From d98801dd6612f6d0cf83afa8dca104e77fe296e6 Mon Sep 17 00:00:00 2001 From: Harrison Date: Wed, 3 May 2023 08:37:35 -0500 Subject: [PATCH] Updated pipeline to use latest build container image features --- Jenkinsfile | 11 +++-------- environment.yml | 3 ++- 2 files changed, 5 insertions(+), 9 deletions(-) diff --git a/Jenkinsfile b/Jenkinsfile index 9e76c23..6a0a2c7 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -1,19 +1,14 @@ pipeline { agent any stages { - stage("clean") { - steps { - sh 'rm -rf ./dist/*' - } - } stage("install") { steps { - sh 'mamba env update --file environment.yml' - sh 'echo "mamba activate renamebycsv" >> ~/.bashrc' + sh 'mamba env update --file environment.yml --prefix ./env || mamba env create --force --file environment.yml --prefix ./env' } } stage("build") { steps { + sh 'rm -rf ./dist/*' sh "python -m build" } } @@ -25,7 +20,7 @@ pipeline { } stage("archive") { steps { - archiveArtifacts artifacts: 'dist/*.tar.gz, dist/*.whl' + archiveArtifacts artifacts: 'dist/*.tar.gz, dist/*.whl', fingerprint: true, followSymlinks: false, onlyIfSuccessful: true } } stage("publish package") { diff --git a/environment.yml b/environment.yml index 8e4e936..c080028 100644 --- a/environment.yml +++ b/environment.yml @@ -8,4 +8,5 @@ dependencies: - python=3.11 - setuptools=67.6 - twine=4.0 - - cryptography=38.0.4 \ No newline at end of file + - cryptography=38.0.4 +prefix: ./env \ No newline at end of file