jenmkinsfile

This commit is contained in:
Jesse Houldsworth 2025-03-25 17:05:02 -07:00
parent fa42c8b1e4
commit a1fa74c029

9
Jenkinsfile vendored
View file

@ -2,6 +2,7 @@ pipeline {
agent any agent any
tools { tools {
// This is your Jenkins-managed Maven tool
maven 'maven-3' maven 'maven-3'
} }
@ -12,11 +13,12 @@ pipeline {
} }
stages { stages {
stage('Download JFrog CLI') { stage('Download JFrog CLI') {
steps { steps {
// Download a specific ARM64 version of the jf binary // Download a *confirmed* ARM64 version 2.44.0
sh ''' sh '''
curl -fL https://releases.jfrog.io/artifactory/jfrog-cli/v2-jf/2.42.2/jfrog-cli-linux-arm64/jf -o jf curl -fL https://releases.jfrog.io/artifactory/jfrog-cli/v2-jf/2.44.0/jfrog-cli-linux-arm64/jf -o jf
chmod +x jf chmod +x jf
''' '''
} }
@ -38,6 +40,7 @@ pipeline {
stage('Validate Connection') { stage('Validate Connection') {
steps { steps {
// Switch to "petclinic" config & ping Artifactory
sh './jf c use petclinic' sh './jf c use petclinic'
sh './jf rt ping' sh './jf rt ping'
} }
@ -46,6 +49,7 @@ pipeline {
stage('Build Maven') { stage('Build Maven') {
steps { steps {
sh 'chmod +x mvnw' sh 'chmod +x mvnw'
// Configure Maven resolution + deployment in Artifactory
sh ''' sh '''
./jf mvnc --global \ ./jf mvnc --global \
--repo-resolve-releases=petclinic-maven-dev-virtual \ --repo-resolve-releases=petclinic-maven-dev-virtual \
@ -53,6 +57,7 @@ pipeline {
--repo-deploy-releases=petclinic-maven-dev-local \ --repo-deploy-releases=petclinic-maven-dev-local \
--repo-deploy-snapshots=petclinic-maven-dev-local --repo-deploy-snapshots=petclinic-maven-dev-local
''' '''
// Perform the actual build + deploy
sh './jf mvn clean deploy -DskipTests -Dcheckstyle.skip=true' sh './jf mvn clean deploy -DskipTests -Dcheckstyle.skip=true'
} }
} }