Added test installation and archiving stages to 'Jenkinsfile'
All checks were successful
ydeng/renamebycsv/pipeline/head This commit looks good
All checks were successful
ydeng/renamebycsv/pipeline/head This commit looks good
This commit is contained in:
parent
efe4855297
commit
e95f5b5ac9
23
Jenkinsfile
vendored
23
Jenkinsfile
vendored
@ -1,10 +1,15 @@
|
|||||||
pipeline {
|
pipeline {
|
||||||
agent any
|
agent any
|
||||||
stages {
|
stages {
|
||||||
|
stage("clean") {
|
||||||
|
steps {
|
||||||
|
sh 'rm -rf ./dist/*'
|
||||||
|
}
|
||||||
|
}
|
||||||
stage("install") {
|
stage("install") {
|
||||||
steps {
|
steps {
|
||||||
sh 'conda env update --file environment.yml'
|
sh 'mamba env update --file environment.yml'
|
||||||
sh 'echo "conda activate renamebycsv" >> ~/.bashrc'
|
sh 'echo "mamba activate renamebycsv" >> ~/.bashrc'
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
stage("build") {
|
stage("build") {
|
||||||
@ -12,9 +17,19 @@ pipeline {
|
|||||||
sh "python -m build"
|
sh "python -m build"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
stage("publish") {
|
stage("test") {
|
||||||
|
steps {
|
||||||
|
sh "pip install dist/*.whl"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
stage("archive") {
|
||||||
|
steps {
|
||||||
|
archiveArtifacts artifacts: 'dist/*.tar.gz, dist/*.whl'
|
||||||
|
}
|
||||||
|
}
|
||||||
|
stage("publish package") {
|
||||||
when {
|
when {
|
||||||
branch '**/master'
|
branch '**/main'
|
||||||
}
|
}
|
||||||
steps {
|
steps {
|
||||||
withCredentials([usernamePassword(credentialsId: 'rs-git-package-registry-ydeng', passwordVariable: 'PASS', usernameVariable: 'USER')]) {
|
withCredentials([usernamePassword(credentialsId: 'rs-git-package-registry-ydeng', passwordVariable: 'PASS', usernameVariable: 'USER')]) {
|
||||||
|
Loading…
Reference in New Issue
Block a user