pipeline { agent { kubernetes { cloud 'Reslate Systems' defaultContainer 'conda' } } stages { stage("install") { steps { sh 'conda update conda -y -q' sh 'conda env update -n base --file environment.yml' } } stage("build") { steps { sh "conda run -n base python -m build" } } stage("test") { steps { sh "conda run -n base pip install dist/*.whl" sh "conda run -n base splitmsa -h" } } stage("archive") { steps { archiveArtifacts artifacts: 'dist/*.tar.gz, dist/*.whl', fingerprint: true, followSymlinks: false, onlyIfSuccessful: true } } stage("publish") { when { branch '**/master' } steps { withCredentials([usernamePassword(credentialsId: 'rs-git-package-registry-ydeng', passwordVariable: 'PASS', usernameVariable: 'USER')]) { sh 'conda run -n base python -m twine upload --repository-url https://git.reslate.systems/api/packages/${USER}/pypi -u ${USER} -p ${PASS} --non-interactive --disable-progress-bar --verbose dist/*' } } } } }