2022-01-08 20:23:08 +00:00
|
|
|
pipeline {
|
|
|
|
agent any
|
|
|
|
stages {
|
|
|
|
stage('setup') {
|
|
|
|
steps {
|
|
|
|
sh 'git checkout delta'
|
|
|
|
sh 'git reset --hard origin/delta'
|
|
|
|
sshagent(['2e60e630-b240-4c78-87ce-cb2c33d70180']) {
|
|
|
|
sh 'git fetch --prune --prune-tags'
|
|
|
|
sh 'git pull --force origin delta'
|
|
|
|
}
|
|
|
|
sh 'git clean -fd'
|
|
|
|
}
|
|
|
|
}
|
2022-01-09 06:04:25 +00:00
|
|
|
stage('test') {
|
2022-01-08 20:23:08 +00:00
|
|
|
steps {
|
|
|
|
sh './testrun.sh'
|
|
|
|
logParser failBuildOnError: true, projectRulePath: 'Jenkinsparse', parsingRulesPath: 'Jenkinsparse', showGraphs: true, unstableOnWarning: true, useProjectRule: true
|
|
|
|
sh 'git reset --hard'
|
|
|
|
}
|
|
|
|
}
|
2022-01-10 11:02:03 +00:00
|
|
|
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'
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
2022-01-09 06:04:25 +00:00
|
|
|
stage('queue') {
|
2022-01-08 20:23:08 +00:00
|
|
|
steps {
|
|
|
|
load './server_ver.groovy'
|
|
|
|
sh 'git checkout master'
|
|
|
|
|
|
|
|
sh 'git reset --hard origin/master'
|
|
|
|
sshagent(['2e60e630-b240-4c78-87ce-cb2c33d70180']) {
|
|
|
|
sh 'git fetch --prune --prune-tags'
|
|
|
|
sh 'git pull --force origin master'
|
|
|
|
}
|
|
|
|
sh 'git clean -fd'
|
|
|
|
|
|
|
|
sh 'git merge --strategy-option theirs --no-commit origin/delta'
|
|
|
|
sh 'git tag -a "L$VER_MAJOR.$VER_MINOR.$VER_PATCH" -m "Automatic publish performed by Jenkins."'
|
|
|
|
sh 'git commit -am "Automatically merged delta branch to master." || exit 0'
|
|
|
|
sshagent(['2e60e630-b240-4c78-87ce-cb2c33d70180']) {
|
|
|
|
sh 'git push origin master'
|
2022-01-09 07:07:17 +00:00
|
|
|
sh 'git push origin --tags'
|
2022-01-08 20:23:08 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|