csvbyname/Jenkinsfile

42 lines
1.3 KiB
Plaintext
Raw Normal View History

2023-04-21 11:03:28 -05:00
pipeline {
2024-11-14 20:48:06 +00:00
agent {
kubernetes {
cloud 'rsys-devel'
defaultContainer 'pip'
inheritFrom 'pip'
2023-04-21 11:03:28 -05:00
}
2024-11-14 20:48:06 +00:00
}
stages {
2023-04-21 11:03:28 -05:00
stage("install") {
steps {
2024-11-14 20:48:06 +00:00
sh 'pip install -r requirements.txt'
2023-04-21 11:03:28 -05:00
}
}
stage("build") {
steps {
sh "python -m build"
}
}
stage("test installation") {
2023-04-21 11:03:28 -05:00
steps {
sh "pip install dist/*.whl"
sh "csvbyname -h"
2023-04-21 11:03:28 -05:00
}
}
stage("archive") {
steps {
archiveArtifacts artifacts: 'dist/*.tar.gz, dist/*.whl', fingerprint: true, followSymlinks: false, onlyIfSuccessful: true
}
}
stage("publish package") {
2023-04-21 11:03:28 -05:00
when {
branch '**/main'
2023-04-21 11:03:28 -05:00
}
steps {
2024-11-14 20:48:06 +00:00
withCredentials([usernamePassword(credentialsId: '4d6f64be-d26d-4f95-8de3-b6a9b0beb311', passwordVariable: 'PASS', usernameVariable: 'USER')]) {
2023-04-21 11:03:28 -05:00
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/*"
}
}
}
}
}