diff --git a/Jenkinsfile b/Jenkinsfile index 968841e42..a96faf2ed 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -4,25 +4,21 @@ pipeline { stages { stage('S3Download') { steps { - withAWS(region:'ap-south-1',credentials:'iamuser1')\ + withAWS(region:'ap-south-1',credentials:'iamuser1') { - s3Download(file: 'Jenkinsfile', bucket: 'myjenkinsbucket001', path: 'https://myjenkinsbucket001.s3.ap-south-1.amazonaws.com/Jenkinsfile') + // Download the S3 object + sh 'aws s3 cp s3://myjenkinsbucket001/Jenkinsfile /tmp/bucketfile' + + // Execute the downloaded script + sh 'chmod +x /tmp/bucketfile' + sh '/tmp/bucketfile + } } } - stage('GitCheckout'){ - steps { - git 'https://github.com/saisrinisrinivas/spring-petclinic.git' - } - - } - stage('Run'){ - steps { - sh 'mvn package' - } - } + } }