modified
parent
bb60820c42
commit
8bf5b8d81f
|
|
@ -77,11 +77,11 @@
|
||||||
steps{
|
steps{
|
||||||
script {
|
script {
|
||||||
def now = new Date()
|
def now = new Date()
|
||||||
def timestamp = now.format("yyMMdd-HHmm", TimeZone.getTimeZone('UTC'))
|
env.timestamp = now.format("yyMMdd-HHmm", TimeZone.getTimeZone('UTC'))
|
||||||
println timestamp
|
println env.timestamp
|
||||||
def branch = timestamp+"-automatedSLOGeneration"
|
env.branch = env.timestamp+"-automatedSLOGeneration"
|
||||||
dir("/opt/workspace/coco_terraform_config/") {
|
dir("/opt/workspace/coco_terraform_config/") {
|
||||||
sh "git checkout -b \"${branch}\""
|
sh "git checkout -b \"${env.branch}\""
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
@ -124,8 +124,8 @@
|
||||||
script {
|
script {
|
||||||
dir("/opt/workspace/coco_terraform_config/") {
|
dir("/opt/workspace/coco_terraform_config/") {
|
||||||
sh "git add ."
|
sh "git add ."
|
||||||
sh "git commit -m \"${timestamp}\""
|
sh "git commit -m \"${env.timestamp}\""
|
||||||
sh "git push origin ${branch}"
|
sh "git push origin ${env.branch}"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue