Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

NO-ISSUE: Fwd port from 10.0.x #1788

Merged
merged 5 commits into from
Jul 29, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 0 additions & 6 deletions .ci/jenkins/Jenkinsfile.build-image
Original file line number Diff line number Diff line change
Expand Up @@ -153,12 +153,6 @@ pipeline {
latestTag = getTriggeringProjectName().contains('weekly') ? 'weekly-latest' : 'latest'
cloud.skopeoCopyRegistryImages(imageTag, getBuiltImageTag(latestTag), retries)
}
try {
String reducedTag = cloud.getReducedTag(getDeployImageTag())
cloud.skopeoCopyRegistryImages(imageTag, getBuiltImageTag(reducedTag), retries)
} catch (err) {
echo "Reduced tag cannot be applied: ${err}"
}
}
}
}
Expand Down
2 changes: 1 addition & 1 deletion .ci/jenkins/Jenkinsfile.deploy
Original file line number Diff line number Diff line change
Expand Up @@ -364,7 +364,7 @@ List getTestFailedImages() {
////////////////////////////////////////////////////////////////////////

boolean isDeployImage() {
return !env.DISABLE_IMAGES_DEPLOY
return !Boolean.valueOf(env.DISABLE_IMAGES_DEPLOY)
}

boolean isDeployImageInOpenshiftRegistry() {
Expand Down
12 changes: 9 additions & 3 deletions .ci/jenkins/Jenkinsfile.setup-branch
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ pipeline {
stage('Initialization') {
steps {
script {
cleanWs()
cleanWs(disableDeferredWipeout: true)

if (params.DISPLAY_NAME) {
currentBuild.displayName = params.DISPLAY_NAME
Expand All @@ -53,7 +53,7 @@ pipeline {
steps {
script {
dir(getRepoName()) {
versionCmd = "python scripts/manage-kogito-version.py --bump-to ${getKogitoVersion()} --confirm"
versionCmd = "python scripts/manage-kogito-version.py --bump-to ${getBuildBranch()} --confirm"
versionCmd += " --examples-ref nightly-${getBuildBranch()}"
if (getKogitoArtifactsVersion()) {
versionCmd += " --artifacts-version ${getKogitoArtifactsVersion()}"
Expand Down Expand Up @@ -103,8 +103,14 @@ pipeline {
steps {
script {
dir(getRepoName()) {
githubscm.setUserConfigFromCreds(getGitAuthorPushCredsId())
def mainBranchPrCheckJenkinsfile = '.ci/jenkins/Jenkinsfile'
def newBranchPrCheckJenkinsfile = ".ci/jenkins/Jenkinsfile.pr.${getBuildBranch()}"
if (!isMainBranch() && fileExists(mainBranchPrCheckJenkinsfile)) {
sh "mv ${mainBranchPrCheckJenkinsfile} ${newBranchPrCheckJenkinsfile}"
sh "git add ${newBranchPrCheckJenkinsfile}"
}
if (githubscm.isThereAnyChanges()) {
githubscm.setUserConfigFromCreds(getGitAuthorPushCredsId())
githubscm.commitChanges("[${getBuildBranch()}] Update version to ${getKogitoVersion()}")
githubscm.pushObject('origin', getBuildBranch(), getGitAuthorPushCredsId())
} else {
Expand Down
3 changes: 2 additions & 1 deletion .ci/jenkins/dsl/jobs.groovy
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,8 @@ void setupPrJob() {
setupBuildAndTestJob(JobType.PULL_REQUEST)

// Branch Source Plugin multibranchPipelineJob
Utils.isMainBranch(this) && KogitoJobTemplate.createPullRequestMultibranchPipelineJob(this, "${jenkins_path}/Jenkinsfile", JobType.PULL_REQUEST.getName())
def triggeringJenkinsfileName = Utils.isMainBranch(this) ? "Jenkinsfile" : "Jenkinsfile.pr.${Utils.getGitBranch(this)}"
KogitoJobTemplate.createPullRequestMultibranchPipelineJob(this, "${jenkins_path}/${triggeringJenkinsfileName}", JobType.PULL_REQUEST.getName())
}

void createSetupBranchJob() {
Expand Down
4 changes: 2 additions & 2 deletions scripts/manage-kogito-version.py
Original file line number Diff line number Diff line change
Expand Up @@ -51,8 +51,8 @@

if args.bump_to:
# validate if the provided version is valid.
# e.g. 1.10.0, 1.0.0-rc1, 999-snapshot or 999-20240101-snapshot
pattern = r'(\d+.\d+.)?(\d+$|\d+-rc\d+$|\d+(-\d{8})?-snapshot$)'
# e.g. 1.10.0, 10.0.x, 1.0.0-rc1, 999-snapshot or 999-20240101-snapshot
pattern = r'(\d+.\d+.)?(x$|\d+$|\d+-rc\d+$|\d+(-\d{8})?-snapshot$)'
regex = re.compile(pattern, re.IGNORECASE)
valid = regex.match(args.bump_to)
examples_ref = ""
Expand Down
Loading