Skip to content

Daily dev :: Publish #393

Daily dev :: Publish

Daily dev :: Publish #393

name: "Daily dev :: Publish"
on:
schedule:
- cron: "0 2 * * *" # 2am UTC everyday
workflow_dispatch:
jobs:
build:
if: github.repository == 'kiegroup/kie-tools'
runs-on: ${{ matrix.os }}
strategy:
fail-fast: true
matrix:
os: [ubuntu-latest, macos-latest, windows-latest]
env:
KIE_SANDBOX_EXTENDED_SERVICES_VERSION: "0.0.0"
KIE_TOOLS_BUILD__buildContainerImages: "true"
DMN_DEV_DEPLOYMENT__baseImageRegistry: "quay.io"
DMN_DEV_DEPLOYMENT__baseImageAccount: "kie-tools"
DMN_DEV_DEPLOYMENT__baseImageName: "dmn-dev-deployment-base-image"
DMN_DEV_DEPLOYMENT__baseImageTag: "daily-dev"
DMN_DEV_DEPLOYMENT__baseImageBuildTags: "daily-dev"
DMN_DEV_DEPLOYMENT__onlineEditorUrl: "https://kiegroup.github.io/kogito-online/dev"
EXTENDED_SERVICES__kieSandboxUrl: "https://kiegroup.github.io/kogito-online/dev"
ONLINE_EDITOR__gitCorsProxyUrl: "https://daily-dev-git-cors-proxy-kie-sandbox.rhba-0ad6762cc85bcef5745bb684498c2436-0000.us-south.containers.appdomain.cloud"
KIE_SANDBOX__imageRegistry: "quay.io"
KIE_SANDBOX__imageAccount: "kie-tools"
KIE_SANDBOX__imageName: "kie-sandbox-image"
KIE_SANDBOX__imageBuildTags: "daily-dev"
KIE_SANDBOX_EXTENDED_SERVICES__imageRegistry: "quay.io"
KIE_SANDBOX_EXTENDED_SERVICES__imageAccount: "kie-tools"
KIE_SANDBOX_EXTENDED_SERVICES__imageName: "kie-sandbox-extended-services-image"
KIE_SANDBOX_EXTENDED_SERVICES__imageBuildTags: "daily-dev"
GIT_CORS_PROXY__imageRegistry: "quay.io"
GIT_CORS_PROXY__imageAccount: "kie-tools"
GIT_CORS_PROXY__imageName: "git-cors-proxy-image"
GIT_CORS_PROXY__imageBuildTags: "daily-dev"
OPENSHIFT_NAMESPACE: "kie-sandbox"
OPENSHIFT_PART_OF: "daily-dev-kie-sandbox-app"
DEPLOY_TAG: "daily-dev"
DASHBUILDER__viewerImageRegistry: "quay.io"
DASHBUILDER__viewerImageAccount: "kie-tools"
DASHBUILDER__viewerImageName: "dashbuilder-viewer-image"
DASHBUILDER__viewerImageBuildTags: "daily-dev"
SERVERLESS_LOGIC_WEB_TOOLS__dashbuilderViewerImageTag: "daily-dev"
SERVERLESS_LOGIC_WEB_TOOLS__extendedServicesVersion: "0.0.0"
SERVERLESS_LOGIC_WEB_TOOLS__swfBuilderImageRegistry: "quay.io"
SERVERLESS_LOGIC_WEB_TOOLS__swfBuilderImageAccount: "kie-tools"
SERVERLESS_LOGIC_WEB_TOOLS__swfBuilderImageName: "serverless-logic-web-tools-swf-builder-image"
SERVERLESS_LOGIC_WEB_TOOLS__swfBuilderImageTag: "daily-dev"
SERVERLESS_LOGIC_WEB_TOOLS__swfBuilderImageBuildTags: "daily-dev"
SERVERLESS_LOGIC_WEB_TOOLS__baseBuilderImageRegistry: "quay.io"
SERVERLESS_LOGIC_WEB_TOOLS__baseBuilderImageAccount: "kie-tools"
SERVERLESS_LOGIC_WEB_TOOLS__baseBuilderImageName: "serverless-logic-web-tools-base-builder-image"
SERVERLESS_LOGIC_WEB_TOOLS__baseBuilderImageTag: "daily-dev"
SERVERLESS_LOGIC_WEB_TOOLS__baseBuilderImageBuildTags: "daily-dev"
SERVERLESS_LOGIC_WEB_TOOLS__gitCorsProxyUrl: "https://daily-dev-git-cors-proxy-kie-sandbox.rhba-0ad6762cc85bcef5745bb684498c2436-0000.us-south.containers.appdomain.cloud"
steps:
- name: "Support longpaths (Windows only)"
if: runner.os == 'Windows'
run: git config --system core.longpaths true
- name: "Clone kie-tools"
uses: actions/checkout@v3
with:
path: kie-tools
# This bash script will set an output version for this step. It can be used with steps.version.outputs.version
- name: "Output version"
id: version
run: |
cd kie-tools
echo "version=$(node -e "console.log(require('./package.json').version);")" >> $GITHUB_OUTPUT
shell: bash
- name: "Cache Maven packages"
uses: actions/cache@9b0c1fce7a93df8e3bb8926b0d6e9d89e92f20a7
with:
path: ~/.m2
key: ${{ runner.os }}-daily-dev-m2-${{ hashFiles('**/pom.xml') }}
restore-keys: ${{ runner.os }}-daily-dev-m2
- name: "Setup environment"
uses: ./kie-tools/.github/actions/setup-env
with:
working_dir: kie-tools
- name: "Bootstrap"
id: bootstrap
uses: ./kie-tools/.github/actions/bootstrap
with:
working_dir: kie-tools
- name: "Build kie-tools"
env:
WEBPACK__minimize: "true"
WEBPACK__tsLoaderTranspileOnly: "false"
CHROME_EXTENSION__routerTargetOrigin: "https://kiegroup.github.io"
CHROME_EXTENSION__routerRelativePath: "kogito-online/dev/editors/"
SWF_CHROME_EXTENSION__routerTargetOrigin: "https://kiegroup.github.io"
SWF_CHROME_EXTENSION__routerRelativePath: "kogito-online/dev/editors/"
ONLINE_EDITOR__kieSandboxExtendedServicesDownloadUrlLinux: "https://github.com/kiegroup/kie-tools/releases/download/${{ env.KIE_SANDBOX_EXTENDED_SERVICES_VERSION }}/kie_sandbox_extended_services_linux_${{ env.KIE_SANDBOX_EXTENDED_SERVICES_VERSION }}.tar.gz"
ONLINE_EDITOR__kieSandboxExtendedServicesDownloadUrlMacOs: "https://github.com/kiegroup/kie-tools/releases/download/${{ env.KIE_SANDBOX_EXTENDED_SERVICES_VERSION }}/kie_sandbox_extended_services_macos_${{ env.KIE_SANDBOX_EXTENDED_SERVICES_VERSION }}.dmg"
ONLINE_EDITOR__kieSandboxExtendedServicesDownloadUrlWindows: "https://github.com/kiegroup/kie-tools/releases/download/${{ env.KIE_SANDBOX_EXTENDED_SERVICES_VERSION }}/kie_sandbox_extended_services_windows_${{ env.KIE_SANDBOX_EXTENDED_SERVICES_VERSION }}.exe"
ONLINE_EDITOR__kieSandboxExtendedServicesCompatibleVersion: "${{ env.KIE_SANDBOX_EXTENDED_SERVICES_VERSION }}"
ONLINE_EDITOR__buildInfo: "${{ steps.version.outputs.version }} (daily-dev) @ ${{ github.sha }}"
DISPLAY: ":99.0"
SERVERLESS_LOGIC_WEB_TOOLS__kieSandboxExtendedServicesDownloadUrlLinux: "https://github.com/kiegroup/kie-tools/releases/download/${{ env.SERVERLESS_LOGIC_WEB_TOOLS__extendedServicesVersion }}/kie_sandbox_extended_services_linux_${{ env.SERVERLESS_LOGIC_WEB_TOOLS__extendedServicesVersion }}.tar.gz"
SERVERLESS_LOGIC_WEB_TOOLS__kieSandboxExtendedServicesDownloadUrlMacOs: "https://github.com/kiegroup/kie-tools/releases/download/${{ env.SERVERLESS_LOGIC_WEB_TOOLS__extendedServicesVersion }}/kie_sandbox_extended_services_macos_${{ env.SERVERLESS_LOGIC_WEB_TOOLS__extendedServicesVersion }}.dmg"
SERVERLESS_LOGIC_WEB_TOOLS__kieSandboxExtendedServicesDownloadUrlWindows: "https://github.com/kiegroup/kie-tools/releases/download/${{ env.SERVERLESS_LOGIC_WEB_TOOLS__extendedServicesVersion }}/kie_sandbox_extended_services_windows_${{ env.SERVERLESS_LOGIC_WEB_TOOLS__extendedServicesVersion }}.exe"
SERVERLESS_LOGIC_WEB_TOOLS__kieSandboxExtendedServicesCompatibleVersion: "${{ env.SERVERLESS_LOGIC_WEB_TOOLS__extendedServicesVersion }}"
SERVERLESS_LOGIC_WEB_TOOLS__buildInfo: "${{ steps.version.outputs.version }} (daily-dev) @ ${{ github.sha }}"
run: |
cd kie-tools
pnpm -r build:prod
- name: "Push dmn-dev-deployment-base-image to quay.io (Ubuntu only)"
if: runner.os == 'Linux'
uses: redhat-actions/push-to-registry@v2
with:
image: "${{ env.DMN_DEV_DEPLOYMENT__baseImageName }}"
tags: "${{ env.DMN_DEV_DEPLOYMENT__baseImageBuildTags }}"
registry: "${{ env.DMN_DEV_DEPLOYMENT__baseImageRegistry }}/${{ env.DMN_DEV_DEPLOYMENT__baseImageAccount }}"
username: "${{ env.DMN_DEV_DEPLOYMENT__baseImageAccount }}"
password: "${{ secrets.QUAY_REGISTRY_PASSWORD }}"
- name: "Push kie-sandbox-extended-services-image to quay.io (Ubuntu only)"
if: runner.os == 'Linux'
uses: redhat-actions/push-to-registry@v2
with:
image: "${{ env.KIE_SANDBOX_EXTENDED_SERVICES__imageName }}"
tags: "${{ env.KIE_SANDBOX_EXTENDED_SERVICES__imageBuildTags }}"
registry: "${{ env.KIE_SANDBOX_EXTENDED_SERVICES__imageRegistry }}/${{ env.KIE_SANDBOX_EXTENDED_SERVICES__imageAccount }}"
username: "${{ env.KIE_SANDBOX_EXTENDED_SERVICES__imageAccount }}"
password: "${{ secrets.QUAY_REGISTRY_PASSWORD }}"
- name: "Push git-cors-proxy-image to quay.io (Ubuntu only)"
if: runner.os == 'Linux'
uses: redhat-actions/push-to-registry@v2
with:
image: "${{ env.GIT_CORS_PROXY__imageName }}"
tags: "${{ env.GIT_CORS_PROXY__imageBuildTags }}"
registry: "${{ env.GIT_CORS_PROXY__imageRegistry }}/${{ env.GIT_CORS_PROXY__imageAccount }}"
username: "${{ env.GIT_CORS_PROXY__imageAccount }}"
password: "${{ secrets.QUAY_REGISTRY_PASSWORD }}"
- name: "Push kie-sandbox-image to quay.io (Ubuntu only)"
if: runner.os == 'Linux'
uses: redhat-actions/push-to-registry@v2
with:
image: "${{ env.KIE_SANDBOX__imageName }}"
tags: "${{ env.KIE_SANDBOX__imageBuildTags }}"
registry: "${{ env.KIE_SANDBOX__imageRegistry }}/${{ env.KIE_SANDBOX__imageAccount }}"
username: "${{ env.KIE_SANDBOX__imageAccount }}"
password: "${{ secrets.QUAY_REGISTRY_PASSWORD }}"
- name: "Push serverless-logic-web-tools-swf-builder-image to quay.io (Ubuntu only)"
if: runner.os == 'Linux'
uses: redhat-actions/push-to-registry@v2
with:
image: "${{ env.SERVERLESS_LOGIC_WEB_TOOLS__swfBuilderImageName }}"
tags: "${{ env.SERVERLESS_LOGIC_WEB_TOOLS__swfBuilderImageBuildTags }}"
registry: "${{ env.SERVERLESS_LOGIC_WEB_TOOLS__swfBuilderImageRegistry }}/${{ env.SERVERLESS_LOGIC_WEB_TOOLS__swfBuilderImageAccount }}"
username: "${{ env.SERVERLESS_LOGIC_WEB_TOOLS__swfBuilderImageAccount }}"
password: "${{ secrets.QUAY_REGISTRY_PASSWORD }}"
- name: "Push serverless-logic-web-tools-base-builder-image to quay.io (Ubuntu only)"
if: runner.os == 'Linux'
uses: redhat-actions/push-to-registry@v2
with:
image: "${{ env.SERVERLESS_LOGIC_WEB_TOOLS__baseBuilderImageName }}"
tags: "${{ env.SERVERLESS_LOGIC_WEB_TOOLS__baseBuilderImageBuildTags }}"
registry: "${{ env.SERVERLESS_LOGIC_WEB_TOOLS__baseBuilderImageRegistry }}/${{ env.SERVERLESS_LOGIC_WEB_TOOLS__baseBuilderImageAccount }}"
username: "${{ env.SERVERLESS_LOGIC_WEB_TOOLS__baseBuilderImageAccount }}"
password: "${{ secrets.QUAY_REGISTRY_PASSWORD }}"
- name: "Push dashbuilder-viewer-image to quay.io (Ubuntu only)"
if: runner.os == 'Linux'
uses: redhat-actions/push-to-registry@v2
with:
image: "${{ env.DASHBUILDER__viewerImageName }}"
tags: "${{ env.DASHBUILDER__viewerImageBuildTags }}"
registry: "${{ env.DASHBUILDER__viewerImageRegistry }}/${{ env.DASHBUILDER__viewerImageAccount }}"
username: "${{ env.DASHBUILDER__viewerImageAccount }}"
password: "${{ secrets.QUAY_REGISTRY_PASSWORD }}"
- name: "Deploy kie-sandbox-extended-services-image to OpenShift (Ubuntu only)"
id: deploy_kie_sandbox_extended_services_image
if: runner.os == 'Linux'
uses: ./kie-tools/.github/actions/deploy-openshift
with:
image_tag: ${{ env.DEPLOY_TAG }}
image_url: "${{ env.KIE_SANDBOX_EXTENDED_SERVICES__imageRegistry }}/${{ env.KIE_SANDBOX_EXTENDED_SERVICES__imageAccount }}/${{ env.KIE_SANDBOX_EXTENDED_SERVICES__imageName }}:${{ env.DEPLOY_TAG }}"
app_name: "daily-dev-kie-sandbox-extended-services"
part_of: ${{ env.OPENSHIFT_PART_OF }}
openshift_server: ${{ secrets.OPENSHIFT_SERVER }}
openshift_token: ${{ secrets.OPENSHIFT_TOKEN }}
openshift_namespace: ${{ env.OPENSHIFT_NAMESPACE }}
deployment_icon: "golang"
- name: "Deploy git-cors-proxy-image to OpenShift (Ubuntu only)"
id: deploy_git_cors_proxy_image
if: runner.os == 'Linux'
uses: ./kie-tools/.github/actions/deploy-openshift
with:
image_tag: ${{ env.DEPLOY_TAG }}
image_url: "${{ env.GIT_CORS_PROXY__imageRegistry }}/${{ env.GIT_CORS_PROXY__imageAccount }}/${{ env.GIT_CORS_PROXY__imageName }}:${{ env.DEPLOY_TAG }}"
app_name: "daily-dev-git-cors-proxy"
part_of: ${{ env.OPENSHIFT_PART_OF }}
openshift_server: ${{ secrets.OPENSHIFT_SERVER }}
openshift_token: ${{ secrets.OPENSHIFT_TOKEN }}
openshift_namespace: ${{ env.OPENSHIFT_NAMESPACE }}
deployment_icon: "nodejs"
- name: "Prepare environment variables for OpenShift deployment (Ubuntu only)"
if: runner.os == 'Linux'
shell: bash
run: |
echo "KIE_SANDBOX_EXTENDED_SERVICES_URL=${{ steps.deploy_kie_sandbox_extended_services_image.outputs.route_url }}" >> deployment.env
echo "KIE_SANDBOX_GIT_CORS_PROXY_URL=${{ steps.deploy_git_cors_proxy_image.outputs.route_url }}" >> deployment.env
- name: "Deploy kie-sandbox-image to OpenShift (Ubuntu only)"
if: runner.os == 'Linux'
uses: ./kie-tools/.github/actions/deploy-openshift
with:
image_tag: ${{ env.DEPLOY_TAG }}
image_url: "${{ env.KIE_SANDBOX__imageRegistry }}/${{ env.KIE_SANDBOX__imageAccount }}/${{ env.KIE_SANDBOX__imageName }}:${{ env.DEPLOY_TAG }}"
app_name: "daily-dev-kie-sandbox"
part_of: ${{ env.OPENSHIFT_PART_OF }}
openshift_server: ${{ secrets.OPENSHIFT_SERVER }}
openshift_token: ${{ secrets.OPENSHIFT_TOKEN }}
openshift_namespace: ${{ env.OPENSHIFT_NAMESPACE }}
deployment_envvars_file_path: ./deployment.env
deployment_icon: "js"
- name: "Upload Serverless Workflow VS Code Extension - Red Hat (Ubuntu only)"
if: runner.os == 'Linux'
uses: actions/upload-artifact@v3
with:
name: vscode-extension-serverless-workflow-editor
path: kie-tools/packages/vscode-extension-serverless-workflow-editor/dist/vscode_extension_serverless_workflow_editor_${{ steps.version.outputs.version }}.vsix
- name: "Upload Serverless Workflow VS Code Extension - KIE (Ubuntu only)"
if: runner.os == 'Linux'
uses: actions/upload-artifact@v3
with:
name: serverless-workflow-vscode-extension
path: kie-tools/packages/serverless-workflow-vscode-extension/dist/serverless_workflow_vscode_extension_${{ steps.version.outputs.version }}.vsix
- name: "Upload Dashbuilder VS Code Extension (Ubuntu only)"
if: runner.os == 'Linux'
uses: actions/upload-artifact@v3
with:
name: vscode-extension-dashbuilder-editor
path: kie-tools/packages/vscode-extension-dashbuilder-editor/dist/vscode_extension_dashbuilder_editor_${{ steps.version.outputs.version }}.vsix
- name: "Upload VS Code Extension (dev) (Ubuntu only)"
if: runner.os == 'Linux'
uses: actions/upload-artifact@v3
with:
name: vscode-extension
path: kie-tools/packages/kie-editors-dev-vscode-extension/dist/kie_editors_dev_vscode_extension_${{ steps.version.outputs.version }}.vsix
- name: "Upload Chrome Extension for KIE Editors (Ubuntu only)"
if: runner.os == 'Linux'
uses: actions/upload-artifact@v3
with:
name: chrome-extension
path: kie-tools/packages/chrome-extension-pack-kogito-kie-editors/dist/chrome_extension_kogito_kie_editors_${{ steps.version.outputs.version }}.zip
- name: "Upload Chrome Extension for Serverless Workflow Editor (Ubuntu only)"
if: runner.os == 'Linux'
uses: actions/upload-artifact@v3
with:
name: swf-chrome-extension
path: kie-tools/packages/chrome-extension-serverless-workflow-editor/dist/chrome_extension_serverless_workflow_editor_${{ steps.version.outputs.version }}.zip
- name: "Checkout kogito-online (Ubuntu only)"
if: runner.os == 'Linux'
uses: actions/checkout@v3
with:
token: ${{ secrets.KIE_TOOLS_BOT_TOKEN }}
path: kogito-online
repository: kiegroup/kogito-online
ref: gh-pages
- name: "Update kogito-online resources (Ubuntu only)"
if: runner.os == 'Linux'
run: |
cd kogito-online
rm -rf dev
mkdir -p dev/editors
cp -RL ../kie-tools/packages/stunner-editors/dist/dmn dev/editors/
cp -RL ../kie-tools/packages/stunner-editors/dist/bpmn dev/editors/
cp -RL ../kie-tools/packages/stunner-editors/dist/scesim dev/editors/
cp -r ../kie-tools/packages/online-editor/dist/* dev/
rm -rf dev/gwt-editors
ln -s editors dev/gwt-editors
git config --global user.email "[email protected]"
git config --global user.name "KIE Tools Bot (kiegroup)"
today=$(date -I)
git add . && git commit -m "KIE Tools Daily Dev Build resources - $today" || echo "No changes."
git push origin gh-pages
cd -
- name: "Checkout serverless-logic-sandbox-deployment (Ubuntu only)"
if: runner.os == 'Linux'
uses: actions/checkout@v3
with:
token: ${{ secrets.KIE_TOOLS_BOT_TOKEN }}
path: serverless-logic-sandbox-deployment
repository: kiegroup/serverless-logic-sandbox-deployment
ref: gh-pages
- name: "Update serverless-logic-sandbox-deployment resources (Ubuntu only)"
if: runner.os == 'Linux'
run: |
cd serverless-logic-sandbox-deployment
rm -rf dev
mkdir dev
cp -r ../kie-tools/packages/serverless-logic-web-tools/dist/* dev/
git config --global user.email "[email protected]"
git config --global user.name "KIE Tools Bot (kiegroup)"
today=$(date -I)
git add . && git commit -m "KIE Tools Daily Dev Build resources - $today" || echo "No changes."
git push origin gh-pages
cd -