splitmsa/Jenkinsfile
Harrison Deng 2f49699a23
Some checks reported errors
ydeng/splitmsa/pipeline/head Something is wrong with the build of this commit
Loosened version requirements for twine.
2024-07-21 04:01:36 +00:00

42 lines
1.3 KiB
Groovy

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'
}
}
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/*'
}
}
}
}
}