Update Jenkinsfile

This commit is contained in:
lwj9812 2024-03-22 12:09:00 +09:00 committed by GitHub
parent 72cd1612fa
commit 8f921bd568
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

24
Jenkinsfile vendored
View file

@ -1,12 +1,4 @@
pipeline {
agent any
tools {
jdk "jdk17"
maven "M3"
}
environment {
AWS_CREDENTIAL_NAME = "AWSCredentials"pipeline {
agent any
tools {
@ -17,7 +9,7 @@ pipeline {
environment {
AWS_CREDENTIAL_NAME = "AWSCredentials"
REGION = "ap-northeast-2"
DOCKER_IMAGE_NAME="std01-spring-petclinic"
DOCKER_IMAGE_NAME="std00-spring-petclinic"
ECR_REPOSITORY = "257307634175.dkr.ecr.ap-northeast-2.amazonaws.com"
ECR_DOCKER_IMAGE = "${ECR_REPOSITORY}/${DOCKER_IMAGE_NAME}"
}
@ -26,7 +18,7 @@ pipeline {
stage('Git Clone') {
steps {
echo 'Git Clone'
git url: 'https://github.com/lwj9812/spring-petclinic.git',
git url: 'https://github.com/sjh4616/spring-petclinic.git',
branch: 'efficient-webjars'
}
post {
@ -89,7 +81,7 @@ pipeline {
dir("${env.WORKSPACE}") {
sh 'zip -r deploy.zip ./deploy appspec.yaml'
withAWS(region:"${REGION}", credentials: "${AWS_CREDENTIAL_NAME}"){
s3Upload(file:"deploy.zip", bucket:"std01-codedeploy-bucket")
s3Upload(file:"deploy.zip", bucket:"std00-codedeploy-bucket")
}
sh 'rm -rf ./deploy.zip'
}
@ -97,5 +89,15 @@ pipeline {
}
}
}