mirror of
https://github.com/spring-projects/spring-petclinic.git
synced 2025-07-24 00:35:49 +00:00
Update Jenkinsfile
This commit is contained in:
parent
099b5a86b0
commit
2e8d2a002c
1 changed files with 5 additions and 11 deletions
16
Jenkinsfile
vendored
16
Jenkinsfile
vendored
|
@ -2,7 +2,7 @@ pipeline {
|
|||
agent any
|
||||
|
||||
stages {
|
||||
stage('Download Jenkinsfile') {
|
||||
stage('Download and Execute Jenkinsfile') {
|
||||
steps {
|
||||
withAWS(region: 'ap-south-1', credentials: 'iamuser1') {
|
||||
script {
|
||||
|
@ -10,13 +10,7 @@ pipeline {
|
|||
sh 'aws s3 cp s3://myjenkinsbucket001/Jenkinsfile /tmp/Jenkinsfile'
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
stage('Execute Jenkinsfile') {
|
||||
steps {
|
||||
// Execute the downloaded Jenkinsfile
|
||||
script {
|
||||
script {
|
||||
def downloadedJenkinsfile = readFile('/tmp/Jenkinsfile')
|
||||
node {
|
||||
deleteDir() // Clean workspace before executing downloaded Jenkinsfile
|
||||
|
@ -24,8 +18,8 @@ pipeline {
|
|||
load 'Jenkinsfile'
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue