mirror of
https://github.com/spring-projects/spring-petclinic.git
synced 2025-05-17 09:29:37 +00:00
jenmkinsfile
This commit is contained in:
parent
9044ab498c
commit
1af91b4708
1 changed files with 20 additions and 19 deletions
39
Jenkinsfile
vendored
39
Jenkinsfile
vendored
|
@ -10,15 +10,15 @@ pipeline {
|
||||||
JFROG_CREDENTIALS_ID = 'jfrog-saas'
|
JFROG_CREDENTIALS_ID = 'jfrog-saas'
|
||||||
JFROG_CLI_BUILD_NAME = "spring-petclinic"
|
JFROG_CLI_BUILD_NAME = "spring-petclinic"
|
||||||
JFROG_CLI_BUILD_NUMBER = "${BUILD_ID}"
|
JFROG_CLI_BUILD_NUMBER = "${BUILD_ID}"
|
||||||
JF = "${WORKSPACE}/jfrog" // Local CLI path
|
JF = "${WORKSPACE}/jfrog"
|
||||||
}
|
}
|
||||||
stages {
|
stages {
|
||||||
stage('Download JFrog CLI') {
|
stage('Download JFrog CLI') {
|
||||||
steps {
|
steps {
|
||||||
sh '''
|
sh """
|
||||||
curl -fL https://releases.jfrog.io/artifactory/jfrog-cli/v2-jf/2.74.1/jfrog-cli-linux-amd64/jf -o "$JF"
|
curl -fL https://releases.jfrog.io/artifactory/jfrog-cli/v2-jf/2.74.1/jfrog-cli-linux-amd64/jf -o "${JF}"
|
||||||
chmod +x "$JF"
|
chmod +x "${JF}"
|
||||||
'''
|
"""
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -30,7 +30,8 @@ pipeline {
|
||||||
--artifactory-url=${JFROG_URL}/artifactory \
|
--artifactory-url=${JFROG_URL}/artifactory \
|
||||||
--user=${JFROG_USER} \
|
--user=${JFROG_USER} \
|
||||||
--apikey=${JFROG_API_KEY} \
|
--apikey=${JFROG_API_KEY} \
|
||||||
--interactive=false
|
--interactive=false \
|
||||||
|
--overwrite=true
|
||||||
"""
|
"""
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -38,28 +39,28 @@ pipeline {
|
||||||
|
|
||||||
stage('Build Maven') {
|
stage('Build Maven') {
|
||||||
steps {
|
steps {
|
||||||
sh '''
|
sh """
|
||||||
"$JF" mvnc --global \
|
${JF} mvnc --global \
|
||||||
--repo-resolve-releases=${JFROG_REPO_SNAPSHOTS} \
|
--repo-resolve-releases=${JFROG_REPO_SNAPSHOTS} \
|
||||||
--repo-resolve-snapshots=${JFROG_REPO_SNAPSHOTS} \
|
--repo-resolve-snapshots=${JFROG_REPO_SNAPSHOTS} \
|
||||||
--repo-deploy-releases=${JFROG_REPO_RELEASES} \
|
--repo-deploy-releases=${JFROG_REPO_RELEASES} \
|
||||||
--repo-deploy-snapshots=${JFROG_REPO_RELEASES}
|
--repo-deploy-snapshots=${JFROG_REPO_RELEASES}
|
||||||
'''
|
"""
|
||||||
sh '''
|
sh """
|
||||||
"$JF" mvn clean deploy -DskipTests -Dcheckstyle.skip=true \
|
${JF} mvn clean deploy -DskipTests -Dcheckstyle.skip=true \
|
||||||
--build-name="$JFROG_CLI_BUILD_NAME" \
|
--build-name=${JFROG_CLI_BUILD_NAME} \
|
||||||
--build-number="$JFROG_CLI_BUILD_NUMBER"
|
--build-number=${JFROG_CLI_BUILD_NUMBER}
|
||||||
'''
|
"""
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
stage('Publish Build Info') {
|
stage('Publish Build Info') {
|
||||||
steps {
|
steps {
|
||||||
sh '''
|
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