-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathJenkinsfile
72 lines (71 loc) · 2.42 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
66
67
68
69
70
71
72
pipeline {
agent none
options {
skipStagesAfterUnstable()
}
stages {
stage('Build Environment') {
agent {label 'CI-W10-Agent'}
environment {
CONDA_DLL_SEARCH_MODIFICATION_ENABLE=1
}
steps {
bat """set PATH=%PATH%;C:\\Windows\\System32\\downlevel;'
call conda env create
call activate GIS-Helper
call conda info -a
call yes | pip install -r requirements.txt"""
}
post {
failure {
bat 'conda env remove -y --name GIS-Helper'
bat 'rmdir /Q /S c:\\Users\\Ross\\miniconda3\\envs\\GIS-Helper' // Make sure environment is fully gone
cleanWs()
}
}
}
stage('Test') {
agent {label 'CI-W10-Agent'}
environment {
CONDA_DLL_SEARCH_MODIFICATION_ENABLE=1
}
steps {
bat """call activate GIS-Helper
call conda env list
call pytest --cov=. --cov-report xml --junitxml results.xml"""
}
//post {
// failure {
// bat 'conda env remove -y --name GIS-Helper'
// bat 'rmdir /Q /S c:\\Users\\Ross\\miniconda3\\envs\\GIS-Helper' // Make sure environment is fully gone
// cleanWs()
// }
//}
}
stage('Deliver') {
agent {label 'CI-W10-Agent'}
environment {
CONDA_DLL_SEARCH_MODIFICATION_ENABLE=1
}
steps {
bat """call activate GIS-Helper
call conda info --envs
call pyinstaller --onefile gh-release.spec"""
}
post {
success {
archiveArtifacts 'dist/gh/**'
}
always {
junit 'results.xml'
cobertura coberturaReportFile: 'coverage.xml'
}
cleanup {
bat 'conda env remove -y --name GIS-Helper'
bat 'rmdir /Q /S c:\\Users\\Ross\\miniconda3\\envs\\GIS-Helper' // Make sure environment is fully gone
cleanWs()
}
}
}
}
}