Skip to content

Commit

Permalink
devMode may be "true" only for projects that have profile.d/developme…
Browse files Browse the repository at this point in the history
…nt which never publish anything.
  • Loading branch information
ao-apps committed Sep 19, 2023
1 parent 5a67dfc commit 620cb3c
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 20 deletions.
11 changes: 1 addition & 10 deletions Jenkinsfile
Original file line number Diff line number Diff line change
Expand Up @@ -962,16 +962,7 @@ void deploySteps(niceCmd, projectDir, deployJdk, maven, mavenOpts, mavenOptsJdk1
mavenLocalRepo: ".m2/repository-jdk-$deployJdk",
jdk: "jdk-$deployJdk"
) {
// "publish" profile may not be enabled at the same time as "development" profile,
// disable for any project that always has "development" profile enabled.
sh """#!/bin/bash
if [ -f profile.d/development ]
then
${niceCmd}$MVN_CMD $mvnCommon -Pnexus,jenkins-deploy deploy
else
${niceCmd}$MVN_CMD $mvnCommon -Pnexus,jenkins-deploy,publish deploy
fi
"""
sh "${niceCmd}$MVN_CMD $mvnCommon -Pnexus,jenkins-deploy,publish deploy"
}
// Restore surefire-reports
sh restoreSurefireReportsScript()
Expand Down
11 changes: 1 addition & 10 deletions book/Jenkinsfile
Original file line number Diff line number Diff line change
Expand Up @@ -963,16 +963,7 @@ void deploySteps(niceCmd, projectDir, deployJdk, maven, mavenOpts, mavenOptsJdk1
mavenLocalRepo: ".m2/repository-jdk-$deployJdk",
jdk: "jdk-$deployJdk"
) {
// "publish" profile may not be enabled at the same time as "development" profile,
// disable for any project that always has "development" profile enabled.
sh """#!/bin/bash
if [ -f profile.d/development ]
then
${niceCmd}$MVN_CMD $mvnCommon -Pnexus,jenkins-deploy deploy
else
${niceCmd}$MVN_CMD $mvnCommon -Pnexus,jenkins-deploy,publish deploy
fi
"""
sh "${niceCmd}$MVN_CMD $mvnCommon -Pnexus,jenkins-deploy,publish deploy"
}
// Restore surefire-reports
sh restoreSurefireReportsScript()
Expand Down

0 comments on commit 620cb3c

Please sign in to comment.