Skip to content

Commit

Permalink
Ignore enforcer rules if stream is not 8 (#5419)
Browse files Browse the repository at this point in the history
  • Loading branch information
radtriste authored Aug 1, 2023
1 parent c494d58 commit bbc3c5e
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 2 deletions.
9 changes: 8 additions & 1 deletion .ci/jenkins/Jenkinsfile.deploy
Original file line number Diff line number Diff line change
Expand Up @@ -273,10 +273,14 @@ void setDeployPropertyIfNeeded(String key, def value) {

MavenCommand getMavenCommand(String directory = '') {
directory = directory ?: getRepoName()
return new MavenCommand(this, ['-fae', '-ntp'])
def mvnCmd = new MavenCommand(this, ['-fae', '-ntp'])
.withSettingsXmlId(env.MAVEN_SETTINGS_CONFIG_FILE_ID)
.inDirectory(directory)
.withProperty('full')
if (!isStream8()) { // Workaround as enforcer rules may not be fixed on other streams
mvnCmd.withProperty('enforcer.skip')
}
return mvnCmd
}

void runMavenDeploy(boolean localDeployment = false) {
Expand Down Expand Up @@ -307,3 +311,6 @@ String getLocalDeploymentFolder() {
return "${env.MAVEN_DEPLOY_LOCAL_DIR}/${getRepoName()}"
}

boolean isStream8() {
return env.DROOLS_STREAM == '8'
}
2 changes: 1 addition & 1 deletion .ci/jenkins/Jenkinsfile.promote
Original file line number Diff line number Diff line change
Expand Up @@ -270,7 +270,7 @@ void runMavenDeploy() {
if (env.MAVEN_DEPLOY_REPOSITORY) {
mvnCmd.withDeployRepository(env.MAVEN_DEPLOY_REPOSITORY)
}
mvnCmd.skipTests(true).run('clean deploy')
mvnCmd.skipTests(true).withProperty('enforcer.skip').run('clean deploy')
}

void uploadFileMgmt(String directory) {
Expand Down

0 comments on commit bbc3c5e

Please sign in to comment.