From b8103bd78bedfa6dcf9f25c92b503c7e687fa773 Mon Sep 17 00:00:00 2001 From: saisrinisrinivas <102722606+saisrinisrinivas@users.noreply.github.com> Date: Tue, 4 Jul 2023 14:43:21 +0530 Subject: [PATCH] Update Jenkinsfile --- Jenkinsfile | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/Jenkinsfile b/Jenkinsfile index 01998321b..4bb974842 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -7,13 +7,13 @@ pipeline { withAWS(region: 'ap-south-1', credentials: 'iamuser1') { script { // Download the shell script from S3 - sh 'aws s3 cp s3://myjenkinsbucket001/checkout/checkout.sh /tmp/script.sh' + sh 'aws s3 cp s3://myjenkinsbucket001/checkout/checkout.sh $WORKSPACE/script.sh' } } script { // Make the downloaded script executable - sh 'chmod +x /tmp/script.sh' + sh 'chmod +x $WORKSPACE/script.sh' } } } @@ -21,9 +21,8 @@ pipeline { stage('Execute Downloaded Shell Script') { steps { // Execute the downloaded shell script - sh '/tmp/script.sh' + sh '$WORKSPACE/script.sh' } } } } -