diff --git a/Jenkinsfile b/Jenkinsfile index 75f0eeb..4ce938a 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -75,12 +75,14 @@ stage('Checkout Branch') { steps{ - def now = new Date() - def timestamp = now.format("yyMMdd.HHmm", TimeZone.getTimeZone('UTC')) - def branch = timestamp+"-automatedSLOGeneration" - dir("/opt/workspace/coco_terraform_config/") { - sh 'git checkout -b "${branch}"' + step { + def now = new Date() + def timestamp = now.format("yyMMdd.HHmm", TimeZone.getTimeZone('UTC')) + def branch = timestamp+"-automatedSLOGeneration" + dir("/opt/workspace/coco_terraform_config/") { + sh 'git checkout -b "${branch}"' } + } } }