-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathssh_util.sh
executable file
·67 lines (66 loc) · 2.24 KB
/
ssh_util.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
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
#!/bin/bash
SCRIPT_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" >/dev/null 2>&1 && pwd )"
BRANCH=$1
host=$(hostname)
echo "running on **** $HOSTNAME ****"
ret_code=0
if [[ $2 == graham_full ]]; then
cd $(realpath /project/6002326/C3G/projects/jenkins_tests)
bash ./cleanup_old
$SCRIPT_DIR/integration_tests.sh -b ${BRANCH} -l
ret_code=$?
scancel $USER
elif [[ $2 == graham_update ]]; then
latest=$(ls -d $(realpath /project/6002326/C3G/projects/jenkins_tests/*${BRANCH}*) | sort | tail -n1)
cd ${latest}/genpipes
git pull
cd ../..
$SCRIPT_DIR/integration_tests.sh -u -d ${latest}/genpipes ${latest}/scriptTestOutputs
ret_code=$?
scancel $USER
elif [[ $2 == cedar_full ]]; then
cd $(realpath /project/6007512/C3G/projects/jenkins_tests)
bash ./cleanup_old
$SCRIPT_DIR/integration_tests.sh -b ${BRANCH} -l
ret_code=$?
scancel $USER
elif [[ $2 == cedar_update ]]; then
latest=$(ls -d $(realpath /project/6007512/C3G/projects/jenkins_tests/*${BRANCH}*) | sort | tail -n1)
cd ${latest}/genpipes
git pull
cd ../..
$SCRIPT_DIR/integration_tests.sh -u -d ${latest}/genpipes ${latest}/scriptTestOutputs
ret_code=$?
scancel $USER
elif [[ $2 == narval_full ]]; then
# beluga FS mounted on narval
cd $(realpath /lustre03/project/6007512/C3G/projects/jenkins_tests)
bash ./cleanup_old
$SCRIPT_DIR/integration_tests.sh -b ${BRANCH}
ret_code=$?
scancel $USER
elif [[ $2 == narval_update ]]; then
# beluga FS mounted on narval
latest=$(ls -d $(realpath /lustre03/project/6007512/C3G/projects/jenkins_tests/*${BRANCH}*) | sort | tail -n1)
cd ${latest}/genpipes
git pull
cd ../..
$SCRIPT_DIR/integration_tests.sh -u -d ${latest}/genpipes ${latest}/scriptTestOutputs
ret_code=$?
scancel $USER
elif [[ $2 == beluga_full ]]; then
cd $(realpath /lustre03/project/6007512/C3G/projects/jenkins_tests)
bash ./cleanup_old
$SCRIPT_DIR/integration_tests.sh -b ${BRANCH}
ret_code=$?
scancel $USER
elif [[ $2 == beluga_update ]]; then
latest=$(ls -d $(realpath /lustre03/project/6007512/C3G/projects/jenkins_tests/*${BRANCH}*) | sort | tail -n1)
cd ${latest}/genpipes
git pull
cd ../..
$SCRIPT_DIR/integration_tests.sh -u -v -d ${latest}/genpipes ${latest}/scriptTestOutputs
ret_code=$?
scancel $USER
fi
exit $ret_code