Edited Jenkinsfile
这个提交包含在:
父节点
128e9ba59f
当前提交
a06f159dd8
共有 2 个文件被更改,包括 46 次插入 和 15 次删除
16
jenkins/Jenkinsfile
vendored
16
jenkins/Jenkinsfile
vendored
|
|
@ -2,21 +2,12 @@ pipeline {
|
||||||
agent none
|
agent none
|
||||||
stages {
|
stages {
|
||||||
stage('Build') {
|
stage('Build') {
|
||||||
agent {
|
|
||||||
docker {
|
|
||||||
image 'python:2-alpine'
|
|
||||||
}
|
|
||||||
}
|
|
||||||
steps {
|
steps {
|
||||||
sh 'python -m py_compile sources/add2vals.py sources/calc.py'
|
sh 'python -m py_compile sources/add2vals.py sources/calc.py'
|
||||||
|
stash(name: 'compiled-results', includes: 'sources/*.py')
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
stage('Test') {
|
stage('Test') {
|
||||||
agent {
|
|
||||||
docker {
|
|
||||||
image 'qnib/pytest'
|
|
||||||
}
|
|
||||||
}
|
|
||||||
steps {
|
steps {
|
||||||
sh 'py.test --verbose --junit-xml test-reports/results.xml sources/test_calc.py'
|
sh 'py.test --verbose --junit-xml test-reports/results.xml sources/test_calc.py'
|
||||||
}
|
}
|
||||||
|
|
@ -27,11 +18,6 @@ pipeline {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
stage('Deliver') {
|
stage('Deliver') {
|
||||||
agent {
|
|
||||||
docker {
|
|
||||||
image 'cdrx/pyinstaller-linux:python2'
|
|
||||||
}
|
|
||||||
}
|
|
||||||
steps {
|
steps {
|
||||||
sh 'pyinstaller --onefile sources/add2vals.py'
|
sh 'pyinstaller --onefile sources/add2vals.py'
|
||||||
}
|
}
|
||||||
|
|
|
||||||
45
jenkins/Jenkinsfile.save
普通文件
45
jenkins/Jenkinsfile.save
普通文件
|
|
@ -0,0 +1,45 @@
|
||||||
|
pipeline {
|
||||||
|
agent none
|
||||||
|
stages {
|
||||||
|
stage('Build') {
|
||||||
|
agent
|
||||||
|
docker {
|
||||||
|
image 'python:2-alpine'
|
||||||
|
}
|
||||||
|
}
|
||||||
|
steps {
|
||||||
|
sh 'python -m py_compile sources/add2vals.py sources/calc.py'
|
||||||
|
}
|
||||||
|
}
|
||||||
|
stage('Test') {
|
||||||
|
agent {
|
||||||
|
docker {
|
||||||
|
image 'qnib/pytest'
|
||||||
|
}
|
||||||
|
}
|
||||||
|
steps {
|
||||||
|
sh 'py.test --verbose --junit-xml test-reports/results.xml sources/test_calc.py'
|
||||||
|
}
|
||||||
|
post {
|
||||||
|
always {
|
||||||
|
junit 'test-reports/results.xml'
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
stage('Deliver') {
|
||||||
|
agent {
|
||||||
|
docker {
|
||||||
|
image 'cdrx/pyinstaller-linux:python2'
|
||||||
|
}
|
||||||
|
}
|
||||||
|
steps {
|
||||||
|
sh 'pyinstaller --onefile sources/add2vals.py'
|
||||||
|
}
|
||||||
|
post {
|
||||||
|
success {
|
||||||
|
archiveArtifacts 'dist/add2vals'
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
正在加载…
在新工单中引用