Skip to content

Commit 2091818

Browse files
author
Alan Christie
committed
- Adds a Jenkinsfile
1 parent d8f2066 commit 2091818

File tree

1 file changed

+53
-0
lines changed

1 file changed

+53
-0
lines changed

Jenkinsfile

Lines changed: 53 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,53 @@
1+
#!groovy​
2+
3+
pipeline {
4+
5+
// As we may need different flavours of agent,
6+
// the agent definition is deferred to each stage.
7+
agent none
8+
9+
stages {
10+
11+
// --------------------------------------------------------------------
12+
// Python Test
13+
// --------------------------------------------------------------------
14+
15+
stage ('Test') {
16+
17+
agent {
18+
label 'python-slave'
19+
}
20+
21+
steps {
22+
23+
// Crete a Python2 environment and move into it.
24+
sh 'python3.6 -m venv python3'
25+
sh '. python3/bin/activate'
26+
27+
sh 'pip install -r package-requirements.txt'
28+
29+
dir('src/python') {
30+
sh 'coverage run setup.py test'
31+
sh 'coverage report'
32+
sh 'pyroma .'
33+
sh 'python setup.py bdist_wheel'
34+
}
35+
36+
}
37+
38+
}
39+
40+
}
41+
42+
// End-of-pipeline post-processing actions...
43+
post {
44+
45+
failure {
46+
mail to: '[email protected]',
47+
subject: 'Failed PipelineUtils Job',
48+
body: "Something is wrong with the Squonk CI/CD PIPELINES-UTILS build ${env.BUILD_URL}"
49+
}
50+
51+
}
52+
53+
}

0 commit comments

Comments
 (0)