2023-04-08 05:36:11 -05:00
|
|
|
pipeline {
|
|
|
|
agent any
|
|
|
|
stages {
|
|
|
|
stage("install") {
|
|
|
|
steps {
|
2023-05-03 08:37:35 -05:00
|
|
|
sh 'mamba env update --file environment.yml --prefix ./env || mamba env create --force --file environment.yml --prefix ./env'
|
2023-04-08 05:36:11 -05:00
|
|
|
}
|
|
|
|
}
|
|
|
|
stage("build") {
|
|
|
|
steps {
|
2023-05-03 08:37:35 -05:00
|
|
|
sh 'rm -rf ./dist/*'
|
2023-04-08 05:36:11 -05:00
|
|
|
sh "python -m build"
|
|
|
|
}
|
|
|
|
}
|
2023-04-21 11:23:56 -05:00
|
|
|
stage("test") {
|
|
|
|
steps {
|
2023-04-24 12:25:55 -05:00
|
|
|
sh "pip install dist/*.whl --force-reinstall"
|
2023-04-22 16:37:03 -05:00
|
|
|
sh "renamebycsv -h"
|
2023-04-21 11:23:56 -05:00
|
|
|
}
|
|
|
|
}
|
|
|
|
stage("archive") {
|
|
|
|
steps {
|
2023-05-03 08:37:35 -05:00
|
|
|
archiveArtifacts artifacts: 'dist/*.tar.gz, dist/*.whl', fingerprint: true, followSymlinks: false, onlyIfSuccessful: true
|
2023-04-21 11:23:56 -05:00
|
|
|
}
|
|
|
|
}
|
|
|
|
stage("publish package") {
|
2023-09-11 20:52:34 +00:00
|
|
|
environment {
|
|
|
|
CREDS = credentials('rs-git-package-registry-ydeng')
|
|
|
|
}
|
2023-04-08 13:14:45 -05:00
|
|
|
when {
|
2023-04-21 11:34:21 -05:00
|
|
|
branch '**/master'
|
2023-04-08 13:14:45 -05:00
|
|
|
}
|
2023-04-08 05:36:11 -05:00
|
|
|
steps {
|
2023-09-11 20:52:34 +00:00
|
|
|
sh returnStatus: true, script: 'python -m twine upload --repository-url https://git.reslate.systems/api/packages/${CREDS_USR}/pypi -u ${CREDS_USR} -p ${CREDS_PSW} --non-interactive --disable-progress-bar --verbose dist/*'
|
2023-04-08 05:36:11 -05:00
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|