-
Notifications
You must be signed in to change notification settings - Fork 7
/
Copy pathstarter.sh
executable file
·51 lines (42 loc) · 1.28 KB
/
starter.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
#!/bin/bash
agentstarted=
if test -z "$SSH_AUTH_SOCK"; then
sudo killall --older-than 8h ssh-agent 2>&1 > /dev/null
eval `ssh-agent` > /dev/null
for key in ~/.ssh/id_rsa ~/.ssh/id_ed25519 ~/.ssh/id_deploy; do
if test -f $key; then
ssh-add $key
fi
done
agentstarted=1
fi
"$DOCKER" run -v $HOME/.ssh:/root/.ssh arangodb/ssh-client ssh -o StrictHostKeyChecking=no -T [email protected]
"$DOCKER" run \
-e "PDOCKER=`getent group docker | cut -d: -f3`" \
-e "PGID=`id -g`" \
-e "PHOME=$HOME" \
-e "PPWD=`pwd`" \
-e "PUID=`id -u`" \
-e "SSH_AUTH_SOCK=$SSH_AUTH_SOCK" \
\
-e "ARANGODB_BRANCH=$ARANGODB_BRANCH" \
-e "BASE_VERSION=$BASE_VERSION" \
-e "EDITION=$EDITION" \
-e "ENTERPRISE_BRANCH=$ENTERPRISE_BRANCH" \
-e "NODE_NAME=$NODE_NAME" \
-e "OSKAR_BRANCH=$OSKAR_BRANCH" \
-e "STORAGE_ENGINE=$STORAGE_ENGINE" \
-e "TEST_SUITE=$TEST_SUITE" \
\
-v "$HOME:$HOME" \
-v "$SSH_AUTH_SOCK:$SSH_AUTH_SOCK" \
-v "/var/run/docker.sock:/var/run/docker.sock" \
-v "/mnt/buildfiles:/mnt/buildfiles" \
arangodb/oskar $*
result=$?
if test -n "$agentstarted"; then
ssh-agent -k > /dev/null
unset -v SSH_AUTH_SOCK
unset -v SSH_AGENT_PID
fi
exit $result