mirror of
https://github.com/spring-projects/spring-petclinic.git
synced 2025-07-27 09:25:49 +00:00
jenkinsfile one
This commit is contained in:
parent
0901f0a42a
commit
aed2c3f028
1 changed files with 35 additions and 0 deletions
35
precommit/Jenkinsfile
vendored
Normal file
35
precommit/Jenkinsfile
vendored
Normal file
|
@ -0,0 +1,35 @@
|
||||||
|
pipeline {
|
||||||
|
agent any
|
||||||
|
environment {
|
||||||
|
|
||||||
|
}
|
||||||
|
triggers {
|
||||||
|
//polls repo every 2 hours from 10am to 19pm on weekdays for changes
|
||||||
|
pollSCM('H H(10-19)/2 * * 1-5')
|
||||||
|
}
|
||||||
|
options {
|
||||||
|
//reduces dick I/O, may result in losing data
|
||||||
|
durabilityHint('PERFORMANCE_OPTIMIZED')
|
||||||
|
}
|
||||||
|
stages {
|
||||||
|
stage('pull') {
|
||||||
|
steps {
|
||||||
|
git branch: "main",
|
||||||
|
credentialsId: 'azima-git-ssh',
|
||||||
|
url: 'git://github.com/VSAzima/spring-petclinic'
|
||||||
|
}
|
||||||
|
}
|
||||||
|
stage('build') {
|
||||||
|
steps {
|
||||||
|
script {
|
||||||
|
withCredentials([file(credentialsId: 'ngx', variable: 'ROOT_CERT'),file(credentialsId:'m2', variable: 'SETTINGS')]) {
|
||||||
|
docker.image('maven:3.8.1-jdk-8').inside("-u root --network=jenkins_default") {
|
||||||
|
sh 'cp $ROOT_CERT /usr/local/share/ca-certificates/ && update-ca-certificates && cp $SETTINGS /root/.m2'
|
||||||
|
sh 'mvn -B clean package'
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
Loading…
Reference in a new issue