File tree Expand file tree Collapse file tree 1 file changed +44
-0
lines changed Expand file tree Collapse file tree 1 file changed +44
-0
lines changed Original file line number Diff line number Diff line change 1+ pipeline {
2+ agent {
3+ dockerfile {
4+ label ' kube'
5+ }
6+ }
7+
8+ environment {
9+ ARTIFACTORY_CREDS = credentials(' artifactory-service-account' )
10+ ARTIFACTORY_URL = " https://jfrog.nonprod.pge.com/artifactory/api/pypi/arad-pypi-combined"
11+ }
12+
13+ stages {
14+ stage(' Lint' ) {
15+ steps {
16+ sh ' mkdir -p reports'
17+ sh ' flake8 --tee --output-file reports/pep8.log'
18+ }
19+ }
20+
21+ stage(' Test' ) {
22+ steps {
23+ sh ' mkdir -p reports'
24+ sh ' py.test --cov=. --cov-report xml:./reports/coverage.xml'
25+ }
26+ }
27+
28+ stage(' Deploy' ) {
29+ when { anyOf { tag ' release-*' } }
30+ steps {
31+ configFileProvider([configFile(fileId : ' artifactory-ssl-certificate' , targetLocation : ' artifactory.pem' )]) {
32+ sh ' python setup.py sdist'
33+ sh ' twine upload --repository-url ${ARTIFACTORY_URL} -p ${ARTIFACTORY_CREDS_PSW} -u ${ARTIFACTORY_CREDS_USR} --cert ./artifactory.pem dist/*'
34+ }
35+ }
36+ }
37+ }
38+ post {
39+ always {
40+ cobertura coberturaReportFile : ' **/coverage.xml'
41+ recordIssues tool : flake8(pattern : ' reports/pep8.log' ), failedTotalAll : 1 , enabledForFailure : true
42+ }
43+ }
44+ }
You can’t perform that action at this time.
0 commit comments