mirror of
https://github.com/spring-projects/spring-petclinic.git
synced 2025-07-21 23:35:50 +00:00
Update Jenkinsfile
This commit is contained in:
parent
edc876d62a
commit
a200b45770
1 changed files with 23 additions and 1 deletions
22
Jenkinsfile
vendored
22
Jenkinsfile
vendored
|
@ -54,6 +54,28 @@ pipeline {
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
stage ('Docker Image Build'){
|
||||||
|
steps {
|
||||||
|
echo "Push Docker Image to ECR"
|
||||||
|
script {
|
||||||
|
sh 'rm -f ~/.dockercfg~/.docker/config.json || true'
|
||||||
|
docker.withRegistry("http://${ECR_REPOSITORY}", "ecr"${REGION}:${AWS_CREDENTIAL_NAME}") {
|
||||||
|
docker.image("${ECR_DOCKER_IMAGE}:latest").push()
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
stage('Clean Up Docker Images on Jenkins Server'){
|
||||||
|
steps {
|
||||||
|
echo 'Cleaning up unused Docker images on Jenkins server'
|
||||||
|
sh "docker image prune -f --all --filter \"nutil=1h\""
|
||||||
|
}
|
||||||
|
}
|
||||||
|
stage('Upload to S3'){
|
||||||
|
|
||||||
|
}
|
||||||
|
stage('Codedeploy Workload'){
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue