Create Jenkinsfile

This commit is contained in:
s4616 2023-07-10 18:41:47 +09:00 committed by GitHub
parent beb408b7a4
commit d9f8662a2a
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

59
Jenkinsfile vendored Normal file
View file

@ -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"
}
}
}
}