mirror of
https://github.com/spring-projects/spring-petclinic.git
synced 2025-07-19 14:05:50 +00:00
pruned jenkinsfile
This commit is contained in:
parent
519d34e671
commit
0015a2e4c1
1 changed files with 1 additions and 35 deletions
|
@ -1,7 +1,5 @@
|
|||
#!/bin/env groovy
|
||||
|
||||
@Library('ldop-shared-library@fd16602cad0f97ca1b04090f93a0540ddc871b45') _
|
||||
|
||||
pipeline {
|
||||
agent none
|
||||
|
||||
|
@ -18,38 +16,9 @@ pipeline {
|
|||
}
|
||||
}
|
||||
steps {
|
||||
configFileProvider([configFile(fileId: 'nexus', variable: 'MAVEN_SETTINGS')]) {
|
||||
sh 'mvn -s $MAVEN_SETTINGS clean deploy -DskipTests=true -B'
|
||||
}
|
||||
}
|
||||
}
|
||||
stage('Sonar') {
|
||||
agent {
|
||||
docker {
|
||||
image 'sebp/sonar-runner'
|
||||
args '-e SONAR_ACCOUNT_LOGIN -e SONAR_ACCOUNT_PASSWORD -e SONAR_DB_URL -e SONAR_DB_LOGIN -e SONAR_DB_PASSWORD --network=${LDOP_NETWORK_NAME}'
|
||||
}
|
||||
}
|
||||
steps {
|
||||
sh '/opt/sonar-runner-2.4/bin/sonar-runner -e -D sonar.login=${SONAR_ACCOUNT_LOGIN} -D sonar.password=${SONAR_ACCOUNT_PASSWORD} -D sonar.jdbc.url=${SONAR_DB_URL} -D sonar.jdbc.username=${SONAR_DB_LOGIN} -D sonar.jdbc.password=${SONAR_DB_PASSWORD}'
|
||||
}
|
||||
}
|
||||
stage('Get Artifact') {
|
||||
agent {
|
||||
docker {
|
||||
image 'maven:3.5.0'
|
||||
args '-e INITIAL_ADMIN_USER -e INITIAL_ADMIN_PASSWORD --network=${LDOP_NETWORK_NAME}'
|
||||
}
|
||||
}
|
||||
steps {
|
||||
sh 'mvn clean'
|
||||
script {
|
||||
pom = readMavenPom file: 'pom.xml'
|
||||
getArtifact(pom.groupId, pom.artifactId, pom.version, 'petclinic')
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
stage('Build container') {
|
||||
agent any
|
||||
steps {
|
||||
|
@ -64,20 +33,17 @@ pipeline {
|
|||
}
|
||||
}
|
||||
}
|
||||
|
||||
stage('Run local container') {
|
||||
agent any
|
||||
steps {
|
||||
sh 'docker rm -f petclinic-tomcat-temp || true'
|
||||
sh "docker run -d --network=${LDOP_NETWORK_NAME} --name petclinic-tomcat-temp ${env.IMAGE}:${TAG}"
|
||||
sh "docker run -d -p 9966:8080 --name petclinic-tomcat-temp ${env.IMAGE}:${TAG}"
|
||||
}
|
||||
}
|
||||
|
||||
stage('Smoke-Test & OWASP Security Scan') {
|
||||
agent {
|
||||
docker {
|
||||
image 'maven:3.5.0'
|
||||
args '--network=${LDOP_NETWORK_NAME}'
|
||||
}
|
||||
}
|
||||
steps {
|
||||
|
|
Loading…
Reference in a new issue