mirror of
https://github.com/spring-projects/spring-petclinic.git
synced 2025-07-16 12:55:50 +00:00
jenkinsfile
This commit is contained in:
parent
37ff72eaee
commit
c02878d736
1 changed files with 9 additions and 24 deletions
33
Jenkinsfile
vendored
33
Jenkinsfile
vendored
|
@ -9,9 +9,7 @@ pipeline {
|
||||||
stages {
|
stages {
|
||||||
stage('Setup JFrog CLI') {
|
stage('Setup JFrog CLI') {
|
||||||
steps {
|
steps {
|
||||||
sh '''
|
jf "rt config --server-id-resolve jfrog-local --server-id-deploy jfrog-local --interactive=false"
|
||||||
jfrog rt config --server-id-resolve jfrog-local --server-id-deploy jfrog-local --interactive=false
|
|
||||||
'''
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -23,42 +21,29 @@ pipeline {
|
||||||
|
|
||||||
stage('Build with Maven') {
|
stage('Build with Maven') {
|
||||||
steps {
|
steps {
|
||||||
sh '''
|
sh 'chmod +x mvnw'
|
||||||
chmod +x mvnw
|
jf "mvnc --global --repo-resolve-releases=libs-release-local --repo-resolve-snapshots=libs-snapshot-local"
|
||||||
jf mvnc --global \
|
jf "mvn clean install -DskipTests=true -Denforcer.skip=true"
|
||||||
--repo-resolve-releases=libs-release-local \
|
|
||||||
--repo-resolve-snapshots=libs-snapshot-local
|
|
||||||
|
|
||||||
jf mvn clean install -DskipTests=true -Denforcer.skip=true
|
|
||||||
'''
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
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 '''
|
jf "docker-push localhost:8081/petclinic-docker-dev-local/spring-petclinic:${BUILD_ID} petclinic-docker-dev-local"
|
||||||
jf docker-push \
|
|
||||||
localhost:8081/petclinic-docker-dev-local/spring-petclinic:$BUILD_ID \
|
|
||||||
petclinic-docker-dev-local
|
|
||||||
'''
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
stage('Publish Build Info') {
|
stage('Publish Build Info') {
|
||||||
steps {
|
steps {
|
||||||
sh '''
|
jf "rt build-collect-env"
|
||||||
jf rt build-collect-env
|
jf "rt build-add-git"
|
||||||
jf rt build-add-git
|
jf "rt build-publish"
|
||||||
jf rt build-publish
|
|
||||||
'''
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue