Skip to content

Commit

Permalink
correction
Browse files Browse the repository at this point in the history
  • Loading branch information
radtriste committed Jun 22, 2023
1 parent 510d48e commit 2315560
Showing 1 changed file with 10 additions and 10 deletions.
20 changes: 10 additions & 10 deletions .ci/jenkins/Jenkinsfile.build-image
Original file line number Diff line number Diff line change
Expand Up @@ -35,8 +35,6 @@ pipeline {

sh 'printenv'

setupGithubCommitStatus()

assert getBuildImageName() : 'Please provide `BUILD_IMAGE_NAME` parameter'

currentBuild.displayName = params.DISPLAY_NAME ?: currentBuild.displayName
Expand All @@ -49,6 +47,8 @@ pipeline {
checkout(githubscm.resolveRepository(getRepoName(), getSourceAuthor(), getSourceBranch(), false))
}

updateGithubCommitStatus()

if (isProdCI()) {
// Prod fix to be able to build the image as a community one
sh "echo '' > content_sets.yaml"
Expand Down Expand Up @@ -110,8 +110,6 @@ pipeline {
dir('target/image') {
cloud.dockerBuildMultiPlatformImages(getBuiltImageTag(), getImageBuildPlatforms(), shouldDeployImage(), squashMessage)
}

updateGithubCommitStatus()
}
}
}
Expand Down Expand Up @@ -357,15 +355,16 @@ String getQuarkusPlatformURL() {
// Update commit status

def getRepoURL() {
String url = sh(returnStdout: true, script: 'git config --get remote.origin.url').trim()
echo "Got Repo URL -> ${url}"
return url
return "https://github.com/${getSourceAuthor()}/${getRepoName()}"
}

def getCommitSha() {
String sha = sh(returnStdout: true, script: "git show-ref -s ${getSourceBranch()}").trim()
echo "Got Commit SHA -> ${sha}"
return sha
dir('temp-source') {
checkout(githubscm.resolveRepository(getRepoName(), getSourceAuthor(), getSourceBranch(), false))
String sha = sh(returnStdout: true, script: "git show-ref -s ${getSourceBranch()} | head -n 1").trim()
echo "Got Commit SHA -> ${sha}"
return sha
}
}

def setupGithubCommitStatus() {
Expand All @@ -390,6 +389,7 @@ def updateGithubCommitStatus() {
statusResultSource: [
$class: 'ConditionalStatusResultSource',
results: [
[$class: 'BetterThanOrEqualBuildResult', result: 'PENDING', state: 'PENDING', message: 'anything'],
[$class: 'BetterThanOrEqualBuildResult', result: 'SUCCESS', state: 'SUCCESS', message: 'anything'],
[$class: 'BetterThanOrEqualBuildResult', result: 'FAILURE', state: 'FAILURE', message: 'anything'],
[$class: 'AnyBuildResult', state: 'FAILURE', message: 'Loophole']
Expand Down

0 comments on commit 2315560

Please sign in to comment.