2023-04-21 17:21:41 +00:00
|
|
|
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 filterfasta" >> ~/.bashrc'
|
|
|
|
}
|
|
|
|
}
|
|
|
|
stage("build") {
|
|
|
|
steps {
|
|
|
|
sh "python -m build"
|
|
|
|
}
|
|
|
|
}
|
|
|
|
stage("test") {
|
|
|
|
steps {
|
|
|
|
sh "pip install dist/*.whl"
|
2023-04-24 14:45:47 +00:00
|
|
|
sh "filterfasta -h"
|
|
|
|
}
|
|
|
|
}
|
|
|
|
stage("archive") {
|
|
|
|
steps {
|
|
|
|
archiveArtifacts artifacts: 'dist/*.tar.gz, dist/*.whl'
|
2023-04-21 17:21:41 +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/*"
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|