forked from apache/incubator-kie-tools
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #34 from kubesmarts/main-sync-20241203-160054
[20241203-165240] - Automatic PR: Sync main with main-apache
- Loading branch information
Showing
106 changed files
with
5,534 additions
and
527 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -17,5 +17,5 @@ | |
github: | ||
enabled_merge_buttons: | ||
squash: true | ||
merge: true | ||
merge: false | ||
rebase: false |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
213 changes: 213 additions & 0 deletions
213
.ci/jenkins/release-jobs/Jenkinsfile.kie-sandbox-accelerator-quarkus
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,213 @@ | ||
/* | ||
* Licensed to the Apache Software Foundation (ASF) under one or more | ||
* contributor license agreements. See the NOTICE file distributed with | ||
* this work for additional information regarding copyright ownership. | ||
* The ASF licenses this file to You under the Apache License, Version 2.0 | ||
* (the "License"); you may not use this file except in compliance with | ||
* the License. You may obtain a copy of the License at | ||
* | ||
* http://www.apache.org/licenses/LICENSE-2.0 | ||
* | ||
* Unless required by applicable law or agreed to in writing, software | ||
* distributed under the License is distributed on an "AS IS" BASIS, | ||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
* See the License for the specific language governing permissions and | ||
* limitations under the License. | ||
*/ | ||
pipeline { | ||
agent { | ||
docker { | ||
image 'docker.io/apache/incubator-kie-tools-ci-build:main' | ||
args '--shm-size=2g --privileged --group-add docker' | ||
} | ||
} | ||
|
||
options { | ||
timeout(time: 120, unit: 'MINUTES') | ||
} | ||
|
||
parameters { | ||
booleanParam(description: 'Dry run', name: 'DRY_RUN', defaultValue: true) | ||
string(description: 'Release Version', name: 'RELEASE_VERSION', defaultValue: '0.0.0') | ||
string(description: 'Base Ref', name: 'BASE_REF') | ||
string(description: 'Release Candidate Version', name: 'RELEASE_CANDIDATE_VERSION', defaultValue: '') | ||
} | ||
|
||
environment { | ||
KIE_TOOLS_BUILD__runLinters = 'false' | ||
KIE_TOOLS_BUILD__runTests = 'false' | ||
KIE_TOOLS_BUILD__runEndToEndTests = 'false' | ||
|
||
|
||
RELEASE_ARTIFACTS_DIR = "${WORKSPACE}/release-artifacts" | ||
|
||
PNPM_FILTER_STRING = '-F @kie-tools/kie-sandbox-accelerator-quarkus...' | ||
} | ||
|
||
stages { | ||
stage('Load local shared scripts') { | ||
steps { | ||
script { | ||
pipelineVars = load '.ci/jenkins/shared-scripts/pipelineVars.groovy' | ||
buildUtils = load '.ci/jenkins/shared-scripts/buildUtils.groovy' | ||
githubUtils = load '.ci/jenkins/shared-scripts/githubUtils.groovy' | ||
releaseUtils = load '.ci/jenkins/shared-scripts/releaseUtils.groovy' | ||
zipUtils = load '.ci/jenkins/shared-scripts/zipUtils.groovy' | ||
} | ||
} | ||
} | ||
|
||
stage('Start required services for build and tests (DinD, Xvfb, Fluxbox)') { | ||
steps { | ||
script { | ||
buildUtils.startRequiredServices() | ||
} | ||
} | ||
} | ||
|
||
stage('Clean workspace before build') { | ||
steps { | ||
cleanWs(deleteDirs: true, disableDeferredWipeout: true) | ||
} | ||
} | ||
|
||
stage('Checkout kie-tools') { | ||
steps { | ||
dir('kie-tools') { | ||
script { | ||
githubUtils.checkoutRepo( | ||
"http://github.com/${pipelineVars.githubRepositorySlug}.git", | ||
"${params.BASE_REF}", | ||
"${pipelineVars.kieToolsBotGithubCredentialsId}" | ||
) | ||
} | ||
} | ||
} | ||
} | ||
|
||
stage('Checkout kie-sandbox-quarkus-accelerator repo') { | ||
steps { | ||
dir('kie-sandbox-quarkus-accelerator') { | ||
script { | ||
githubUtils.checkoutRepo( | ||
'http://github.com/apache/incubator-kie-sandbox-quarkus-accelerator.git', | ||
'main', | ||
"${pipelineVars.kieToolsBotGithubCredentialsId}" | ||
) | ||
} | ||
} | ||
} | ||
} | ||
|
||
stage('Setup PNPM') { | ||
steps { | ||
dir('kie-tools') { | ||
script { | ||
buildUtils.setupPnpm("${pipelineVars.mavenSettingsReleaseConfigFileId}") | ||
} | ||
} | ||
} | ||
} | ||
|
||
stage('PNPM Bootstrap') { | ||
steps { | ||
dir('kie-tools') { | ||
script { | ||
buildUtils.pnpmBootstrap("${env.PNPM_FILTER_STRING}") | ||
} | ||
} | ||
} | ||
} | ||
|
||
stage('Build') { | ||
steps { | ||
dir('kie-tools') { | ||
script { | ||
buildUtils.pnpmBuild("${env.PNPM_FILTER_STRING}") | ||
} | ||
} | ||
} | ||
} | ||
|
||
stage('Push to GitHub (kie-sandbox-quarkus-accelerator)') { | ||
when { | ||
expression { !params.DRY_RUN && params.RELEASE_CANDIDATE_VERSION == '' } | ||
} | ||
steps { | ||
dir('kie-sandbox-quarkus-accelerator') { | ||
script { | ||
|
||
sh """#!/bin/bash -el | ||
git config user.email [email protected] | ||
git config user.name asf-ci-kie | ||
|
||
git checkout --orphan ${params.RELEASE_VERSION} | ||
|
||
echo "Copy content" | ||
cp -r ${WORKSPACE}/kie-tools/packages/kie-sandbox-accelerator-quarkus/dist/git-repo-content/* . | ||
|
||
echo "Commit changes and push" | ||
git add . | ||
git commit -m "Apache KIE Sandbox Quarkus Accelerator ${params.RELEASE_VERSION}" | ||
git tag ${params.RELEASE_VERSION} | ||
git push origin ${params.RELEASE_VERSION} | ||
""".trim() | ||
|
||
githubUtils.pushObject('origin', "${params.RELEASE_VERSION}", "${pipelineVars.asfGithubPushCredentialsId}") | ||
} | ||
} | ||
} | ||
} | ||
|
||
stage('Setup release candidate artifacts') { | ||
when { | ||
expression { !params.DRY_RUN && params.RELEASE_CANDIDATE_VERSION != '' } | ||
} | ||
steps { | ||
script { | ||
env.KIE_SANDBOX_ACCELERATOR_QUARKUS_ZIP_FILE = "incubator-kie-${params.RELEASE_CANDIDATE_VERSION}-sandbox-accelerator-quarkus.zip" | ||
sh """#!/bin/bash -el | ||
mkdir ${env.RELEASE_ARTIFACTS_DIR} | ||
cd "${WORKSPACE}/kie-tools/packages/kie-sandbox-accelerator-quarkus/dist" && zip -r "${env.RELEASE_ARTIFACTS_DIR}/${env.KIE_SANDBOX_ACCELERATOR_QUARKUS_ZIP_FILE}" . | ||
""".trim() | ||
} | ||
} | ||
} | ||
|
||
stage('Sign artifacts for Apache release') { | ||
when { | ||
expression { !params.DRY_RUN && params.RELEASE_CANDIDATE_VERSION != '' } | ||
} | ||
steps { | ||
dir("${env.RELEASE_ARTIFACTS_DIR}") { | ||
script { | ||
releaseUtils.setupSigningKey("${pipelineVars.asfReleaseGPGKeyCredentialsId}") | ||
releaseUtils.signArtifact("${env.KIE_SANDBOX_ACCELERATOR_QUARKUS_ZIP_FILE}") | ||
} | ||
} | ||
} | ||
} | ||
|
||
stage('Publish Release Candidate artifacts') { | ||
when { | ||
expression { !params.DRY_RUN && params.RELEASE_CANDIDATE_VERSION != '' } | ||
} | ||
steps { | ||
script { | ||
releaseUtils.publishArtifacts( | ||
"${env.RELEASE_ARTIFACTS_DIR}", | ||
"${pipelineVars.asfReleaseStagingRepository}", | ||
"${params.RELEASE_CANDIDATE_VERSION}", | ||
"${pipelineVars.asfReleaseSVNStagingCredentialsId}" | ||
) | ||
} | ||
} | ||
} | ||
} | ||
|
||
post { | ||
always { | ||
cleanWs(deleteDirs: true) | ||
} | ||
} | ||
} |
Oops, something went wrong.