-
Notifications
You must be signed in to change notification settings - Fork 1
/
jenkins-script.sh
executable file
·62 lines (48 loc) · 1.65 KB
/
jenkins-script.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
#!/bin/sh
# Pass local or testttolshed as arguments
TARGET="${1^^}"
echo "Setting up planemo, if not installed"
if [ ! -f "get-pip.py" ]
then
echo "Installing pip, virtualenv"
wget https://raw.github.com/pypa/pip/master/contrib/get-pip.py
python get-pip.py --user
export PATH=~/.local/bin:$PATH
pip install --user virtualenv
virtualenv venv --no-site-packages
fi
export PATH=~/.local/bin:$PATH
. venv/bin/activate
pip install --upgrade planemo
planemo --version
echo "Setting up jenkins test script and retrieving API keys"
if [ ! -d "jenkins-testing/" ]
then
git clone https://github.com/mvdbeek/jenkins-testing.git
fi
if [ ! -d "lab-coding/" ]
then
hg clone https://mvdbeek:${bitbucket_pw}@bitbucket.org/mvdbeek/lab-coding
fi
cd lab-coding
hg pull -u https://mvdbeek:${bitbucket_pw}@bitbucket.org/mvdbeek/lab-coding
cd ../
cd jenkins-testing
git pull && git checkout
echo "Starting job"
#Local toolshed test
if [ "$TARGET" == "LOCAL" ];
then
python ./test-repo.py shed_test --tool_dirs ${WORKSPACE}/packages ${WORKSPACE}/tools \
--report_dir ${WORKSPACE}/reports --build_number ${BUILD_NUMBER} --cores 4 \
--api_keys ${WORKSPACE}/lab-coding/api_keys/api_keys.yaml --shed_target https://lbcd41.snv.jussieu.fr/toolshed/ \
${SKIP_TEST}
elif [ "$TARGET" == "TESTTOOLSHED" ];
then
python ./test-repo.py shed_test --tool_dirs ${WORKSPACE}/packages ${WORKSPACE}/tools \
--report_dir ${WORKSPACE}/reports --build_number ${BUILD_NUMBER} --cores 4 \
--api_keys ${WORKSPACE}/lab-coding/api_keys/api_keys.yaml --shed_target testtoolshed \
${SKIP_TEST}
else
echo "Choose local or testtoolshed"
fi