mirror of
https://github.com/spring-projects/spring-petclinic.git
synced 2025-07-18 05:25:50 +00:00
use jenkins file with the nexus id for credentals provider
This commit is contained in:
parent
a9e220b078
commit
48933222a6
1 changed files with 6 additions and 14 deletions
18
Jenkinsfile
vendored
18
Jenkinsfile
vendored
|
@ -1,24 +1,16 @@
|
||||||
pipeline {
|
pipeline {
|
||||||
agent {
|
agent {
|
||||||
docker {
|
docker {
|
||||||
image 'maven:3-alpine'
|
image 'maven:3.5.0'
|
||||||
|
args '-v /usr/share/jenkins/ref/.m2/:/root/.m2/ --network=plumbing_default'
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
stages {
|
stages {
|
||||||
stage ('Build') {
|
stage ('Build') {
|
||||||
steps {
|
steps {
|
||||||
git branch: 'master', url: 'https://github.com/liatrio/spring-petclinic.git'
|
configFileProvider(
|
||||||
sh 'mvn deploy'
|
[configFile(fileId: 'nexus', variable: 'MAVEN_SETTINGS')]) {
|
||||||
}
|
sh 'mvn -s $MAVEN_SETTINGS clean deploy -DskipTests=true'
|
||||||
}
|
|
||||||
stage ('Sonar Analysis') {
|
|
||||||
steps {
|
|
||||||
script {
|
|
||||||
scannerHome = tool 'Sonar'
|
|
||||||
}
|
|
||||||
|
|
||||||
withSonarQubeEnv('Sonar') {
|
|
||||||
sh "${scannerHome}/bin/sonar-scanner"
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue