renamebycsv/Jenkinsfile

37 lines
1.3 KiB
Plaintext
Raw Normal View History

2023-04-08 10:36:11 +00:00
pipeline {
agent any
stages {
stage("install") {
steps {
sh 'mamba env update --file environment.yml --prefix ./env || mamba env create --force --file environment.yml --prefix ./env'
2023-04-08 10:36:11 +00:00
}
}
stage("build") {
steps {
sh 'rm -rf ./dist/*'
2023-04-08 10:36:11 +00:00
sh "python -m build"
}
}
stage("test") {
steps {
2023-04-24 17:25:55 +00:00
sh "pip install dist/*.whl --force-reinstall"
2023-04-22 21:37:03 +00:00
sh "renamebycsv -h"
}
}
stage("archive") {
steps {
archiveArtifacts artifacts: 'dist/*.tar.gz, dist/*.whl', fingerprint: true, followSymlinks: false, onlyIfSuccessful: true
}
}
stage("publish package") {
when {
branch '**/master'
}
2023-04-08 10:36:11 +00:00
steps {
withCredentials([usernamePassword(credentialsId: 'rs-git-package-registry-ydeng', passwordVariable: 'PASS', usernameVariable: 'USER')]) {
sh returnStatus: true, script: '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-08 10:45:31 +00:00
}
2023-04-08 10:36:11 +00:00
}
}
}
}