Skip to content
New issue

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

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

Already on GitHub? Sign in to your account

kie-issues#963: Move task-console and management-console images from kogito-images to kie-tools #2226

Merged
merged 20 commits into from
Apr 12, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
20 commits
Select commit Hold shift + click to select a range
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
36 changes: 36 additions & 0 deletions .ci/jenkins/Jenkinsfile.daily-dev-publish
Original file line number Diff line number Diff line change
Expand Up @@ -112,6 +112,16 @@ pipeline {
SERVERLESS_LOGIC_WEB_TOOLS__swfDevModeImageBuildTags = 'daily-dev'
SERVERLESS_LOGIC_WEB_TOOLS__corsProxyUrl = 'https://daily-dev-cors-proxy-kie-sandbox.rhba-0ad6762cc85bcef5745bb684498c2436-0000.us-south.containers.appdomain.cloud'

KOGITO_TASK_CONSOLE__registry = 'quay.io'
KOGITO_TASK_CONSOLE__account = 'kie-tools'
KOGITO_TASK_CONSOLE__name = 'kogito-task-console'
KOGITO_TASK_CONSOLE__buildTags = 'daily-dev'

KOGITO_MANAGEMENT_CONSOLE__registry = 'quay.io'
KOGITO_MANAGEMENT_CONSOLE__account = 'kie-tools'
KOGITO_MANAGEMENT_CONSOLE__name = 'kogito-management-console'
KOGITO_MANAGEMENT_CONSOLE__buildTags = 'daily-dev'

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

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

stage('Push kogito-task-console to quay.io') {
steps {
script {
dockerUtils.pushImageToRegistry(
"${env.KOGITO_TASK_CONSOLE__registry}/${env.KOGITO_TASK_CONSOLE__account}",
"${env.KOGITO_TASK_CONSOLE__name}",
"${env.KOGITO_TASK_CONSOLE__buildTags}",
"${pipelineVars.quayPushCredentialsId}"
)
}
}
}

stage('Push kogito-management-console to quay.io') {
steps {
script {
dockerUtils.pushImageToRegistry(
"${env.KOGITO_MANAGEMENT_CONSOLE__registry}/${env.KOGITO_MANAGEMENT_CONSOLE__account}",
"${env.KOGITO_MANAGEMENT_CONSOLE__name}",
"${env.KOGITO_MANAGEMENT_CONSOLE__buildTags}",
"${pipelineVars.quayPushCredentialsId}"
)
}
}
}

stage('Push kie-sandbox-helm-chart to quay.io') {
steps {
dir('kie-tools') {
Expand Down
46 changes: 45 additions & 1 deletion .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"}')
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"}')
}

environment {
Expand All @@ -52,6 +52,8 @@ pipeline {
SERVERLESS_LOGIC_WEB_TOOLS_BASE_BUILDER_IMAGE_JOB_RESULT = 'SKIPPED'
SERVERLESS_LOGIC_WEB_TOOLS_SWF_DEV_MODE_IMAGE_JOB_RESULT = 'SKIPPED'
DASHBUILDER_VIEWER_IMAGE_JOB_RESULT = 'SKIPPED'
KOGITO_TASK_CONSOLE_JOB_RESULT = 'SKIPPED'
KOGITO_MANAGEMENT_CONSOLE_JOB_RESULT = 'SKIPPED'
}

stages {
Expand Down Expand Up @@ -89,6 +91,8 @@ 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
}
}
}
Expand Down Expand Up @@ -117,6 +121,8 @@ 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}"
""".trim()
}
}
Expand Down Expand Up @@ -534,6 +540,44 @@ pipeline {
}
}
}

stage('Kogito Task Console Image') {
when {
expression { env.KOGITO_TASK_CONSOLE == 'true' }
}
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: 'TAG', value: "${params.TAG}")
]
).result
}
}
}

stage('Kogito Management Console Image') {
when {
expression { env.KOGITO_MANAGEMENT_CONSOLE == 'true' }
}
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: '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"}')
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"}')
]
}
}
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"}')
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"}')
}

stages {
Expand Down
90 changes: 90 additions & 0 deletions .ci/jenkins/Jenkinsfile.staging-build
Original file line number Diff line number Diff line change
Expand Up @@ -107,6 +107,16 @@ pipeline {
KIE_SANDBOX_HELM_CHART__name = 'kie-sandbox-helm-chart'
KIE_SANDBOX_HELM_CHART__tag = "${params.TAG}-prerelease"

KOGITO_TASK_CONSOLE__registry = 'quay.io'
KOGITO_TASK_CONSOLE__account = 'kie-tools'
KOGITO_TASK_CONSOLE__name = 'kogito-task-console'
KOGITO_TASK_CONSOLE__buildTags = "${params.TAG}-prerelease"

KOGITO_MANAGEMENT_CONSOLE__registry = 'quay.io'
KOGITO_MANAGEMENT_CONSOLE__account = 'kie-tools'
KOGITO_MANAGEMENT_CONSOLE__name = 'kogito-management-console'
KOGITO_MANAGEMENT_CONSOLE__buildTags = "${params.TAG}-prerelease"

DOCKER_CONFIG = "${WORKSPACE}/.docker"
}

Expand Down Expand Up @@ -724,6 +734,48 @@ pipeline {
}
}
}

stage('Build (kogito-task-console)') {
steps {
dir('kie-tools') {
script {
buildKogitoTaskConsole()
}
}
}
}

stage('STAGING: Push kogito-task-console to quay.io') {
when {
expression { !params.DRY_RUN }
}
steps {
script {
pushKogitoTaskConsoleToQuay()
}
}
}

stage('Build (kogito-management-console)') {
steps {
dir('kie-tools') {
script {
buildKogitoManagementConsole()
}
}
}
}

stage('STAGING: Push kogito-management-console to quay.io') {
when {
expression { !params.DRY_RUN }
}
steps {
script {
pushKogitoManagementConsoleToQuay()
}
}
}
}

post {
Expand Down Expand Up @@ -767,6 +819,8 @@ def buildPartial() {
-F='!@kie-tools/dev-deployment-kogito-quarkus-blank-app-image' \
-F='!@kie-tools/serverless-logic-web-tools-base-builder-image' \
-F='!@kie-tools/dashbuilder-viewer-image' \
-F='!@kie-tools/kogito-task-console' \
-F='!@kie-tools/kogito-management-console' \
-r --workspace-concurrency=1 build:prod
""".trim()
}
Expand Down Expand Up @@ -1010,6 +1064,42 @@ def pushServerlessLogicWebToolsBaseBuilderImageToQuay() {
)
}

def buildKogitoTaskConsole() {
sh '''#!/bin/bash -el
export KIE_TOOLS_BUILD__runTests=true
export KIE_TOOLS_BUILD__buildContainerImages=true
echo "Build @kie-tools/kogito-task-console"
pnpm -F @kie-tools/kogito-task-console... --workspace-concurrency=1 build:prod
'''.trim()
}

def pushKogitoTaskConsoleToQuay() {
dockerUtils.pushImageToRegistry(
"${env.KOGITO_TASK_CONSOLE__registry}/${env.KOGITO_TASK_CONSOLE__account}",
"${env.KOGITO_TASK_CONSOLE__name}",
"${env.KOGITO_TASK_CONSOLE__buildTags}",
"${pipelineVars.quayPushCredentialsId}"
)
}

def buildKogitoManagementConsole() {
sh '''#!/bin/bash -el
export KIE_TOOLS_BUILD__runTests=true
export KIE_TOOLS_BUILD__buildContainerImages=true
echo "Build @kie-tools/kogito-management-console"
pnpm -F @kie-tools/kogito-management-console... --workspace-concurrency=1 build:prod
'''.trim()
}

def pushKogitoManagementConsoleToQuay() {
dockerUtils.pushImageToRegistry(
"${env.KOGITO_MANAGEMENT_CONSOLE__registry}/${env.KOGITO_MANAGEMENT_CONSOLE__account}",
"${env.KOGITO_MANAGEMENT_CONSOLE__name}",
"${env.KOGITO_MANAGEMENT_CONSOLE__buildTags}",
"${pipelineVars.quayPushCredentialsId}"
)
}

def loadLocalSharedScripts() {
pipelineVars = load '.ci/jenkins/shared-scripts/pipelineVars.groovy'
buildUtils = load '.ci/jenkins/shared-scripts/buildUtils.groovy'
Expand Down
Loading
Loading