@@ -24,22 +24,21 @@ pipeline {
2424 stages {
2525 stage(' Cleanup' ) {
2626 steps {
27- sh ' rm -rf dist build docs/_build '
27+ sh ' rm -rf dist build'
2828 }
2929 }
3030 stage(' Build documentation' ) {
3131 steps {
32- sh ' pip install -e .' // required for python_training_project.version
33- sh ' cd docs && pipenv run make html'
32+ sh ' ./tools/build-docs.sh'
3433 archiveArtifacts(
35- artifacts : ' docs/_build /html/**' ,
34+ artifacts : ' build /html/**' ,
3635 onlyIfSuccessful : true
3736 )
3837 publishHTML([
3938 allowMissing : false ,
4039 alwaysLinkToLastBuild : false ,
4140 keepAll : false ,
42- reportDir : ' docs/_build /html/' ,
41+ reportDir : ' build /html/' ,
4342 reportFiles : ' index.html' ,
4443 reportName : ' Documentation' ,
4544 reportTitles : ' ' ,
@@ -49,23 +48,17 @@ pipeline {
4948 }
5049 stage(' Build Python package' ) {
5150 steps {
52- sh ' python -m build --wheel '
51+ sh ' ./tools/ build-package.sh '
5352 archiveArtifacts(
54- artifacts : ' dist/**/* .whl' ,
53+ artifacts : ' dist/*.whl' ,
5554 onlyIfSuccessful : true
5655 )
5756 }
5857 }
5958 stage(' Static code analysis' ) {
6059 steps {
61- warnError(' flake8 issues found' ) {
62- sh ' flake8 src/python_training_project --format=pylint > flake8.log'
63- }
64- warnError(' pylint issues found' ) {
65- sh ' pylint src/python_training_project --msg-template="{path}:{line}: [{msg_id}, {obj}] {msg} ({symbol})" > pylint.log'
66- }
67- warnError(' mypy issues found' ) {
68- sh ' mypy src/python_training_project > mypy.log'
60+ warnError(' lint issues found' ) {
61+ sh ' ./tools/lint-package.sh'
6962 }
7063 recordIssues(
7164 sourceCodeRetention : ' LAST_BUILD' ,
@@ -76,24 +69,23 @@ pipeline {
7669 lowTags : ' HACK' ,
7770 normalTags : ' TODO'
7871 ),
79- flake8(pattern : ' flake8.log ' ),
80- pyLint(pattern : ' pylint.log ' ),
81- myPy(pattern : ' mypy.log ' )
72+ flake8(pattern : ' build/ flake8.txt ' ),
73+ pyLint(pattern : ' build/ pylint.txt ' ),
74+ myPy(pattern : ' build/ mypy.txt ' )
8275 ]
8376 )
8477 }
8578 }
8679 stage(' Test Python package' ) {
8780 steps {
88- sh ' pip install -e .'
89- sh ' pytest'
81+ sh ' ./tools/test-package.sh'
9082 junit(
91- testResults : ' report.xml'
83+ testResults : ' build/test- report.xml'
9284 )
9385 recordCoverage(
9486 tools : [
95- [parser : ' JUNIT' , pattern : ' report.xml' ],
96- [parser : ' COBERTURA' , pattern : ' coverage.xml' ]
87+ [parser : ' JUNIT' , pattern : ' build/test- report.xml' ],
88+ [parser : ' COBERTURA' , pattern : ' build/test- coverage.xml' ]
9789 ]
9890 )
9991 }
0 commit comments