Skip to content

Commit

Permalink
HSEARCH-4924 Run pre-build and build stages on the same node
Browse files Browse the repository at this point in the history
  • Loading branch information
marko-bekhta committed Aug 25, 2023
1 parent 283c85e commit 617d408
Showing 1 changed file with 19 additions and 22 deletions.
41 changes: 19 additions & 22 deletions Jenkinsfile
Original file line number Diff line number Diff line change
Expand Up @@ -375,19 +375,19 @@ Resulting execution plan:
"""
}

stage('Pre-build sources') {
// we want this stage to only be executed when we are planning to use incremental build
if (!incrementalBuild) {
echo 'Skipping pre-building sources for non-pull request builds.'
helper.markStageSkipped()
return
}
if (!enableDefaultBuild) {
echo 'Skipping default build and integration tests in the default environment'
helper.markStageSkipped()
return
}
runBuildOnNode( NODE_PATTERN_BASE ) {
runBuildOnNode( NODE_PATTERN_BASE, [time: 2, unit: 'HOURS'] ) {
stage('Pre-build sources') {
// we want this stage to only be executed when we are planning to use incremental build
if (!incrementalBuild) {
echo 'Skipping pre-building sources for non-pull request builds.'
helper.markStageSkipped()
return
}
if (!enableDefaultBuild) {
echo 'Skipping default build and integration tests in the default environment'
helper.markStageSkipped()
return
}
withMavenWorkspace {
sh """ \
mvn clean install \
Expand All @@ -401,15 +401,12 @@ stage('Pre-build sources') {
}
}
}
}

stage('Default build') {
if (!enableDefaultBuild) {
echo 'Skipping default build and integration tests in the default environment'
helper.markStageSkipped()
return
}
runBuildOnNode( NODE_PATTERN_BASE, [time: 2, unit: 'HOURS'] ) {
stage('Default build') {
if (!enableDefaultBuild) {
echo 'Skipping default build and integration tests in the default environment'
helper.markStageSkipped()
return
}
withMavenWorkspace(mavenSettingsConfig: deploySnapshot ? helper.configuration.file.deployment.maven.settingsId : null) {
if ( incrementalBuild ) {
dir(helper.configuration.maven.localRepositoryPath) {
Expand Down

0 comments on commit 617d408

Please sign in to comment.