modified
parent
aa88b3daf3
commit
1010765b54
|
|
@ -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}'
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue