mirror of
https://github.com/spring-projects/spring-petclinic.git
synced 2025-07-21 15:25:49 +00:00
Update Jenkinsfile
This commit is contained in:
parent
48ec6fbe36
commit
d470462bb3
1 changed files with 4 additions and 4 deletions
8
Jenkinsfile
vendored
8
Jenkinsfile
vendored
|
@ -53,27 +53,27 @@ pipeline {
|
|||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
stage ('Push Docker Image to ECR') {
|
||||
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}:${BUILD_NUMBER}").push()
|
||||
docker.image("${ECR_DOCKER_IMAGE}:${BUILD_NUMBER}").push()
|
||||
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 \"until=1h\""
|
||||
}
|
||||
}
|
||||
*/
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue