diff --git a/Jenkinsfile b/Jenkinsfile new file mode 100644 index 000000000..570d77f74 --- /dev/null +++ b/Jenkinsfile @@ -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' + } + } + } + } +} diff --git a/sources/add2vals.py b/sources/add2vals.py index d671e38ea..19da48349 100644 --- a/sources/add2vals.py +++ b/sources/add2vals.py @@ -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