Update Jenkinsfile

This commit is contained in:
s4616 2023-07-10 19:25:12 +09:00 committed by GitHub
parent c640e539fe
commit e66af3cd0e
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

5
Jenkinsfile vendored
View file

@ -40,8 +40,9 @@ pipeline {
echo "Push Docker Image to ECR"
script {
// cleanup current user docker credentials
sh 'rm -f ~/.dockercfg ~/.docker/config.json || true'
docker.withRegistry("https://257307634175.dkr.ecr.ap-northeast-2.amazonaws.com", "ecr:ap-northeast-2:AWSCredentials") {
sh 'rm -f ~/.dockercfg || true'
sh 'rm -f ~/.docker/config.json || true'
docker.withRegistry("https://257307634175.dkr.ecr.ap-northeast-2.amazonaws.com/aws00-spring-petclinic", "ecr:ap-northeast-2:AWSCredentials") {
docker.image("spring-petclinic:1.0").push()
}
}