-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathJenkinsfile
65 lines (55 loc) · 1.56 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
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
#!groovy
//loading https://code.sbb.ch/projects/KD_WZU/repos/wzu-pipeline-helper
@Library('python-pipeline-helper') _
library identifier: 'python-helper@master',
retriever: modernSCM(
[$class : 'GitSCMSource',
credentialsId: 'fsosebuild',
remote : 'ssh://git@code.sbb.ch:7999/kd_esta_blueprints/esta-python-helper.git'])
pipeline {
agent { label 'java' }
tools {
maven 'Apache Maven 3.3'
jdk 'Oracle JDK 1.8 64-Bit'
}
stages {
stage('Install & Unit Tests'){
steps {
tox_conda_wrapper(
JENKINS_CLOSURE: {
sh """
# set -e
# set -x
# set -o pipefail
# set up shell for conda
# conda init bash
# source ~/.bashrc
# pip config set global.extra-index-url https://bin.sbb.ch/artifactory/api/pypi/simba.pypi/simple
# conda env create --file environment.yml --force
# conda activate synpop
# pytest --junitxml results.xml
"""
// junit '*.xml'
}
)
}
}
stage('When on develop, do nothing') {
when {
branch 'develop'
}
steps {
sh 'ls'
}
}
stage('When on master, Release: Adapt poms, tag, deploy and push.') {
when {
branch 'master'
}
steps {
releasePython()
releasePythonToArtifactory()
}
}
}
}