Skip to content

Commit

Permalink
correct
Browse files Browse the repository at this point in the history
  • Loading branch information
radtriste committed Jun 27, 2023
1 parent 90888d8 commit 2bd561e
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 2 deletions.
12 changes: 10 additions & 2 deletions .ci/jenkins/Jenkinsfile
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ pipeline {
script {
clean()

githubscm.checkoutIfExists('kogito-images', getChangeAuthor(), getChangeBranch(), 'kiegroup', getChangeTarget(), true)
githubscm.checkoutIfExists(getRepoName(), getChangeAuthor(), getChangeBranch(), 'kiegroup', getChangeTarget(), true)
}
}
}
Expand Down Expand Up @@ -78,7 +78,7 @@ Closure createBuildAndTestStageClosure(String image) {
githubscm.prepareCommitStatusInformationForPullRequest(getRepoName(), getChangeAuthor(), getChangeBranch(), 'kiegroup', getGitAuthorCredentialsId())
githubscm.updateGithubCommitStatus(image, state, 'PENDING', 'Queued')

def job = build(job: "kogito-images.build-image", wait: true, parameters: buildParams, propagate: false)
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")
Expand Down Expand Up @@ -113,3 +113,11 @@ String getChangeBranch() {
String getChangeTarget() {
return env.ghprbTargetBranch ?: CHANGE_TARGET
}

String getRepoName() {
return env.REPO_NAME
}

String getGitAuthorCredentialsId() {
return env.AUTHOR_CREDS_ID
}
3 changes: 3 additions & 0 deletions .ci/jenkins/dsl/jobs.groovy
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,9 @@ void setupPrJob(boolean isProdCI = false) {
jobParams.pr.commitContext = '(Prod) Check Images'
jobParams.env.put('PROD_CI', true)
}
jobParams.env.putAll([
AUTHOR_CREDS_ID: "${GIT_AUTHOR_CREDENTIALS_ID}",
])
KogitoJobTemplate.createPRJob(this, jobParams)
}

Expand Down

0 comments on commit 2bd561e

Please sign in to comment.