splitmsa/Jenkinsfile

42 lines
1.3 KiB
Plaintext
Raw Normal View History

pipeline {
2024-07-21 02:52:25 +00:00
agent {
kubernetes {
cloud 'Reslate Systems'
defaultContainer 'conda'
2023-04-20 20:47:52 +00:00
}
2024-07-21 02:52:25 +00:00
}
stages {
stage("install") {
steps {
2024-07-21 02:52:25 +00:00
sh 'conda update conda -y -q'
sh 'conda env update -n base --file environment.yml'
}
}
stage("build") {
steps {
2024-07-21 02:52:25 +00:00
sh "conda run -n base python -m build"
}
}
stage("test") {
steps {
2024-07-21 02:52:25 +00:00
sh "conda run -n base pip install dist/*.whl"
sh "conda run -n base splitmsa -h"
}
}
2023-04-24 14:42:10 +00:00
stage("archive") {
steps {
archiveArtifacts artifacts: 'dist/*.tar.gz, dist/*.whl', fingerprint: true, followSymlinks: false, onlyIfSuccessful: true
2023-04-24 14:42:10 +00:00
}
}
stage("publish") {
when {
branch '**/master'
}
steps {
withCredentials([usernamePassword(credentialsId: 'rs-git-package-registry-ydeng', passwordVariable: 'PASS', usernameVariable: 'USER')]) {
2024-07-21 02:52:25 +00:00
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/*"
}
}
}
}
}