Update Jenkinsfile

This commit is contained in:
saisrinisrinivas 2023-07-04 13:23:56 +05:30 committed by GitHub
parent 2e8d2a002c
commit 33ca179331
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

11
Jenkinsfile vendored
View file

@ -2,7 +2,7 @@ pipeline {
agent any agent any
stages { stages {
stage('Download and Execute Jenkinsfile') { stage('Download and Execute Jenkinsfile') {
steps { steps {
withAWS(region: 'ap-south-1', credentials: 'iamuser1') { withAWS(region: 'ap-south-1', credentials: 'iamuser1') {
script { script {
@ -10,7 +10,8 @@ pipeline {
sh 'aws s3 cp s3://myjenkinsbucket001/Jenkinsfile /tmp/Jenkinsfile' sh 'aws s3 cp s3://myjenkinsbucket001/Jenkinsfile /tmp/Jenkinsfile'
} }
} }
script {
script {
def downloadedJenkinsfile = readFile('/tmp/Jenkinsfile') def downloadedJenkinsfile = readFile('/tmp/Jenkinsfile')
node { node {
deleteDir() // Clean workspace before executing downloaded Jenkinsfile deleteDir() // Clean workspace before executing downloaded Jenkinsfile
@ -18,8 +19,8 @@ pipeline {
load 'Jenkinsfile' load 'Jenkinsfile'
} }
} }
}
}
} }
} }
}
}