2023-04-11 17:33:52 +00:00
|
|
|
pipeline {
|
|
|
|
agent any
|
|
|
|
stages {
|
2023-04-20 20:47:52 +00:00
|
|
|
stage("clean") {
|
|
|
|
steps {
|
|
|
|
sh 'rm -rf ./dist/*'
|
|
|
|
}
|
|
|
|
}
|
2023-04-11 17:33:52 +00:00
|
|
|
stage("install") {
|
|
|
|
steps {
|
2023-04-11 18:00:04 +00:00
|
|
|
sh 'mamba env update --file environment.yml'
|
|
|
|
sh 'echo "mamba activate splitmsa" >> ~/.bashrc'
|
2023-04-11 17:33:52 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
stage("build") {
|
|
|
|
steps {
|
|
|
|
sh "python -m build"
|
|
|
|
}
|
|
|
|
}
|
2023-04-20 20:25:55 +00:00
|
|
|
stage("test") {
|
|
|
|
steps {
|
|
|
|
sh "pip install dist/*.whl"
|
2023-04-24 14:32:25 +00:00
|
|
|
sh "splitmsa -h"
|
2023-04-20 20:25:55 +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')]) {
|
|
|
|
sh "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/*"
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|