From d9f8662a2a0f261f5ebfad00d2b8f78c5de9184e Mon Sep 17 00:00:00 2001 From: s4616 <87678241+s4616@users.noreply.github.com> Date: Mon, 10 Jul 2023 18:41:47 +0900 Subject: [PATCH] Create Jenkinsfile --- Jenkinsfile | 59 +++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 59 insertions(+) create mode 100644 Jenkinsfile diff --git a/Jenkinsfile b/Jenkinsfile new file mode 100644 index 000000000..194a93626 --- /dev/null +++ b/Jenkinsfile @@ -0,0 +1,59 @@ +pipeline { + agent any + tools { + maven 'M3' + jdk 'JDK11' + } + stages { + stage('Git clone') { + steps { + git url: 'https://github.com/s4616/spring-petclinic.git', branch: 'efficient-webjars', credentialsId: 'admin' + } + post { + success { + echo 'success clone project' + } + failure { + error 'fail clone project' // exit pipeline + } + } + } + + stage ('mvn Build') { + steps { + sh 'mvn -Dmaven.test.failure.ignore=true install' + } + post { + success { + junit '**/target/surefire-reports/TEST-*.xml' + } + } + } + + stage ('Docker Build') { + steps { + dir("${env.WORKSPACE}") { + sh 'docker build -t spring-perclinic:1.0 .' + } + } + } + + stage('Push Docker Image') { + steps { + echo "Push Docker Image to ECR" + } + } + stage('Upload to S3') { + steps { + echo "Upload to S3" + } + } + } + + stage('Codedeploy Workload') { + steps { + echo "create application" + } + } + } +}