Jenkins pipeline now updates version before queueing.

Undid previous version increment to account change in order of operation.
This commit is contained in:
Harrison Deng 2022-01-10 05:02:03 -06:00
parent 01c36ad550
commit 88ed1c6bc8
2 changed files with 12 additions and 12 deletions

22
Jenkinsfile vendored
View File

@ -19,6 +19,17 @@ pipeline {
sh 'git reset --hard' sh 'git reset --hard'
} }
} }
stage('update') {
steps {
load './server_ver.groovy'
sh 'git checkout delta'
sh 'sed -i "s/env.VER_PATCH=$VER_PATCH/env.VER_PATCH=$((VER_PATCH + 1))/" ./server_ver.groovy'
sh 'git commit -am "Updated version number for next patch."'
sshagent(['2e60e630-b240-4c78-87ce-cb2c33d70180']) {
sh 'git push origin delta'
}
}
}
stage('queue') { stage('queue') {
steps { steps {
load './server_ver.groovy' load './server_ver.groovy'
@ -40,16 +51,5 @@ pipeline {
} }
} }
} }
stage('update') {
steps {
load './server_ver.groovy'
sh 'git checkout delta'
sh 'sed -i "s/env.VER_PATCH=$VER_PATCH/env.VER_PATCH=$((VER_PATCH + 1))/" ./server_ver.groovy'
sh 'git commit -am "Updated version number for next patch."'
sshagent(['2e60e630-b240-4c78-87ce-cb2c33d70180']) {
sh 'git push origin delta'
}
}
}
} }
} }

View File

@ -1,3 +1,3 @@
env.VER_MAJOR=0 env.VER_MAJOR=0
env.VER_MINOR=0 env.VER_MINOR=0
env.VER_PATCH=10 env.VER_PATCH=9