Skip to content

Commit

Permalink
kie-issues#1036: Adapt kie-tools Jenkins jobs to build and publish pa…
Browse files Browse the repository at this point in the history
…ckages/kogito-swf-{devmode,builder} (apache#2262)
  • Loading branch information
rodrigonull authored Apr 25, 2024
1 parent a955c46 commit 558ae56
Show file tree
Hide file tree
Showing 9 changed files with 677 additions and 221 deletions.
36 changes: 36 additions & 0 deletions .ci/jenkins/Jenkinsfile.daily-dev-publish
Original file line number Diff line number Diff line change
Expand Up @@ -122,6 +122,16 @@ pipeline {
KOGITO_MANAGEMENT_CONSOLE__name = 'kogito-management-console'
KOGITO_MANAGEMENT_CONSOLE__buildTags = 'daily-dev'

KOGITO_SWF_BUILDER_IMAGE__registry = 'quay.io'
KOGITO_SWF_BUILDER_IMAGE__account = 'kiegroup'
KOGITO_SWF_BUILDER_IMAGE__name = 'kogito-swf-builder-nightly'
KOGITO_SWF_BUILDER_IMAGE__buildTag = 'latest'

KOGITO_SWF_DEVMODE_IMAGE__registry = 'quay.io'
KOGITO_SWF_DEVMODE_IMAGE__account = 'kiegroup'
KOGITO_SWF_DEVMODE_IMAGE__name = 'kogito-swf-devmode-nightly'
KOGITO_SWF_DEVMODE_IMAGE__buildTag = 'latest'

BUILD_DATE = sh(script: "echo `date +'%Y-%m-%d %T'`", returnStdout: true).trim()

DOCKER_CONFIG = "${WORKSPACE}/.docker"
Expand Down Expand Up @@ -215,6 +225,32 @@ pipeline {
}
}

stage('Push kogito-swf-builder to quay.io') {
steps {
script {
dockerUtils.pushImageToRegistry(
"${env.KOGITO_SWF_BUILDER_IMAGE__registry}/${env.KOGITO_SWF_BUILDER_IMAGE__account}",
"${env.KOGITO_SWF_BUILDER_IMAGE__name}",
"${env.KOGITO_SWF_BUILDER_IMAGE__buildTag}",
"${pipelineVars.quayKiegroupPushCredentialsId}"
)
}
}
}

stage('Push kogito-swf-devmode to quay.io') {
steps {
script {
dockerUtils.pushImageToRegistry(
"${env.KOGITO_SWF_DEVMODE_IMAGE__registry}/${env.KOGITO_SWF_DEVMODE_IMAGE__account}",
"${env.KOGITO_SWF_DEVMODE_IMAGE__name}",
"${env.KOGITO_SWF_DEVMODE_IMAGE__buildTag}",
"${pipelineVars.quayKiegroupPushCredentialsId}"
)
}
}
}

stage('Push dev-deployment-base-image to quay.io') {
steps {
script {
Expand Down
54 changes: 49 additions & 5 deletions .ci/jenkins/Jenkinsfile.release-build
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ pipeline {
string(description: 'Base Ref', name: 'BASE_REF')
string(description: 'Tag', name: 'TAG', 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":"true", "kogito-task-console":"false", "kogito-management-console":"false"}')
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"}')
}

environment {
Expand All @@ -54,6 +54,8 @@ pipeline {
DASHBUILDER_VIEWER_IMAGE_JOB_RESULT = 'SKIPPED'
KOGITO_TASK_CONSOLE_JOB_RESULT = 'SKIPPED'
KOGITO_MANAGEMENT_CONSOLE_JOB_RESULT = 'SKIPPED'
KOGITO_SWF_BUILDER_JOB_RESULT = 'SKIPPED'
KOGITO_SWF_DEVMODE_JOB_RESULT = 'SKIPPED'
}

stages {
Expand Down Expand Up @@ -91,8 +93,10 @@ pipeline {
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_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
}
}
}
Expand Down Expand Up @@ -121,8 +125,10 @@ pipeline {
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_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}"
""".trim()
}
}
Expand Down Expand Up @@ -578,6 +584,44 @@ pipeline {
}
}
}

stage('Kogito SWF Builder Image') {
when {
expression { env.KOGITO_SWF_BUILDER == 'true' }
}
steps {
script {
env.KOGITO_SWF_BUILDER_JOB_RESULT = build(
wait: true,
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: 'TAG', value: "${params.TAG}")
]
).result
}
}
}

stage('Kogito SWF Devmode Image') {
when {
expression { env.KOGITO_SWF_DEVMODE == 'true' }
}
steps {
script {
env.KOGITO_SWF_DEVMODE_JOB_RESULT = build(
wait: true,
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: 'TAG', value: "${params.TAG}")
]
).result
}
}
}
}

post {
Expand Down
2 changes: 1 addition & 1 deletion .ci/jenkins/Jenkinsfile.release-dry-run
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ pipeline {
build job: 'KIE/kie-tools/kie-tools-release-build', parameters: [
booleanParam(name: 'DRY_RUN', value: true),
string(name: 'BASE_REF', value: 'main'),
string(name: 'RUNNERS', value: '{"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"}')
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"}')
]
}
}
Expand Down
2 changes: 1 addition & 1 deletion .ci/jenkins/Jenkinsfile.release-publish
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ pipeline {

parameters {
string(description: 'Tag', name: 'TAG', 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"}')
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_swf_devmode":"true"}')
}

stages {
Expand Down
Loading

0 comments on commit 558ae56

Please sign in to comment.