Skip to content

Commit

Permalink
update
Browse files Browse the repository at this point in the history
  • Loading branch information
radtriste committed Jul 17, 2023
1 parent 04504c2 commit be96520
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 4 deletions.
12 changes: 10 additions & 2 deletions .ci/jenkins/Jenkinsfile
Original file line number Diff line number Diff line change
Expand Up @@ -77,10 +77,18 @@ Closure createBuildAndTestStageClosure(String image) {
buildParams.add(string(name: 'TARGET_BRANCH', value: getChangeTarget()))
buildParams.add(string(name: 'BUILD_KOGITO_APPS_REF', value: getChangeTarget()))

build(job: "${getRepoName()}.build-image", wait: false, parameters: buildParams, propagate: false)

githubscm.prepareCommitStatusInformationForPullRequest(getRepoName(), getChangeAuthor(), getChangeBranch(), 'kiegroup', getGitAuthorCredentialsId())
githubscm.updateGithubCommitStatus(image, 'PENDING', 'Queued', getRepoName())

// Keep executing so we can cancel all if needed
def job = build(job: "${getRepoName()}.build-image", wait: true, parameters: buildParams, propagate: false)
if (job.result != 'SUCCESS') {
if (job.result == 'UNSTABLE') {
unstable("Tests on ${image} seems to have failed")
} else {
error("Error building ${image}. Please check the logs of the job: ${job.absoluteUrl}")
}
}
}
}
}
Expand Down
4 changes: 2 additions & 2 deletions .ci/jenkins/dsl/jobs.groovy
Original file line number Diff line number Diff line change
Expand Up @@ -53,14 +53,14 @@ void setupPrJob(boolean isProdCI = false) {
run_only_for_branches: [ "${GIT_BRANCH}" ],
disable_status_message_error: true,
disable_status_message_failure: true,
commitContext: 'Launch Image Checks',
commitContext: 'Retrieve and Launch Image Checks',
contextShowtestResults: false,
])
if (isProdCI) {
jobParams.job.name += '.prod'
jobParams.pr.trigger_phrase = '.*[j|J]enkins,?.*(rerun|run) [prod|Prod|PROD].*'
jobParams.pr.trigger_phrase_only = true
jobParams.pr.commitContext = '(Prod) Launch Image Checks'
jobParams.pr.commitContext = '(Prod) Retrieve and Launch Image Checks'
jobParams.env.put('PROD_CI', true)
} else if (Utils.hasBindingValue(this, 'CLOUD_IMAGES')) {
jobParams.env.put('IMAGES_LIST', Utils.getBindingValue(this, 'CLOUD_IMAGES'))
Expand Down

0 comments on commit be96520

Please sign in to comment.