Skip to content

Commit

Permalink
add parameters to Jenkinsfile_multibranch_pipeline;
Browse files Browse the repository at this point in the history
Signed-off-by: Stefan Maute <stefan.maute@bosch.io>
  • Loading branch information
stmaute committed Jul 1, 2020
1 parent 0eca295 commit bfb9cdf
Showing 1 changed file with 9 additions and 4 deletions.
13 changes: 9 additions & 4 deletions java/Jenkinsfile_multibranch_pipeline
Expand Up @@ -9,6 +9,11 @@ pipeline {
theMvnRepo = "$WORKSPACE/../feature-repository-${theBranch}";
JAVA_TOOL_OPTIONS = '-Duser.home=/home/jenkins-slave'
}
parameters {
string(name: 'DOCKER_ARGS_FOR_BUILD', defaultValue: '', description: 'Docker args for building the ditto project inside the container')
string(name: 'DOCKER_ARGS_FOR_SONAR', defaultValue: '', description: 'Docker args for SonarScan stage')
string(name: 'DOCKER_IMAGE_MAVEN_JDK_8', defaultValue: '', description: 'Insert the docker image version to run the build')
}
stages {
stage('Choose Ditto Version to build against') {
steps {
Expand All @@ -30,8 +35,8 @@ pipeline {
stage('Build') {
agent {
docker {
args '-v /home/jenkins-slave/.m2:/home/jenkins-slave/.m2:z'
image 'thingsdev.azurecr.io/things-pipeline/maven-jdk-8:latest'
args "$DOCKER_ARGS_FOR_BUILD"
image "$DOCKER_IMAGE_MAVEN_JDK_8"
}
}
steps {
Expand All @@ -50,8 +55,8 @@ pipeline {
stage('SonarQube Scan') {
agent {
docker {
args '-v /home/jenkins-slave/.m2:/home/jenkins-slave/.m2:z'
image 'thingsdev.azurecr.io/things-pipeline/maven-jdk-8:latest'
args "$DOCKER_ARGS_FOR_BUILD"
image "$DOCKER_IMAGE_MAVEN_JDK_8"
}
}
steps {
Expand Down

0 comments on commit bfb9cdf

Please sign in to comment.