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
72cd1612fa
commit
8f921bd568
1 changed files with 13 additions and 11 deletions
24
Jenkinsfile
vendored
24
Jenkinsfile
vendored
|
@ -1,13 +1,5 @@
|
||||||
pipeline {
|
pipeline {
|
||||||
agent any
|
agent any
|
||||||
tools {
|
|
||||||
jdk "jdk17"
|
|
||||||
maven "M3"
|
|
||||||
}
|
|
||||||
|
|
||||||
environment {
|
|
||||||
AWS_CREDENTIAL_NAME = "AWSCredentials"pipeline {
|
|
||||||
agent any
|
|
||||||
|
|
||||||
tools {
|
tools {
|
||||||
jdk "jdk17"
|
jdk "jdk17"
|
||||||
|
@ -17,7 +9,7 @@ pipeline {
|
||||||
environment {
|
environment {
|
||||||
AWS_CREDENTIAL_NAME = "AWSCredentials"
|
AWS_CREDENTIAL_NAME = "AWSCredentials"
|
||||||
REGION = "ap-northeast-2"
|
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_REPOSITORY = "257307634175.dkr.ecr.ap-northeast-2.amazonaws.com"
|
||||||
ECR_DOCKER_IMAGE = "${ECR_REPOSITORY}/${DOCKER_IMAGE_NAME}"
|
ECR_DOCKER_IMAGE = "${ECR_REPOSITORY}/${DOCKER_IMAGE_NAME}"
|
||||||
}
|
}
|
||||||
|
@ -26,7 +18,7 @@ pipeline {
|
||||||
stage('Git Clone') {
|
stage('Git Clone') {
|
||||||
steps {
|
steps {
|
||||||
echo 'Git Clone'
|
echo 'Git Clone'
|
||||||
git url: 'https://github.com/lwj9812/spring-petclinic.git',
|
git url: 'https://github.com/sjh4616/spring-petclinic.git',
|
||||||
branch: 'efficient-webjars'
|
branch: 'efficient-webjars'
|
||||||
}
|
}
|
||||||
post {
|
post {
|
||||||
|
@ -89,7 +81,7 @@ pipeline {
|
||||||
dir("${env.WORKSPACE}") {
|
dir("${env.WORKSPACE}") {
|
||||||
sh 'zip -r deploy.zip ./deploy appspec.yaml'
|
sh 'zip -r deploy.zip ./deploy appspec.yaml'
|
||||||
withAWS(region:"${REGION}", credentials: "${AWS_CREDENTIAL_NAME}"){
|
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'
|
sh 'rm -rf ./deploy.zip'
|
||||||
}
|
}
|
||||||
|
@ -97,5 +89,15 @@ pipeline {
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue