splitmsa/Jenkinsfile
Harrison Deng 5b037d556e
All checks were successful
ydeng/splitmsa/pipeline/head This commit looks good
Merge branch 'master' into develop
2024-07-21 04:03:50 +00:00

42 lines
1.4 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', 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 returnStatus: true, script: '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/*'
}
}
}
}
}