Skip to content

Commit

Permalink
update
Browse files Browse the repository at this point in the history
  • Loading branch information
radtriste committed Aug 16, 2023
1 parent 21d5f93 commit ada3b07
Show file tree
Hide file tree
Showing 5 changed files with 22 additions and 17 deletions.
15 changes: 12 additions & 3 deletions .ci/jenkins/Jenkinsfile.deploy
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ pipeline {
dir(getRepoName()) {
if (githubscm.isBranchExist('origin',getPRBranch())) {
githubscm.removeRemoteBranch('origin', getPRBranch())
}
}
githubscm.createBranch(getPRBranch())
}
}
Expand All @@ -103,7 +103,12 @@ pipeline {
stage('Build & Test') {
steps {
script {
getMavenCommand().withProperty('maven.test.failure.ignore', true).skipTests(params.SKIP_TESTS).run('clean install')
getMavenCommand()
.withOptions(env.DROOLS_BUILD_MVN_OPTS ? [ env.DROOLS_BUILD_MVN_OPTS ] : [])
.withOptions(env.BUILD_MVN_OPTS_CURRENT ? [ env.BUILD_MVN_OPTS_CURRENT ] : [])
.withProperty('maven.test.failure.ignore', true)
.skipTests(params.SKIP_TESTS)
.run('clean install')
}
}
post {
Expand Down Expand Up @@ -261,6 +266,7 @@ MavenCommand getMavenCommand(String directory = '') {
directory = directory ?: getRepoName()
def mvnCmd = new MavenCommand(this, ['-fae', '-ntp'])
.withSettingsXmlId(env.MAVEN_SETTINGS_CONFIG_FILE_ID)
.withOptions(env.BUILD_MVN_OPTS ? [ env.BUILD_MVN_OPTS ] : [])
.inDirectory(directory)
if (!isMainStream()) { // Workaround as enforcer rules may not be fixed on other streams
mvnCmd.withProperty('enforcer.skip')
Expand All @@ -279,7 +285,10 @@ void runMavenDeploy(boolean localDeployment = false) {
mvnCmd.withDeployRepository(env.MAVEN_DEPLOY_REPOSITORY)
}

mvnCmd.skipTests(true).run('clean deploy')
mvnCmd.skipTests(true)
.withOptions(env.DROOLS_BUILD_MVN_OPTS ? [ env.DROOLS_BUILD_MVN_OPTS ] : [])
.withOptions(env.BUILD_MVN_OPTS_CURRENT ? [ env.BUILD_MVN_OPTS_CURRENT ] : [])
.run('clean deploy')
}

void runMavenStage() {
Expand Down
9 changes: 8 additions & 1 deletion .ci/jenkins/Jenkinsfile.promote
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,13 @@ pipeline {
}
steps {
script {
getMavenCommand().inDirectory(getRepoName()).skipTests(true).withProperty('full').run('clean install')
getMavenCommand()
.withOptions(env.DROOLS_BUILD_MVN_OPTS ? [ env.DROOLS_BUILD_MVN_OPTS ] : [])
.withOptions(env.BUILD_MVN_OPTS_CURRENT ? [ env.BUILD_MVN_OPTS_CURRENT ] : [])
.inDirectory(getRepoName())
.skipTests(true)
.withProperty('full')
.run('clean install')
uploadFileMgmt(getRepoName())
}
}
Expand Down Expand Up @@ -195,6 +201,7 @@ void tagLatest() {
MavenCommand getMavenCommand() {
mvnCmd = new MavenCommand(this, ['-fae', '-ntp'])
.withSettingsXmlId("${env.MAVEN_SETTINGS_CONFIG_FILE_ID}")
.withOptions(env.BUILD_MVN_OPTS ? [ env.BUILD_MVN_OPTS ] : [])
if (env.MAVEN_DEPENDENCIES_REPOSITORY) {
mvnCmd.withDependencyRepositoryInSettings('deps-repo', env.MAVEN_DEPENDENCIES_REPOSITORY)
}
Expand Down
6 changes: 0 additions & 6 deletions .ci/jenkins/Jenkinsfile.quarkus-3.rewrite.pr
Original file line number Diff line number Diff line change
Expand Up @@ -79,9 +79,3 @@ String getRepoName() {
String getGitAuthorCredsId() {
return env.AUTHOR_CREDS_ID
}

MavenCommand getMavenCommand() {
return new MavenCommand(this, ['-fae', '-ntp'])
.withSettingsXmlId(env.MAVEN_SETTINGS_CONFIG_FILE_ID)
.withProperty('full')
}
6 changes: 0 additions & 6 deletions .ci/jenkins/Jenkinsfile.quarkus-3.rewrite.standalone
Original file line number Diff line number Diff line change
Expand Up @@ -152,9 +152,3 @@ String getGitAuthorCredsId() {
String getPRBranch() {
return "${getBuildBranch()}-${env.PR_BRANCH_HASH}"
}

MavenCommand getMavenCommand() {
return new MavenCommand(this, ['-fae', '-ntp'])
.withSettingsXmlId(env.MAVEN_SETTINGS_CONFIG_FILE_ID)
.withProperty('full')
}
3 changes: 2 additions & 1 deletion .ci/jenkins/Jenkinsfile.setup-branch
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ pipeline {
}
steps {
script {
build job: '../tools/kie-benchmarks-update-drools', parameters: [ string(name: 'NEW_VERSION', value: "${getDroolsVersion()}")]
build job: '../tools/kie-benchmarks-update-drools', parameters: [ string(name: 'NEW_VERSION', value: "${getDroolsVersion()}")]
}
}
}
Expand Down Expand Up @@ -137,6 +137,7 @@ String getGitAuthorCredsId() {
MavenCommand getMavenCommand() {
return new MavenCommand(this, ['-fae', '-ntp'])
.withSettingsXmlId(env.MAVEN_SETTINGS_CONFIG_FILE_ID)
.withOptions(env.BUILD_MVN_OPTS ? [ env.BUILD_MVN_OPTS ] : [])
.withProperty('full')
}

Expand Down

0 comments on commit ada3b07

Please sign in to comment.