Update Jenkinsfile

This commit is contained in:
lwj9812 2024-03-15 15:23:04 +09:00 committed by GitHub
parent edc876d62a
commit a200b45770
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

24
Jenkinsfile vendored
View file

@ -53,7 +53,29 @@ 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'){
}
}
}