mirror of
https://github.com/spring-projects/spring-petclinic.git
synced 2025-04-24 19:32:48 +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_CLI_BUILD_NAME = "spring-petclinic"
|
||||
JFROG_CLI_BUILD_NUMBER = "${BUILD_ID}"
|
||||
JF = "${WORKSPACE}/jfrog" // Local CLI path
|
||||
JF = "${WORKSPACE}/jfrog"
|
||||
}
|
||||
stages {
|
||||
stage('Download JFrog CLI') {
|
||||
steps {
|
||||
sh '''
|
||||
curl -fL https://releases.jfrog.io/artifactory/jfrog-cli/v2-jf/2.74.1/jfrog-cli-linux-amd64/jf -o "$JF"
|
||||
chmod +x "$JF"
|
||||
'''
|
||||
sh """
|
||||
curl -fL https://releases.jfrog.io/artifactory/jfrog-cli/v2-jf/2.74.1/jfrog-cli-linux-amd64/jf -o "${JF}"
|
||||
chmod +x "${JF}"
|
||||
"""
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -30,7 +30,8 @@ pipeline {
|
|||
--artifactory-url=${JFROG_URL}/artifactory \
|
||||
--user=${JFROG_USER} \
|
||||
--apikey=${JFROG_API_KEY} \
|
||||
--interactive=false
|
||||
--interactive=false \
|
||||
--overwrite=true
|
||||
"""
|
||||
}
|
||||
}
|
||||
|
@ -38,28 +39,28 @@ pipeline {
|
|||
|
||||
stage('Build Maven') {
|
||||
steps {
|
||||
sh '''
|
||||
"$JF" mvnc --global \
|
||||
sh """
|
||||
${JF} mvnc --global \
|
||||
--repo-resolve-releases=${JFROG_REPO_SNAPSHOTS} \
|
||||
--repo-resolve-snapshots=${JFROG_REPO_SNAPSHOTS} \
|
||||
--repo-deploy-releases=${JFROG_REPO_RELEASES} \
|
||||
--repo-deploy-snapshots=${JFROG_REPO_RELEASES}
|
||||
'''
|
||||
sh '''
|
||||
"$JF" mvn clean deploy -DskipTests -Dcheckstyle.skip=true \
|
||||
--build-name="$JFROG_CLI_BUILD_NAME" \
|
||||
--build-number="$JFROG_CLI_BUILD_NUMBER"
|
||||
'''
|
||||
"""
|
||||
sh """
|
||||
${JF} mvn clean deploy -DskipTests -Dcheckstyle.skip=true \
|
||||
--build-name=${JFROG_CLI_BUILD_NAME} \
|
||||
--build-number=${JFROG_CLI_BUILD_NUMBER}
|
||||
"""
|
||||
}
|
||||
}
|
||||
|
||||
stage('Publish Build Info') {
|
||||
steps {
|
||||
sh '''
|
||||
"$JF" rt build-collect-env
|
||||
"$JF" rt build-add-git
|
||||
"$JF" rt build-publish
|
||||
'''
|
||||
sh """
|
||||
${JF} rt build-collect-env
|
||||
${JF} rt build-add-git
|
||||
${JF} rt build-publish
|
||||
"""
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue