Skip to content

Commit

Permalink
update jenkinsfile
Browse files Browse the repository at this point in the history
  • Loading branch information
radtriste committed Oct 17, 2023
1 parent 9c6f9fc commit 85faab5
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 16 deletions.
11 changes: 7 additions & 4 deletions .ci/jenkins/Jenkinsfile
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,10 @@ pipeline {
sh 'printenv'

dir(getRepoName()) {
githubscm.checkoutIfExists(getRepoName(), getChangeAuthor(), getChangeBranch(), 'apache', getChangeTarget(), true)
// githubscm.checkoutIfExists(getRepoName(), getChangeAuthor(), getChangeBranch(), 'apache', getChangeTarget(), true, credentials = [token: getGitAuthorCredentialsId(), usernamePassword: 'kie-ci'])
// TODO Test pupose
deleteDir()
checkout(githubscm.resolveRepository('kogito-images', 'radtriste', 'fix_pipelines', false))
}
}
}
Expand Down Expand Up @@ -95,15 +98,15 @@ String[] getImages() {
}

String getChangeAuthor() {
return env.ghprbAuthorRepoGitUrl ? util.getGroup(env.ghprbAuthorRepoGitUrl) : (env.ghprbPullAuthorLogin ?: CHANGE_AUTHOR)
return CHANGE_AUTHOR
}

String getChangeBranch() {
return env.ghprbSourceBranch ?: CHANGE_BRANCH
return CHANGE_BRANCH
}

String getChangeTarget() {
return env.ghprbTargetBranch ?: CHANGE_TARGET
return CHANGE_TARGET
}

String getRepoName() {
Expand Down
18 changes: 6 additions & 12 deletions .ci/jenkins/Jenkinsfile.deploy
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,9 @@ deployProperties = [:]

changesDone = false

BUILT_IMAGES = []
BUILD_FAILED_IMAGES = []
TEST_FAILED_IMAGES = []
BUILT_IMAGES = Collections.synchronizedList([])
BUILD_FAILED_IMAGES = Collections.synchronizedList([])
TEST_FAILED_IMAGES = Collections.synchronizedList([])

pipeline {
agent {
Expand Down Expand Up @@ -304,21 +304,15 @@ void createBuildAndTestStageClosure(String image) {
}

void registerBuiltImage(String imageName) {
lock("${BUILD_URL} build success") {
BUILT_IMAGES.add(imageName)
}
BUILT_IMAGES.add(imageName)
}

void registerBuildFailedImage(String imageName) {
lock("${BUILD_URL} build failed") {
BUILD_FAILED_IMAGES.add(imageName)
}
BUILD_FAILED_IMAGES.add(imageName)
}

void registerTestFailedImage(String imageName) {
lock("${BUILD_URL} test failed") {
TEST_FAILED_IMAGES.add(imageName)
}
TEST_FAILED_IMAGES.add(imageName)
}

List getBuiltImages() {
Expand Down

0 comments on commit 85faab5

Please sign in to comment.