Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
31 changes: 31 additions & 0 deletions Jenkinsfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
pipeline {
agent any
stages {
stage('Build') {
steps {
sh 'python -m py_compile sources/add2vals.py sources/calc.py'
stash(name: 'compiled-results', includes: 'sources/*.py*')
}
}
stage('Test') {
steps {
sh 'py.test --junit-xml test-reports/results.xml sources/test_calc.py'
}
post {
always {
junit 'test-reports/results.xml'
}
}
}
stage('Deliver') {
steps {
sh "pyinstaller --onefile sources/add2vals.py"
}
post {
success {
archiveArtifacts 'dist/add2vals'
}
}
}
}
}
3 changes: 3 additions & 0 deletions sources/add2vals.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
'''
A simple command line tool that takes 2 values and adds them together using
the calc.py library's 'add2' function.


Mudanças feita por Marbel
'''

import sys
Expand Down