From f41e0fa8137e5de593090558bc84b45b7c560875 Mon Sep 17 00:00:00 2001 From: Pol Feliu <> Date: Mon, 23 Dec 2024 09:04:52 +0100 Subject: [PATCH] migrate to publish to distext via ssh --- Jenkinsfile | 43 ++++++++++++++++++++++++++----------------- 1 file changed, 26 insertions(+), 17 deletions(-) diff --git a/Jenkinsfile b/Jenkinsfile index 210cf792..f9618153 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -123,6 +123,8 @@ pipeline { stage('Build wheels') { steps { bat "py -${DEFAULT_PYTHON_VERSION} -m tox -e build" + stash includes: 'dist\\*', name: 'build' + archiveArtifacts artifacts: "dist\\*" } } stage('Make a static type analysis') { @@ -138,6 +140,10 @@ pipeline { stage('Generate documentation') { steps { bat "py -${DEFAULT_PYTHON_VERSION} -m tox -e docs" + bat """ + "C:\\Program Files\\7-Zip\\7z.exe" a -r docs.zip -w _docs -mem=AES256 + """ + stash includes: 'docs.zip', name: 'docs' } } stage("Run unit tests") { @@ -179,33 +185,36 @@ pipeline { } } } - stage('Archive') { - steps { - bat """ - "C:\\Program Files\\7-Zip\\7z.exe" a -r docs.zip -w _docs -mem=AES256 - """ - stash includes: 'dist\\*, docs.zip', name: 'publish_files' - archiveArtifacts artifacts: "dist\\*, docs.zip" - } - } } } - stage('Publish ingeniamotion') { - when { + stage('Publish documentation') { + /* when { beforeAgent true branch BRANCH_NAME_MASTER + } */ + agent { + label "worker" + } + steps { + unstash 'docs' + unzip zipFile: 'docs.zip', dir: '.' + // publishDistExt("_docs", DISTEXT_PROJECT_DIR, false) } + } + stage('Publish to pypi') { + /*when { + beforeAgent true + branch BRANCH_NAME_MASTER + }*/ agent { docker { - label "worker" - image "ingeniacontainers.azurecr.io/publisher:1.8" + label 'worker' + image PUBLISHER_DOCKER_IMAGE } } steps { - unstash 'publish_files' - unzip zipFile: 'docs.zip', dir: '.' - publishDistExt("_docs", DISTEXT_PROJECT_DIR, false) - publishPyPi("dist/*") + unstash 'build' + // publishPyPi("dist/*") } } }