Skip to content
Snippets Groups Projects
Commit d4becc5e authored by OZGCloud's avatar OZGCloud
Browse files

Merge pull request 'new jenkins build agent' (#79) from new-build-agent into master

parents b0042d9e 664103f0
Branches
Tags
No related merge requests found
pipeline { pipeline {
agent { agent {
node { node {
label 'jenkins-quarkus-build-agent' label 'ozgcloud-jenkins-build-agent'
} }
} }
...@@ -63,7 +63,7 @@ pipeline { ...@@ -63,7 +63,7 @@ pipeline {
} }
configFileProvider([configFile(fileId: 'maven-settings', variable: 'MAVEN_SETTINGS')]) { configFileProvider([configFile(fileId: 'maven-settings', variable: 'MAVEN_SETTINGS')]) {
sh './mvnw -pl user-manager-interface -s $MAVEN_SETTINGS clean deploy -Dmaven.wagon.http.retryHandler.count=3' sh 'mvn -pl user-manager-interface -s $MAVEN_SETTINGS clean deploy -Dmaven.wagon.http.retryHandler.count=3'
} }
} }
} }
...@@ -74,7 +74,7 @@ pipeline { ...@@ -74,7 +74,7 @@ pipeline {
FAILED_STAGE=env.STAGE_NAME FAILED_STAGE=env.STAGE_NAME
configFileProvider([configFile(fileId: 'maven-settings', variable: 'MAVEN_SETTINGS')]) { configFileProvider([configFile(fileId: 'maven-settings', variable: 'MAVEN_SETTINGS')]) {
sh './mvnw -pl user-manager-server -s $MAVEN_SETTINGS clean deploy -Dmaven.wagon.http.retryHandler.count=3' sh 'mvn -pl user-manager-server -s $MAVEN_SETTINGS clean deploy -Dmaven.wagon.http.retryHandler.count=3'
junit testResults: '**/target/surefire-reports/*.xml', skipPublishingChecks: true junit testResults: '**/target/surefire-reports/*.xml', skipPublishingChecks: true
} }
} }
...@@ -88,7 +88,7 @@ pipeline { ...@@ -88,7 +88,7 @@ pipeline {
withCredentials([usernamePassword(credentialsId: 'jenkins-nexus-login', usernameVariable: 'USER', passwordVariable: 'PASSWORD')]) { withCredentials([usernamePassword(credentialsId: 'jenkins-nexus-login', usernameVariable: 'USER', passwordVariable: 'PASSWORD')]) {
configFileProvider([configFile(fileId: 'maven-settings', variable: 'MAVEN_SETTINGS')]) { configFileProvider([configFile(fileId: 'maven-settings', variable: 'MAVEN_SETTINGS')]) {
sh './mvnw -pl user-manager-server -s $MAVEN_SETTINGS clean verify -Pnative -Dquarkus.container-image.registry=docker.ozg-sh.de -Dquarkus.container-image.username=${USER} -Dquarkus.container-image.password=${PASSWORD} -Dquarkus.container-image.push=true -Dquarkus.container-image.build=true -Dquarkus.native.remote-container-build=true -Dmaven.wagon.http.retryHandler.count=3' sh 'mvn -pl user-manager-server -s $MAVEN_SETTINGS clean verify -Pnative -Dquarkus.container-image.registry=docker.ozg-sh.de -Dquarkus.container-image.username=${USER} -Dquarkus.container-image.password=${PASSWORD} -Dquarkus.container-image.push=true -Dquarkus.container-image.build=true -Dquarkus.native.remote-container-build=true -Dmaven.wagon.http.retryHandler.count=3'
} }
} }
} }
...@@ -96,9 +96,6 @@ pipeline { ...@@ -96,9 +96,6 @@ pipeline {
} }
stage ('OWASP Dependency-Check Vulnerabilities') { stage ('OWASP Dependency-Check Vulnerabilities') {
when {
branch 'master'
}
steps { steps {
dependencyCheck additionalArguments: ''' dependencyCheck additionalArguments: '''
-o "./" -o "./"
...@@ -107,6 +104,7 @@ pipeline { ...@@ -107,6 +104,7 @@ pipeline {
-d /dependency-check-data -d /dependency-check-data
--suppression dependency-check-supressions.xml --suppression dependency-check-supressions.xml
--disableKnownExploited --disableKnownExploited
--noupdate
--disableArchive --disableArchive
--prettyPrint''', odcInstallation: 'dependency-check-owasp' --prettyPrint''', odcInstallation: 'dependency-check-owasp'
...@@ -126,7 +124,7 @@ pipeline { ...@@ -126,7 +124,7 @@ pipeline {
dir('user-manager-server') { dir('user-manager-server') {
try { try {
withSonarQubeEnv('sonarqube-ozg-sh'){ withSonarQubeEnv('sonarqube-ozg-sh'){
sh "./mvnw -s $MAVEN_SETTINGS package sonar:sonar -Dsonar.coverage.jacoco.xmlReportPaths=${env.WORKSPACE}/user-manager-server/target/jacoco-report/jacoco.xml" sh "mvn -s $MAVEN_SETTINGS package sonar:sonar -Dsonar.coverage.jacoco.xmlReportPaths=${env.WORKSPACE}/user-manager-server/target/jacoco-report/jacoco.xml"
} }
} catch (Exception e) { } catch (Exception e) {
unstable("SonarQube failed") unstable("SonarQube failed")
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment