splitmsa/Jenkinsfile
Harrison 0cc3539280
All checks were successful
ydeng/splitmsa/pipeline/head This commit looks good
Added clean stage to 'Jenkinsfile'.
2023-04-20 15:47:52 -05:00

36 lines
1.1 KiB
Groovy

pipeline {
agent any
stages {
stage("clean") {
steps {
sh 'rm -rf ./dist/*'
}
}
stage("install") {
steps {
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/*"
}
}
}
}
}