2023-04-11 17:33:52 +00:00
|
|
|
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
|
|
|
}
|
2023-04-11 17:33:52 +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'
|
2023-04-11 17:33:52 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
stage("build") {
|
|
|
|
steps {
|
2024-07-21 02:52:25 +00:00
|
|
|
sh "conda run -n base python -m build"
|
2023-04-11 17:33:52 +00:00
|
|
|
}
|
|
|
|
}
|
2023-04-20 20:25:55 +00:00
|
|
|
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-20 20:25:55 +00:00
|
|
|
}
|
|
|
|
}
|
2023-04-24 14:42:10 +00:00
|
|
|
stage("archive") {
|
|
|
|
steps {
|
2023-05-03 13:39:45 +00:00
|
|
|
archiveArtifacts artifacts: 'dist/*.tar.gz, dist/*.whl', fingerprint: true, followSymlinks: false, onlyIfSuccessful: true
|
2023-04-24 14:42:10 +00:00
|
|
|
}
|
|
|
|
}
|
2023-04-11 17:33:52 +00:00
|
|
|
stage("publish") {
|
|
|
|
when {
|
|
|
|
branch '**/master'
|
|
|
|
}
|
|
|
|
steps {
|
|
|
|
withCredentials([usernamePassword(credentialsId: 'rs-git-package-registry-ydeng', passwordVariable: 'PASS', usernameVariable: 'USER')]) {
|
2024-07-21 04:01:36 +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/*'
|
2023-04-11 17:33:52 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|