Skip to content

Commit

Permalink
Merge pull request #34 from kubesmarts/main-sync-20241203-160054
Browse files Browse the repository at this point in the history
[20241203-165240] - Automatic PR: Sync main with main-apache
  • Loading branch information
ricardozanini authored Dec 3, 2024
2 parents 1e80140 + 861b09f commit 1c14677
Show file tree
Hide file tree
Showing 106 changed files with 5,534 additions and 527 deletions.
2 changes: 1 addition & 1 deletion .asf.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -17,5 +17,5 @@
github:
enabled_merge_buttons:
squash: true
merge: true
merge: false
rebase: false
49 changes: 26 additions & 23 deletions .ci/jenkins/Jenkinsfile.release-build
Original file line number Diff line number Diff line change
Expand Up @@ -88,6 +88,17 @@ pipeline {

stage('Parallel - Builds') {
parallel {
stage('KIE Sandbox Accelerator Quarkus') {
when {
expression { env.KIE_SANDBOX_ACCELERATOR_QUARKUS == 'true' }
}
steps {
script {
kieSandboxAcceleratorQuarkusBuildJob()
}
}
}

stage('Dev Deployment Kogito Quarkus Blank App Image') {
when {
expression { env.DEV_DEPLOYMENT_KOGITO_QUARKUS_BLANK_APP_IMAGE == 'true' }
Expand Down Expand Up @@ -209,17 +220,6 @@ pipeline {
}
}

stage('Kogito Task Console Image') {
when {
expression { env.KOGITO_TASK_CONSOLE == 'true' }
}
steps {
script {
kogitoTaskConsoleBuildJob()
}
}
}

stage('Kogito Management Console Image') {
when {
expression { env.KOGITO_MANAGEMENT_CONSOLE == 'true' }
Expand Down Expand Up @@ -427,6 +427,7 @@ pipeline {

def setRunners() {
runners = readJSON text: "${params.RUNNERS}"
env.KIE_SANDBOX_ACCELERATOR_QUARKUS = runners.kie_sandbox_accelerator_quarkus
env.DEV_DEPLOYMENT_BASE_IMAGE = runners.dev_deployment_base_image
env.DEV_DEPLOYMENT_KOGITO_QUARKUS_BLANK_APP_IMAGE = runners.dev_deployment_kogito_quakus_blank_app_image
env.DEV_DEPLOYMENT_DMN_FORM_WEBAPP_IMAGE = runners.dev_deployment_dmn_form_webapp_image
Expand Down Expand Up @@ -460,6 +461,7 @@ def setRunners() {

def printRunners() {
sh """
echo "kie_sandbox_accelerator_quarkus: ${env.KIE_SANDBOX_ACCELERATOR_QUARKUS}"
echo "dev_deployment_base_image: ${env.DEV_DEPLOYMENT_BASE_IMAGE}"
echo "dev_deployment_kogito_quakus_blank_app_image: ${env.DEV_DEPLOYMENT_KOGITO_QUARKUS_BLANK_APP_IMAGE}"
echo "dev_deployment_dmn_form_webapp_image: ${env.DEV_DEPLOYMENT_DMN_FORM_WEBAPP_IMAGE}"
Expand Down Expand Up @@ -627,18 +629,6 @@ def serverlessLogicWebToolsBuildJob() {
).result
}

def kogitoTaskConsoleBuildJob() {
env.KOGITO_TASK_CONSOLE_JOB_RESULT = build(
job: 'KIE/kie-tools/kie-tools-release-jobs/kogito-task-console',
parameters: [
booleanParam(name: 'DRY_RUN', value: "${params.DRY_RUN}"),
string(name: 'BASE_REF', value: "${params.BASE_REF}"),
string(name: 'RELEASE_VERSION', value: "${params.RELEASE_VERSION}"),
string(name: 'RELEASE_CANDIDATE_VERSION', value: "${params.RELEASE_CANDIDATE_VERSION}")
]
).result
}

def kogitoManagementConsoleBuildJob() {
env.KOGITO_MANAGEMENT_CONSOLE_JOB_RESULT = build(
job: 'KIE/kie-tools/kie-tools-release-jobs/kogito-management-console',
Expand Down Expand Up @@ -824,6 +814,19 @@ def kieSandboxImageBuildJob() {
env.KIE_SANDBOX_URL = openShiftUtils.getAppRoute("${env.OPENSHIFT_NAMESPACE}", 'kie-sandbox', "${pipelineVars.openshiftCredentialsId}")
}

def kieSandboxAcceleratorQuarkusBuildJob() {
env.KIE_SANDBOX_IMAGE_JOB_RESULT = build(
job: 'KIE/kie-tools/kie-tools-release-jobs/kie-sandbox-accelerator-quarkus',
parameters: [
booleanParam(name: 'DRY_RUN', value: "${params.DRY_RUN}"),
string(name: 'BASE_REF', value: "${params.BASE_REF}"),
string(name: 'RELEASE_VERSION', value: "${params.RELEASE_VERSION}"),
string(name: 'RELEASE_CANDIDATE_VERSION', value: "${params.RELEASE_CANDIDATE_VERSION}")
]
).result
env.KIE_SANDBOX_URL = openShiftUtils.getAppRoute("${env.OPENSHIFT_NAMESPACE}", 'kie-sandbox', "${pipelineVars.openshiftCredentialsId}")
}

def kieSandboxHelmChartBuildJob() {
env.KIE_SANDBOX_HELM_CHART_JOB_RESULT = build(
job: 'KIE/kie-tools/kie-tools-release-jobs/kie-sandbox-helm-chart',
Expand Down
2 changes: 1 addition & 1 deletion .ci/jenkins/Jenkinsfile.release-candidate
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ pipeline {
string(name: 'BRANCH_NAME', description: 'Set the Git branch to checkout (0.0.x)', trim: true)
string(name: 'RELEASE_VERSION', description: 'Release version', trim: true)
string(name: 'TAG_NAME', description: 'Tag name to be created', trim: true)
string(description: 'Runners', name: 'RUNNERS', defaultValue: '{"chrome_extensions":"true","cors_proxy_image":"true","dashbuilder_viewer_image":"true","dev_deployment_base_image":"true","dev_deployment_dmn_form_webapp_image":"true","dev_deployment_kogito_quakus_blank_app_image":"true","dev_deployment_upload_service":"true","extended_services":"true","jbpm_quarkus_devui":"true","kie_sandbox_extended_services_image":"true","kie_sandbox_helm_chart":"true","kie_sandbox_image":"true","kn_plugin_workflow":"true","kogito_task_console":"true","kogito_management_console":"true","kogito_swf_builder":"true","kogito_swf_devmode":"true","kogito_serverless_operator":"true","npm_packages":"true","online_editor":"true","runtime_tools_consoles_helm_chart":"true","serverless_logic_web_tools":"true","serverless_logic_web_tools_base_builder_image":"true","serverless_logic_web_tools_swf_builder_image":"true","serverless_logic_web_tools_swf_dev_mode_image":"true","standalone_editors_cdn":"true","sonataflow_quarkus_devui":"true","vscode_extensions_dev":"true","vscode_extensions_prod":"true"}')
string(description: 'Runners', name: 'RUNNERS', defaultValue: '{"chrome_extensions":"true","cors_proxy_image":"true","dashbuilder_viewer_image":"true","dev_deployment_base_image":"true","kie_sandbox_accelerator_quarkus":"true","dev_deployment_dmn_form_webapp_image":"true","dev_deployment_kogito_quakus_blank_app_image":"true","dev_deployment_upload_service":"true","extended_services":"true","jbpm_quarkus_devui":"true","kie_sandbox_extended_services_image":"true","kie_sandbox_helm_chart":"true","kie_sandbox_image":"true","kn_plugin_workflow":"true","kogito_task_console":"true","kogito_management_console":"true","kogito_swf_builder":"true","kogito_swf_devmode":"true","kogito_serverless_operator":"true","npm_packages":"true","online_editor":"true","runtime_tools_consoles_helm_chart":"true","serverless_logic_web_tools":"true","serverless_logic_web_tools_base_builder_image":"true","serverless_logic_web_tools_swf_builder_image":"true","serverless_logic_web_tools_swf_dev_mode_image":"true","standalone_editors_cdn":"true","sonataflow_quarkus_devui":"true","vscode_extensions_dev":"true","vscode_extensions_prod":"true"}')
}

stages {
Expand Down
2 changes: 1 addition & 1 deletion .ci/jenkins/Jenkinsfile.release-dry-run
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ pipeline {
build job: 'KIE/kie-tools/kie-tools-release-build', parameters: [
booleanParam(name: 'DRY_RUN', value: true),
string(name: 'BASE_REF', value: 'main'),
string(name: 'RUNNERS', value: '{"chrome_extensions":"true","cors_proxy_image":"true","dashbuilder_viewer_image":"true","dev_deployment_base_image":"true","dev_deployment_dmn_form_webapp_image":"true","dev_deployment_kogito_quakus_blank_app_image":"true","dev_deployment_upload_service":"true","extended_services":"true","jbpm_quarkus_devui":"true","kie_sandbox_extended_services_image":"true","kie_sandbox_helm_chart":"true","kie_sandbox_image":"true","kn_plugin_workflow":"true","kogito_task_console":"true","kogito_management_console":"true","kogito_swf_builder":"true","kogito_swf_devmode":"true","kogito_serverless_operator":"true","npm_packages":"true","online_editor":"true","runtime_tools_consoles_helm_chart":"true","serverless_logic_web_tools":"true","serverless_logic_web_tools_base_builder_image":"true","serverless_logic_web_tools_swf_builder_image":"true","serverless_logic_web_tools_swf_dev_mode_image":"true","standalone_editors_cdn":"true","sonataflow_quarkus_devui":"true","vscode_extensions_dev":"true","vscode_extensions_prod":"true"}')
string(name: 'RUNNERS', value: '{"chrome_extensions":"true","cors_proxy_image":"true","dashbuilder_viewer_image":"true","dev_deployment_base_image":"true","kie_sandbox_accelerator_quarkus":"true","dev_deployment_dmn_form_webapp_image":"true","dev_deployment_kogito_quakus_blank_app_image":"true","dev_deployment_upload_service":"true","extended_services":"true","jbpm_quarkus_devui":"true","kie_sandbox_extended_services_image":"true","kie_sandbox_helm_chart":"true","kie_sandbox_image":"true","kn_plugin_workflow":"true","kogito_task_console":"true","kogito_management_console":"true","kogito_swf_builder":"true","kogito_swf_devmode":"true","kogito_serverless_operator":"true","npm_packages":"true","online_editor":"true","runtime_tools_consoles_helm_chart":"true","serverless_logic_web_tools":"true","serverless_logic_web_tools_base_builder_image":"true","serverless_logic_web_tools_swf_builder_image":"true","serverless_logic_web_tools_swf_dev_mode_image":"true","standalone_editors_cdn":"true","sonataflow_quarkus_devui":"true","vscode_extensions_dev":"true","vscode_extensions_prod":"true"}')
]
}
}
Expand Down
2 changes: 1 addition & 1 deletion .ci/jenkins/Jenkinsfile.release-publish
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ pipeline {

parameters {
string(description: 'Release Version', name: 'RELEASE_VERSION', defaultValue: '0.0.0')
string(description: 'Runners', name: 'RUNNERS', defaultValue: '{"chrome_extensions":"true","cors_proxy_image":"true","dashbuilder_viewer_image":"true","dev_deployment_base_image":"true","dev_deployment_dmn_form_webapp_image":"true","dev_deployment_kogito_quakus_blank_app_image":"true","dev_deployment_upload_service":"true","extended_services":"true","jbpm_quarkus_devui":"true","kie_sandbox_extended_services_image":"true","kie_sandbox_helm_chart":"true","kie_sandbox_image":"true","kn_plugin_workflow":"true","kogito_task_console":"true","kogito_management_console":"true","kogito_swf_builder":"true","kogito_swf_devmode":"true","kogito_serverless_operator":"true","npm_packages":"true","online_editor":"true","runtime_tools_consoles_helm_chart":"true","serverless_logic_web_tools":"true","serverless_logic_web_tools_base_builder_image":"true","serverless_logic_web_tools_swf_builder_image":"true","serverless_logic_web_tools_swf_dev_mode_image":"true","standalone_editors_cdn":"true","sonataflow_quarkus_devui":"true","vscode_extensions_dev":"true","vscode_extensions_prod":"true"}')
string(description: 'Runners', name: 'RUNNERS', defaultValue: '{"chrome_extensions":"true","cors_proxy_image":"true","dashbuilder_viewer_image":"true","dev_deployment_base_image":"true","kie_sandbox_accelerator_quarkus":"true","dev_deployment_dmn_form_webapp_image":"true","dev_deployment_kogito_quakus_blank_app_image":"true","dev_deployment_upload_service":"true","extended_services":"true","jbpm_quarkus_devui":"true","kie_sandbox_extended_services_image":"true","kie_sandbox_helm_chart":"true","kie_sandbox_image":"true","kn_plugin_workflow":"true","kogito_task_console":"true","kogito_management_console":"true","kogito_swf_builder":"true","kogito_swf_devmode":"true","kogito_serverless_operator":"true","npm_packages":"true","online_editor":"true","runtime_tools_consoles_helm_chart":"true","serverless_logic_web_tools":"true","serverless_logic_web_tools_base_builder_image":"true","serverless_logic_web_tools_swf_builder_image":"true","serverless_logic_web_tools_swf_dev_mode_image":"true","standalone_editors_cdn":"true","sonataflow_quarkus_devui":"true","vscode_extensions_dev":"true","vscode_extensions_prod":"true"}')
}

stages {
Expand Down
213 changes: 213 additions & 0 deletions .ci/jenkins/release-jobs/Jenkinsfile.kie-sandbox-accelerator-quarkus
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)
}
}
}
Loading

0 comments on commit 1c14677

Please sign in to comment.