diff --git a/.ci/jenkins/Jenkinsfile.daily-dev-publish b/.ci/jenkins/Jenkinsfile.daily-dev-publish index 1a39084705a..56fd21e0c92 100644 --- a/.ci/jenkins/Jenkinsfile.daily-dev-publish +++ b/.ci/jenkins/Jenkinsfile.daily-dev-publish @@ -596,7 +596,7 @@ pipeline { steps { dir('kie-tools') { script { - withCredentials([usernamePassword(credentialsId: "${pipelineVars.mavenDeployRepositoryCredentialsId}", usernameVariable: 'REPOSITORY_USER', passwordVariable: 'REPOSITORY_TOKEN')]) { + withCredentials([usernamePassword(credentialsId: "${pipelineVars.mavenDeploySnapshotsCredentialsId}", usernameVariable: 'REPOSITORY_USER', passwordVariable: 'REPOSITORY_TOKEN')]) { configFileProvider([configFile(fileId: "${pipelineVars.mavenSettingsConfigFileId}", variable: 'MAVEN_SETTINGS_FILE')]) { sh """#!/bin/bash -el export KIE_TOOLS_BUILD__mavenDeploySkip=false diff --git a/.ci/jenkins/Jenkinsfile.release-build b/.ci/jenkins/Jenkinsfile.release-build index a498a382d52..ade739b87b4 100644 --- a/.ci/jenkins/Jenkinsfile.release-build +++ b/.ci/jenkins/Jenkinsfile.release-build @@ -35,8 +35,7 @@ pipeline { string(description: 'Base Ref', name: 'BASE_REF') string(description: 'Release Version', name: 'RELEASE_VERSION', defaultValue: '0.0.0') string(description: 'Upload asset url', name: 'UPLOAD_ASSET_URL', defaultValue: '') - string(description: 'Runners', name: 'RUNNERS', defaultValue: '{"dev_deployment_base_image":"false","dev_deployment_kogito_quakus_blank_app_image":"false","dev_deployment_dmn_form_webapp_image":"false","dev_deployment_upload_service":"false","kie_sandbox_image":"false","kie_sandbox_extended_services_image":"false","cors_proxy_image":"false","online_editor":"false", "chrome_extensions":"false","vscode_extensions_dev":"false","vscode_extensions_prod":"false","npm_packages":"false","standalone_editors_cdn":"false","extended_services":"false","serverless_logic_web_tools":"false","serverless_logic_web_tools_swf_builder_image":"false","serverless_logic_web_tools_base_builder_image":"false","serverless_logic_web_tools_swf_dev_mode_image":"false","dashbuilder_viewer_image":"false","kn_plugin_workflow":"false","kie_sandbox_helm_chart":"false","kogito_task_console":"false","kogito_management_console":"false","kogito_swf_builder":"false","kogito_swf_devmode":"false","kogito_serverless_operator":"false","jbpm_quarkus_devui":"false","sonataflow_quarkus_devui":"false","runtime_tools_consoles_helm_chart":"false"}') - booleanParam(description: 'Release Candidate', name: 'RELEASE_CANDIDATE', defaultValue: false) + string(description: 'Runners', name: 'RUNNERS', defaultValue: '{"chrome_extensions":"false","cors_proxy_image":"false","dashbuilder_viewer_image":"false","dev_deployment_base_image":"false","dev_deployment_dmn_form_webapp_image":"false","dev_deployment_kogito_quakus_blank_app_image":"false","dev_deployment_upload_service":"false","extended_services":"false","jbpm_quarkus_devui":"false","kie_sandbox_extended_services_image":"false","kie_sandbox_helm_chart":"false","kie_sandbox_image":"false","kn_plugin_workflow":"false","kogito_task_console":"false","kogito_management_console":"false","kogito_swf_builder":"false","kogito_swf_devmode":"false","kogito_serverless_operator":"false","npm_packages":"false","online_editor":"false","runtime_tools_consoles_helm_chart": "false","serverless_logic_web_tools":"false","serverless_logic_web_tools_base_builder_image":"false","serverless_logic_web_tools_swf_builder_image":"false","serverless_logic_web_tools_swf_dev_mode_image":"false","standalone_editors_cdn":"false","sonataflow_quarkus_devui":"false","vscode_extensions_dev":"false","vscode_extensions_prod":"false"}') string(description: 'Release Candidate Version', name: 'RELEASE_CANDIDATE_VERSION', defaultValue: '') } @@ -74,73 +73,16 @@ pipeline { stage('Set Runners') { steps { script { - runners = readJSON text: "${params.RUNNERS}" - 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 - env.DEV_DEPLOYMENT_UPLOAD_SERVICE = runners.dev_deployment_upload_service - env.KIE_SANDBOX_IMAGE = runners.kie_sandbox_image - env.KIE_SANDBOX_EXTENDED_SERVICES_IMAGE = runners.kie_sandbox_extended_services_image - env.CORS_PROXY_IMAGE = runners.cors_proxy_image - env.ONLINE_EDITOR = runners.online_editor - env.CHROME_EXTENSIONS = runners.chrome_extensions - env.VSCODE_EXTENSIONS_DEV = runners.vscode_extensions_dev - env.VSCODE_EXTENSIONS_PROD = runners.vscode_extensions_prod - env.NPM_PACKAGES = runners.npm_packages - env.STANDALONE_EDITORS_CDN = runners.standalone_editors_cdn - env.EXTENDED_SERVICES = runners.extended_services - env.SERVERLESS_LOGIC_WEB_TOOLS = runners.serverless_logic_web_tools - env.SERVERLESS_LOGIC_WEB_TOOLS_SWF_BUILDER_IMAGE = runners.serverless_logic_web_tools_swf_builder_image - env.SERVERLESS_LOGIC_WEB_TOOLS_BASE_BUILDER_IMAGE = runners.serverless_logic_web_tools_base_builder_image - env.SERVERLESS_LOGIC_WEB_TOOLS_SWF_DEV_MODE_IMAGE = runners.serverless_logic_web_tools_swf_dev_mode_image - env.DASHBUILDER_VIEWER_IMAGE = runners.dashbuilder_viewer_image - env.KN_PLUGIN_WORKFLOW = runners.kn_plugin_workflow - env.KIE_SANDBOX_HELM_CHART = runners.kie_sandbox_helm_chart - env.KOGITO_TASK_CONSOLE = runners.kogito_task_console - env.KOGITO_MANAGEMENT_CONSOLE = runners.kogito_management_console - env.KOGITO_SWF_BUILDER = runners.kogito_swf_builder - env.KOGITO_SWF_DEVMODE = runners.kogito_swf_devmode - env.KOGITO_SERVERLESS_OPERATOR = runners.kogito_serverless_operator - env.JBPM_QUARKUS_DEVUI = runners.jbpm_quarkus_devui - env.SONATAFLOW_QUARKUS_DEVUI = runners.sonataflow_quarkus_devui - env.RUNTIME_TOOLS_CONSOLES_HELM_CHART = runners.runtime_tools_consoles_helm_chart + setRunners() } } } stage('Print Runners') { steps { - sh """ - 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}" - echo "dev_deployment_upload_service: ${env.DEV_DEPLOYMENT_UPLOAD_SERVICE}" - echo "kie_sandbox_image: ${env.KIE_SANDBOX_IMAGE}" - echo "kie_sandbox_extended_services_image: ${env.KIE_SANDBOX_EXTENDED_SERVICES_IMAGE}" - echo "cors_proxy_image: ${env.CORS_PROXY_IMAGE}" - echo "online_editor: ${env.ONLINE_EDITOR}" - echo "chrome_extensions: ${env.CHROME_EXTENSIONS}" - echo "vscode_extensions_dev: ${env.VSCODE_EXTENSIONS_DEV}" - echo "vscode_extensions_prod: ${env.VSCODE_EXTENSIONS_PROD}" - echo "npm_packages: ${env.NPM_PACKAGES}" - echo "standalone_editors_cdn: ${env.STANDALONE_EDITORS_CDN}" - echo "extended_services: ${env.EXTENDED_SERVICES}" - echo "serverless_logic_web_tools: ${env.SERVERLESS_LOGIC_WEB_TOOLS}" - echo "serverless_logic_web_tools_swf_builder_image: ${env.SERVERLESS_LOGIC_WEB_TOOLS_SWF_BUILDER_IMAGE}" - echo "serverless_logic_web_tools_base_builder_image: ${env.SERVERLESS_LOGIC_WEB_TOOLS_BASE_BUILDER_IMAGE}" - echo "serverless_logic_web_tools_swf_dev_mode_image: ${env.SERVERLESS_LOGIC_WEB_TOOLS_SWF_DEV_MODE_IMAGE}" - echo "dashbuilder_viewer_image: ${env.DASHBUILDER_VIEWER_IMAGE}" - echo "kn_plugin_workflow: ${env.KN_PLUGIN_WORKFLOW}" - echo "kie_sandbox_helm_chart: ${env.KIE_SANDBOX_HELM_CHART}" - echo "kogito_task_console: ${env.KOGITO_TASK_CONSOLE}" - echo "kogito_management_console: ${env.KOGITO_MANAGEMENT_CONSOLE}" - echo "kogito_swf_builder: ${env.KOGITO_SWF_BUILDER}" - echo "kogito_swf_devmode: ${env.KOGITO_SWF_DEVMODE}" - echo "kogito_serverless_operator: ${env.KOGITO_SERVERLESS_OPERATOR}" - echo "jbpm_quarkus_devui: ${env.JBPM_QUARKUS_DEVUI}" - echo "sonataflow_quarkus_devui: ${env.SONATAFLOW_QUARKUS_DEVUI}" - echo "runtime_tools_consoles_helm_chart: ${env.RUNTIME_TOOLS_CONSOLES_HELM_CHART}" - """.trim() + script { + printRunners() + } } } @@ -152,18 +94,7 @@ pipeline { } steps { script { - env.DEV_DEPLOYMENT_KOGITO_QUARKUS_BLANK_APP_IMAGE_JOB_RESULT = build( - wait: true, - job: 'KIE/kie-tools/kie-tools-release-jobs/dev-deployment-kogito-quarkus-blank-app-image', - 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}"), - booleanParam(name: 'RELEASE_CANDIDATE', value: "${params.RELEASE_CANDIDATE}"), - string(name: 'RELEASE_CANDIDATE_VERSION', value: "${params.RELEASE_CANDIDATE_VERSION}"), - string(name: 'RELEASE_CANDIDATE_VERSION', value: "${params.RELEASE_CANDIDATE_VERSION}") - ] - ).result + devDeploymentKogitoQuarkusBlankAppImageBuildJob() } } } @@ -174,18 +105,7 @@ pipeline { } steps { script { - env.DEV_DEPLOYMENT_UPLOAD_SERVICE_JOB_RESULT = build( - wait: true, - job: 'KIE/kie-tools/kie-tools-release-jobs/dev-deployment-upload-service', - 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: 'UPLOAD_ASSET_URL', value: "${params.UPLOAD_ASSET_URL}"), - booleanParam(name: 'RELEASE_CANDIDATE', value: "${params.RELEASE_CANDIDATE}"), - string(name: 'RELEASE_CANDIDATE_VERSION', value: "${params.RELEASE_CANDIDATE_VERSION}") - ] - ).result + devDeploymentUploadServiceBuildJob() } } } @@ -196,16 +116,7 @@ pipeline { } steps { script { - env.VSCODE_EXTENSIONS_DEV_JOB_RESULT = build( - wait: true, - job: 'KIE/kie-tools/kie-tools-release-jobs/vscode-extensions-dev', - 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: 'UPLOAD_ASSET_URL', value: "${params.UPLOAD_ASSET_URL}") - ] - ).result + vscodeExtensionsDevBuildJob() } } } @@ -216,18 +127,7 @@ pipeline { } steps { script { - env.CHROME_EXTENSIONS_JOB_RESULT = build( - wait: true, - job: 'KIE/kie-tools/kie-tools-release-jobs/vscode-extensions-prod', - 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: 'UPLOAD_ASSET_URL', value: "${params.UPLOAD_ASSET_URL}"), - booleanParam(name: 'RELEASE_CANDIDATE', value: "${params.RELEASE_CANDIDATE}"), - string(name: 'RELEASE_CANDIDATE_VERSION', value: "${params.RELEASE_CANDIDATE_VERSION}") - ] - ).result + vscodeExtensionsProdBuildJob() } } } @@ -238,17 +138,7 @@ pipeline { } steps { script { - env.NPM_PACKAGES_JOB_RESULT = build( - wait: true, - job: 'KIE/kie-tools/kie-tools-release-jobs/npm-packages', - 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}"), - booleanParam(name: 'RELEASE_CANDIDATE', value: "${params.RELEASE_CANDIDATE}"), - string(name: 'RELEASE_CANDIDATE_VERSION', value: "${params.RELEASE_CANDIDATE_VERSION}") - ] - ).result + npmPackagesBuildJob() } } } @@ -259,18 +149,7 @@ pipeline { } steps { script { - env.KN_PLUGIN_WORKFLOW_JOB_RESULT = build( - wait: true, - job: 'KIE/kie-tools/kie-tools-release-jobs/kn-plugin-workflow', - 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: 'UPLOAD_ASSET_URL', value: "${params.UPLOAD_ASSET_URL}"), - booleanParam(name: 'RELEASE_CANDIDATE', value: "${params.RELEASE_CANDIDATE}"), - string(name: 'RELEASE_CANDIDATE_VERSION', value: "${params.RELEASE_CANDIDATE_VERSION}") - ] - ).result + knPluginWorkflowBuildJob() } } } @@ -281,17 +160,7 @@ pipeline { } steps { script { - env.SERVERLESS_LOGIC_WEB_TOOLS_SWF_BUILDER_IMAGE_JOB_RESULT = build( - wait: true, - job: 'KIE/kie-tools/kie-tools-release-jobs/serverless-logic-web-tools-swf-builder-image', - 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}"), - booleanParam(name: 'RELEASE_CANDIDATE', value: "${params.RELEASE_CANDIDATE}"), - string(name: 'RELEASE_CANDIDATE_VERSION', value: "${params.RELEASE_CANDIDATE_VERSION}") - ] - ).result + serverlessLogicWebToolsSwfBuilderImageBuildJob() } } } @@ -302,17 +171,7 @@ pipeline { } steps { script { - env.SERVERLESS_LOGIC_WEB_TOOLS_SWF_DEV_MODE_IMAGE_JOB_RESULT = build( - wait: true, - job: 'KIE/kie-tools/kie-tools-release-jobs/serverless-logic-web-tools-swf-dev-mode-image', - 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}"), - booleanParam(name: 'RELEASE_CANDIDATE', value: "${params.RELEASE_CANDIDATE}"), - string(name: 'RELEASE_CANDIDATE_VERSION', value: "${params.RELEASE_CANDIDATE_VERSION}") - ] - ).result + serverlessLogicWebToolsSwfDevModeImageBuildJob() } } } @@ -323,17 +182,7 @@ pipeline { } steps { script { - env.SERVERLESS_LOGIC_WEB_TOOLS_BASE_BUILDER_IMAGE_JOB_RESULT = build( - wait: true, - job: 'KIE/kie-tools/kie-tools-release-jobs/serverless-logic-web-tools-base-builder-image', - 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}"), - booleanParam(name: 'RELEASE_CANDIDATE', value: "${params.RELEASE_CANDIDATE}"), - string(name: 'RELEASE_CANDIDATE_VERSION', value: "${params.RELEASE_CANDIDATE_VERSION}") - ] - ).result + serverlessLogicWebToolsBaseBuilderImageBuildJob() } } } @@ -344,17 +193,7 @@ pipeline { } steps { script { - env.DASHBUILDER_VIEWER_IMAGE_JOB_RESULT = build( - wait: true, - job: 'KIE/kie-tools/kie-tools-release-jobs/dashbuilder-viewer-image', - 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}"), - booleanParam(name: 'RELEASE_CANDIDATE', value: "${params.RELEASE_CANDIDATE}"), - string(name: 'RELEASE_CANDIDATE_VERSION', value: "${params.RELEASE_CANDIDATE_VERSION}") - ] - ).result + dashbuilderViewerImageBuildJob() } } } @@ -365,15 +204,7 @@ pipeline { } steps { script { - env.SERVERLESS_LOGIC_WEB_TOOLS_JOB_RESULT = build( - wait: true, - job: 'KIE/kie-tools/kie-tools-release-jobs/serverless-logic-web-tools', - 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}") - ] - ).result + serverlessLogicWebToolsBuildJob() } } } @@ -384,17 +215,7 @@ pipeline { } steps { script { - env.KOGITO_TASK_CONSOLE_JOB_RESULT = build( - wait: true, - 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}"), - booleanParam(name: 'RELEASE_CANDIDATE', value: "${params.RELEASE_CANDIDATE}"), - string(name: 'RELEASE_CANDIDATE_VERSION', value: "${params.RELEASE_CANDIDATE_VERSION}") - ] - ).result + kogitoTaskConsoleBuildJob() } } } @@ -405,17 +226,7 @@ pipeline { } steps { script { - env.KOGITO_MANAGEMENT_CONSOLE_JOB_RESULT = build( - wait: true, - job: 'KIE/kie-tools/kie-tools-release-jobs/kogito-management-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}"), - booleanParam(name: 'RELEASE_CANDIDATE', value: "${params.RELEASE_CANDIDATE}"), - string(name: 'RELEASE_CANDIDATE_VERSION', value: "${params.RELEASE_CANDIDATE_VERSION}") - ] - ).result + kogitoManagementConsoleBuildJob() } } } @@ -426,17 +237,7 @@ pipeline { } steps { script { - env.KOGITO_SWF_BUILDER_JOB_RESULT = build( - wait: true, - job: 'KIE/kie-tools/kie-tools-release-jobs/sonataflow-builder', - 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}"), - booleanParam(name: 'RELEASE_CANDIDATE', value: "${params.RELEASE_CANDIDATE}"), - string(name: 'RELEASE_CANDIDATE_VERSION', value: "${params.RELEASE_CANDIDATE_VERSION}") - ] - ).result + kogitoSwfBuilderBuildJob() } } } @@ -447,17 +248,7 @@ pipeline { } steps { script { - env.KOGITO_SWF_DEVMODE_JOB_RESULT = build( - wait: true, - job: 'KIE/kie-tools/kie-tools-release-jobs/sonataflow-devmode', - 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}"), - booleanParam(name: 'RELEASE_CANDIDATE', value: "${params.RELEASE_CANDIDATE}"), - string(name: 'RELEASE_CANDIDATE_VERSION', value: "${params.RELEASE_CANDIDATE_VERSION}") - ] - ).result + kogitoSwfDevmodeBuildJob() } } } @@ -468,56 +259,7 @@ pipeline { } steps { script { - env.KOGITO_SERVERLESS_OPERATOR_JOB_RESULT = build( - wait: true, - job: 'KIE/kie-tools/kie-tools-release-jobs/sonataflow-operator', - 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}"), - booleanParam(name: 'RELEASE_CANDIDATE', value: "${params.RELEASE_CANDIDATE}"), - string(name: 'RELEASE_CANDIDATE_VERSION', value: "${params.RELEASE_CANDIDATE_VERSION}") - ] - ).result - } - } - } - - stage('JBPM Quarkus Dev UI') { - when { - expression { env.JBPM_QUARKUS_DEVUI == 'true' } - } - steps { - script { - env.JBPM_QUARKUS_DEVUI_JOB_RESULT = build( - wait: true, - job: 'KIE/kie-tools/kie-tools-release-jobs/jbpm-quarkus-devui', - 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}") - ] - ).result - } - } - } - - stage('Sonataflow Quarkus Dev UI') { - when { - expression { env.SONATAFLOW_QUARKUS_DEVUI == 'true' } - } - steps { - script { - env.SONATAFLOW_QUARKUS_DEVUI_JOB_RESULT = build( - wait: true, - job: 'KIE/kie-tools/kie-tools-release-jobs/sonataflow-quarkus-devui', - 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}"), - booleanParam(name: 'RELEASE_CANDIDATE', value: "${params.RELEASE_CANDIDATE}") - ] - ).result + kogitoServerlessOperatorBuildJob() } } } @@ -528,15 +270,7 @@ pipeline { } steps { script { - env.JBPM_QUARKUS_DEVUI_JOB_RESULT = build( - wait: true, - job: 'KIE/kie-tools/kie-tools-release-jobs/jbpm-quarkus-devui', - 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}") - ] - ).result + jbpmQuarkusDevuiBuildJob() } } } @@ -547,15 +281,7 @@ pipeline { } steps { script { - env.SONATAFLOW_QUARKUS_DEVUI_JOB_RESULT = build( - wait: true, - job: 'KIE/kie-tools/kie-tools-release-jobs/sonataflow-quarkus-devui', - 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}") - ] - ).result + sonataflowQuarkusDevuiBuildJob() } } } @@ -568,17 +294,7 @@ pipeline { } steps { script { - env.DEV_DEPLOYMENT_BASE_IMAGE_JOB_RESULT = build( - wait: true, - job: 'KIE/kie-tools/kie-tools-release-jobs/dev-deployment-base-image', - 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}"), - booleanParam(name: 'RELEASE_CANDIDATE', value: "${params.RELEASE_CANDIDATE}"), - string(name: 'RELEASE_CANDIDATE_VERSION', value: "${params.RELEASE_CANDIDATE_VERSION}") - ] - ).result + devDeploymentBaseImageBuildJob() } } } @@ -589,17 +305,7 @@ pipeline { } steps { script { - env.DEV_DEPLOYMENT_DMN_FORM_WEBAPP_IMAGE_JOB_RESULT = build( - wait: true, - job: 'KIE/kie-tools/kie-tools-release-jobs/dev-deployment-dmn-form-webapp-image', - 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}"), - booleanParam(name: 'RELEASE_CANDIDATE', value: "${params.RELEASE_CANDIDATE}"), - string(name: 'RELEASE_CANDIDATE_VERSION', value: "${params.RELEASE_CANDIDATE_VERSION}") - ] - ).result + devDeploymentDmnFormWebappImageBuildJob() } } } @@ -610,18 +316,7 @@ pipeline { } steps { script { - env.EXTENDED_SERVICES_JOB_RESULT = build( - wait: true, - job: 'KIE/kie-tools/kie-tools-release-jobs/extended-services', - 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: 'UPLOAD_ASSET_URL', value: "${params.UPLOAD_ASSET_URL}"), - booleanParam(name: 'RELEASE_CANDIDATE', value: "${params.RELEASE_CANDIDATE}"), - string(name: 'RELEASE_CANDIDATE_VERSION', value: "${params.RELEASE_CANDIDATE_VERSION}") - ] - ).result + extendedServicesBuildJob() } } } @@ -632,17 +327,7 @@ pipeline { } steps { script { - env.ONLINE_EDITOR_JOB_RESULT = build( - wait: true, - job: 'KIE/kie-tools/kie-tools-release-jobs/online-editor', - 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}"), - booleanParam(name: 'RELEASE_CANDIDATE', value: "${params.RELEASE_CANDIDATE}"), - string(name: 'RELEASE_CANDIDATE_VERSION', value: "${params.RELEASE_CANDIDATE_VERSION}") - ] - ).result + onlineEditorBuildJob() } } } @@ -653,18 +338,7 @@ pipeline { } steps { script { - env.CHROME_EXTENSIONS_JOB_RESULT = build( - wait: true, - job: 'KIE/kie-tools/kie-tools-release-jobs/chrome-extensions', - 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: 'UPLOAD_ASSET_URL', value: "${params.UPLOAD_ASSET_URL}"), - booleanParam(name: 'RELEASE_CANDIDATE', value: "${params.RELEASE_CANDIDATE}"), - string(name: 'RELEASE_CANDIDATE_VERSION', value: "${params.RELEASE_CANDIDATE_VERSION}") - ] - ).result + chromeExtensionsBuildJob() } } } @@ -675,17 +349,7 @@ pipeline { } steps { script { - env.STANDALONE_EDITORS_CDN_JOB_RESULT = build( - wait: true, - job: 'KIE/kie-tools/kie-tools-release-jobs/standalone-editors-cdn', - 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}"), - booleanParam(name: 'RELEASE_CANDIDATE', value: "${params.RELEASE_CANDIDATE}"), - string(name: 'RELEASE_CANDIDATE_VERSION', value: "${params.RELEASE_CANDIDATE_VERSION}") - ] - ).result + standaloneEditorsCdnBuildJob() } } } @@ -700,19 +364,7 @@ pipeline { } steps { script { - env.KIE_SANDBOX_EXTENDED_SERVICES_IMAGE_JOB_RESULT = build( - wait: true, - job: 'KIE/kie-tools/kie-tools-release-jobs/kie-sandbox-extended-services', - 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}"), - booleanParam(name: 'RELEASE_CANDIDATE', value: "${params.RELEASE_CANDIDATE}"), - string(name: 'RELEASE_CANDIDATE_VERSION', value: "${params.RELEASE_CANDIDATE_VERSION}") - ] - ).result - - env.KIE_SANDBOX_EXTENDED_SERVICES_URL = openShiftUtils.getAppRoute("${env.OPENSHIFT_NAMESPACE}", 'kie-sandbox-extended-services', "${pipelineVars.openshiftCredentialsId}") + kieSandboxExtendedServicesImageBuildJob() } } } @@ -723,19 +375,7 @@ pipeline { } steps { script { - env.CORS_PROXY_IMAGE_JOB_RESULT = build( - wait: true, - job: 'KIE/kie-tools/kie-tools-release-jobs/cors-proxy', - 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}"), - booleanParam(name: 'RELEASE_CANDIDATE', value: "${params.RELEASE_CANDIDATE}"), - string(name: 'RELEASE_CANDIDATE_VERSION', value: "${params.RELEASE_CANDIDATE_VERSION}") - ] - ).result - - env.KIE_SANDBOX_CORS_PROXY_URL = openShiftUtils.getAppRoute("${env.OPENSHIFT_NAMESPACE}", 'cors-proxy', "${pipelineVars.openshiftCredentialsId}") + corsProxyImageBuildJob() } } } @@ -746,21 +386,7 @@ pipeline { } steps { script { - env.KIE_SANDBOX_IMAGE_JOB_RESULT = build( - wait: true, - job: 'KIE/kie-tools/kie-tools-release-jobs/kie-sandbox', - 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: 'KIE_SANDBOX_EXTENDED_SERVICES_URL', value: "${env.KIE_SANDBOX_EXTENDED_SERVICES_URL}"), - string(name: 'KIE_SANDBOX_CORS_PROXY_URL', value: "${env.KIE_SANDBOX_CORS_PROXY_URL}"), - booleanParam(name: 'RELEASE_CANDIDATE', value: "${params.RELEASE_CANDIDATE}"), - string(name: 'RELEASE_CANDIDATE_VERSION', value: "${params.RELEASE_CANDIDATE_VERSION}") - ] - ).result - - env.KIE_SANDBOX_URL = openShiftUtils.getAppRoute("${env.OPENSHIFT_NAMESPACE}", 'kie-sandbox', "${pipelineVars.openshiftCredentialsId}") + kieSandboxImageBuildJob() } } } @@ -771,17 +397,7 @@ pipeline { } steps { script { - env.KIE_SANDBOX_HELM_CHART_JOB_RESULT = build( - wait: true, - job: 'KIE/kie-tools/kie-tools-release-jobs/kie-sandbox-helm-chart', - 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}"), - booleanParam(name: 'RELEASE_CANDIDATE', value: "${params.RELEASE_CANDIDATE}"), - string(name: 'RELEASE_CANDIDATE_VERSION', value: "${params.RELEASE_CANDIDATE_VERSION}") - ] - ).result + kieSandboxHelmChartBuildJob() } } } @@ -792,17 +408,7 @@ pipeline { } steps { script { - env.RUNTIME_TOOLS_CONSOLES_HELM_CHART_JOB_RESULT = build( - wait: true, - job: 'KIE/kie-tools/kie-tools-release-jobs/runtime-tools-consoles-helm-chart', - 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}"), - booleanParam(name: 'RELEASE_CANDIDATE', value: "${params.RELEASE_CANDIDATE}"), - string(name: 'RELEASE_CANDIDATE_VERSION', value: "${params.RELEASE_CANDIDATE_VERSION}") - ] - ).result + runtimeToolsConsolesHelmChartBuildJob() } } } @@ -818,3 +424,427 @@ pipeline { } } } + +def setRunners() { + runners = readJSON text: "${params.RUNNERS}" + 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 + env.DEV_DEPLOYMENT_UPLOAD_SERVICE = runners.dev_deployment_upload_service + env.KIE_SANDBOX_IMAGE = runners.kie_sandbox_image + env.KIE_SANDBOX_EXTENDED_SERVICES_IMAGE = runners.kie_sandbox_extended_services_image + env.CORS_PROXY_IMAGE = runners.cors_proxy_image + env.ONLINE_EDITOR = runners.online_editor + env.CHROME_EXTENSIONS = runners.chrome_extensions + env.VSCODE_EXTENSIONS_DEV = runners.vscode_extensions_dev + env.VSCODE_EXTENSIONS_PROD = runners.vscode_extensions_prod + env.NPM_PACKAGES = runners.npm_packages + env.STANDALONE_EDITORS_CDN = runners.standalone_editors_cdn + env.EXTENDED_SERVICES = runners.extended_services + env.SERVERLESS_LOGIC_WEB_TOOLS = runners.serverless_logic_web_tools + env.SERVERLESS_LOGIC_WEB_TOOLS_SWF_BUILDER_IMAGE = runners.serverless_logic_web_tools_swf_builder_image + env.SERVERLESS_LOGIC_WEB_TOOLS_BASE_BUILDER_IMAGE = runners.serverless_logic_web_tools_base_builder_image + env.SERVERLESS_LOGIC_WEB_TOOLS_SWF_DEV_MODE_IMAGE = runners.serverless_logic_web_tools_swf_dev_mode_image + env.DASHBUILDER_VIEWER_IMAGE = runners.dashbuilder_viewer_image + env.KN_PLUGIN_WORKFLOW = runners.kn_plugin_workflow + env.KIE_SANDBOX_HELM_CHART = runners.kie_sandbox_helm_chart + env.KOGITO_TASK_CONSOLE = runners.kogito_task_console + env.KOGITO_MANAGEMENT_CONSOLE = runners.kogito_management_console + env.KOGITO_SWF_BUILDER = runners.kogito_swf_builder + env.KOGITO_SWF_DEVMODE = runners.kogito_swf_devmode + env.KOGITO_SERVERLESS_OPERATOR = runners.kogito_serverless_operator + env.JBPM_QUARKUS_DEVUI = runners.jbpm_quarkus_devui + env.SONATAFLOW_QUARKUS_DEVUI = runners.sonataflow_quarkus_devui + env.RUNTIME_TOOLS_CONSOLES_HELM_CHART = runners.runtime_tools_consoles_helm_chart +} + +def printRunners() { + sh """ + 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}" + echo "dev_deployment_upload_service: ${env.DEV_DEPLOYMENT_UPLOAD_SERVICE}" + echo "kie_sandbox_image: ${env.KIE_SANDBOX_IMAGE}" + echo "kie_sandbox_extended_services_image: ${env.KIE_SANDBOX_EXTENDED_SERVICES_IMAGE}" + echo "cors_proxy_image: ${env.CORS_PROXY_IMAGE}" + echo "online_editor: ${env.ONLINE_EDITOR}" + echo "chrome_extensions: ${env.CHROME_EXTENSIONS}" + echo "vscode_extensions_dev: ${env.VSCODE_EXTENSIONS_DEV}" + echo "vscode_extensions_prod: ${env.VSCODE_EXTENSIONS_PROD}" + echo "npm_packages: ${env.NPM_PACKAGES}" + echo "standalone_editors_cdn: ${env.STANDALONE_EDITORS_CDN}" + echo "extended_services: ${env.EXTENDED_SERVICES}" + echo "serverless_logic_web_tools: ${env.SERVERLESS_LOGIC_WEB_TOOLS}" + echo "serverless_logic_web_tools_swf_builder_image: ${env.SERVERLESS_LOGIC_WEB_TOOLS_SWF_BUILDER_IMAGE}" + echo "serverless_logic_web_tools_base_builder_image: ${env.SERVERLESS_LOGIC_WEB_TOOLS_BASE_BUILDER_IMAGE}" + echo "serverless_logic_web_tools_swf_dev_mode_image: ${env.SERVERLESS_LOGIC_WEB_TOOLS_SWF_DEV_MODE_IMAGE}" + echo "dashbuilder_viewer_image: ${env.DASHBUILDER_VIEWER_IMAGE}" + echo "kn_plugin_workflow: ${env.KN_PLUGIN_WORKFLOW}" + echo "kie_sandbox_helm_chart: ${env.KIE_SANDBOX_HELM_CHART}" + echo "kogito_task_console: ${env.KOGITO_TASK_CONSOLE}" + echo "kogito_management_console: ${env.KOGITO_MANAGEMENT_CONSOLE}" + echo "kogito_swf_builder: ${env.KOGITO_SWF_BUILDER}" + echo "kogito_swf_devmode: ${env.KOGITO_SWF_DEVMODE}" + echo "kogito_serverless_operator: ${env.KOGITO_SERVERLESS_OPERATOR}" + echo "jbpm_quarkus_devui: ${env.JBPM_QUARKUS_DEVUI}" + echo "sonataflow_quarkus_devui: ${env.SONATAFLOW_QUARKUS_DEVUI}" + echo "runtime_tools_consoles_helm_chart: ${env.RUNTIME_TOOLS_CONSOLES_HELM_CHART}" + """.trim() +} + +def devDeploymentKogitoQuarkusBlankAppImageBuildJob() { + env.DEV_DEPLOYMENT_KOGITO_QUARKUS_BLANK_APP_IMAGE_JOB_RESULT = build( + job: 'KIE/kie-tools/kie-tools-release-jobs/dev-deployment-kogito-quarkus-blank-app-image', + 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 devDeploymentUploadServiceBuildJob() { + env.DEV_DEPLOYMENT_UPLOAD_SERVICE_JOB_RESULT = build( + job: 'KIE/kie-tools/kie-tools-release-jobs/dev-deployment-upload-service', + 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: 'UPLOAD_ASSET_URL', value: "${params.UPLOAD_ASSET_URL}"), + string(name: 'RELEASE_CANDIDATE_VERSION', value: "${params.RELEASE_CANDIDATE_VERSION}") + ] + ).result +} + +def vscodeExtensionsDevBuildJob() { + env.VSCODE_EXTENSIONS_DEV_JOB_RESULT = build( + wait: true, + job: 'KIE/kie-tools/kie-tools-release-jobs/vscode-extensions-dev', + 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: 'UPLOAD_ASSET_URL', value: "${params.UPLOAD_ASSET_URL}") + ] + ).result +} + +def vscodeExtensionsProdBuildJob() { + env.VSCODE_EXTENSIONS_PROD_JOB_RESULT = build( + job: 'KIE/kie-tools/kie-tools-release-jobs/vscode-extensions-prod', + 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: 'UPLOAD_ASSET_URL', value: "${params.UPLOAD_ASSET_URL}"), + string(name: 'RELEASE_CANDIDATE_VERSION', value: "${params.RELEASE_CANDIDATE_VERSION}") + ] + ).result +} + +def npmPackagesBuildJob() { + env.NPM_PACKAGES_JOB_RESULT = build( + job: 'KIE/kie-tools/kie-tools-release-jobs/npm-packages', + 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 knPluginWorkflowBuildJob() { + env.KN_PLUGIN_WORKFLOW_JOB_RESULT = build( + job: 'KIE/kie-tools/kie-tools-release-jobs/kn-plugin-workflow', + 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: 'UPLOAD_ASSET_URL', value: "${params.UPLOAD_ASSET_URL}"), + string(name: 'RELEASE_CANDIDATE_VERSION', value: "${params.RELEASE_CANDIDATE_VERSION}") + ] + ).result +} + +def serverlessLogicWebToolsSwfBuilderImageBuildJob() { + env.SERVERLESS_LOGIC_WEB_TOOLS_SWF_BUILDER_IMAGE_JOB_RESULT = build( + job: 'KIE/kie-tools/kie-tools-release-jobs/serverless-logic-web-tools-swf-builder-image', + 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 serverlessLogicWebToolsSwfDevModeImageBuildJob() { + env.SERVERLESS_LOGIC_WEB_TOOLS_SWF_DEV_MODE_IMAGE_JOB_RESULT = build( + job: 'KIE/kie-tools/kie-tools-release-jobs/serverless-logic-web-tools-swf-dev-mode-image', + 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 serverlessLogicWebToolsBaseBuilderImageBuildJob() { + env.SERVERLESS_LOGIC_WEB_TOOLS_BASE_BUILDER_IMAGE_JOB_RESULT = build( + job: 'KIE/kie-tools/kie-tools-release-jobs/serverless-logic-web-tools-base-builder-image', + 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 dashbuilderViewerImageBuildJob() { + env.DASHBUILDER_VIEWER_IMAGE_JOB_RESULT = build( + job: 'KIE/kie-tools/kie-tools-release-jobs/dashbuilder-viewer-image', + 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 serverlessLogicWebToolsBuildJob() { + env.SERVERLESS_LOGIC_WEB_TOOLS_JOB_RESULT = build( + job: 'KIE/kie-tools/kie-tools-release-jobs/serverless-logic-web-tools', + 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}") + ] + ).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', + 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 kogitoSwfBuilderBuildJob() { + env.KOGITO_SWF_BUILDER_JOB_RESULT = build( + job: 'KIE/kie-tools/kie-tools-release-jobs/kogito-swf-builder', + 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 kogitoSwfDevmodeBuildJob() { + env.KOGITO_SWF_DEVMODE_JOB_RESULT = build( + job: 'KIE/kie-tools/kie-tools-release-jobs/kogito-swf-devmode', + 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 kogitoServerlessOperatorBuildJob() { + env.KOGITO_SERVERLESS_OPERATOR_JOB_RESULT = build( + job: 'KIE/kie-tools/kie-tools-release-jobs/kogito-serverless-operator', + 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 jbpmQuarkusDevuiBuildJob() { + env.JBPM_QUARKUS_DEVUI_JOB_RESULT = build( + job: 'KIE/kie-tools/kie-tools-release-jobs/jbpm-quarkus-devui', + 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}") + ] + ).result +} + +def sonataflowQuarkusDevuiBuildJob() { + env.SONATAFLOW_QUARKUS_DEVUI_JOB_RESULT = build( + job: 'KIE/kie-tools/kie-tools-release-jobs/sonataflow-quarkus-devui', + 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}") + ] + ).result +} + +def devDeploymentBaseImageBuildJob() { + env.DEV_DEPLOYMENT_BASE_IMAGE_JOB_RESULT = build( + job: 'KIE/kie-tools/kie-tools-release-jobs/dev-deployment-base-image', + 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 devDeploymentDmnFormWebappImageBuildJob() { + env.DEV_DEPLOYMENT_DMN_FORM_WEBAPP_IMAGE_JOB_RESULT = build( + job: 'KIE/kie-tools/kie-tools-release-jobs/dev-deployment-dmn-form-webapp-image', + 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 extendedServicesBuildJob() { + env.EXTENDED_SERVICES_JOB_RESULT = build( + job: 'KIE/kie-tools/kie-tools-release-jobs/extended-services', + 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: 'UPLOAD_ASSET_URL', value: "${params.UPLOAD_ASSET_URL}"), + string(name: 'RELEASE_CANDIDATE_VERSION', value: "${params.RELEASE_CANDIDATE_VERSION}") + ] + ).result +} + +def onlineEditorBuildJob() { + env.ONLINE_EDITOR_JOB_RESULT = build( + job: 'KIE/kie-tools/kie-tools-release-jobs/online-editor', + 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 chromeExtensionsBuildJob() { + env.CHROME_EXTENSIONS_JOB_RESULT = build( + job: 'KIE/kie-tools/kie-tools-release-jobs/chrome-extensions', + 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: 'UPLOAD_ASSET_URL', value: "${params.UPLOAD_ASSET_URL}"), + string(name: 'RELEASE_CANDIDATE_VERSION', value: "${params.RELEASE_CANDIDATE_VERSION}") + ] + ).result +} + +def standaloneEditorsCdnBuildJob() { + env.STANDALONE_EDITORS_CDN_JOB_RESULT = build( + job: 'KIE/kie-tools/kie-tools-release-jobs/standalone-editors-cdn', + 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 kieSandboxExtendedServicesImageBuildJob() { + env.KIE_SANDBOX_EXTENDED_SERVICES_IMAGE_JOB_RESULT = build( + job: 'KIE/kie-tools/kie-tools-release-jobs/kie-sandbox-extended-services', + 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_EXTENDED_SERVICES_URL = openShiftUtils.getAppRoute("${env.OPENSHIFT_NAMESPACE}", 'kie-sandbox-extended-services', "${pipelineVars.openshiftCredentialsId}") +} + +def corsProxyImageBuildJob() { + env.CORS_PROXY_IMAGE_JOB_RESULT = build( + job: 'KIE/kie-tools/kie-tools-release-jobs/cors-proxy', + 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_CORS_PROXY_URL = openShiftUtils.getAppRoute("${env.OPENSHIFT_NAMESPACE}", 'cors-proxy', "${pipelineVars.openshiftCredentialsId}") +} + +def kieSandboxImageBuildJob() { + env.KIE_SANDBOX_IMAGE_JOB_RESULT = build( + job: 'KIE/kie-tools/kie-tools-release-jobs/kie-sandbox', + 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: 'KIE_SANDBOX_EXTENDED_SERVICES_URL', value: "${env.KIE_SANDBOX_EXTENDED_SERVICES_URL}"), + string(name: 'KIE_SANDBOX_CORS_PROXY_URL', value: "${env.KIE_SANDBOX_CORS_PROXY_URL}"), + 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', + 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 runtimeToolsConsolesHelmChartBuildJob() { + env.RUNTIME_TOOLS_CONSOLES_HELM_CHART_JOB_RESULT = build( + wait: true, + job: 'KIE/kie-tools/kie-tools-release-jobs/runtime-tools-consoles-helm-chart', + 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 +} diff --git a/.ci/jenkins/Jenkinsfile.release-candidate b/.ci/jenkins/Jenkinsfile.release-candidate index 8476f256969..d095223c448 100644 --- a/.ci/jenkins/Jenkinsfile.release-candidate +++ b/.ci/jenkins/Jenkinsfile.release-candidate @@ -31,9 +31,10 @@ pipeline { } parameters { - string(name: 'BRANCH_NAME', description: 'Set the Git branch to checkout (0.0.X)', trim: true) + 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"}') } stages { @@ -71,7 +72,7 @@ pipeline { steps { dir('kie-tools') { script { - buildUtils.setupPnpm() + buildUtils.setupPnpm("${pipelineVars.mavenSettingsConfigFileId}") } } } @@ -81,7 +82,7 @@ pipeline { steps { dir('kie-tools') { script { - buildUtils.pnpmBootstrap("${env.PNPM_FILTER_STRING}") + buildUtils.pnpmBootstrap() } } } @@ -131,7 +132,7 @@ pipeline { } } - stage('Commit and Push changes') { + stage('Commit changes') { steps { dir('kie-tools') { script { @@ -139,7 +140,6 @@ pipeline { git add . git commit --allow-empty -am "Apache KIE ${params.RELEASE_VERSION} release" """.trim() - githubUtils.pushObject('origin', "${params.NEW_BRANCH_NAME}", "${pipelineVars.asfGithubPushCredentialsId}") } } } @@ -173,11 +173,9 @@ pipeline { steps { build job: 'KIE/kie-tools/kie-tools-release-build', parameters: [ booleanParam(name: 'DRY_RUN', value: false), - string(name: 'BASE_REF', value: "${env.BRANCH_NAME}"), + string(name: 'BASE_REF', value: "${env.TAG_NAME}"), string(name: 'RELEASE_VERSION', value: "${params.RELEASE_VERSION}"), - string(name: 'UPLOAD_ASSET_URL', value: "${env.RELEASE_UPLOAD_ASSET_URL}"), string(name: 'RUNNERS', value: "${params.RUNNERS}"), - booleanParam(name: 'RELEASE_CANDIDATE', value: true), string(name: 'RELEASE_CANDIDATE_VERSION', value: "${TAG_NAME}") ] } diff --git a/.ci/jenkins/Jenkinsfile.release-candidate.quarkus-accelerator b/.ci/jenkins/Jenkinsfile.release-candidate.quarkus-accelerator new file mode 100644 index 00000000000..ba444a19180 --- /dev/null +++ b/.ci/jenkins/Jenkinsfile.release-candidate.quarkus-accelerator @@ -0,0 +1,125 @@ +/* + * 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. + */ + +@Library('jenkins-pipeline-shared-libraries')_ + +pipeline { + agent { + docker { + image 'docker.io/apache/incubator-kie-tools-ci-build:10.0.999' + args '--shm-size=2g --privileged --group-add docker' + label util.avoidFaultyNodes() + } + } + + options { + timeout(time: 60, unit: 'MINUTES') + } + + parameters { + string(name: 'BRANCH_NAME', description: 'Set the Git branch to checkout (0.0.999)', trim: true) + string(name: 'RELEASE_VERSION', description: 'Release version', trim: true) + string(name: 'TAG_NAME', description: 'Tag name to be created', trim: true) + } + + stages { + stage('Load local shared scripts') { + steps { + script { + pipelineVars = load '.ci/jenkins/shared-scripts/pipelineVars.groovy' + githubUtils = load '.ci/jenkins/shared-scripts/githubUtils.groovy' + } + } + } + + stage('Clean workspace') { + steps { + cleanWs(deleteDirs: true, disableDeferredWipeout: true) + } + } + + stage('Checkout kie-sandbox-quarkus-accelerator') { + steps { + dir('kie-sandbox-quarkus-accelerator') { + script { + githubUtils.checkoutRepo( + 'http://github.com/apache/incubator-kie-sandbox-quarkus-accelerator.git', + "${params.BRANCH_NAME}", + "${pipelineVars.kieToolsBotGithubCredentialsId}" + ) + } + } + } + } + + stage('Setup Git repository') { + steps { + dir('kie-sandbox-quarkus-accelerator') { + script { + sh """#!/bin/bash -el + git config user.email asf-ci-kie@jenkins.kie.apache.org + git config user.name asf-ci-kie + git checkout ${params.BRANCH_NAME} + """.trim() + } + } + } + } + + stage('Update kogito BOM version') { + steps { + dir('kie-sandbox-quarkus-accelerator') { + script { + sh """#!/bin/bash -el + mvn versions:set-property -Dproperty=kogito.bom.version -DnewVersion=${params.RELEASE_VERSION} + """.trim() + } + } + } + } + + stage('Commit changes') { + steps { + dir('kie-sandbox-quarkus-accelerator') { + script { + sh """#!/bin/bash -el + git add . + git commit --allow-empty -am "Apache KIE ${params.RELEASE_VERSION} release" + """.trim() + } + } + } + } + + stage('Create a new tag') { + steps { + dir('kie-sandbox-quarkus-accelerator') { + script { + githubUtils.createTag("${params.TAG_NAME}") + githubUtils.pushObject('origin', "${params.TAG_NAME}", "${pipelineVars.asfCIGithubCredentialsId}") + } + } + } + } + } + + post { + always { + cleanWs(deleteDirs: true, disableDeferredWipeout: true) + } + } +} diff --git a/.ci/jenkins/Jenkinsfile.release-dry-run b/.ci/jenkins/Jenkinsfile.release-dry-run index 207cfd8bd64..44716f5d28f 100644 --- a/.ci/jenkins/Jenkinsfile.release-dry-run +++ b/.ci/jenkins/Jenkinsfile.release-dry-run @@ -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: '{"dev_deployment_base_image":"true","dev_deployment_kogito_quakus_blank_app_image":"true","dev_deployment_dmn_form_webapp_image":"true","dev_deployment_upload_service":"true","kie_sandbox_image":"true","kie_sandbox_extended_services_image":"true","cors_proxy_image":"true","online_editor":"true","chrome_extensions":"true","vscode_extensions_dev":"true","vscode_extensions_prod":"true","npm_packages":"true","standalone_editors_cdn":"true","extended_services":"true","serverless_logic_web_tools":"true","serverless_logic_web_tools_swf_builder_image":"true","serverless_logic_web_tools_base_builder_image":"true","serverless_logic_web_tools_swf_dev_mode_image":"true","dashbuilder_viewer_image":"true","kn_plugin_workflow":"true","kie_sandbox_helm_chart":"true","kogito_task_console":"true","kogito_management_console":"true","kogito_swf_builder":"true","kogito_swf_devmode":"true","kogito_serverless_operator":"true","jbpm_quarkus_devui":"false","sonataflow_quarkus_devui":"false","runtime_tools_consoles_helm_chart":"false"}') + 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"}') ] } } diff --git a/.ci/jenkins/Jenkinsfile.release-publish b/.ci/jenkins/Jenkinsfile.release-publish index 9d5cae693ed..e6d1e9a77d2 100644 --- a/.ci/jenkins/Jenkinsfile.release-publish +++ b/.ci/jenkins/Jenkinsfile.release-publish @@ -31,7 +31,7 @@ pipeline { parameters { string(description: 'Release Version', name: 'RELEASE_VERSION', defaultValue: '0.0.0') - string(description: 'Runners', name: 'RUNNERS', defaultValue: '{"dev_deployment_base_image":"true","dev_deployment_kogito_quakus_blank_app_image":"true","dev_deployment_dmn_form_webapp_image":"true","dev_deployment_upload_service":"true","kie_sandbox_image":"true","kie_sandbox_extended_services_image":"true","cors_proxy_image":"true","online_editor":"true","chrome_extensions":"true","vscode_extensions_dev":"true","vscode_extensions_prod":"true","npm_packages":"true","standalone_editors_cdn":"true","extended_services":"true","serverless_logic_web_tools":"true","serverless_logic_web_tools_swf_builder_image":"true","serverless_logic_web_tools_base_builder_image":"true","serverless_logic_web_tools_swf_dev_mode_image":"true","dashbuilder_viewer_image":"true","kn_plugin_workflow":"true","kie_sandbox_helm_chart":"true","kogito_task_console":"true","kogito_management_console":"true","kogito_swf_builder":"true","kogito_serverless_operator":"true","jbpm_quarkus_devui":"true","sonataflow_quarkus_devui":"true","runtime_tools_consoles_helm_chart":"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"}') } stages { diff --git a/.ci/jenkins/Jenkinsfile.weekly-publish b/.ci/jenkins/Jenkinsfile.weekly-publish index 6ca9e6dc1d7..5dd76e76907 100644 --- a/.ci/jenkins/Jenkinsfile.weekly-publish +++ b/.ci/jenkins/Jenkinsfile.weekly-publish @@ -115,7 +115,7 @@ pipeline { steps { dir('kie-tools') { script { - withCredentials([usernamePassword(credentialsId: "${pipelineVars.mavenDeployRepositoryCredentialsId}", usernameVariable: 'REPOSITORY_USER', passwordVariable: 'REPOSITORY_TOKEN')]) { + withCredentials([usernamePassword(credentialsId: "${pipelineVars.mavenDeploySnapshotsCredentialsId}", usernameVariable: 'REPOSITORY_USER', passwordVariable: 'REPOSITORY_TOKEN')]) { configFileProvider([configFile(fileId: "${pipelineVars.mavenSettingsConfigFileId}", variable: 'MAVEN_SETTINGS_FILE')]) { timestampedSnapshotVersion = getTimestampedSnapshotVersion() sh """#!/bin/bash -el diff --git a/.ci/jenkins/release-jobs/Jenkinsfile.chrome-extensions b/.ci/jenkins/release-jobs/Jenkinsfile.chrome-extensions index d1bc56fac62..4680482ec5d 100644 --- a/.ci/jenkins/release-jobs/Jenkinsfile.chrome-extensions +++ b/.ci/jenkins/release-jobs/Jenkinsfile.chrome-extensions @@ -31,7 +31,6 @@ pipeline { string(description: 'Release Version', name: 'RELEASE_VERSION', defaultValue: '0.0.0') string(description: 'Base Ref', name: 'BASE_REF') string(description: 'Upload Asset Url', name: 'UPLOAD_ASSET_URL') - booleanParam(description: 'Release Candidate', name: 'RELEASE_CANDIDATE', defaultValue: false) string(description: 'Release Candidate Version', name: 'RELEASE_CANDIDATE_VERSION', defaultValue: '') } @@ -63,6 +62,7 @@ pipeline { githubUtils = load '.ci/jenkins/shared-scripts/githubUtils.groovy' chromeStoreUtils = load '.ci/jenkins/shared-scripts/chromeStoreUtils.groovy' releaseUtils = load '.ci/jenkins/shared-scripts/releaseUtils.groovy' + zipUtils = load '.ci/jenkins/shared-scripts/zipUtils.groovy' } } } @@ -113,7 +113,7 @@ pipeline { steps { dir('kie-tools') { script { - buildUtils.setupPnpm() + buildUtils.setupPnpm("${pipelineVars.mavenSettingsConfigFileId}") } } } @@ -141,7 +141,7 @@ pipeline { stage('Upload Chrome Extension for Kogito KIE Editors') { when { - expression { !params.DRY_RUN } + expression { !params.DRY_RUN && params.RELEASE_CANDIDATE_VERSION == '' } } steps { script { @@ -158,7 +158,7 @@ pipeline { stage('Deploy Chrome Extension for KIE Editors to GitHub Pages (kogito-online)') { when { - expression { !params.DRY_RUN && !params.RELEASE_CANDIDATE } + expression { !params.DRY_RUN && params.RELEASE_CANDIDATE_VERSION == '' } } steps { dir('kogito-online') { @@ -193,7 +193,7 @@ pipeline { stage('Upload Chrome Extension for KIE Editors to the Chrome Store') { when { - expression { !params.DRY_RUN && !params.RELEASE_CANDIDATE } + expression { !params.DRY_RUN && params.RELEASE_CANDIDATE_VERSION == '' } } steps { script { @@ -209,7 +209,7 @@ pipeline { stage('Check Upload - Chrome Extension for KIE Editors') { when { - expression { !params.DRY_RUN && !params.RELEASE_CANDIDATE } + expression { !params.DRY_RUN && params.RELEASE_CANDIDATE_VERSION == '' } } steps { sh """#!/bin/bash -el @@ -220,7 +220,7 @@ pipeline { stage('Publish Chrome Extension for KIE Editors for users') { when { - expression { !params.DRY_RUN && !params.RELEASE_CANDIDATE } + expression { !params.DRY_RUN && params.RELEASE_CANDIDATE_VERSION == '' } } steps { script { @@ -235,7 +235,7 @@ pipeline { stage('Check Publish - Chrome Extension for KIE Editors') { when { - expression { !params.DRY_RUN && !params.RELEASE_CANDIDATE } + expression { !params.DRY_RUN && params.RELEASE_CANDIDATE_VERSION == '' } } steps { sh """#!/bin/bash -el @@ -246,7 +246,7 @@ pipeline { stage('Upload Chrome Extension for Serverless Workflow Editor') { when { - expression { !params.DRY_RUN && !params.RELEASE_CANDIDATE } + expression { !params.DRY_RUN && params.RELEASE_CANDIDATE_VERSION == '' } } steps { script { @@ -263,7 +263,7 @@ pipeline { stage('Deploy Chrome Extension for Serverless Workflow Editor to GitHub Pages (kogito-online)') { when { - expression { !params.DRY_RUN && !params.RELEASE_CANDIDATE } + expression { !params.DRY_RUN && params.RELEASE_CANDIDATE_VERSION == '' } } steps { dir('kogito-online') { @@ -294,7 +294,7 @@ pipeline { stage('Upload Chrome Extension for Serverless Workflow Editor to the Chrome Store') { when { - expression { !params.DRY_RUN && !params.RELEASE_CANDIDATE } + expression { !params.DRY_RUN && params.RELEASE_CANDIDATE_VERSION == '' } } steps { script { @@ -310,7 +310,7 @@ pipeline { stage('Check Upload - Chrome Extension for Serverless Workflow Editor') { when { - expression { !params.DRY_RUN && !params.RELEASE_CANDIDATE } + expression { !params.DRY_RUN && params.RELEASE_CANDIDATE_VERSION == '' } } steps { sh """#!/bin/bash -el @@ -321,7 +321,7 @@ pipeline { stage('Publish Chrome Extension for Serverless Workflow Editor for users') { when { - expression { !params.DRY_RUN && !params.RELEASE_CANDIDATE } + expression { !params.DRY_RUN && params.RELEASE_CANDIDATE_VERSION == '' } } steps { script { @@ -336,7 +336,7 @@ pipeline { stage('Check Publish - Chrome Extension for Serverless Workflow Editor') { when { - expression { !params.DRY_RUN && !params.RELEASE_CANDIDATE } + expression { !params.DRY_RUN && params.RELEASE_CANDIDATE_VERSION == '' } } steps { sh """#!/bin/bash -el @@ -347,17 +347,25 @@ pipeline { stage('Setup release candidate artifacts') { when { - expression { !params.DRY_RUN && params.RELEASE_CANDIDATE } + expression { !params.DRY_RUN && params.RELEASE_CANDIDATE_VERSION != '' } } steps { script { env.CHROME_EXTENSION_RELEASE_ZIP_FILE = "incubator-kie-${params.RELEASE_CANDIDATE_VERSION}-business-automation-chrome-extension.zip" env.SWF_CHROME_EXTENSION_RELEASE_ZIP_FILE = "incubator-kie-${params.RELEASE_CANDIDATE_VERSION}-sonataflow-chrome-extension.zip" + env.CHROME_EXTENSION_EDITORS_RELEASE_ZIP_FILE = "incubator-kie-${params.RELEASE_CANDIDATE_VERSION}-business-automation-chrome-extension-editors.zip" + env.SWF_CHROME_EXTENSION_EDITORS_RELEASE_ZIP_FILE = "incubator-kie-${params.RELEASE_CANDIDATE_VERSION}-sonataflow-chrome-extension-editors.zip" sh """#!/bin/bash -el - mkdir ${env.RELEASE_ARTIFACTS_DIR} + mkdir -p ${env.RELEASE_ARTIFACTS_DIR}/{business-automation-chrome-extension-editors,sonataflow-chrome-extension-editors} + cp -r kie-tools/packages/chrome-extension-pack-kogito-kie-editors/dist/{fonts,*-envelope.*} "${env.RELEASE_ARTIFACTS_DIR}/business-automation-chrome-extension-editors" + cp -r kie-tools/packages/chrome-extension-serverless-workflow-editor/dist/{fonts,diagram,*-envelope.*,*.bundle.js,*.worker.js} "${env.RELEASE_ARTIFACTS_DIR}/sonataflow-chrome-extension-editors" cp "kie-tools/packages/chrome-extension-pack-kogito-kie-editors/dist/chrome_extension_kogito_kie_editors_${params.RELEASE_VERSION}.zip" "${env.RELEASE_ARTIFACTS_DIR}/${CHROME_EXTENSION_RELEASE_ZIP_FILE}" cp "kie-tools/packages/chrome-extension-serverless-workflow-editor/dist/chrome_extension_serverless_workflow_editor_${params.RELEASE_VERSION}.zip" "${env.RELEASE_ARTIFACTS_DIR}/${SWF_CHROME_EXTENSION_RELEASE_ZIP_FILE}" + cd "${env.RELEASE_ARTIFACTS_DIR}/business-automation-chrome-extension-editors" && zip -r "${env.RELEASE_ARTIFACTS_DIR}/${env.CHROME_EXTENSION_EDITORS_RELEASE_ZIP_FILE}" . + cd "${env.RELEASE_ARTIFACTS_DIR}/sonataflow-chrome-extension-editors" && zip -r "${env.RELEASE_ARTIFACTS_DIR}/${env.SWF_CHROME_EXTENSION_EDITORS_RELEASE_ZIP_FILE}" . + rm -rf "${env.RELEASE_ARTIFACTS_DIR}/business-automation-chrome-extension-editors" + rm -rf "${env.RELEASE_ARTIFACTS_DIR}/sonataflow-chrome-extension-editors" """.trim() } } @@ -365,20 +373,24 @@ pipeline { stage('Sign artifacts for Apache release') { when { - expression { !params.DRY_RUN && params.RELEASE_CANDIDATE } + expression { !params.DRY_RUN && params.RELEASE_CANDIDATE_VERSION != '' } } steps { - script { - releaseUtils.setupSigningKey("${pipelineVars.asfReleaseGPGKeyCredentialsId}") - releaseUtils.signArtifact("${env.RELEASE_ARTIFACTS_DIR}/${env.CHROME_EXTENSION_RELEASE_ZIP_FILE}") - releaseUtils.signArtifact("${env.RELEASE_ARTIFACTS_DIR}/${env.SWF_CHROME_EXTENSION_RELEASE_ZIP_FILE}") + dir("${env.RELEASE_ARTIFACTS_DIR}") { + script { + releaseUtils.setupSigningKey("${pipelineVars.asfReleaseGPGKeyCredentialsId}") + releaseUtils.signArtifact("${env.CHROME_EXTENSION_RELEASE_ZIP_FILE}") + releaseUtils.signArtifact("${env.SWF_CHROME_EXTENSION_RELEASE_ZIP_FILE}") + releaseUtils.signArtifact("${env.CHROME_EXTENSION_EDITORS_RELEASE_ZIP_FILE}") + releaseUtils.signArtifact("${env.SWF_CHROME_EXTENSION_EDITORS_RELEASE_ZIP_FILE}") + } } } } stage('Publish Release Candidate artifacts') { when { - expression { !params.DRY_RUN && params.RELEASE_CANDIDATE } + expression { !params.DRY_RUN && params.RELEASE_CANDIDATE_VERSION != '' } } steps { script { diff --git a/.ci/jenkins/release-jobs/Jenkinsfile.cors-proxy b/.ci/jenkins/release-jobs/Jenkinsfile.cors-proxy index 9ad0bfe3106..3b10f40fdd4 100644 --- a/.ci/jenkins/release-jobs/Jenkinsfile.cors-proxy +++ b/.ci/jenkins/release-jobs/Jenkinsfile.cors-proxy @@ -30,7 +30,6 @@ pipeline { 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') - booleanParam(description: 'Release Candidate', name: 'RELEASE_CANDIDATE', defaultValue: false) string(description: 'Release Candidate Version', name: 'RELEASE_CANDIDATE_VERSION', defaultValue: '') } @@ -85,11 +84,15 @@ pipeline { } stage('Load upstream images') { + when { + expression { !params.DRY_RUN && params.RELEASE_CANDIDATE_VERSION != '' } + } steps { script { upstreamReleaseArtifactsDir = "${WORKSPACE}/upstream-release-artifacts" - releaseUtils.downloadReleaseArtifacts("${upstreamReleaseArtifactsDir}", "${params.RELEASE_CANDIDATE_VERSION}") - dockerUtils.loadImages(releaseUtils.getUpstreamImagesArtifactsList("${upstreamReleaseArtifactsDir}", "${params.RELEASE_CANDIDATE_VERSION}")) + releaseUtils.downloadReleaseArtifacts("${pipelineVars.asfReleaseStagingRepository}", "${upstreamReleaseArtifactsDir}", "${params.RELEASE_CANDIDATE_VERSION}") + upstreamImagesArtifacts = releaseUtils.getUpstreamImagesArtifactsList("${upstreamReleaseArtifactsDir}", "${params.RELEASE_CANDIDATE_VERSION}") + dockerUtils.loadImages(upstreamImagesArtifacts as String[]) } } } @@ -112,7 +115,7 @@ pipeline { steps { dir('kie-tools') { script { - buildUtils.setupPnpm() + buildUtils.setupPnpm("${pipelineVars.mavenSettingsConfigFileId}") } } } @@ -140,7 +143,7 @@ pipeline { stage('Push cors-proxy-image to Docker Hub') { when { - expression { !params.DRY_RUN && !params.RELEASE_CANDIDATE } + expression { !params.DRY_RUN && params.RELEASE_CANDIDATE_VERSION == '' } } steps { script { @@ -158,7 +161,7 @@ pipeline { stage('Deploy cors-proxy-image to OpenShift') { when { - expression { !params.DRY_RUN && !params.RELEASE_CANDIDATE } + expression { !params.DRY_RUN && params.RELEASE_CANDIDATE_VERSION == '' } } steps { script { @@ -177,11 +180,11 @@ pipeline { stage('Setup release candidate artifacts') { when { - expression { !params.DRY_RUN && params.RELEASE_CANDIDATE } + expression { !params.DRY_RUN && params.RELEASE_CANDIDATE_VERSION != '' } } steps { script { - env.RELEASE_IMAGE_TAR_FILE = "incubator-kie-${params.RELEASE_CANDIDATE_VERSION}-${env.CORS_PROXY_IMAGE__imageName}.tar.gz" + env.RELEASE_IMAGE_TAR_FILE = "incubator-kie-${params.RELEASE_CANDIDATE_VERSION}-cors-proxy-image.tar.gz" sh """#!/bin/bash -el mkdir ${env.RELEASE_ARTIFACTS_DIR} @@ -193,19 +196,21 @@ pipeline { stage('Sign artifact for Apache release') { when { - expression { !params.DRY_RUN && params.RELEASE_CANDIDATE } + expression { !params.DRY_RUN && params.RELEASE_CANDIDATE_VERSION != '' } } steps { - script { - releaseUtils.setupSigningKey("${pipelineVars.asfReleaseGPGKeyCredentialsId}") - releaseUtils.signArtifact("${env.RELEASE_ARTIFACTS_DIR}/${env.RELEASE_IMAGE_TAR_FILE}") + dir("${env.RELEASE_ARTIFACTS_DIR}") { + script { + releaseUtils.setupSigningKey("${pipelineVars.asfReleaseGPGKeyCredentialsId}") + releaseUtils.signArtifact("${env.RELEASE_IMAGE_TAR_FILE}") + } } } } stage('Publish Release Candidate artifacts') { when { - expression { !params.DRY_RUN && params.RELEASE_CANDIDATE } + expression { !params.DRY_RUN && params.RELEASE_CANDIDATE_VERSION != '' } } steps { script { diff --git a/.ci/jenkins/release-jobs/Jenkinsfile.dashbuilder-viewer-image b/.ci/jenkins/release-jobs/Jenkinsfile.dashbuilder-viewer-image index 45d00612c65..ac03e1cef08 100644 --- a/.ci/jenkins/release-jobs/Jenkinsfile.dashbuilder-viewer-image +++ b/.ci/jenkins/release-jobs/Jenkinsfile.dashbuilder-viewer-image @@ -30,7 +30,6 @@ pipeline { 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') - booleanParam(description: 'Release Candidate', name: 'RELEASE_CANDIDATE', defaultValue: false) string(description: 'Release Candidate Version', name: 'RELEASE_CANDIDATE_VERSION', defaultValue: '') } @@ -80,11 +79,15 @@ pipeline { } stage('Load upstream images') { + when { + expression { !params.DRY_RUN && params.RELEASE_CANDIDATE_VERSION != '' } + } steps { script { upstreamReleaseArtifactsDir = "${WORKSPACE}/upstream-release-artifacts" - releaseUtils.downloadReleaseArtifacts("${upstreamReleaseArtifactsDir}", "${params.RELEASE_CANDIDATE_VERSION}") - dockerUtils.loadImages(releaseUtils.getUpstreamImagesArtifactsList("${upstreamReleaseArtifactsDir}", "${params.RELEASE_CANDIDATE_VERSION}")) + releaseUtils.downloadReleaseArtifacts("${pipelineVars.asfReleaseStagingRepository}", "${upstreamReleaseArtifactsDir}", "${params.RELEASE_CANDIDATE_VERSION}") + upstreamImagesArtifacts = releaseUtils.getUpstreamImagesArtifactsList("${upstreamReleaseArtifactsDir}", "${params.RELEASE_CANDIDATE_VERSION}") + dockerUtils.loadImages(upstreamImagesArtifacts as String[]) } } } @@ -107,7 +110,7 @@ pipeline { steps { dir('kie-tools') { script { - buildUtils.setupPnpm() + buildUtils.setupPnpm("${pipelineVars.mavenSettingsConfigFileId}") } } } @@ -135,7 +138,7 @@ pipeline { stage('Push dashbuilder-viewer-image to Docker Hub') { when { - expression { !params.DRY_RUN && !params.RELEASE_CANDIDATE } + expression { !params.DRY_RUN && params.RELEASE_CANDIDATE_VERSION == '' } } steps { script { @@ -153,11 +156,11 @@ pipeline { stage('Setup release candidate artifacts') { when { - expression { !params.DRY_RUN && params.RELEASE_CANDIDATE } + expression { !params.DRY_RUN && params.RELEASE_CANDIDATE_VERSION != '' } } steps { script { - env.RELEASE_IMAGE_TAR_FILE = "incubator-kie-${params.RELEASE_CANDIDATE_VERSION}-${env.DASHBUILDER__viewerImageName}.tar.gz" + env.RELEASE_IMAGE_TAR_FILE = "incubator-kie-${params.RELEASE_CANDIDATE_VERSION}-dashbuilder-viewer-image.tar.gz" sh """#!/bin/bash -el mkdir ${env.RELEASE_ARTIFACTS_DIR} @@ -169,19 +172,21 @@ pipeline { stage('Sign artifact for Apache release') { when { - expression { !params.DRY_RUN && params.RELEASE_CANDIDATE } + expression { !params.DRY_RUN && params.RELEASE_CANDIDATE_VERSION != '' } } steps { - script { - releaseUtils.setupSigningKey("${pipelineVars.asfReleaseGPGKeyCredentialsId}") - releaseUtils.signArtifact("${env.RELEASE_ARTIFACTS_DIR}/${env.RELEASE_IMAGE_TAR_FILE}") + dir("${env.RELEASE_ARTIFACTS_DIR}") { + script { + releaseUtils.setupSigningKey("${pipelineVars.asfReleaseGPGKeyCredentialsId}") + releaseUtils.signArtifact("${env.RELEASE_IMAGE_TAR_FILE}") + } } } } stage('Publish Release Candidate artifacts') { when { - expression { !params.DRY_RUN && params.RELEASE_CANDIDATE } + expression { !params.DRY_RUN && params.RELEASE_CANDIDATE_VERSION != '' } } steps { script { diff --git a/.ci/jenkins/release-jobs/Jenkinsfile.dev-deployment-base-image b/.ci/jenkins/release-jobs/Jenkinsfile.dev-deployment-base-image index aee037d6f9e..daf309eb427 100644 --- a/.ci/jenkins/release-jobs/Jenkinsfile.dev-deployment-base-image +++ b/.ci/jenkins/release-jobs/Jenkinsfile.dev-deployment-base-image @@ -30,7 +30,6 @@ pipeline { 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') - booleanParam(description: 'Release Candidate', name: 'RELEASE_CANDIDATE', defaultValue: false) string(description: 'Release Candidate Version', name: 'RELEASE_CANDIDATE_VERSION', defaultValue: '') } @@ -80,11 +79,15 @@ pipeline { } stage('Load upstream images') { + when { + expression { !params.DRY_RUN && params.RELEASE_CANDIDATE_VERSION != '' } + } steps { script { upstreamReleaseArtifactsDir = "${WORKSPACE}/upstream-release-artifacts" - releaseUtils.downloadReleaseArtifacts("${upstreamReleaseArtifactsDir}", "${params.RELEASE_CANDIDATE_VERSION}") - dockerUtils.loadImages(releaseUtils.getUpstreamImagesArtifactsList("${upstreamReleaseArtifactsDir}", "${params.RELEASE_CANDIDATE_VERSION}")) + releaseUtils.downloadReleaseArtifacts("${pipelineVars.asfReleaseStagingRepository}", "${upstreamReleaseArtifactsDir}", "${params.RELEASE_CANDIDATE_VERSION}") + upstreamImagesArtifacts = releaseUtils.getUpstreamImagesArtifactsList("${upstreamReleaseArtifactsDir}", "${params.RELEASE_CANDIDATE_VERSION}") + dockerUtils.loadImages(upstreamImagesArtifacts as String[]) } } } @@ -107,7 +110,7 @@ pipeline { steps { dir('kie-tools') { script { - buildUtils.setupPnpm() + buildUtils.setupPnpm("${pipelineVars.mavenSettingsConfigFileId}") } } } @@ -135,7 +138,7 @@ pipeline { stage('Push dev-deployment-base-image to Docker Hub') { when { - expression { !params.DRY_RUN && !params.RELEASE_CANDIDATE } + expression { !params.DRY_RUN && params.RELEASE_CANDIDATE_VERSION == '' } } steps { script { @@ -153,7 +156,7 @@ pipeline { stage('Setup release candidate artifacts') { when { - expression { !params.DRY_RUN && params.RELEASE_CANDIDATE } + expression { !params.DRY_RUN && params.RELEASE_CANDIDATE_VERSION != '' } } steps { script { @@ -169,19 +172,21 @@ pipeline { stage('Sign artifact for Apache release') { when { - expression { !params.DRY_RUN && params.RELEASE_CANDIDATE } + expression { !params.DRY_RUN && params.RELEASE_CANDIDATE_VERSION != '' } } steps { - script { - releaseUtils.setupSigningKey("${pipelineVars.asfReleaseGPGKeyCredentialsId}") - releaseUtils.signArtifact("${env.RELEASE_ARTIFACTS_DIR}/${env.RELEASE_IMAGE_TAR_FILE}") + dir("${env.RELEASE_ARTIFACTS_DIR}") { + script { + releaseUtils.setupSigningKey("${pipelineVars.asfReleaseGPGKeyCredentialsId}") + releaseUtils.signArtifact("${env.RELEASE_IMAGE_TAR_FILE}") + } } } } stage('Publish Release Candidate artifacts') { when { - expression { !params.DRY_RUN && params.RELEASE_CANDIDATE } + expression { !params.DRY_RUN && params.RELEASE_CANDIDATE_VERSION != '' } } steps { script { diff --git a/.ci/jenkins/release-jobs/Jenkinsfile.dev-deployment-dmn-form-webapp-image b/.ci/jenkins/release-jobs/Jenkinsfile.dev-deployment-dmn-form-webapp-image index 778e8b7afa6..111627463a1 100644 --- a/.ci/jenkins/release-jobs/Jenkinsfile.dev-deployment-dmn-form-webapp-image +++ b/.ci/jenkins/release-jobs/Jenkinsfile.dev-deployment-dmn-form-webapp-image @@ -30,7 +30,6 @@ pipeline { 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') - booleanParam(description: 'Release Candidate', name: 'RELEASE_CANDIDATE', defaultValue: false) string(description: 'Release Candidate Version', name: 'RELEASE_CANDIDATE_VERSION', defaultValue: '') } @@ -80,11 +79,15 @@ pipeline { } stage('Load upstream images') { + when { + expression { !params.DRY_RUN && params.RELEASE_CANDIDATE_VERSION != '' } + } steps { script { upstreamReleaseArtifactsDir = "${WORKSPACE}/upstream-release-artifacts" - releaseUtils.downloadReleaseArtifacts("${upstreamReleaseArtifactsDir}", "${params.RELEASE_CANDIDATE_VERSION}") - dockerUtils.loadImages(releaseUtils.getUpstreamImagesArtifactsList("${upstreamReleaseArtifactsDir}", "${params.RELEASE_CANDIDATE_VERSION}")) + releaseUtils.downloadReleaseArtifacts("${pipelineVars.asfReleaseStagingRepository}", "${upstreamReleaseArtifactsDir}", "${params.RELEASE_CANDIDATE_VERSION}") + upstreamImagesArtifacts = releaseUtils.getUpstreamImagesArtifactsList("${upstreamReleaseArtifactsDir}", "${params.RELEASE_CANDIDATE_VERSION}") + dockerUtils.loadImages(upstreamImagesArtifacts as String[]) } } } @@ -107,7 +110,7 @@ pipeline { steps { dir('kie-tools') { script { - buildUtils.setupPnpm() + buildUtils.setupPnpm("${pipelineVars.mavenSettingsConfigFileId}") } } } @@ -135,7 +138,7 @@ pipeline { stage('Push dev-deployment-dmn-form-webapp-image to Docker Hub') { when { - expression { !params.DRY_RUN && !params.RELEASE_CANDIDATE } + expression { !params.DRY_RUN && params.RELEASE_CANDIDATE_VERSION == '' } } steps { script { @@ -153,7 +156,7 @@ pipeline { stage('Setup release candidate artifacts') { when { - expression { !params.DRY_RUN && params.RELEASE_CANDIDATE } + expression { !params.DRY_RUN && params.RELEASE_CANDIDATE_VERSION != '' } } steps { script { @@ -169,19 +172,21 @@ pipeline { stage('Sign artifact for Apache release') { when { - expression { !params.DRY_RUN && params.RELEASE_CANDIDATE } + expression { !params.DRY_RUN && params.RELEASE_CANDIDATE_VERSION != '' } } steps { - script { - releaseUtils.setupSigningKey("${pipelineVars.asfReleaseGPGKeyCredentialsId}") - releaseUtils.signArtifact("${env.RELEASE_ARTIFACTS_DIR}/${env.RELEASE_IMAGE_TAR_FILE}") + dir("${env.RELEASE_ARTIFACTS_DIR}") { + script { + releaseUtils.setupSigningKey("${pipelineVars.asfReleaseGPGKeyCredentialsId}") + releaseUtils.signArtifact("${env.RELEASE_IMAGE_TAR_FILE}") + } } } } stage('Publish Release Candidate artifacts') { when { - expression { !params.DRY_RUN && params.RELEASE_CANDIDATE } + expression { !params.DRY_RUN && params.RELEASE_CANDIDATE_VERSION != '' } } steps { script { diff --git a/.ci/jenkins/release-jobs/Jenkinsfile.dev-deployment-kogito-quarkus-blank-app-image b/.ci/jenkins/release-jobs/Jenkinsfile.dev-deployment-kogito-quarkus-blank-app-image index afac09da23d..c4f09261827 100644 --- a/.ci/jenkins/release-jobs/Jenkinsfile.dev-deployment-kogito-quarkus-blank-app-image +++ b/.ci/jenkins/release-jobs/Jenkinsfile.dev-deployment-kogito-quarkus-blank-app-image @@ -30,7 +30,6 @@ pipeline { 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') - booleanParam(description: 'Release Candidate', name: 'RELEASE_CANDIDATE', defaultValue: false) string(description: 'Release Candidate Version', name: 'RELEASE_CANDIDATE_VERSION', defaultValue: '') } @@ -80,11 +79,15 @@ pipeline { } stage('Load upstream images') { + when { + expression { !params.DRY_RUN && params.RELEASE_CANDIDATE_VERSION != '' } + } steps { script { upstreamReleaseArtifactsDir = "${WORKSPACE}/upstream-release-artifacts" - releaseUtils.downloadReleaseArtifacts("${upstreamReleaseArtifactsDir}", "${params.RELEASE_CANDIDATE_VERSION}") - dockerUtils.loadImages(releaseUtils.getUpstreamImagesArtifactsList("${upstreamReleaseArtifactsDir}", "${params.RELEASE_CANDIDATE_VERSION}")) + releaseUtils.downloadReleaseArtifacts("${pipelineVars.asfReleaseStagingRepository}", "${upstreamReleaseArtifactsDir}", "${params.RELEASE_CANDIDATE_VERSION}") + upstreamImagesArtifacts = releaseUtils.getUpstreamImagesArtifactsList("${upstreamReleaseArtifactsDir}", "${params.RELEASE_CANDIDATE_VERSION}") + dockerUtils.loadImages(upstreamImagesArtifacts as String[]) } } } @@ -107,7 +110,7 @@ pipeline { steps { dir('kie-tools') { script { - buildUtils.setupPnpm() + buildUtils.setupPnpm("${pipelineVars.mavenSettingsConfigFileId}") } } } @@ -135,7 +138,7 @@ pipeline { stage('Push dev-deployment-kogito-quarkus-blank-app-image to Docker Hub') { when { - expression { !params.DRY_RUN && !params.RELEASE_CANDIDATE } + expression { !params.DRY_RUN && params.RELEASE_CANDIDATE_VERSION == '' } } steps { script { @@ -153,7 +156,7 @@ pipeline { stage('Setup release candidate artifacts') { when { - expression { !params.DRY_RUN && params.RELEASE_CANDIDATE } + expression { !params.DRY_RUN && params.RELEASE_CANDIDATE_VERSION != '' } } steps { script { @@ -169,19 +172,21 @@ pipeline { stage('Sign artifact for Apache release') { when { - expression { !params.DRY_RUN && params.RELEASE_CANDIDATE } + expression { !params.DRY_RUN && params.RELEASE_CANDIDATE_VERSION != '' } } steps { - script { - releaseUtils.setupSigningKey("${pipelineVars.asfReleaseGPGKeyCredentialsId}") - releaseUtils.signArtifact("${env.RELEASE_ARTIFACTS_DIR}/${env.RELEASE_IMAGE_TAR_FILE}") + dir("${env.RELEASE_ARTIFACTS_DIR}") { + script { + releaseUtils.setupSigningKey("${pipelineVars.asfReleaseGPGKeyCredentialsId}") + releaseUtils.signArtifact("${env.RELEASE_IMAGE_TAR_FILE}") + } } } } stage('Publish Release Candidate artifacts') { when { - expression { !params.DRY_RUN && params.RELEASE_CANDIDATE } + expression { !params.DRY_RUN && params.RELEASE_CANDIDATE_VERSION != '' } } steps { script { diff --git a/.ci/jenkins/release-jobs/Jenkinsfile.dev-deployment-upload-service b/.ci/jenkins/release-jobs/Jenkinsfile.dev-deployment-upload-service index 6664587ef9c..707b4962359 100644 --- a/.ci/jenkins/release-jobs/Jenkinsfile.dev-deployment-upload-service +++ b/.ci/jenkins/release-jobs/Jenkinsfile.dev-deployment-upload-service @@ -31,7 +31,6 @@ pipeline { string(description: 'Release Version', name: 'RELEASE_VERSION', defaultValue: '0.0.0') string(description: 'Base Ref', name: 'BASE_REF') string(description: 'Upload Asset Url', name: 'UPLOAD_ASSET_URL') - booleanParam(description: 'Release Candidate', name: 'RELEASE_CANDIDATE', defaultValue: false) string(description: 'Release Candidate Version', name: 'RELEASE_CANDIDATE_VERSION', defaultValue: '') } @@ -74,20 +73,24 @@ pipeline { stage('Checkout kie-tools') { steps { - script { - githubUtils.checkoutRepo( - "http://github.com/${pipelineVars.githubRepositorySlug}.git", - "${params.BASE_REF}", - "${pipelineVars.kieToolsBotGithubCredentialsId}" - ) + dir('kie-tools') { + script { + githubUtils.checkoutRepo( + "http://github.com/${pipelineVars.githubRepositorySlug}.git", + "${params.BASE_REF}", + "${pipelineVars.kieToolsBotGithubCredentialsId}" + ) + } } } } stage('Setup PNPM') { steps { - script { - buildUtils.setupPnpm() + dir('kie-tools') { + script { + buildUtils.setupPnpm("${pipelineVars.mavenSettingsConfigFileId}") + } } } } @@ -114,7 +117,7 @@ pipeline { stage('Upload Dev Deployment Upload Service assets') { when { - expression { !params.DRY_RUN && !params.RELEASE_CANDIDATE } + expression { !params.DRY_RUN && params.RELEASE_CANDIDATE_VERSION == '' } } steps { script { @@ -188,7 +191,7 @@ pipeline { stage('Setup release candidate artifacts') { when { - expression { !params.DRY_RUN && params.RELEASE_CANDIDATE } + expression { !params.DRY_RUN && params.RELEASE_CANDIDATE_VERSION != '' } } steps { script { @@ -210,22 +213,24 @@ pipeline { stage('Sign artifacts for Apache release') { when { - expression { !params.DRY_RUN && params.RELEASE_CANDIDATE } + expression { !params.DRY_RUN && params.RELEASE_CANDIDATE_VERSION != '' } } steps { - script { - releaseUtils.setupSigningKey("${pipelineVars.asfReleaseGPGKeyCredentialsId}") - releaseUtils.signArtifact("${env.RELEASE_ARTIFACTS_DIR}/${env.DEV_DEPLOYMENT_UPLOAD_SERVICE_MAC_ARM64_RELEASE_FILE}") - releaseUtils.signArtifact("${env.RELEASE_ARTIFACTS_DIR}/${env.DEV_DEPLOYMENT_UPLOAD_SERVICE_MAC_X86_RELEASE_FILE}") - releaseUtils.signArtifact("${env.RELEASE_ARTIFACTS_DIR}/${env.DEV_DEPLOYMENT_UPLOAD_SERVICE_LINUX_X86_RELEASE_FILE}") - releaseUtils.signArtifact("${env.RELEASE_ARTIFACTS_DIR}/${env.DEV_DEPLOYMENT_UPLOAD_SERVICE_WINDOWS_X86_RELEASE_FILE}") + dir("${env.RELEASE_ARTIFACTS_DIR}") { + script { + releaseUtils.setupSigningKey("${pipelineVars.asfReleaseGPGKeyCredentialsId}") + releaseUtils.signArtifact("${env.DEV_DEPLOYMENT_UPLOAD_SERVICE_MAC_ARM64_RELEASE_FILE}") + releaseUtils.signArtifact("${env.DEV_DEPLOYMENT_UPLOAD_SERVICE_MAC_X86_RELEASE_FILE}") + releaseUtils.signArtifact("${env.DEV_DEPLOYMENT_UPLOAD_SERVICE_LINUX_X86_RELEASE_FILE}") + releaseUtils.signArtifact("${env.DEV_DEPLOYMENT_UPLOAD_SERVICE_WINDOWS_X86_RELEASE_FILE}") + } } } } stage('Publish Release Candidate artifacts') { when { - expression { !params.DRY_RUN && params.RELEASE_CANDIDATE } + expression { !params.DRY_RUN && params.RELEASE_CANDIDATE_VERSION != '' } } steps { script { diff --git a/.ci/jenkins/release-jobs/Jenkinsfile.extended-services b/.ci/jenkins/release-jobs/Jenkinsfile.extended-services index 74105dccb54..bb3d6fc5d17 100644 --- a/.ci/jenkins/release-jobs/Jenkinsfile.extended-services +++ b/.ci/jenkins/release-jobs/Jenkinsfile.extended-services @@ -31,7 +31,6 @@ pipeline { string(description: 'Release Version', name: 'RELEASE_VERSION', defaultValue: '0.0.0') string(description: 'Base Ref', name: 'BASE_REF') string(description: 'Upload Asset Url', name: 'UPLOAD_ASSET_URL') - booleanParam(description: 'Release Candidate', name: 'RELEASE_CANDIDATE', defaultValue: false) string(description: 'Release Candidate Version', name: 'RELEASE_CANDIDATE_VERSION', defaultValue: '') } @@ -74,20 +73,24 @@ pipeline { stage('Checkout kie-tools') { steps { - script { - githubUtils.checkoutRepo( - "http://github.com/${pipelineVars.githubRepositorySlug}.git", - "${params.BASE_REF}", - "${pipelineVars.kieToolsBotGithubCredentialsId}" - ) + dir('kie-tools') { + script { + githubUtils.checkoutRepo( + "http://github.com/${pipelineVars.githubRepositorySlug}.git", + "${params.BASE_REF}", + "${pipelineVars.kieToolsBotGithubCredentialsId}" + ) + } } } } stage('Setup PNPM') { steps { - script { - buildUtils.setupPnpm() + dir('kie-tools') { + script { + buildUtils.setupPnpm("${pipelineVars.mavenSettingsConfigFileId}") + } } } } @@ -114,7 +117,7 @@ pipeline { stage('Upload Extended Services for Linux') { when { - expression { !params.DRY_RUN && !params.RELEASE_CANDIDATE } + expression { !params.DRY_RUN && params.RELEASE_CANDIDATE_VERSION == '' } } steps { dir('kie-tools') { @@ -133,7 +136,7 @@ pipeline { stage('Setup release candidate artifacts') { when { - expression { !params.DRY_RUN && params.RELEASE_CANDIDATE } + expression { !params.DRY_RUN && params.RELEASE_CANDIDATE_VERSION != '' } } steps { script { @@ -149,19 +152,21 @@ pipeline { stage('Sign artifacts for Apache release') { when { - expression { !params.DRY_RUN && params.RELEASE_CANDIDATE } + expression { !params.DRY_RUN && params.RELEASE_CANDIDATE_VERSION != '' } } steps { - script { - releaseUtils.setupSigningKey("${pipelineVars.asfReleaseGPGKeyCredentialsId}") - releaseUtils.signArtifact("${env.RELEASE_ARTIFACTS_DIR}/${RELEASE_TAR_FILE}") + dir("${env.RELEASE_ARTIFACTS_DIR}") { + script { + releaseUtils.setupSigningKey("${pipelineVars.asfReleaseGPGKeyCredentialsId}") + releaseUtils.signArtifact("${RELEASE_TAR_FILE}") + } } } } stage('Publish Release Candidate artifacts') { when { - expression { !params.DRY_RUN && params.RELEASE_CANDIDATE } + expression { !params.DRY_RUN && params.RELEASE_CANDIDATE_VERSION != '' } } steps { script { diff --git a/.ci/jenkins/release-jobs/Jenkinsfile.jbpm-quarkus-devui b/.ci/jenkins/release-jobs/Jenkinsfile.jbpm-quarkus-devui index 6faee326836..973cbe0a516 100644 --- a/.ci/jenkins/release-jobs/Jenkinsfile.jbpm-quarkus-devui +++ b/.ci/jenkins/release-jobs/Jenkinsfile.jbpm-quarkus-devui @@ -30,7 +30,6 @@ pipeline { 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') - booleanParam(description: 'Release Candidate', name: 'RELEASE_CANDIDATE', defaultValue: false) } environment { @@ -88,7 +87,7 @@ pipeline { steps { dir('kie-tools') { script { - buildUtils.setupPnpm() + buildUtils.setupPnpm("${pipelineVars.mavenSettingsConfigFileId}") } } } @@ -119,7 +118,7 @@ pipeline { if (params.DRY_RUN) { env.KIE_TOOLS_BUILD__mavenDeploySkip = 'true' } - withCredentials([usernamePassword(credentialsId: "${pipelineVars.mavenDeployRepositoryCredentialsId}", usernameVariable: 'REPOSITORY_USER', passwordVariable: 'REPOSITORY_TOKEN')]) { + withCredentials([usernamePassword(credentialsId: "${pipelineVars.mavenDeployStagingCredentialsId}", usernameVariable: 'REPOSITORY_USER', passwordVariable: 'REPOSITORY_TOKEN')]) { configFileProvider([configFile(fileId: "${pipelineVars.mavenSettingsConfigFileId}", variable: 'MAVEN_SETTINGS_FILE')]) { sh """#!/bin/bash -el pnpm ${env.PNPM_FILTER_STRING} exec 'bash' '-c' 'echo -e "\n--settings=${MAVEN_SETTINGS_FILE}" >> .mvn/maven.config' diff --git a/.ci/jenkins/release-jobs/Jenkinsfile.kie-sandbox b/.ci/jenkins/release-jobs/Jenkinsfile.kie-sandbox index cfdba9ab81e..1204f17e9bf 100644 --- a/.ci/jenkins/release-jobs/Jenkinsfile.kie-sandbox +++ b/.ci/jenkins/release-jobs/Jenkinsfile.kie-sandbox @@ -32,7 +32,6 @@ pipeline { string(description: 'Base Ref', name: 'BASE_REF') string(description: 'Kie Sandbox Extendend Services Url', name: 'KIE_SANDBOX_EXTENDED_SERVICES_URL') string(description: 'Kie Sandbox Cors Proxy Url', name: 'KIE_SANDBOX_CORS_PROXY_URL') - booleanParam(description: 'Release Candidate', name: 'RELEASE_CANDIDATE', defaultValue: false) string(description: 'Release Candidate Version', name: 'RELEASE_CANDIDATE_VERSION', defaultValue: '') } @@ -101,11 +100,15 @@ pipeline { } stage('Load upstream images') { + when { + expression { !params.DRY_RUN && params.RELEASE_CANDIDATE_VERSION != '' } + } steps { script { upstreamReleaseArtifactsDir = "${WORKSPACE}/upstream-release-artifacts" - releaseUtils.downloadReleaseArtifacts("${upstreamReleaseArtifactsDir}", "${params.RELEASE_CANDIDATE_VERSION}") - dockerUtils.loadImages(releaseUtils.getUpstreamImagesArtifactsList("${upstreamReleaseArtifactsDir}", "${params.RELEASE_CANDIDATE_VERSION}")) + releaseUtils.downloadReleaseArtifacts("${pipelineVars.asfReleaseStagingRepository}", "${upstreamReleaseArtifactsDir}", "${params.RELEASE_CANDIDATE_VERSION}") + upstreamImagesArtifacts = releaseUtils.getUpstreamImagesArtifactsList("${upstreamReleaseArtifactsDir}", "${params.RELEASE_CANDIDATE_VERSION}") + dockerUtils.loadImages(upstreamImagesArtifacts as String[]) } } } @@ -128,7 +131,7 @@ pipeline { steps { dir('kie-tools') { script { - buildUtils.setupPnpm() + buildUtils.setupPnpm("${pipelineVars.mavenSettingsConfigFileId}") } } } @@ -174,7 +177,7 @@ pipeline { stage('Prepare environment variables for OpenShift deployment') { when { - expression { !params.DRY_RUN && !params.RELEASE_CANDIDATE } + expression { !params.DRY_RUN && params.RELEASE_CANDIDATE_VERSION == '' } } steps { sh """#!/bin/bash -el @@ -186,7 +189,7 @@ pipeline { stage('Deploy kie-sandbox-image to OpenShift') { when { - expression { !params.DRY_RUN && !params.RELEASE_CANDIDATE } + expression { !params.DRY_RUN && params.RELEASE_CANDIDATE_VERSION == '' } } steps { script { @@ -206,7 +209,7 @@ pipeline { stage('Setup release candidate artifacts') { when { - expression { !params.DRY_RUN && params.RELEASE_CANDIDATE } + expression { !params.DRY_RUN && params.RELEASE_CANDIDATE_VERSION != '' } } steps { script { @@ -222,19 +225,21 @@ pipeline { stage('Sign artifact for Apache release') { when { - expression { !params.DRY_RUN && params.RELEASE_CANDIDATE } + expression { !params.DRY_RUN && params.RELEASE_CANDIDATE_VERSION != '' } } steps { - script { - releaseUtils.setupSigningKey("${pipelineVars.asfReleaseGPGKeyCredentialsId}") - releaseUtils.signArtifact("${env.RELEASE_ARTIFACTS_DIR}/${env.RELEASE_IMAGE_TAR_FILE}") + dir("${env.RELEASE_ARTIFACTS_DIR}") { + script { + releaseUtils.setupSigningKey("${pipelineVars.asfReleaseGPGKeyCredentialsId}") + releaseUtils.signArtifact("${env.RELEASE_IMAGE_TAR_FILE}") + } } } } stage('Publish Release Candidate artifacts') { when { - expression { !params.DRY_RUN && params.RELEASE_CANDIDATE } + expression { !params.DRY_RUN && params.RELEASE_CANDIDATE_VERSION != '' } } steps { script { diff --git a/.ci/jenkins/release-jobs/Jenkinsfile.kie-sandbox-extended-services b/.ci/jenkins/release-jobs/Jenkinsfile.kie-sandbox-extended-services index 66a25a3d341..7c435c3ddc6 100644 --- a/.ci/jenkins/release-jobs/Jenkinsfile.kie-sandbox-extended-services +++ b/.ci/jenkins/release-jobs/Jenkinsfile.kie-sandbox-extended-services @@ -30,7 +30,6 @@ pipeline { 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') - booleanParam(description: 'Release Candidate', name: 'RELEASE_CANDIDATE', defaultValue: false) string(description: 'Release Candidate Version', name: 'RELEASE_CANDIDATE_VERSION', defaultValue: '') } @@ -85,11 +84,15 @@ pipeline { } stage('Load upstream images') { + when { + expression { !params.DRY_RUN && params.RELEASE_CANDIDATE_VERSION != '' } + } steps { script { upstreamReleaseArtifactsDir = "${WORKSPACE}/upstream-release-artifacts" - releaseUtils.downloadReleaseArtifacts("${upstreamReleaseArtifactsDir}", "${params.RELEASE_CANDIDATE_VERSION}") - dockerUtils.loadImages(releaseUtils.getUpstreamImagesArtifactsList("${upstreamReleaseArtifactsDir}", "${params.RELEASE_CANDIDATE_VERSION}")) + releaseUtils.downloadReleaseArtifacts("${pipelineVars.asfReleaseStagingRepository}", "${upstreamReleaseArtifactsDir}", "${params.RELEASE_CANDIDATE_VERSION}") + upstreamImagesArtifacts = releaseUtils.getUpstreamImagesArtifactsList("${upstreamReleaseArtifactsDir}", "${params.RELEASE_CANDIDATE_VERSION}") + dockerUtils.loadImages(upstreamImagesArtifacts as String[]) } } } @@ -112,7 +115,7 @@ pipeline { steps { dir('kie-tools') { script { - buildUtils.setupPnpm() + buildUtils.setupPnpm("${pipelineVars.mavenSettingsConfigFileId}") } } } @@ -140,7 +143,7 @@ pipeline { stage('Push kie-sandbox-extended-services-image to Docker Hub') { when { - expression { !params.DRY_RUN && !params.RELEASE_CANDIDATE } + expression { !params.DRY_RUN && params.RELEASE_CANDIDATE_VERSION == '' } } steps { script { @@ -158,7 +161,7 @@ pipeline { stage('Deploy kie-sandbox-extended-services-image to OpenShift') { when { - expression { !params.DRY_RUN && !params.RELEASE_CANDIDATE } + expression { !params.DRY_RUN && params.RELEASE_CANDIDATE_VERSION == '' } } steps { script { @@ -177,7 +180,7 @@ pipeline { stage('Setup release candidate artifacts') { when { - expression { !params.DRY_RUN && params.RELEASE_CANDIDATE } + expression { !params.DRY_RUN && params.RELEASE_CANDIDATE_VERSION != '' } } steps { script { @@ -193,19 +196,21 @@ pipeline { stage('Sign artifact for Apache release') { when { - expression { !params.DRY_RUN && params.RELEASE_CANDIDATE } + expression { !params.DRY_RUN && params.RELEASE_CANDIDATE_VERSION != '' } } steps { - script { - releaseUtils.setupSigningKey("${pipelineVars.asfReleaseGPGKeyCredentialsId}") - releaseUtils.signArtifact("${env.RELEASE_ARTIFACTS_DIR}/${env.RELEASE_IMAGE_TAR_FILE}") + dir("${env.RELEASE_ARTIFACTS_DIR}") { + script { + releaseUtils.setupSigningKey("${pipelineVars.asfReleaseGPGKeyCredentialsId}") + releaseUtils.signArtifact("${env.RELEASE_IMAGE_TAR_FILE}") + } } } } stage('Publish Release Candidate artifacts') { when { - expression { !params.DRY_RUN && params.RELEASE_CANDIDATE } + expression { !params.DRY_RUN && params.RELEASE_CANDIDATE_VERSION != '' } } steps { script { diff --git a/.ci/jenkins/release-jobs/Jenkinsfile.kie-sandbox-helm-chart b/.ci/jenkins/release-jobs/Jenkinsfile.kie-sandbox-helm-chart index 75b57a81069..817b095902d 100644 --- a/.ci/jenkins/release-jobs/Jenkinsfile.kie-sandbox-helm-chart +++ b/.ci/jenkins/release-jobs/Jenkinsfile.kie-sandbox-helm-chart @@ -23,14 +23,13 @@ pipeline { } options { - timeout(time: 60, unit: 'MINUTES') + 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') - booleanParam(description: 'Release Candidate', name: 'RELEASE_CANDIDATE', defaultValue: false) string(description: 'Release Candidate Version', name: 'RELEASE_CANDIDATE_VERSION', defaultValue: '') } @@ -60,6 +59,7 @@ pipeline { buildUtils = load '.ci/jenkins/shared-scripts/buildUtils.groovy' githubUtils = load '.ci/jenkins/shared-scripts/githubUtils.groovy' helmUtils = load '.ci/jenkins/shared-scripts/helmUtils.groovy' + dockerUtils = load '.ci/jenkins/shared-scripts/dockerUtils.groovy' releaseUtils = load '.ci/jenkins/shared-scripts/releaseUtils.groovy' } } @@ -80,11 +80,15 @@ pipeline { } stage('Load upstream images') { + when { + expression { !params.DRY_RUN && params.RELEASE_CANDIDATE_VERSION != '' } + } steps { script { upstreamReleaseArtifactsDir = "${WORKSPACE}/upstream-release-artifacts" - releaseUtils.downloadReleaseArtifacts("${upstreamReleaseArtifactsDir}", "${params.RELEASE_CANDIDATE_VERSION}") - dockerUtils.loadImages(releaseUtils.getUpstreamImagesArtifactsList("${upstreamReleaseArtifactsDir}", "${params.RELEASE_CANDIDATE_VERSION}")) + releaseUtils.downloadReleaseArtifacts("${pipelineVars.asfReleaseStagingRepository}", "${upstreamReleaseArtifactsDir}", "${params.RELEASE_CANDIDATE_VERSION}") + upstreamImagesArtifacts = releaseUtils.getUpstreamImagesArtifactsList("${upstreamReleaseArtifactsDir}", "${params.RELEASE_CANDIDATE_VERSION}") + dockerUtils.loadImages(upstreamImagesArtifacts as String[]) } } } @@ -107,7 +111,7 @@ pipeline { steps { dir('kie-tools') { script { - buildUtils.setupPnpm() + buildUtils.setupPnpm("${pipelineVars.mavenSettingsConfigFileId}") } } } @@ -135,7 +139,7 @@ pipeline { stage('Push kie-sandbox-helm-chart to Docker Hub') { when { - expression { !params.DRY_RUN && !params.RELEASE_CANDIDATE } + expression { !params.DRY_RUN && params.RELEASE_CANDIDATE_VERSION == '' } } steps { dir('kie-tools') { @@ -154,7 +158,7 @@ pipeline { stage('Setup release candidate artifacts') { when { - expression { !params.DRY_RUN && params.RELEASE_CANDIDATE } + expression { !params.DRY_RUN && params.RELEASE_CANDIDATE_VERSION != '' } } steps { script { @@ -170,19 +174,21 @@ pipeline { stage('Sign artifacts for Apache release') { when { - expression { !params.DRY_RUN && params.RELEASE_CANDIDATE } + expression { !params.DRY_RUN && params.RELEASE_CANDIDATE_VERSION != '' } } steps { - script { - releaseUtils.setupSigningKey("${pipelineVars.asfReleaseGPGKeyCredentialsId}") - releaseUtils.signArtifact("${env.RELEASE_ARTIFACTS_DIR}/${RELEASE_TAR_FILE}") + dir("${env.RELEASE_ARTIFACTS_DIR}") { + script { + releaseUtils.setupSigningKey("${pipelineVars.asfReleaseGPGKeyCredentialsId}") + releaseUtils.signArtifact("${RELEASE_TAR_FILE}") + } } } } stage('Publish Release Candidate artifacts') { when { - expression { !params.DRY_RUN && params.RELEASE_CANDIDATE } + expression { !params.DRY_RUN && params.RELEASE_CANDIDATE_VERSION != '' } } steps { script { diff --git a/.ci/jenkins/release-jobs/Jenkinsfile.kn-plugin-workflow b/.ci/jenkins/release-jobs/Jenkinsfile.kn-plugin-workflow index d0b643a1c01..c8a8f809fc7 100644 --- a/.ci/jenkins/release-jobs/Jenkinsfile.kn-plugin-workflow +++ b/.ci/jenkins/release-jobs/Jenkinsfile.kn-plugin-workflow @@ -23,7 +23,7 @@ pipeline { } options { - timeout(time: 90, unit: 'MINUTES') + timeout(time: 360, unit: 'MINUTES') } parameters { @@ -31,7 +31,6 @@ pipeline { string(description: 'Release Version', name: 'RELEASE_VERSION', defaultValue: '0.0.0') string(description: 'Base Ref', name: 'BASE_REF') string(description: 'Upload Asset Url', name: 'UPLOAD_ASSET_URL') - booleanParam(description: 'Release Candidate', name: 'RELEASE_CANDIDATE', defaultValue: false) string(description: 'Release Candidate Version', name: 'RELEASE_CANDIDATE_VERSION', defaultValue: '') } @@ -41,6 +40,8 @@ pipeline { KIE_TOOLS_BUILD__runEndToEndTests = 'false' KIE_TOOLS_BUILD__buildContainerImages = 'true' + MAVEN_SETTINGS_PATH = "${WORKSPACE}/kie-settings.xml" + RELEASE_ARTIFACTS_DIR = "${WORKSPACE}/release-artifacts" PNPM_FILTER_STRING = '-F @kie-tools/kn-plugin-workflow...' @@ -91,7 +92,21 @@ pipeline { steps { dir('kie-tools') { script { - buildUtils.setupPnpm() + buildUtils.setupPnpm("${pipelineVars.mavenSettingsConfigFileId}") + } + } + } + } + + stage('Setup maven') { + steps { + dir('kie-tools') { + script { + defaultSettingsFile = 'packages/sonataflow-image-common/resources/modules/kogito-maven/common/maven/settings.xml' + sh """#!/bin/bash -el + rm -rf "${defaultSettingsFile}" + cp "${env.MAVEN_SETTINGS_PATH}" "${defaultSettingsFile}" + """.trim() } } } @@ -119,7 +134,7 @@ pipeline { stage('Upload Knative CLI Workflow Plugin for Linux') { when { - expression { !params.DRY_RUN && !params.RELEASE_CANDIDATE } + expression { !params.DRY_RUN && params.RELEASE_CANDIDATE_VERSION == '' } } steps { dir('kie-tools') { @@ -138,7 +153,7 @@ pipeline { stage('Upload Knative CLI Workflow Plugin for macOS') { when { - expression { !params.DRY_RUN && !params.RELEASE_CANDIDATE } + expression { !params.DRY_RUN && params.RELEASE_CANDIDATE_VERSION == '' } } steps { dir('kie-tools') { @@ -157,7 +172,7 @@ pipeline { stage('Upload Knative CLI Workflow Plugin for macOS M1') { when { - expression { !params.DRY_RUN && !params.RELEASE_CANDIDATE } + expression { !params.DRY_RUN && params.RELEASE_CANDIDATE_VERSION == '' } } steps { dir('kie-tools') { @@ -176,7 +191,7 @@ pipeline { stage('Upload Knative CLI Workflow Plugin for Windows') { when { - expression { !params.DRY_RUN && !params.RELEASE_CANDIDATE } + expression { !params.DRY_RUN && params.RELEASE_CANDIDATE_VERSION == '' } } steps { dir('kie-tools') { @@ -195,7 +210,7 @@ pipeline { stage('Setup release candidate artifacts') { when { - expression { !params.DRY_RUN && params.RELEASE_CANDIDATE } + expression { !params.DRY_RUN && params.RELEASE_CANDIDATE_VERSION != '' } } steps { script { @@ -204,33 +219,38 @@ pipeline { env.KN_PLUGIN_MACOS_X86_RELEASE_ZIP_FILE = "incubator-kie-${params.RELEASE_CANDIDATE_VERSION}-sonataflow-knative-plugin-macOS-x86.zip" env.KN_PLUGIN_WINDOWS_X86_RELEASE_ZIP_FILE = "incubator-kie-${params.RELEASE_CANDIDATE_VERSION}-sonataflow-knative-plugin-windows-x86.zip" - sh "mkdir ${env.RELEASE_ARTIFACTS_DIR}" - zipUtils.zipArtifact("${env.RELEASE_ARTIFACTS_DIR}/${env.KN_PLUGIN_LINUX_X86_RELEASE_ZIP_FILE}", 'kie-tools/packages/kn-plugin-workflow/dist/kn-workflow-linux-amd64') - zipUtils.zipArtifact("${env.RELEASE_ARTIFACTS_DIR}/${env.KN_PLUGIN_MACOS_ARM_RELEASE_ZIP_FILE}", 'kie-tools/packages/kn-plugin-workflow/dist/kn-workflow-darwin-arm64') - zipUtils.zipArtifact("${env.RELEASE_ARTIFACTS_DIR}/${env.KN_PLUGIN_MACOS_X86_RELEASE_ZIP_FILE}", 'kie-tools/packages/kn-plugin-workflow/dist/kn-workflow-darwin-amd64') - zipUtils.zipArtifact("${env.RELEASE_ARTIFACTS_DIR}/${env.KN_PLUGIN_WINDOWS_X86_RELEASE_ZIP_FILE}", 'kie-tools/packages/kn-plugin-workflow/dist/kn-workflow-windows-amd64.exe') + sh """#!/bin/bash -el + mkdir ${env.RELEASE_ARTIFACTS_DIR} + cd kie-tools/packages/kn-plugin-workflow/dist + zip "${env.RELEASE_ARTIFACTS_DIR}/${env.KN_PLUGIN_LINUX_X86_RELEASE_ZIP_FILE}" ./kn-workflow-linux-amd64 + zip "${env.RELEASE_ARTIFACTS_DIR}/${env.KN_PLUGIN_MACOS_ARM_RELEASE_ZIP_FILE}" ./kn-workflow-darwin-arm64 + zip "${env.RELEASE_ARTIFACTS_DIR}/${env.KN_PLUGIN_MACOS_X86_RELEASE_ZIP_FILE}" ./kn-workflow-darwin-amd64 + zip "${env.RELEASE_ARTIFACTS_DIR}/${env.KN_PLUGIN_WINDOWS_X86_RELEASE_ZIP_FILE}" ./kn-workflow-windows-amd64.exe + """.trim() } } } stage('Sign artifacts for Apache release') { when { - expression { !params.DRY_RUN && params.RELEASE_CANDIDATE } + expression { !params.DRY_RUN && params.RELEASE_CANDIDATE_VERSION != '' } } steps { - script { - releaseUtils.setupSigningKey("${pipelineVars.asfReleaseGPGKeyCredentialsId}") - releaseUtils.signArtifact("${env.RELEASE_ARTIFACTS_DIR}/${env.KN_PLUGIN_LINUX_X86_RELEASE_ZIP_FILE}") - releaseUtils.signArtifact("${env.RELEASE_ARTIFACTS_DIR}/${env.KN_PLUGIN_MACOS_ARM_RELEASE_ZIP_FILE}") - releaseUtils.signArtifact("${env.RELEASE_ARTIFACTS_DIR}/${env.KN_PLUGIN_MACOS_X86_RELEASE_ZIP_FILE}") - releaseUtils.signArtifact("${env.RELEASE_ARTIFACTS_DIR}/${env.KN_PLUGIN_WINDOWS_X86_RELEASE_ZIP_FILE}") + dir("${env.RELEASE_ARTIFACTS_DIR}") { + script { + releaseUtils.setupSigningKey("${pipelineVars.asfReleaseGPGKeyCredentialsId}") + releaseUtils.signArtifact("${env.KN_PLUGIN_LINUX_X86_RELEASE_ZIP_FILE}") + releaseUtils.signArtifact("${env.KN_PLUGIN_MACOS_ARM_RELEASE_ZIP_FILE}") + releaseUtils.signArtifact("${env.KN_PLUGIN_MACOS_X86_RELEASE_ZIP_FILE}") + releaseUtils.signArtifact("${env.KN_PLUGIN_WINDOWS_X86_RELEASE_ZIP_FILE}") + } } } } stage('Publish Release Candidate artifacts') { when { - expression { !params.DRY_RUN && params.RELEASE_CANDIDATE } + expression { !params.DRY_RUN && params.RELEASE_CANDIDATE_VERSION != '' } } steps { script { diff --git a/.ci/jenkins/release-jobs/Jenkinsfile.kogito-management-console b/.ci/jenkins/release-jobs/Jenkinsfile.kogito-management-console index 53f7dc3c091..37aed0f5416 100644 --- a/.ci/jenkins/release-jobs/Jenkinsfile.kogito-management-console +++ b/.ci/jenkins/release-jobs/Jenkinsfile.kogito-management-console @@ -30,7 +30,6 @@ pipeline { 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') - booleanParam(description: 'Release Candidate', name: 'RELEASE_CANDIDATE', defaultValue: false) string(description: 'Release Candidate Version', name: 'RELEASE_CANDIDATE_VERSION', defaultValue: '') } @@ -80,11 +79,15 @@ pipeline { } stage('Load upstream images') { + when { + expression { !params.DRY_RUN && params.RELEASE_CANDIDATE_VERSION != '' } + } steps { script { upstreamReleaseArtifactsDir = "${WORKSPACE}/upstream-release-artifacts" - releaseUtils.downloadReleaseArtifacts("${upstreamReleaseArtifactsDir}", "${params.RELEASE_CANDIDATE_VERSION}") - dockerUtils.loadImages(releaseUtils.getUpstreamImagesArtifactsList("${upstreamReleaseArtifactsDir}", "${params.RELEASE_CANDIDATE_VERSION}")) + releaseUtils.downloadReleaseArtifacts("${pipelineVars.asfReleaseStagingRepository}", "${upstreamReleaseArtifactsDir}", "${params.RELEASE_CANDIDATE_VERSION}") + upstreamImagesArtifacts = releaseUtils.getUpstreamImagesArtifactsList("${upstreamReleaseArtifactsDir}", "${params.RELEASE_CANDIDATE_VERSION}") + dockerUtils.loadImages(upstreamImagesArtifacts as String[]) } } } @@ -107,7 +110,7 @@ pipeline { steps { dir('kie-tools') { script { - buildUtils.setupPnpm() + buildUtils.setupPnpm("${pipelineVars.mavenSettingsConfigFileId}") } } } @@ -135,7 +138,7 @@ pipeline { stage('Push kogito-management-console to Docker Hub') { when { - expression { !params.DRY_RUN && !params.RELEASE_CANDIDATE } + expression { !params.DRY_RUN && params.RELEASE_CANDIDATE_VERSION == '' } } steps { script { @@ -153,11 +156,11 @@ pipeline { stage('Setup release candidate artifacts') { when { - expression { !params.DRY_RUN && params.RELEASE_CANDIDATE } + expression { !params.DRY_RUN && params.RELEASE_CANDIDATE_VERSION != '' } } steps { script { - env.RELEASE_IMAGE_TAR_FILE = "incubator-kie-${params.RELEASE_CANDIDATE_VERSION}-${KOGITO_MANAGEMENT_CONSOLE__name}-image.tar.gz" + env.RELEASE_IMAGE_TAR_FILE = "incubator-kie-${params.RELEASE_CANDIDATE_VERSION}-kogito-management-console-image.tar.gz" sh """#!/bin/bash -el mkdir ${env.RELEASE_ARTIFACTS_DIR} @@ -169,19 +172,21 @@ pipeline { stage('Sign artifact for Apache release') { when { - expression { !params.DRY_RUN && params.RELEASE_CANDIDATE } + expression { !params.DRY_RUN && params.RELEASE_CANDIDATE_VERSION != '' } } steps { - script { - releaseUtils.setupSigningKey("${pipelineVars.asfReleaseGPGKeyCredentialsId}") - releaseUtils.signArtifact("${env.RELEASE_ARTIFACTS_DIR}/${env.RELEASE_IMAGE_TAR_FILE}") + dir("${env.RELEASE_ARTIFACTS_DIR}") { + script { + releaseUtils.setupSigningKey("${pipelineVars.asfReleaseGPGKeyCredentialsId}") + releaseUtils.signArtifact("${env.RELEASE_IMAGE_TAR_FILE}") + } } } } stage('Publish Release Candidate artifacts') { when { - expression { !params.DRY_RUN && params.RELEASE_CANDIDATE } + expression { !params.DRY_RUN && params.RELEASE_CANDIDATE_VERSION != '' } } steps { script { diff --git a/.ci/jenkins/release-jobs/Jenkinsfile.kogito-serverless-operator b/.ci/jenkins/release-jobs/Jenkinsfile.kogito-serverless-operator index 867149290c7..6971c1c13ee 100644 --- a/.ci/jenkins/release-jobs/Jenkinsfile.kogito-serverless-operator +++ b/.ci/jenkins/release-jobs/Jenkinsfile.kogito-serverless-operator @@ -23,14 +23,13 @@ pipeline { } options { - timeout(time: 180, unit: 'MINUTES') + timeout(time: 360, 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') - booleanParam(description: 'Release Candidate', name: 'RELEASE_CANDIDATE', defaultValue: false) string(description: 'Release Candidate Version', name: 'RELEASE_CANDIDATE_VERSION', defaultValue: '') } @@ -45,6 +44,8 @@ pipeline { SONATAFLOW_OPERATOR__name = 'incubator-kie-sonataflow-operator' SONATAFLOW_OPERATOR__buildTag = "${params.RELEASE_VERSION}" + MAVEN_SETTINGS_PATH = "${WORKSPACE}/kie-settings.xml" + RELEASE_ARTIFACTS_DIR = "${WORKSPACE}/release-artifacts" DOCKER_CONFIG = "${WORKSPACE}/.docker" @@ -81,11 +82,15 @@ pipeline { } stage('Load upstream images') { + when { + expression { !params.DRY_RUN && params.RELEASE_CANDIDATE_VERSION != '' } + } steps { script { upstreamReleaseArtifactsDir = "${WORKSPACE}/upstream-release-artifacts" - releaseUtils.downloadReleaseArtifacts("${upstreamReleaseArtifactsDir}", "${params.RELEASE_CANDIDATE_VERSION}") - dockerUtils.loadImages(releaseUtils.getUpstreamImagesArtifactsList("${upstreamReleaseArtifactsDir}", "${params.RELEASE_CANDIDATE_VERSION}")) + releaseUtils.downloadReleaseArtifacts("${pipelineVars.asfReleaseStagingRepository}", "${upstreamReleaseArtifactsDir}", "${params.RELEASE_CANDIDATE_VERSION}") + upstreamImagesArtifacts = releaseUtils.getUpstreamImagesArtifactsList("${upstreamReleaseArtifactsDir}", "${params.RELEASE_CANDIDATE_VERSION}") + dockerUtils.loadImages(upstreamImagesArtifacts as String[]) } } } @@ -108,7 +113,21 @@ pipeline { steps { dir('kie-tools') { script { - buildUtils.setupPnpm() + buildUtils.setupPnpm("${pipelineVars.mavenSettingsConfigFileId}") + } + } + } + } + + stage('Setup maven') { + steps { + dir('kie-tools') { + script { + defaultSettingsFile = 'packages/sonataflow-image-common/resources/modules/kogito-maven/common/maven/settings.xml' + sh """#!/bin/bash -el + rm -rf "${defaultSettingsFile}" + cp "${env.MAVEN_SETTINGS_PATH}" "${defaultSettingsFile}" + """.trim() } } } @@ -136,7 +155,7 @@ pipeline { stage('Upload Kogito Serverless Operator YAML file') { when { - expression { !params.DRY_RUN } + expression { !params.DRY_RUN && params.RELEASE_CANDIDATE_VERSION == '' } } steps { script { @@ -166,7 +185,7 @@ pipeline { stage('Push sonataflow-operator to Docker Hub') { when { - expression { !params.DRY_RUN && !params.RELEASE_CANDIDATE } + expression { !params.DRY_RUN && params.RELEASE_CANDIDATE_VERSION == '' } } steps { script { @@ -184,7 +203,7 @@ pipeline { stage('Setup release candidate artifacts') { when { - expression { !params.DRY_RUN && params.RELEASE_CANDIDATE } + expression { !params.DRY_RUN && params.RELEASE_CANDIDATE_VERSION != '' } } steps { script { @@ -194,29 +213,30 @@ pipeline { sh """#!/bin/bash -el mkdir ${env.RELEASE_ARTIFACTS_DIR} docker save "${env.SONATAFLOW_OPERATOR__registry}/${env.SONATAFLOW_OPERATOR__account}/${env.SONATAFLOW_OPERATOR__name}:${params.RELEASE_VERSION}" | gzip > "${env.RELEASE_ARTIFACTS_DIR}/${env.RELEASE_IMAGE_TAR_FILE}" + cd kie-tools/packages/sonataflow-operator && zip "${env.RELEASE_ARTIFACTS_DIR}/${env.RELEASE_ZIP_FILE}" ./operator.yaml """.trim() - - zipUtils.zipArtifact("${env.RELEASE_ARTIFACTS_DIR}/${env.RELEASE_ZIP_FILE}", 'kie-tools/packages/kogito-serverless-operator/operator.yaml') } } } stage('Sign artifact for Apache release') { when { - expression { !params.DRY_RUN && params.RELEASE_CANDIDATE } + expression { !params.DRY_RUN && params.RELEASE_CANDIDATE_VERSION != '' } } steps { - script { - releaseUtils.setupSigningKey("${pipelineVars.asfReleaseGPGKeyCredentialsId}") - releaseUtils.signArtifact("${env.RELEASE_ARTIFACTS_DIR}/${env.RELEASE_IMAGE_TAR_FILE}") - releaseUtils.signArtifact("${env.RELEASE_ARTIFACTS_DIR}/${env.RELEASE_ZIP_FILE}") + dir("${env.RELEASE_ARTIFACTS_DIR}") { + script { + releaseUtils.setupSigningKey("${pipelineVars.asfReleaseGPGKeyCredentialsId}") + releaseUtils.signArtifact("${env.RELEASE_IMAGE_TAR_FILE}") + releaseUtils.signArtifact("${env.RELEASE_ZIP_FILE}") + } } } } stage('Publish Release Candidate artifacts') { when { - expression { !params.DRY_RUN && params.RELEASE_CANDIDATE } + expression { !params.DRY_RUN && params.RELEASE_CANDIDATE_VERSION != '' } } steps { script { diff --git a/.ci/jenkins/release-jobs/Jenkinsfile.kogito-swf-builder b/.ci/jenkins/release-jobs/Jenkinsfile.kogito-swf-builder index 13df16d1e84..e80ada1693f 100644 --- a/.ci/jenkins/release-jobs/Jenkinsfile.kogito-swf-builder +++ b/.ci/jenkins/release-jobs/Jenkinsfile.kogito-swf-builder @@ -30,7 +30,6 @@ pipeline { 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') - booleanParam(description: 'Release Candidate', name: 'RELEASE_CANDIDATE', defaultValue: false) string(description: 'Release Candidate Version', name: 'RELEASE_CANDIDATE_VERSION', defaultValue: '') } @@ -45,6 +44,8 @@ pipeline { SONATAFLOW_BUILDER_IMAGE__name = 'incubator-kie-sonataflow-builder' SONATAFLOW_BUILDER_IMAGE__buildTag = "${params.RELEASE_VERSION}" + MAVEN_SETTINGS_PATH = "${WORKSPACE}/kie-settings.xml" + RELEASE_ARTIFACTS_DIR = "${WORKSPACE}/release-artifacts" DOCKER_CONFIG = "${WORKSPACE}/.docker" @@ -80,11 +81,15 @@ pipeline { } stage('Load upstream images') { + when { + expression { !params.DRY_RUN && params.RELEASE_CANDIDATE_VERSION != '' } + } steps { script { upstreamReleaseArtifactsDir = "${WORKSPACE}/upstream-release-artifacts" - releaseUtils.downloadReleaseArtifacts("${upstreamReleaseArtifactsDir}", "${params.RELEASE_CANDIDATE_VERSION}") - dockerUtils.loadImages(releaseUtils.getUpstreamImagesArtifactsList("${upstreamReleaseArtifactsDir}", "${params.RELEASE_CANDIDATE_VERSION}")) + releaseUtils.downloadReleaseArtifacts("${pipelineVars.asfReleaseStagingRepository}", "${upstreamReleaseArtifactsDir}", "${params.RELEASE_CANDIDATE_VERSION}") + upstreamImagesArtifacts = releaseUtils.getUpstreamImagesArtifactsList("${upstreamReleaseArtifactsDir}", "${params.RELEASE_CANDIDATE_VERSION}") + dockerUtils.loadImages(upstreamImagesArtifacts as String[]) } } } @@ -107,7 +112,21 @@ pipeline { steps { dir('kie-tools') { script { - buildUtils.setupPnpm() + buildUtils.setupPnpm("${pipelineVars.mavenSettingsConfigFileId}") + } + } + } + } + + stage('Setup maven') { + steps { + dir('kie-tools') { + script { + defaultSettingsFile = 'packages/sonataflow-image-common/resources/modules/kogito-maven/common/maven/settings.xml' + sh """#!/bin/bash -el + rm -rf "${defaultSettingsFile}" + cp "${env.MAVEN_SETTINGS_PATH}" "${defaultSettingsFile}" + """.trim() } } } @@ -148,7 +167,7 @@ pipeline { stage('Push sonataflow-builder to Docker Hub') { when { - expression { !params.DRY_RUN && !params.RELEASE_CANDIDATE } + expression { !params.DRY_RUN && params.RELEASE_CANDIDATE_VERSION == '' } } steps { script { @@ -166,7 +185,7 @@ pipeline { stage('Setup release candidate artifacts') { when { - expression { !params.DRY_RUN && params.RELEASE_CANDIDATE } + expression { !params.DRY_RUN && params.RELEASE_CANDIDATE_VERSION != '' } } steps { script { @@ -182,19 +201,21 @@ pipeline { stage('Sign artifact for Apache release') { when { - expression { !params.DRY_RUN && params.RELEASE_CANDIDATE } + expression { !params.DRY_RUN && params.RELEASE_CANDIDATE_VERSION != '' } } steps { - script { - releaseUtils.setupSigningKey("${pipelineVars.asfReleaseGPGKeyCredentialsId}") - releaseUtils.signArtifact("${env.RELEASE_ARTIFACTS_DIR}/${env.RELEASE_IMAGE_TAR_FILE}") + dir("${env.RELEASE_ARTIFACTS_DIR}") { + script { + releaseUtils.setupSigningKey("${pipelineVars.asfReleaseGPGKeyCredentialsId}") + releaseUtils.signArtifact("${env.RELEASE_IMAGE_TAR_FILE}") + } } } } stage('Publish Release Candidate artifacts') { when { - expression { !params.DRY_RUN && params.RELEASE_CANDIDATE } + expression { !params.DRY_RUN && params.RELEASE_CANDIDATE_VERSION != '' } } steps { script { diff --git a/.ci/jenkins/release-jobs/Jenkinsfile.kogito-swf-devmode b/.ci/jenkins/release-jobs/Jenkinsfile.kogito-swf-devmode index 4fb584fa127..9e8f8c746c3 100644 --- a/.ci/jenkins/release-jobs/Jenkinsfile.kogito-swf-devmode +++ b/.ci/jenkins/release-jobs/Jenkinsfile.kogito-swf-devmode @@ -23,14 +23,13 @@ pipeline { } options { - timeout(time: 180, unit: 'MINUTES') + timeout(time: 240, 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') - booleanParam(description: 'Release Candidate', name: 'RELEASE_CANDIDATE', defaultValue: false) string(description: 'Release Candidate Version', name: 'RELEASE_CANDIDATE_VERSION', defaultValue: '') } @@ -45,6 +44,8 @@ pipeline { SONATAFLOW_DEVMODE_IMAGE__name = 'incubator-kie-sonataflow-devmode' SONATAFLOW_DEVMODE_IMAGE__buildTag = "${params.RELEASE_VERSION}" + MAVEN_SETTINGS_PATH = "${WORKSPACE}/kie-settings.xml" + RELEASE_ARTIFACTS_DIR = "${WORKSPACE}/release-artifacts" DOCKER_CONFIG = "${WORKSPACE}/.docker" @@ -80,11 +81,15 @@ pipeline { } stage('Load upstream images') { + when { + expression { !params.DRY_RUN && params.RELEASE_CANDIDATE_VERSION != '' } + } steps { script { upstreamReleaseArtifactsDir = "${WORKSPACE}/upstream-release-artifacts" - releaseUtils.downloadReleaseArtifacts("${upstreamReleaseArtifactsDir}", "${params.RELEASE_CANDIDATE_VERSION}") - dockerUtils.loadImages(releaseUtils.getUpstreamImagesArtifactsList("${upstreamReleaseArtifactsDir}", "${params.RELEASE_CANDIDATE_VERSION}")) + releaseUtils.downloadReleaseArtifacts("${pipelineVars.asfReleaseStagingRepository}", "${upstreamReleaseArtifactsDir}", "${params.RELEASE_CANDIDATE_VERSION}") + upstreamImagesArtifacts = releaseUtils.getUpstreamImagesArtifactsList("${upstreamReleaseArtifactsDir}", "${params.RELEASE_CANDIDATE_VERSION}") + dockerUtils.loadImages(upstreamImagesArtifacts as String[]) } } } @@ -107,7 +112,21 @@ pipeline { steps { dir('kie-tools') { script { - buildUtils.setupPnpm() + buildUtils.setupPnpm("${pipelineVars.mavenSettingsConfigFileId}") + } + } + } + } + + stage('Setup maven') { + steps { + dir('kie-tools') { + script { + defaultSettingsFile = 'packages/sonataflow-image-common/resources/modules/kogito-maven/common/maven/settings.xml' + sh """#!/bin/bash -el + rm -rf "${defaultSettingsFile}" + cp "${env.MAVEN_SETTINGS_PATH}" "${defaultSettingsFile}" + """.trim() } } } @@ -148,7 +167,7 @@ pipeline { stage('Push sonataflow-devmode to Docker Hub') { when { - expression { !params.DRY_RUN && !params.RELEASE_CANDIDATE } + expression { !params.DRY_RUN && params.RELEASE_CANDIDATE_VERSION == '' } } steps { script { @@ -166,7 +185,7 @@ pipeline { stage('Setup release candidate artifacts') { when { - expression { !params.DRY_RUN && params.RELEASE_CANDIDATE } + expression { !params.DRY_RUN && params.RELEASE_CANDIDATE_VERSION != '' } } steps { script { @@ -182,19 +201,21 @@ pipeline { stage('Sign artifact for Apache release') { when { - expression { !params.DRY_RUN && params.RELEASE_CANDIDATE } + expression { !params.DRY_RUN && params.RELEASE_CANDIDATE_VERSION != '' } } steps { - script { - releaseUtils.setupSigningKey("${pipelineVars.asfReleaseGPGKeyCredentialsId}") - releaseUtils.signArtifact("${env.RELEASE_ARTIFACTS_DIR}/${env.RELEASE_IMAGE_TAR_FILE}") + dir("${env.RELEASE_ARTIFACTS_DIR}") { + script { + releaseUtils.setupSigningKey("${pipelineVars.asfReleaseGPGKeyCredentialsId}") + releaseUtils.signArtifact("${env.RELEASE_IMAGE_TAR_FILE}") + } } } } stage('Publish Release Candidate artifacts') { when { - expression { !params.DRY_RUN && params.RELEASE_CANDIDATE } + expression { !params.DRY_RUN && params.RELEASE_CANDIDATE_VERSION != '' } } steps { script { diff --git a/.ci/jenkins/release-jobs/Jenkinsfile.kogito-task-console b/.ci/jenkins/release-jobs/Jenkinsfile.kogito-task-console index dfeec9ecf02..6cf65c9bb86 100644 --- a/.ci/jenkins/release-jobs/Jenkinsfile.kogito-task-console +++ b/.ci/jenkins/release-jobs/Jenkinsfile.kogito-task-console @@ -30,7 +30,6 @@ pipeline { 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') - booleanParam(description: 'Release Candidate', name: 'RELEASE_CANDIDATE', defaultValue: false) string(description: 'Release Candidate Version', name: 'RELEASE_CANDIDATE_VERSION', defaultValue: '') } @@ -80,11 +79,15 @@ pipeline { } stage('Load upstream images') { + when { + expression { !params.DRY_RUN && params.RELEASE_CANDIDATE_VERSION != '' } + } steps { script { upstreamReleaseArtifactsDir = "${WORKSPACE}/upstream-release-artifacts" - releaseUtils.downloadReleaseArtifacts("${upstreamReleaseArtifactsDir}", "${params.RELEASE_CANDIDATE_VERSION}") - dockerUtils.loadImages(releaseUtils.getUpstreamImagesArtifactsList("${upstreamReleaseArtifactsDir}", "${params.RELEASE_CANDIDATE_VERSION}")) + releaseUtils.downloadReleaseArtifacts("${pipelineVars.asfReleaseStagingRepository}", "${upstreamReleaseArtifactsDir}", "${params.RELEASE_CANDIDATE_VERSION}") + upstreamImagesArtifacts = releaseUtils.getUpstreamImagesArtifactsList("${upstreamReleaseArtifactsDir}", "${params.RELEASE_CANDIDATE_VERSION}") + dockerUtils.loadImages(upstreamImagesArtifacts as String[]) } } } @@ -107,7 +110,7 @@ pipeline { steps { dir('kie-tools') { script { - buildUtils.setupPnpm() + buildUtils.setupPnpm("${pipelineVars.mavenSettingsConfigFileId}") } } } @@ -135,7 +138,7 @@ pipeline { stage('Push kogito-task-console to Docker Hub') { when { - expression { !params.DRY_RUN && !params.RELEASE_CANDIDATE } + expression { !params.DRY_RUN && params.RELEASE_CANDIDATE_VERSION == '' } } steps { script { @@ -153,11 +156,11 @@ pipeline { stage('Setup release candidate artifacts') { when { - expression { !params.DRY_RUN && params.RELEASE_CANDIDATE } + expression { !params.DRY_RUN && params.RELEASE_CANDIDATE_VERSION != '' } } steps { script { - env.RELEASE_IMAGE_TAR_FILE = "incubator-kie-${params.RELEASE_CANDIDATE_VERSION}-${env.KOGITO_TASK_CONSOLE__name}-image.tar.gz" + env.RELEASE_IMAGE_TAR_FILE = "incubator-kie-${params.RELEASE_CANDIDATE_VERSION}-kogito-task-console-image.tar.gz" sh """#!/bin/bash -el mkdir ${env.RELEASE_ARTIFACTS_DIR} @@ -169,19 +172,21 @@ pipeline { stage('Sign artifact for Apache release') { when { - expression { !params.DRY_RUN && params.RELEASE_CANDIDATE } + expression { !params.DRY_RUN && params.RELEASE_CANDIDATE_VERSION != '' } } steps { - script { - releaseUtils.setupSigningKey("${pipelineVars.asfReleaseGPGKeyCredentialsId}") - releaseUtils.signArtifact("${env.RELEASE_ARTIFACTS_DIR}/${env.RELEASE_IMAGE_TAR_FILE}") + dir("${env.RELEASE_ARTIFACTS_DIR}") { + script { + releaseUtils.setupSigningKey("${pipelineVars.asfReleaseGPGKeyCredentialsId}") + releaseUtils.signArtifact("${env.RELEASE_IMAGE_TAR_FILE}") + } } } } stage('Publish Release Candidate artifacts') { when { - expression { !params.DRY_RUN && params.RELEASE_CANDIDATE } + expression { !params.DRY_RUN && params.RELEASE_CANDIDATE_VERSION != '' } } steps { script { diff --git a/.ci/jenkins/release-jobs/Jenkinsfile.npm-packages b/.ci/jenkins/release-jobs/Jenkinsfile.npm-packages index 864da2ea313..5735ccf774c 100644 --- a/.ci/jenkins/release-jobs/Jenkinsfile.npm-packages +++ b/.ci/jenkins/release-jobs/Jenkinsfile.npm-packages @@ -30,7 +30,6 @@ pipeline { 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') - booleanParam(description: 'Release Candidate', name: 'RELEASE_CANDIDATE', defaultValue: false) string(description: 'Release Candidate Version', name: 'RELEASE_CANDIDATE_VERSION', defaultValue: '') } @@ -88,7 +87,7 @@ pipeline { steps { dir('kie-tools') { script { - buildUtils.setupPnpm() + buildUtils.setupPnpm("${pipelineVars.mavenSettingsConfigFileId}") } } } @@ -130,7 +129,7 @@ pipeline { stage('Publish packages to the NPM registry') { when { - expression { !params.DRY_RUN && !params.RELEASE_CANDIDATE } + expression { !params.DRY_RUN && params.RELEASE_CANDIDATE_VERSION == '' } } steps { dir('kie-tools') { @@ -148,7 +147,7 @@ pipeline { stage('Setup release candidate artifacts') { when { - expression { !params.DRY_RUN && params.RELEASE_CANDIDATE } + expression { !params.DRY_RUN && params.RELEASE_CANDIDATE_VERSION != '' } } steps { dir('kie-tools') { @@ -161,8 +160,8 @@ pipeline { PNPM_FILTER_STRING_FOR_PUBLISHING=\$(pnpm -r exec 'bash' '-c' 'PKG_NAME=\$(jq -r ".name" package.json) PKG_IS_PVT=\$(jq -r ".private" package.json); if [[ "\$PKG_IS_PVT" != "true" ]]; then echo "-F \$PKG_NAME"; fi') echo \$PNPM_FILTER_STRING_FOR_PUBLISHING pnpm \$PNPM_FILTER_STRING_FOR_PUBLISHING exec 'bash' '-c' 'pnpm pack --pack-destination ${env.TMP_RELEASE_ARTIFACTS_DIR}' + cd "${env.TMP_RELEASE_ARTIFACTS_DIR}" && zip -r "${env.RELEASE_ARTIFACTS_DIR}/${env.RELEASE_ZIP_FILE}" . """.trim() - zipUtils.zipArtifact("${env.RELEASE_ARTIFACTS_DIR}/${env.RELEASE_ZIP_FILE}", "${env.TMP_RELEASE_ARTIFACTS_DIR}") } } } @@ -170,19 +169,21 @@ pipeline { stage('Sign artifact for Apache release') { when { - expression { !params.DRY_RUN && params.RELEASE_CANDIDATE } + expression { !params.DRY_RUN && params.RELEASE_CANDIDATE_VERSION != '' } } steps { - script { - releaseUtils.setupSigningKey("${pipelineVars.asfReleaseGPGKeyCredentialsId}") - releaseUtils.signArtifact("${env.RELEASE_ARTIFACTS_DIR}/${env.RELEASE_ZIP_FILE}") + dir("${env.RELEASE_ARTIFACTS_DIR}") { + script { + releaseUtils.setupSigningKey("${pipelineVars.asfReleaseGPGKeyCredentialsId}") + releaseUtils.signArtifact("${env.RELEASE_ZIP_FILE}") + } } } } stage('Publish Release Candidate artifacts') { when { - expression { !params.DRY_RUN && params.RELEASE_CANDIDATE } + expression { !params.DRY_RUN && params.RELEASE_CANDIDATE_VERSION != '' } } steps { script { diff --git a/.ci/jenkins/release-jobs/Jenkinsfile.online-editor b/.ci/jenkins/release-jobs/Jenkinsfile.online-editor index dfe19de3e7e..67bc68e32d3 100644 --- a/.ci/jenkins/release-jobs/Jenkinsfile.online-editor +++ b/.ci/jenkins/release-jobs/Jenkinsfile.online-editor @@ -30,7 +30,6 @@ pipeline { 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') - booleanParam(description: 'Release Candidate', name: 'RELEASE_CANDIDATE', defaultValue: false) string(description: 'Release Candidate Version', name: 'RELEASE_CANDIDATE_VERSION', defaultValue: '') } @@ -60,6 +59,8 @@ pipeline { ONLINE_EDITOR__gtmId = 'GTM-PQGMKNW' ONLINE_EDITOR__corsProxyUrl = 'https://cors-proxy-kie-sandbox.rhba-0ad6762cc85bcef5745bb684498c2436-0000.us-south.containers.appdomain.cloud' + RELEASE_ARTIFACTS_DIR = "${WORKSPACE}/release-artifacts" + PNPM_FILTER_STRING = '-F @kie-tools/online-editor...' } @@ -122,7 +123,7 @@ pipeline { steps { dir('kie-tools') { script { - buildUtils.setupPnpm() + buildUtils.setupPnpm("${pipelineVars.mavenSettingsConfigFileId}") } } } @@ -150,7 +151,7 @@ pipeline { stage('Deploy to GitHub Pages (kogito-online)') { when { - expression { !params.DRY_RUN && !params.RELEASE_CANDIDATE } + expression { !params.DRY_RUN && params.RELEASE_CANDIDATE_VERSION == '' } } steps { dir('kogito-online') { @@ -195,33 +196,36 @@ pipeline { stage('Setup release candidate artifacts') { when { - expression { !params.DRY_RUN && params.RELEASE_CANDIDATE } + expression { !params.DRY_RUN && params.RELEASE_CANDIDATE_VERSION != '' } } steps { script { env.RELEASE_ZIP_FILE = "incubator-kie-${params.RELEASE_CANDIDATE_VERSION}-sandbox-webapp.zip" - - sh "mkdir ${env.RELEASE_ARTIFACTS_DIR}" - zipUtils.zipArtifact("${env.RELEASE_ARTIFACTS_DIR}/${env.BUSINESS_AUTOMATION_STANDALONE_RELEASE_ZIP_FILE}", 'kie-tools/packages/online-editor/dist/') + sh """#!/bin/bash -el + mkdir ${env.RELEASE_ARTIFACTS_DIR} + cd kie-tools/packages/online-editor/dist && zip -r "${env.RELEASE_ARTIFACTS_DIR}/${env.RELEASE_ZIP_FILE}" . + """.trim() } } } stage('Sign artifacts for Apache release') { when { - expression { !params.DRY_RUN && params.RELEASE_CANDIDATE } + expression { !params.DRY_RUN && params.RELEASE_CANDIDATE_VERSION != '' } } steps { - script { - releaseUtils.setupSigningKey("${pipelineVars.asfReleaseGPGKeyCredentialsId}") - releaseUtils.signArtifact("${env.RELEASE_ARTIFACTS_DIR}/${env.RELEASE_ZIP_FILE}") + dir("${env.RELEASE_ARTIFACTS_DIR}") { + script { + releaseUtils.setupSigningKey("${pipelineVars.asfReleaseGPGKeyCredentialsId}") + releaseUtils.signArtifact("${env.RELEASE_ZIP_FILE}") + } } } } stage('Publish Release Candidate artifacts') { when { - expression { !params.DRY_RUN && params.RELEASE_CANDIDATE } + expression { !params.DRY_RUN && params.RELEASE_CANDIDATE_VERSION != '' } } steps { script { diff --git a/.ci/jenkins/release-jobs/Jenkinsfile.runtime-tools-consoles-helm-chart b/.ci/jenkins/release-jobs/Jenkinsfile.runtime-tools-consoles-helm-chart index d438a9b4d06..136251c4ecc 100644 --- a/.ci/jenkins/release-jobs/Jenkinsfile.runtime-tools-consoles-helm-chart +++ b/.ci/jenkins/release-jobs/Jenkinsfile.runtime-tools-consoles-helm-chart @@ -30,7 +30,6 @@ pipeline { 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') - booleanParam(description: 'Release Candidate', name: 'RELEASE_CANDIDATE', defaultValue: false) string(description: 'Release Candidate Version', name: 'RELEASE_CANDIDATE_VERSION', defaultValue: '') } @@ -60,6 +59,7 @@ pipeline { buildUtils = load '.ci/jenkins/shared-scripts/buildUtils.groovy' githubUtils = load '.ci/jenkins/shared-scripts/githubUtils.groovy' helmUtils = load '.ci/jenkins/shared-scripts/helmUtils.groovy' + dockerUtils = load '.ci/jenkins/shared-scripts/dockerUtils.groovy' releaseUtils = load '.ci/jenkins/shared-scripts/releaseUtils.groovy' } } @@ -80,11 +80,15 @@ pipeline { } stage('Load upstream images') { + when { + expression { !params.DRY_RUN && params.RELEASE_CANDIDATE_VERSION != '' } + } steps { script { upstreamReleaseArtifactsDir = "${WORKSPACE}/upstream-release-artifacts" - releaseUtils.downloadReleaseArtifacts("${upstreamReleaseArtifactsDir}", "${params.RELEASE_CANDIDATE_VERSION}") - dockerUtils.loadImages(releaseUtils.getUpstreamImagesArtifactsList("${upstreamReleaseArtifactsDir}", "${params.RELEASE_CANDIDATE_VERSION}")) + releaseUtils.downloadReleaseArtifacts("${pipelineVars.asfReleaseStagingRepository}", "${upstreamReleaseArtifactsDir}", "${params.RELEASE_CANDIDATE_VERSION}") + upstreamImagesArtifacts = releaseUtils.getUpstreamImagesArtifactsList("${upstreamReleaseArtifactsDir}", "${params.RELEASE_CANDIDATE_VERSION}") + dockerUtils.loadImages(upstreamImagesArtifacts as String[]) } } } @@ -107,7 +111,7 @@ pipeline { steps { dir('kie-tools') { script { - buildUtils.setupPnpm() + buildUtils.setupPnpm("${pipelineVars.mavenSettingsConfigFileId}") } } } @@ -154,7 +158,7 @@ pipeline { stage('Setup release candidate artifacts') { when { - expression { !params.DRY_RUN && params.RELEASE_CANDIDATE } + expression { !params.DRY_RUN && params.RELEASE_CANDIDATE_VERSION != '' } } steps { script { @@ -170,19 +174,21 @@ pipeline { stage('Sign artifacts for Apache release') { when { - expression { !params.DRY_RUN && params.RELEASE_CANDIDATE } + expression { !params.DRY_RUN && params.RELEASE_CANDIDATE_VERSION != '' } } steps { - script { - releaseUtils.setupSigningKey("${pipelineVars.asfReleaseGPGKeyCredentialsId}") - releaseUtils.signArtifact("${env.RELEASE_ARTIFACTS_DIR}/${RELEASE_TAR_FILE}") + dir("${env.RELEASE_ARTIFACTS_DIR}") { + script { + releaseUtils.setupSigningKey("${pipelineVars.asfReleaseGPGKeyCredentialsId}") + releaseUtils.signArtifact("${RELEASE_TAR_FILE}") + } } } } stage('Publish Release Candidate artifacts') { when { - expression { !params.DRY_RUN && params.RELEASE_CANDIDATE } + expression { !params.DRY_RUN && params.RELEASE_CANDIDATE_VERSION != '' } } steps { script { diff --git a/.ci/jenkins/release-jobs/Jenkinsfile.serverless-logic-web-tools b/.ci/jenkins/release-jobs/Jenkinsfile.serverless-logic-web-tools index db0b44a70ae..5440140cb5d 100644 --- a/.ci/jenkins/release-jobs/Jenkinsfile.serverless-logic-web-tools +++ b/.ci/jenkins/release-jobs/Jenkinsfile.serverless-logic-web-tools @@ -105,7 +105,7 @@ pipeline { steps { dir('kie-tools') { script { - buildUtils.setupPnpm() + buildUtils.setupPnpm("${pipelineVars.mavenSettingsConfigFileId}") } } } diff --git a/.ci/jenkins/release-jobs/Jenkinsfile.serverless-logic-web-tools-base-builder-image b/.ci/jenkins/release-jobs/Jenkinsfile.serverless-logic-web-tools-base-builder-image index 014628cc4d2..99443bf0dd9 100644 --- a/.ci/jenkins/release-jobs/Jenkinsfile.serverless-logic-web-tools-base-builder-image +++ b/.ci/jenkins/release-jobs/Jenkinsfile.serverless-logic-web-tools-base-builder-image @@ -23,14 +23,13 @@ pipeline { } options { - timeout(time: 90, unit: 'MINUTES') + timeout(time: 180, 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') - booleanParam(description: 'Release Candidate', name: 'RELEASE_CANDIDATE', defaultValue: false) string(description: 'Release Candidate Version', name: 'RELEASE_CANDIDATE_VERSION', defaultValue: '') } @@ -80,11 +79,15 @@ pipeline { } stage('Load upstream images') { + when { + expression { !params.DRY_RUN && params.RELEASE_CANDIDATE_VERSION != '' } + } steps { script { upstreamReleaseArtifactsDir = "${WORKSPACE}/upstream-release-artifacts" - releaseUtils.downloadReleaseArtifacts("${upstreamReleaseArtifactsDir}", "${params.RELEASE_CANDIDATE_VERSION}") - dockerUtils.loadImages(releaseUtils.getUpstreamImagesArtifactsList("${upstreamReleaseArtifactsDir}", "${params.RELEASE_CANDIDATE_VERSION}")) + releaseUtils.downloadReleaseArtifacts("${pipelineVars.asfReleaseStagingRepository}", "${upstreamReleaseArtifactsDir}", "${params.RELEASE_CANDIDATE_VERSION}") + upstreamImagesArtifacts = releaseUtils.getUpstreamImagesArtifactsList("${upstreamReleaseArtifactsDir}", "${params.RELEASE_CANDIDATE_VERSION}") + dockerUtils.loadImages(upstreamImagesArtifacts as String[]) } } } @@ -107,7 +110,7 @@ pipeline { steps { dir('kie-tools') { script { - buildUtils.setupPnpm() + buildUtils.setupPnpm("${pipelineVars.mavenSettingsConfigFileId}") } } } @@ -135,7 +138,7 @@ pipeline { stage('Push serverless-logic-web-tools-base-builder-image to Docker Hub') { when { - expression { !params.DRY_RUN && !params.RELEASE_CANDIDATE } + expression { !params.DRY_RUN && params.RELEASE_CANDIDATE_VERSION == '' } } steps { script { @@ -153,11 +156,11 @@ pipeline { stage('Setup release candidate artifacts') { when { - expression { !params.DRY_RUN && params.RELEASE_CANDIDATE } + expression { !params.DRY_RUN && params.RELEASE_CANDIDATE_VERSION != '' } } steps { script { - env.RELEASE_IMAGE_TAR_FILE = "incubator-kie-${params.RELEASE_CANDIDATE_VERSION}-${SERVERLESS_LOGIC_WEB_TOOLS__baseBuilderImageName}.tar.gz" + env.RELEASE_IMAGE_TAR_FILE = "incubator-kie-${params.RELEASE_CANDIDATE_VERSION}-serverless-logic-web-tools-base-builder-image.tar.gz" sh """#!/bin/bash -el mkdir ${env.RELEASE_ARTIFACTS_DIR} @@ -169,19 +172,21 @@ pipeline { stage('Sign artifact for Apache release') { when { - expression { !params.DRY_RUN && params.RELEASE_CANDIDATE } + expression { !params.DRY_RUN && params.RELEASE_CANDIDATE_VERSION != '' } } steps { - script { - releaseUtils.setupSigningKey("${pipelineVars.asfReleaseGPGKeyCredentialsId}") - releaseUtils.signArtifact("${env.RELEASE_ARTIFACTS_DIR}/${env.RELEASE_IMAGE_TAR_FILE}") + dir("${env.RELEASE_ARTIFACTS_DIR}") { + script { + releaseUtils.setupSigningKey("${pipelineVars.asfReleaseGPGKeyCredentialsId}") + releaseUtils.signArtifact("${env.RELEASE_IMAGE_TAR_FILE}") + } } } } stage('Publish Release Candidate artifacts') { when { - expression { !params.DRY_RUN && params.RELEASE_CANDIDATE } + expression { !params.DRY_RUN && params.RELEASE_CANDIDATE_VERSION != '' } } steps { script { diff --git a/.ci/jenkins/release-jobs/Jenkinsfile.serverless-logic-web-tools-swf-builder-image b/.ci/jenkins/release-jobs/Jenkinsfile.serverless-logic-web-tools-swf-builder-image index 587d225ca0f..4907b5653e8 100644 --- a/.ci/jenkins/release-jobs/Jenkinsfile.serverless-logic-web-tools-swf-builder-image +++ b/.ci/jenkins/release-jobs/Jenkinsfile.serverless-logic-web-tools-swf-builder-image @@ -23,14 +23,13 @@ pipeline { } options { - timeout(time: 90, unit: 'MINUTES') + timeout(time: 180, 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') - booleanParam(description: 'Release Candidate', name: 'RELEASE_CANDIDATE', defaultValue: false) string(description: 'Release Candidate Version', name: 'RELEASE_CANDIDATE_VERSION', defaultValue: '') } @@ -45,6 +44,8 @@ pipeline { SERVERLESS_LOGIC_WEB_TOOLS__swfBuilderImageName = 'incubator-kie-serverless-logic-web-tools-swf-builder' SERVERLESS_LOGIC_WEB_TOOLS__swfBuilderImageBuildTag = "${params.RELEASE_VERSION}" + MAVEN_SETTINGS_PATH = "${WORKSPACE}/kie-settings.xml" + RELEASE_ARTIFACTS_DIR = "${WORKSPACE}/release-artifacts" DOCKER_CONFIG = "${WORKSPACE}/.docker" @@ -80,11 +81,15 @@ pipeline { } stage('Load upstream images') { + when { + expression { !params.DRY_RUN && params.RELEASE_CANDIDATE_VERSION != '' } + } steps { script { upstreamReleaseArtifactsDir = "${WORKSPACE}/upstream-release-artifacts" - releaseUtils.downloadReleaseArtifacts("${upstreamReleaseArtifactsDir}", "${params.RELEASE_CANDIDATE_VERSION}") - dockerUtils.loadImages(releaseUtils.getUpstreamImagesArtifactsList("${upstreamReleaseArtifactsDir}", "${params.RELEASE_CANDIDATE_VERSION}")) + releaseUtils.downloadReleaseArtifacts("${pipelineVars.asfReleaseStagingRepository}", "${upstreamReleaseArtifactsDir}", "${params.RELEASE_CANDIDATE_VERSION}") + upstreamImagesArtifacts = releaseUtils.getUpstreamImagesArtifactsList("${upstreamReleaseArtifactsDir}", "${params.RELEASE_CANDIDATE_VERSION}") + dockerUtils.loadImages(upstreamImagesArtifacts as String[]) } } } @@ -107,7 +112,21 @@ pipeline { steps { dir('kie-tools') { script { - buildUtils.setupPnpm() + buildUtils.setupPnpm("${pipelineVars.mavenSettingsConfigFileId}") + } + } + } + } + + stage('Setup maven') { + steps { + dir('kie-tools') { + script { + defaultSettingsFile = 'packages/sonataflow-image-common/resources/modules/kogito-maven/common/maven/settings.xml' + sh """#!/bin/bash -el + rm -rf "${defaultSettingsFile}" + cp "${env.MAVEN_SETTINGS_PATH}" "${defaultSettingsFile}" + """.trim() } } } @@ -135,7 +154,7 @@ pipeline { stage('Push serverless-logic-web-tools-swf-builder-image to Docker Hub') { when { - expression { !params.DRY_RUN && !params.RELEASE_CANDIDATE } + expression { !params.DRY_RUN && params.RELEASE_CANDIDATE_VERSION == '' } } steps { script { @@ -153,11 +172,11 @@ pipeline { stage('Setup release candidate artifacts') { when { - expression { !params.DRY_RUN && params.RELEASE_CANDIDATE } + expression { !params.DRY_RUN && params.RELEASE_CANDIDATE_VERSION != '' } } steps { script { - env.RELEASE_IMAGE_TAR_FILE = "incubator-kie-${params.RELEASE_CANDIDATE_VERSION}-${SERVERLESS_LOGIC_WEB_TOOLS__swfBuilderImageName}.tar.gz" + env.RELEASE_IMAGE_TAR_FILE = "incubator-kie-${params.RELEASE_CANDIDATE_VERSION}-serverless-logic-web-tools-swf-builder-image.tar.gz" sh """#!/bin/bash -el mkdir ${env.RELEASE_ARTIFACTS_DIR} @@ -169,19 +188,21 @@ pipeline { stage('Sign artifact for Apache release') { when { - expression { !params.DRY_RUN && params.RELEASE_CANDIDATE } + expression { !params.DRY_RUN && params.RELEASE_CANDIDATE_VERSION != '' } } steps { - script { - releaseUtils.setupSigningKey("${pipelineVars.asfReleaseGPGKeyCredentialsId}") - releaseUtils.signArtifact("${env.RELEASE_ARTIFACTS_DIR}/${env.RELEASE_IMAGE_TAR_FILE}") + dir("${env.RELEASE_ARTIFACTS_DIR}") { + script { + releaseUtils.setupSigningKey("${pipelineVars.asfReleaseGPGKeyCredentialsId}") + releaseUtils.signArtifact("${env.RELEASE_IMAGE_TAR_FILE}") + } } } } stage('Publish Release Candidate artifacts') { when { - expression { !params.DRY_RUN && params.RELEASE_CANDIDATE } + expression { !params.DRY_RUN && params.RELEASE_CANDIDATE_VERSION != '' } } steps { script { diff --git a/.ci/jenkins/release-jobs/Jenkinsfile.serverless-logic-web-tools-swf-dev-mode-image b/.ci/jenkins/release-jobs/Jenkinsfile.serverless-logic-web-tools-swf-dev-mode-image index 97aa7cd7c6e..28e0d322e9d 100644 --- a/.ci/jenkins/release-jobs/Jenkinsfile.serverless-logic-web-tools-swf-dev-mode-image +++ b/.ci/jenkins/release-jobs/Jenkinsfile.serverless-logic-web-tools-swf-dev-mode-image @@ -23,14 +23,13 @@ pipeline { } options { - timeout(time: 90, unit: 'MINUTES') + timeout(time: 180, 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') - booleanParam(description: 'Release Candidate', name: 'RELEASE_CANDIDATE', defaultValue: false) string(description: 'Release Candidate Version', name: 'RELEASE_CANDIDATE_VERSION', defaultValue: '') } @@ -80,11 +79,15 @@ pipeline { } stage('Load upstream images') { + when { + expression { !params.DRY_RUN && params.RELEASE_CANDIDATE_VERSION != '' } + } steps { script { upstreamReleaseArtifactsDir = "${WORKSPACE}/upstream-release-artifacts" - releaseUtils.downloadReleaseArtifacts("${upstreamReleaseArtifactsDir}", "${params.RELEASE_CANDIDATE_VERSION}") - dockerUtils.loadImages(releaseUtils.getUpstreamImagesArtifactsList("${upstreamReleaseArtifactsDir}", "${params.RELEASE_CANDIDATE_VERSION}")) + releaseUtils.downloadReleaseArtifacts("${pipelineVars.asfReleaseStagingRepository}", "${upstreamReleaseArtifactsDir}", "${params.RELEASE_CANDIDATE_VERSION}") + upstreamImagesArtifacts = releaseUtils.getUpstreamImagesArtifactsList("${upstreamReleaseArtifactsDir}", "${params.RELEASE_CANDIDATE_VERSION}") + dockerUtils.loadImages(upstreamImagesArtifacts as String[]) } } } @@ -107,7 +110,7 @@ pipeline { steps { dir('kie-tools') { script { - buildUtils.setupPnpm() + buildUtils.setupPnpm("${pipelineVars.mavenSettingsConfigFileId}") } } } @@ -135,7 +138,7 @@ pipeline { stage('Push serverless-logic-web-tools-swf-dev-mode-image to Docker Hub') { when { - expression { !params.DRY_RUN && !params.RELEASE_CANDIDATE } + expression { !params.DRY_RUN && params.RELEASE_CANDIDATE_VERSION == '' } } steps { script { @@ -153,11 +156,11 @@ pipeline { stage('Setup release candidate artifacts') { when { - expression { !params.DRY_RUN && params.RELEASE_CANDIDATE } + expression { !params.DRY_RUN && params.RELEASE_CANDIDATE_VERSION != '' } } steps { script { - env.RELEASE_IMAGE_TAR_FILE = "incubator-kie-${params.RELEASE_CANDIDATE_VERSION}-${SERVERLESS_LOGIC_WEB_TOOLS__swfDevModeImageName}.tar.gz" + env.RELEASE_IMAGE_TAR_FILE = "incubator-kie-${params.RELEASE_CANDIDATE_VERSION}-serverless-logic-web-tools-swf-dev-mode-image.tar.gz" sh """#!/bin/bash -el mkdir ${env.RELEASE_ARTIFACTS_DIR} @@ -169,19 +172,21 @@ pipeline { stage('Sign artifact for Apache release') { when { - expression { !params.DRY_RUN && params.RELEASE_CANDIDATE } + expression { !params.DRY_RUN && params.RELEASE_CANDIDATE_VERSION != '' } } steps { - script { - releaseUtils.setupSigningKey("${pipelineVars.asfReleaseGPGKeyCredentialsId}") - releaseUtils.signArtifact("${env.RELEASE_ARTIFACTS_DIR}/${env.RELEASE_IMAGE_TAR_FILE}") + dir("${env.RELEASE_ARTIFACTS_DIR}") { + script { + releaseUtils.setupSigningKey("${pipelineVars.asfReleaseGPGKeyCredentialsId}") + releaseUtils.signArtifact("${env.RELEASE_IMAGE_TAR_FILE}") + } } } } stage('Publish Release Candidate artifacts') { when { - expression { !params.DRY_RUN && params.RELEASE_CANDIDATE } + expression { !params.DRY_RUN && params.RELEASE_CANDIDATE_VERSION != '' } } steps { script { diff --git a/.ci/jenkins/release-jobs/Jenkinsfile.sonataflow-quarkus-devui b/.ci/jenkins/release-jobs/Jenkinsfile.sonataflow-quarkus-devui index d0d24f4efb5..b8045811acb 100644 --- a/.ci/jenkins/release-jobs/Jenkinsfile.sonataflow-quarkus-devui +++ b/.ci/jenkins/release-jobs/Jenkinsfile.sonataflow-quarkus-devui @@ -30,7 +30,6 @@ pipeline { 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') - booleanParam(description: 'Release Candidate', name: 'RELEASE_CANDIDATE', defaultValue: false) } environment { @@ -88,7 +87,7 @@ pipeline { steps { dir('kie-tools') { script { - buildUtils.setupPnpm() + buildUtils.setupPnpm("${pipelineVars.mavenSettingsConfigFileId}") } } } @@ -119,7 +118,7 @@ pipeline { if (params.DRY_RUN) { env.KIE_TOOLS_BUILD__mavenDeploySkip = 'true' } - withCredentials([usernamePassword(credentialsId: "${pipelineVars.mavenDeployRepositoryCredentialsId}", usernameVariable: 'REPOSITORY_USER', passwordVariable: 'REPOSITORY_TOKEN')]) { + withCredentials([usernamePassword(credentialsId: "${pipelineVars.mavenDeployStagingCredentialsId}", usernameVariable: 'REPOSITORY_USER', passwordVariable: 'REPOSITORY_TOKEN')]) { configFileProvider([configFile(fileId: "${pipelineVars.mavenSettingsConfigFileId}", variable: 'MAVEN_SETTINGS_FILE')]) { sh """#!/bin/bash -el pnpm ${env.PNPM_FILTER_STRING} exec 'bash' '-c' 'echo -e "\n--settings=${MAVEN_SETTINGS_FILE}" >> .mvn/maven.config' diff --git a/.ci/jenkins/release-jobs/Jenkinsfile.standalone-editors-cdn b/.ci/jenkins/release-jobs/Jenkinsfile.standalone-editors-cdn index 64e4ffe1efb..082846ce010 100644 --- a/.ci/jenkins/release-jobs/Jenkinsfile.standalone-editors-cdn +++ b/.ci/jenkins/release-jobs/Jenkinsfile.standalone-editors-cdn @@ -30,7 +30,6 @@ pipeline { 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') - booleanParam(description: 'Release Candidate', name: 'RELEASE_CANDIDATE', defaultValue: false) string(description: 'Release Candidate Version', name: 'RELEASE_CANDIDATE_VERSION', defaultValue: '') } @@ -105,7 +104,7 @@ pipeline { steps { dir('kie-tools') { script { - buildUtils.setupPnpm() + buildUtils.setupPnpm("${pipelineVars.mavenSettingsConfigFileId}") } } } @@ -133,7 +132,7 @@ pipeline { stage('Deploy to GitHub Pages (kogito-online)') { when { - expression { !params.DRY_RUN && !params.RELEASE_CANDIDATE } + expression { !params.DRY_RUN && params.RELEASE_CANDIDATE_VERSION == '' } } steps { dir('kogito-online') { @@ -172,36 +171,40 @@ pipeline { stage('Setup release candidate artifacts') { when { - expression { !params.DRY_RUN && params.RELEASE_CANDIDATE } + expression { !params.DRY_RUN && params.RELEASE_CANDIDATE_VERSION != '' } } steps { script { env.BUSINESS_AUTOMATION_STANDALONE_RELEASE_ZIP_FILE = "incubator-kie-${params.RELEASE_CANDIDATE_VERSION}-business-automation-standalone-editors.zip" env.SONATAFLOW_STANDALONE_RELEASE_ZIP_FILE = "incubator-kie-${params.RELEASE_CANDIDATE_VERSION}-sonataflow-standalone-editors.zip" - sh "mkdir ${env.RELEASE_ARTIFACTS_DIR}" - zipUtils.zipArtifact("${env.RELEASE_ARTIFACTS_DIR}/${env.BUSINESS_AUTOMATION_STANDALONE_RELEASE_ZIP_FILE}", 'kie-tools/packages/kie-editors-standalone/dist') - zipUtils.zipArtifact("${env.RELEASE_ARTIFACTS_DIR}/${env.SONATAFLOW_STANDALONE_RELEASE_ZIP_FILE}", 'kie-tools/packages/serverless-workflow-standalone-editor/dist') + sh """#!/bin/bash -el + mkdir ${env.RELEASE_ARTIFACTS_DIR} + cd ${WORKSPACE}/kie-tools/packages/kie-editors-standalone/dist && zip -r "${env.RELEASE_ARTIFACTS_DIR}/${env.BUSINESS_AUTOMATION_STANDALONE_RELEASE_ZIP_FILE}" . + cd ${WORKSPACE}/kie-tools/packages/serverless-workflow-standalone-editor/dist && zip -r "${env.RELEASE_ARTIFACTS_DIR}/${env.SONATAFLOW_STANDALONE_RELEASE_ZIP_FILE}" . + """.trim() } } } stage('Sign artifacts for Apache release') { when { - expression { !params.DRY_RUN && params.RELEASE_CANDIDATE } + expression { !params.DRY_RUN && params.RELEASE_CANDIDATE_VERSION != '' } } steps { - script { - releaseUtils.setupSigningKey("${pipelineVars.asfReleaseGPGKeyCredentialsId}") - releaseUtils.signArtifact("${env.RELEASE_ARTIFACTS_DIR}/${env.BUSINESS_AUTOMATION_STANDALONE_RELEASE_ZIP_FILE}") - releaseUtils.signArtifact("${env.RELEASE_ARTIFACTS_DIR}/${env.SONATAFLOW_STANDALONE_RELEASE_ZIP_FILE}") + dir("${env.RELEASE_ARTIFACTS_DIR}") { + script { + releaseUtils.setupSigningKey("${pipelineVars.asfReleaseGPGKeyCredentialsId}") + releaseUtils.signArtifact("${env.BUSINESS_AUTOMATION_STANDALONE_RELEASE_ZIP_FILE}") + releaseUtils.signArtifact("${env.SONATAFLOW_STANDALONE_RELEASE_ZIP_FILE}") + } } } } stage('Publish Release Candidate artifacts') { when { - expression { !params.DRY_RUN && params.RELEASE_CANDIDATE } + expression { !params.DRY_RUN && params.RELEASE_CANDIDATE_VERSION != '' } } steps { script { diff --git a/.ci/jenkins/release-jobs/Jenkinsfile.vscode-extensions-dev b/.ci/jenkins/release-jobs/Jenkinsfile.vscode-extensions-dev index c80ed3f0756..057f559a52f 100644 --- a/.ci/jenkins/release-jobs/Jenkinsfile.vscode-extensions-dev +++ b/.ci/jenkins/release-jobs/Jenkinsfile.vscode-extensions-dev @@ -85,7 +85,7 @@ pipeline { steps { dir('kie-tools') { script { - buildUtils.setupPnpm() + buildUtils.setupPnpm("${pipelineVars.mavenSettingsConfigFileId}") } } } diff --git a/.ci/jenkins/release-jobs/Jenkinsfile.vscode-extensions-prod b/.ci/jenkins/release-jobs/Jenkinsfile.vscode-extensions-prod index c927209d12c..8368bf010e8 100644 --- a/.ci/jenkins/release-jobs/Jenkinsfile.vscode-extensions-prod +++ b/.ci/jenkins/release-jobs/Jenkinsfile.vscode-extensions-prod @@ -31,7 +31,6 @@ pipeline { string(description: 'Release Version', name: 'RELEASE_VERSION', defaultValue: '0.0.0') string(description: 'Base Ref', name: 'BASE_REF') string(description: 'Upload Asset Url', name: 'UPLOAD_ASSET_URL') - booleanParam(description: 'Release Candidate', name: 'RELEASE_CANDIDATE', defaultValue: false) string(description: 'Release Candidate Version', name: 'RELEASE_CANDIDATE_VERSION', defaultValue: '') } @@ -88,7 +87,7 @@ pipeline { steps { dir('kie-tools') { script { - buildUtils.setupPnpm() + buildUtils.setupPnpm("${pipelineVars.mavenSettingsConfigFileId}") } } } @@ -133,7 +132,7 @@ pipeline { stage('Upload VS Code Extension - BPMN Editor (prod)') { when { - expression { !params.DRY_RUN && !params.RELEASE_CANDIDATE } + expression { !params.DRY_RUN && params.RELEASE_CANDIDATE_VERSION == '' } } steps { dir('kie-tools') { @@ -152,7 +151,7 @@ pipeline { stage('Upload VS Code Extension - DMN Editor (prod)') { when { - expression { !params.DRY_RUN && !params.RELEASE_CANDIDATE } + expression { !params.DRY_RUN && params.RELEASE_CANDIDATE_VERSION == '' } } steps { dir('kie-tools') { @@ -171,7 +170,7 @@ pipeline { stage('Upload VS Code Extension - PMML Editor (prod)') { when { - expression { !params.DRY_RUN && !params.RELEASE_CANDIDATE } + expression { !params.DRY_RUN && params.RELEASE_CANDIDATE_VERSION == '' } } steps { dir('kie-tools') { @@ -190,7 +189,7 @@ pipeline { stage('Upload VS Code Extension - Kogito Bundle (prod)') { when { - expression { !params.DRY_RUN && !params.RELEASE_CANDIDATE } + expression { !params.DRY_RUN && params.RELEASE_CANDIDATE_VERSION == '' } } steps { dir('kie-tools') { @@ -209,7 +208,7 @@ pipeline { stage('Upload VS Code Extension - KIE Business Automation Bundle (prod)') { when { - expression { !params.DRY_RUN && !params.RELEASE_CANDIDATE } + expression { !params.DRY_RUN && params.RELEASE_CANDIDATE_VERSION == '' } } steps { dir('kie-tools') { @@ -228,7 +227,7 @@ pipeline { stage('Upload VS Code Extension - Serverless Workflow Editor - KIE (prod)') { when { - expression { !params.DRY_RUN && !params.RELEASE_CANDIDATE } + expression { !params.DRY_RUN && params.RELEASE_CANDIDATE_VERSION == '' } } steps { dir('kie-tools') { @@ -247,7 +246,7 @@ pipeline { stage('Upload VS Code Extension - Dashbuilder Editor (prod)') { when { - expression { !params.DRY_RUN && !params.RELEASE_CANDIDATE } + expression { !params.DRY_RUN && params.RELEASE_CANDIDATE_VERSION == '' } } steps { dir('kie-tools') { @@ -266,7 +265,7 @@ pipeline { stage('Upload VS Code Extension - Yard (prod)') { when { - expression { !params.DRY_RUN && !params.RELEASE_CANDIDATE } + expression { !params.DRY_RUN && params.RELEASE_CANDIDATE_VERSION == '' } } steps { dir('kie-tools') { @@ -285,7 +284,7 @@ pipeline { stage('Upload VS Code Extension - Extended Services (prod)') { when { - expression { !params.DRY_RUN && !params.RELEASE_CANDIDATE } + expression { !params.DRY_RUN && params.RELEASE_CANDIDATE_VERSION == '' } } steps { dir('kie-tools') { @@ -304,7 +303,7 @@ pipeline { stage('Setup release candidate artifacts') { when { - expression { !params.DRY_RUN && params.RELEASE_CANDIDATE } + expression { !params.DRY_RUN && params.RELEASE_CANDIDATE_VERSION != '' } } steps { script { @@ -322,13 +321,13 @@ pipeline { mkdir ${env.RELEASE_ARTIFACTS_DIR} cp "kie-tools/packages/bpmn-vscode-extension/dist/bpmn_vscode_extension_${params.RELEASE_VERSION}.vsix" "${env.RELEASE_ARTIFACTS_DIR}/${env.BPMN_VSCODE_EXTENSION_RELEASE_FILE}" cp "kie-tools/packages/dmn-vscode-extension/dist/dmn_vscode_extension_${params.RELEASE_VERSION}.vsix" "${env.RELEASE_ARTIFACTS_DIR}/${env.DMN_VSCODE_EXTENSION_RELEASE_FILE}" - cp "kie-tools/ackages/pmml-vscode-extension/dist/pmml_vscode_extension_${params.RELEASE_VERSION}.vsix" "${env.RELEASE_ARTIFACTS_DIR}/${env.PMML_VSCODE_EXTENSION_RELEASE_FILE}" + cp "kie-tools/packages/pmml-vscode-extension/dist/pmml_vscode_extension_${params.RELEASE_VERSION}.vsix" "${env.RELEASE_ARTIFACTS_DIR}/${env.PMML_VSCODE_EXTENSION_RELEASE_FILE}" cp "kie-tools/packages/vscode-extension-dashbuilder-editor/dist/vscode_extension_dashbuilder_editor_${params.RELEASE_VERSION}.vsix" "${env.RELEASE_ARTIFACTS_DIR}/${env.DASHBUILDER_VSCODE_EXTENSION_RELEASE_FILE}" cp "kie-tools/packages/serverless-workflow-vscode-extension/dist/serverless_workflow_vscode_extension_${params.RELEASE_VERSION}.vsix" "${env.RELEASE_ARTIFACTS_DIR}/${env.SONATAFLOW_VSCODE_EXTENSION_RELEASE_FILE}" cp "kie-tools/packages/yard-vscode-extension/dist/yard_vscode_extension_${params.RELEASE_VERSION}.vsix" "${env.RELEASE_ARTIFACTS_DIR}/${env.YARD_VSCODE_EXTENSION_RELEASE_FILE}" cp "kie-tools/packages/vscode-extension-kogito-bundle/dist/vscode_extension_kogito_bundle_${params.RELEASE_VERSION}.vsix" "${env.RELEASE_ARTIFACTS_DIR}/${env.KOGITO_BUNDLE_VSCODE_EXTENSION_RELEASE_FILE}" cp "kie-tools/packages/vscode-extension-kie-ba-bundle/dist/vscode_extension_kie_ba_bundle_${params.RELEASE_VERSION}.vsix" "${env.RELEASE_ARTIFACTS_DIR}/${env.BUSINESS_AUTOMATION_BUNDLE_VSCODE_EXTENSION_RELEASE_FILE}" - cp "kie-tools/packages/extended-services-vscode-extension/dist/extendend_services_vscode_extension_${params.RELEASE_VERSION}.vsix" "${env.RELEASE_ARTIFACTS_DIR}/${env.EXTENDED_SERVICES_VSCODE_EXTENSION_RELEASE_FILE}" + cp "kie-tools/packages/extended-services-vscode-extension/dist/extended_services_vscode_extension_${params.RELEASE_VERSION}.vsix" "${env.RELEASE_ARTIFACTS_DIR}/${env.EXTENDED_SERVICES_VSCODE_EXTENSION_RELEASE_FILE}" """.trim() } } @@ -336,27 +335,29 @@ pipeline { stage('Sign artifacts for Apache release') { when { - expression { !params.DRY_RUN && params.RELEASE_CANDIDATE } + expression { !params.DRY_RUN && params.RELEASE_CANDIDATE_VERSION != '' } } steps { - script { - releaseUtils.setupSigningKey("${pipelineVars.asfReleaseGPGKeyCredentialsId}") - releaseUtils.signArtifact("${env.RELEASE_ARTIFACTS_DIR}/${env.BPMN_VSCODE_EXTENSION_RELEASE_FILE}") - releaseUtils.signArtifact("${env.RELEASE_ARTIFACTS_DIR}/${env.DMN_VSCODE_EXTENSION_RELEASE_FILE}") - releaseUtils.signArtifact("${env.RELEASE_ARTIFACTS_DIR}/${env.PMML_VSCODE_EXTENSION_RELEASE_FILE}") - releaseUtils.signArtifact("${env.RELEASE_ARTIFACTS_DIR}/${env.DASHBUILDER_VSCODE_EXTENSION_RELEASE_FILE}") - releaseUtils.signArtifact("${env.RELEASE_ARTIFACTS_DIR}/${env.SONATAFLOW_VSCODE_EXTENSION_RELEASE_FILE}") - releaseUtils.signArtifact("${env.RELEASE_ARTIFACTS_DIR}/${env.YARD_VSCODE_EXTENSION_RELEASE_FILE}") - releaseUtils.signArtifact("${env.RELEASE_ARTIFACTS_DIR}/${env.KOGITO_BUNDLE_VSCODE_EXTENSION_RELEASE_FILE}") - releaseUtils.signArtifact("${env.RELEASE_ARTIFACTS_DIR}/${env.BUSINESS_AUTOMATION_BUNDLE_VSCODE_EXTENSION_RELEASE_FILE}") - releaseUtils.signArtifact("${env.RELEASE_ARTIFACTS_DIR}/${env.EXTENDED_SERVICES_VSCODE_EXTENSION_RELEASE_FILE}") + dir("${env.RELEASE_ARTIFACTS_DIR}") { + script { + releaseUtils.setupSigningKey("${pipelineVars.asfReleaseGPGKeyCredentialsId}") + releaseUtils.signArtifact("${env.BPMN_VSCODE_EXTENSION_RELEASE_FILE}") + releaseUtils.signArtifact("${env.DMN_VSCODE_EXTENSION_RELEASE_FILE}") + releaseUtils.signArtifact("${env.PMML_VSCODE_EXTENSION_RELEASE_FILE}") + releaseUtils.signArtifact("${env.DASHBUILDER_VSCODE_EXTENSION_RELEASE_FILE}") + releaseUtils.signArtifact("${env.SONATAFLOW_VSCODE_EXTENSION_RELEASE_FILE}") + releaseUtils.signArtifact("${env.YARD_VSCODE_EXTENSION_RELEASE_FILE}") + releaseUtils.signArtifact("${env.KOGITO_BUNDLE_VSCODE_EXTENSION_RELEASE_FILE}") + releaseUtils.signArtifact("${env.BUSINESS_AUTOMATION_BUNDLE_VSCODE_EXTENSION_RELEASE_FILE}") + releaseUtils.signArtifact("${env.EXTENDED_SERVICES_VSCODE_EXTENSION_RELEASE_FILE}") + } } } } stage('Publish Release Candidate artifacts') { when { - expression { !params.DRY_RUN && params.RELEASE_CANDIDATE } + expression { !params.DRY_RUN && params.RELEASE_CANDIDATE_VERSION != '' } } steps { script { diff --git a/.ci/jenkins/shared-scripts/buildUtils.groovy b/.ci/jenkins/shared-scripts/buildUtils.groovy index 50733db8dbe..a10964f90f2 100644 --- a/.ci/jenkins/shared-scripts/buildUtils.groovy +++ b/.ci/jenkins/shared-scripts/buildUtils.groovy @@ -46,7 +46,7 @@ def startFluxbox() { /** * Setup PNPM parameters for building KIE-Tools */ -def setupPnpm() { +def setupPnpm(String mavenSettingsFileId = '') { sh """#!/bin/bash -el pnpm config set network-timeout 1000000 pnpm -r exec 'bash' '-c' 'mkdir .mvn' @@ -54,6 +54,15 @@ def setupPnpm() { pnpm -r exec 'bash' '-c' 'echo -ntp >> .mvn/maven.config' pnpm -r exec 'bash' '-c' 'echo -Xmx2g > .mvn/jvm.config' """.trim() + + if (mavenSettingsFileId) { + configFileProvider([configFile(fileId: mavenSettingsFileId, variable: 'MAVEN_SETTINGS_FILE')]) { + sh """#!/bin/bash -el + cp ${MAVEN_SETTINGS_FILE} ${WORKSPACE}/kie-settings.xml + pnpm -r exec 'bash' '-c' 'echo --settings=${WORKSPACE}/kie-settings.xml >> .mvn/maven.config' + """.trim() + } + } } /** diff --git a/.ci/jenkins/shared-scripts/dockerUtils.groovy b/.ci/jenkins/shared-scripts/dockerUtils.groovy index da1740a7295..a384a8dd084 100644 --- a/.ci/jenkins/shared-scripts/dockerUtils.groovy +++ b/.ci/jenkins/shared-scripts/dockerUtils.groovy @@ -58,19 +58,12 @@ def tagImage(String registry, String image, String oldTag, String newTag) { sh "docker tag ${registry}/${image}:${oldTag} ${registry}/${image}:${newTag}" } -/** -* Load an image -*/ -def loadImage(String imageFile) { - sh "docker load < ${imageFile}" -} - /** * Load multiple images */ def loadImages(String... imagesFiles) { for (imageFile in imagesFiles) { - loadImage(imageFile) + sh "docker load < ${imageFile}" } } diff --git a/.ci/jenkins/shared-scripts/pipelineVars.groovy b/.ci/jenkins/shared-scripts/pipelineVars.groovy index a169d712674..6f87c9f0256 100644 --- a/.ci/jenkins/shared-scripts/pipelineVars.groovy +++ b/.ci/jenkins/shared-scripts/pipelineVars.groovy @@ -36,11 +36,12 @@ class PipelineVars implements Serializable { String asfGithubPushCredentialsId = '84811880-2025-45b6-a44c-2f33bef30ad2' String asfGithubTokenPushCredentialsId = '41128c14-bb63-4708-9074-d20a318ee630' String mavenSettingsConfigFileId = 'kie-release-settings' - String mavenDeployRepositoryCredentialsId = 'apache-nexus-kie-deploy-credentials' + String mavenDeploySnapshotsCredentialsId = 'apache-nexus-kie-deploy-credentials' + String mavenDeployStagingCredentialsId = 'jenkins-deploy-to-nexus-staging' String defaultArtifactsTempDir = 'artifacts-tmp' String asfReleaseStagingRepository = 'https://dist.apache.org/repos/dist/dev/incubator/kie' - String asfReleaseGPGKeyCredentialsId = 'GPG_KEY' - String asfReleaseSVNStagingCredentialsId = 'asf-release-svn-staging' + String asfReleaseGPGKeyCredentialsId = 'GPG_KEY_FILE' + String asfReleaseSVNStagingCredentialsId = 'kie-svn-credentials' String kieToolsCiBuildImageRegistry = 'docker.io' String kieToolsCiBuildImageAccount = 'apache' String kieToolsCiBuildImageName = 'incubator-kie-tools-ci-build' diff --git a/.ci/jenkins/shared-scripts/releaseUtils.groovy b/.ci/jenkins/shared-scripts/releaseUtils.groovy index 6e07f82338a..40c72595dd6 100644 --- a/.ci/jenkins/shared-scripts/releaseUtils.groovy +++ b/.ci/jenkins/shared-scripts/releaseUtils.groovy @@ -19,12 +19,10 @@ * Setup the GPG Key to sign release artifacts */ def setupSigningKey(String gpgKeyCredentialsId) { - withCredentials([string(credentialsId: gpgKeyCredentialsId, variable: 'SIGNING_KEY')]) { + withCredentials([file(credentialsId: gpgKeyCredentialsId, variable: 'SIGNING_KEY')]) { sh """#!/bin/bash -el - echo "${SIGNING_KEY}" > ${WORKSPACE}/signkey.gpg gpg --list-keys - gpg --batch --pinentry-mode loopback --import ${WORKSPACE}/signkey.gpg - rm ${WORKSPACE}/signkey.gpg + gpg --batch --pinentry-mode=loopback --import $SIGNING_KEY """.trim() } } @@ -45,10 +43,10 @@ def signArtifact(String artifactFileName) { def publishArtifacts(String artifactsDir, String releaseRepository, String releaseVersion, String credentialsId) { withCredentials([usernamePassword(credentialsId: credentialsId, usernameVariable: 'ASF_USERNAME', passwordVariable: 'ASF_PASSWORD')]) { sh """#!/bin/bash -el - svn co --depth=empty ${releaseRepository} svn-kie - cp ${artifactsDir}/* svn-kie/${releaseVersion}/ - svn add "svn-kie/${releaseVersion}" + svn co --depth=empty ${releaseRepository}/${releaseVersion} svn-kie + cp ${artifactsDir}/* svn-kie cd svn-kie + svn add . --force svn ci --non-interactive --no-auth-cache --username ${ASF_USERNAME} --password '${ASF_PASSWORD}' -m "Apache KIE ${releaseVersion} artifacts" rm -rf svn-kie """.trim() @@ -58,9 +56,10 @@ def publishArtifacts(String artifactsDir, String releaseRepository, String relea /** * Download release artifacts from a specific release */ -def downloadReleaseArtifacts(String artifactsDir, String releaseVersion) { +def downloadReleaseArtifacts(String releaseRepository, String artifactsDir, String releaseVersion) { sh """#!/bin/bash -el - svn co "${releaseRepository}/${releaseVersion}" "${artifactsDir}/${releaseVersion}" + mkdir -p "${artifactsDir}" + svn co "${releaseRepository}/${releaseVersion}" "${artifactsDir}" """.trim() } @@ -78,3 +77,5 @@ def getUpstreamImagesArtifactsList(String artifactsDir, String releaseVersion) { "${artifactsDir}/incubator-kie-${releaseVersion}-kogito-jobs-service-postgresql-image.tar.gz" ] } + +return this diff --git a/.github/workflows/release_dry_run_extended_services.yml b/.github/workflows/release_dry_run_extended_services.yml deleted file mode 100644 index 3666753e647..00000000000 --- a/.github/workflows/release_dry_run_extended_services.yml +++ /dev/null @@ -1,41 +0,0 @@ -# -# 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. -# - -name: "Release :: Dry Run (Extended Services)" - -on: - workflow_dispatch: - schedule: - - cron: "0 4 * * *" # 4am UTC everyday - pull_request: - branches: ["**"] - paths: - - ".github/workflows/release*" - - ".github/actions/**" - -concurrency: - group: ${{ github.event.pull_request && format('release-dry-run-pr-{0}', github.event.pull_request.number) || format('release-dry-run-ref-{0}', github.ref_name) }} - cancel-in-progress: true - -jobs: - dry_run: - uses: ./.github/workflows/release_build_extended_services.yml - with: - dry_run: true - base_ref: ${{ github.event.pull_request && github.base_ref || github.ref }} diff --git a/.github/workflows/release_publish_extended_services.yml b/.github/workflows/release_publish_extended_services.yml index 5b4b19cc193..35db7b95880 100644 --- a/.github/workflows/release_publish_extended_services.yml +++ b/.github/workflows/release_publish_extended_services.yml @@ -22,21 +22,21 @@ name: "Release :: Publish (Extended Services)" on: workflow_dispatch: inputs: - tag: + release_version: type: string required: true - description: "Tag associated with the release" + description: "Release Version" jobs: prepare: runs-on: ubuntu-latest outputs: - upload_asset_url: ${{ fromJSON(steps.fetch_release_for_tag.outputs.data).upload_url }} - release_ref: ${{ fromJSON(steps.fetch_release_for_tag.outputs.data).target_commitish }} + upload_asset_url: ${{ fromJSON(steps.fetch_release.outputs.data).upload_url }} + release_ref: ${{ fromJSON(steps.fetch_release.outputs.data).target_commitish }} steps: - - name: "Fetch release for ${{ github.event.inputs.tag }}" + - name: "Fetch release for ${{ github.event.inputs.release_version }}" uses: octokit/request-action@v2.1.0 - id: fetch_release_for_tag + id: fetch_release env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} with: @@ -47,20 +47,46 @@ jobs: - name: "Checkout" uses: actions/checkout@v3 with: - ref: ${{ fromJSON(steps.fetch_release_for_tag.outputs.data).target_commitish }} + ref: ${{ fromJSON(steps.fetch_release.outputs.data).target_commitish }} - - name: "Check `tag` against `(package.json).version`" + - name: "Check `release_version` against `(package.json).version`" shell: bash run: | - [ "${{ github.event.inputs.tag }}" == "$(node -p "require('./package.json').version")" ] + [ "${{ github.event.inputs.release_version }}" == "$(node -p "require('./package.json').version")" ] - build_and_publish: + publish: + runs-on: ubuntu-latest needs: [prepare] - uses: ./.github/workflows/release_build_extended_services.yml - with: - dry_run: false - base_ref: ${{ needs.prepare.outputs.release_ref }} - tag: ${{ github.event.inputs.tag }} - upload_asset_url: ${{ needs.prepare.outputs.upload_asset_url }} - secrets: - gh_token: ${{ secrets.GITHUB_TOKEN }} + env: + RELEASE_VERSION: ${{ github.event.inputs.release_version }} + RELEASE_ARTIFACTS_SVN_URL: "https://dist.apache.org/repos/dist/release/incubator/kie" + steps: + - name: "Create release artifacts dir" + shell: bash + run: | + mkdir -p ./release-artifacts + + - name: "Download extended services artifacts from SVN" + shell: bash + run: | + svn co "$RELEASE_ARTIFACTS_SVN_URL/$RELEASE_VERSION" ./release-artifacts + + - name: "Upload Extended Services for macOS" + uses: actions/upload-release-asset@v1.0.2 + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + with: + upload_url: ${{ needs.prepare.outputs.upload_asset_url }} + asset_path: ./release-artifacts/incubator-kie-$RELEASE_VERSION-sandbox-extended-services-macOS.zip + asset_name: incubator-kie-$RELEASE_VERSION-sandbox-extended-services-macOS.zip + asset_content_type: application/octet-stream + + - name: "Upload Extended Services for Windows" + uses: actions/upload-release-asset@v1.0.2 + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + with: + upload_url: ${{ needs.prepare.outputs.upload_asset_url }} + asset_path: ./release-artifacts/incubator-kie-$RELEASE_VERSION-sandbox-extended-services-windows-x86.zip + asset_name: incubator-kie-$RELEASE_VERSION-sandbox-extended-services-windows-x86.zip + asset_content_type: application/octet-stream