Skip to content

Commit

Permalink
HSEARCH-4924 Jenkinsfile: Use string interpolation for params related…
Browse files Browse the repository at this point in the history
… to incremental builds
  • Loading branch information
yrodiere committed Aug 28, 2023
1 parent 66733ad commit 42e56e7
Showing 1 changed file with 8 additions and 5 deletions.
13 changes: 8 additions & 5 deletions Jenkinsfile
Original file line number Diff line number Diff line change
Expand Up @@ -417,10 +417,10 @@ stage('Default build') {
String itMavenArgs = """ \
${commonMavenArgs} \
-pl ${allITProjects} \
${incrementalBuild ?
('-Dincremental -Dgib.referenceBranch=refs/remotes/origin/'+helper.scmSource.pullRequest.target.name)
: ''
} \
${incrementalBuild ? """ \
-Dincremental \
-Dgib.referenceBranch=refs/remotes/origin/${helper.scmSource.pullRequest.target.name} \
""" : '' } \
"""
pullContainerImages( itMavenArgs )
sh """ \
Expand Down Expand Up @@ -900,7 +900,10 @@ void mavenNonDefaultBuild(BuildEnvironment buildEnv, String args, List<String> a
// and in PRs we want to run only those affected by changes
// (see gib.disableSelectedProjectsHandling=true).
String argsWithProjectSelection = """ \
${incrementalBuild ? ('-Dincremental -Dgib.disableSelectedProjectsHandling=true -Dgib.referenceBranch=refs/remotes/origin/' + helper.scmSource.pullRequest.target.name) : ''} \
${incrementalBuild ? """ \
-Dincremental -Dgib.disableSelectedProjectsHandling=true \
-Dgib.referenceBranch=refs/remotes/origin/${helper.scmSource.pullRequest.target.name} \
""" : ''} \
${args} \
"""
if ( artifactsToTest ) {
Expand Down

0 comments on commit 42e56e7

Please sign in to comment.