From 071c415a936b41072933b05badb89fe8c689b557 Mon Sep 17 00:00:00 2001 From: "SLW\\ARNAUA" Date: Thu, 9 Mar 2023 15:23:37 +0100 Subject: [PATCH] modified --- Jenkinsfile | 33 +++++++++++++++++++++++++-------- 1 file changed, 25 insertions(+), 8 deletions(-) diff --git a/Jenkinsfile b/Jenkinsfile index 3d27e63..dd77aa5 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -111,24 +111,41 @@ stage('Execute Script') { steps { - sh "python3 /opt/workspace/coco_apm_slo_yaml2tf/generate.py /opt/workspace/shared_configuration/${params.INPUTFOLDER} /opt/workspace/coco_terraform_config/" + dir("/opt/workspace/coco_apm_slo_yaml2tf/"){ + sh "python3 generate.py /opt/workspace/shared_configuration/${params.INPUTFOLDER} /opt/workspace/coco_terraform_config/" //Only required once CN is not reachable from EMEA //loopEnvironments(environments) + } } } stage('Push Changes') { steps { - script { - dir("/opt/workspace/coco_terraform_config/") { - sh "git status" - sh "git add ." - sh "git commit -m \"${env.timestamp}\"" - sh "git push origin ${env.branch}" - } + withCredentials([gitUsernamePassword(credentialsId: "jaws_dynatrace_bitbuket_user", gitToolName: 'Default')]) { + script { + dir("/opt/workspace/coco_terraform_config/") { + sh "git status" + sh "git add ." + sh "git commit -m \"${env.timestamp}\"" + sh "git push origin ${env.branch}" + } + } } } } + + // stage('Push Changes') { + // steps { + // script { + // dir("/opt/workspace/coco_terraform_config/") { + // sh "git status" + // sh "git add ." + // sh "git commit -m \"${env.timestamp}\"" + // sh "git push origin ${env.branch}" + // } + // } + // } + // } } post {