-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathJenkinsfile
49 lines (48 loc) · 2.27 KB
/
Jenkinsfile
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
pipeline {
agent { label "${env.NODE_LABEL}" }
stages {
stage("checkout") {
steps {
sh "git clone https://github.com/mcellteam/mcell_tools.git || exit 0"
sh "cd mcell_tools || exit 1; git checkout testing_infrastructure || exit 1; git pull || exit 1"
}
}
stage("info") {
steps {
echo "Workspace location: ${env.WORKSPACE}"
sh "ls -l mcell_tools"
}
}
stage("clean") {
steps {
// need to call bash like this because Windows has parentheses .. (x86) in PATH and sh does not handle it
sh '''#!/bin/bash -xe
export PATH=$PATH:/usr/local/bin; cd mcell_tools; python3 run.py --clean
'''
}
}
stage("build") {
steps {
// /usr/local/opt/bison/bin is required for MacOs because an older version is the default there
sh '''#!/bin/bash -xe
export PATH=/usr/local/opt/bison/bin:$PATH:/usr/local/bin; cd mcell_tools; python3 run.py --branch ${TESTED_BRANCH} --update --do-repos --do-build --do-bundle ${EXTRA_BUILD_ARGS}
'''
}
}
stage("test") {
steps {
sh '''#!/bin/bash -xe
export PATH=$PATH:/usr/local/bin; cd mcell_tools; python3 run.py --do-test --store-build ${EXTRA_BUILD_ARGS}
'''
}
}
}
post {
success {
mail subject: "PASSED: MCell test nr. ${env.BUILD_NUMBER} - ${env.NODE_NAME} - ${env.TESTED_BRANCH}", body: "Build: ${env.JOB_NAME} <br>Build Number: ${env.BUILD_NUMBER} <br> URL of build: ${env.BUILD_URL} <br> Branch: ${env.TESTED_BRANCH}", charset: 'UTF-8', from: "[email protected]", mimeType: 'text/html', to: "[email protected]";
}
failure {
mail subject: "FAILED: MCell test nr. ${env.BUILD_NUMBER} - ${env.NODE_NAME} - ${env.TESTED_BRANCH}", body: "Build: ${env.JOB_NAME} <br>Build Number: ${env.BUILD_NUMBER} <br> URL of build: ${env.BUILD_URL} <br> Branch: ${env.TESTED_BRANCH}", charset: 'UTF-8', from: "[email protected]", mimeType: 'text/html', to: "[email protected]";
}
}
}