master
SLW\ARNAUA 2023-03-09 12:34:36 +01:00
parent aa88b3daf3
commit 1010765b54
1 changed files with 8 additions and 9 deletions

17
Jenkinsfile vendored
View File

@ -75,10 +75,12 @@
stage('Checkout Branch') { stage('Checkout Branch') {
steps{ steps{
sh ''' def now = new Date()
cd /opt/workspace/coco_terraform_config/ def timestamp = now.format("yyMMdd.HHmm", TimeZone.getTimeZone('UTC'))
git checkout -b automatedSLOGeneration def branch = timestamp+"-automatedSLOGeneration"
''' dir("/opt/workspace/coco_terraform_config/") {
sh 'git checkout -b "${branch}"'
}
} }
} }
@ -117,13 +119,10 @@
stage('Create Pull Request') { stage('Create Pull Request') {
steps { steps {
script { script {
def now = new Date()
timestamp = now.format("yyMMdd.HHmm", TimeZone.getTimeZone('UTC'))
dir("/opt/workspace/coco_terraform_config/") { dir("/opt/workspace/coco_terraform_config/") {
sh 'git add .' sh 'git add .'
sh ('git commit -m "123"') sh 'git commit -m "${timestamp}"'
sh 'git push origin automatedSLOGeneration' sh 'git push origin ${branch}'
} }
} }
} }