splitmsa/Jenkinsfile

31 lines
970 B
Plaintext
Raw Normal View History

pipeline {
agent any
stages {
stage("install") {
steps {
2023-04-11 18:00:04 +00:00
sh 'mamba env update --file environment.yml'
sh 'echo "mamba activate splitmsa" >> ~/.bashrc'
}
}
stage("build") {
steps {
sh "python -m build"
}
}
stage("test") {
steps {
sh "pip install dist/*.whl"
}
}
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/*"
}
}
}
}
}