mirror of
https://github.com/spring-projects/spring-petclinic.git
synced 2025-07-15 12:25:50 +00:00
jenkinsfile
This commit is contained in:
parent
3f3d898dae
commit
37ff72eaee
1 changed files with 11 additions and 7 deletions
18
Jenkinsfile
vendored
18
Jenkinsfile
vendored
|
@ -9,7 +9,9 @@ pipeline {
|
||||||
stages {
|
stages {
|
||||||
stage('Setup JFrog CLI') {
|
stage('Setup JFrog CLI') {
|
||||||
steps {
|
steps {
|
||||||
jfrog rt config --server-id-resolve jfrog-local --server-id-deploy jfrog-local
|
sh '''
|
||||||
|
jfrog rt config --server-id-resolve jfrog-local --server-id-deploy jfrog-local --interactive=false
|
||||||
|
'''
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -22,9 +24,11 @@ pipeline {
|
||||||
stage('Build with Maven') {
|
stage('Build with Maven') {
|
||||||
steps {
|
steps {
|
||||||
sh '''
|
sh '''
|
||||||
|
chmod +x mvnw
|
||||||
jf mvnc --global \
|
jf mvnc --global \
|
||||||
--repo-resolve-releases=libs-release-local \
|
--repo-resolve-releases=libs-release-local \
|
||||||
--repo-resolve-snapshots=libs-snapshot-local
|
--repo-resolve-snapshots=libs-snapshot-local
|
||||||
|
|
||||||
jf mvn clean install -DskipTests=true -Denforcer.skip=true
|
jf mvn clean install -DskipTests=true -Denforcer.skip=true
|
||||||
'''
|
'''
|
||||||
}
|
}
|
||||||
|
@ -32,19 +36,19 @@ pipeline {
|
||||||
|
|
||||||
stage('Build Docker Image') {
|
stage('Build Docker Image') {
|
||||||
steps {
|
steps {
|
||||||
sh """
|
sh '''
|
||||||
docker build -t localhost:8081/petclinic-docker-dev-local/spring-petclinic:${BUILD_ID} .
|
docker build -t localhost:8081/petclinic-docker-dev-local/spring-petclinic:$BUILD_ID .
|
||||||
"""
|
'''
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
stage('Push Docker Image') {
|
stage('Push Docker Image') {
|
||||||
steps {
|
steps {
|
||||||
sh """
|
sh '''
|
||||||
jf docker-push \
|
jf docker-push \
|
||||||
localhost:8081/petclinic-docker-dev-local/spring-petclinic:${BUILD_ID} \
|
localhost:8081/petclinic-docker-dev-local/spring-petclinic:$BUILD_ID \
|
||||||
petclinic-docker-dev-local
|
petclinic-docker-dev-local
|
||||||
"""
|
'''
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue