Daily dev :: Publish #324
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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_SANDBOX__baseImageRegistry: "quay.io" | |
DMN_DEV_SANDBOX__baseImageAccount: "kie-tools" | |
DMN_DEV_SANDBOX__baseImageName: "dmn-dev-sandbox-deployment-base-image" | |
DMN_DEV_SANDBOX__baseImageTag: "daily-dev" | |
DMN_DEV_SANDBOX__baseImageBuildTags: "daily-dev" | |
DMN_DEV_SANDBOX__onlineEditorUrl: "https://kiegroup.github.io/kogito-online/dev" | |
ONLINE_EDITOR__corsProxyUrl: "https://daily-dev-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" | |
CORS_PROXY__imageRegistry: "quay.io" | |
CORS_PROXY__imageAccount: "kie-tools" | |
CORS_PROXY__imageName: "cors-proxy-image" | |
CORS_PROXY__imageBuildTags: "daily-dev" | |
OPENSHIFT_NAMESPACE: "kie-sandbox" | |
OPENSHIFT_PART_OF: "daily-dev-kie-sandbox-app" | |
DEPLOY_TAG: "daily-dev" | |
SERVERLESS_LOGIC_SANDBOX_EXTENDED_SERVICES_VERSION: "0.0.0" | |
SERVERLESS_LOGIC_SANDBOX__baseImageRegistry: "quay.io" | |
SERVERLESS_LOGIC_SANDBOX__baseImageAccount: "kie-tools" | |
SERVERLESS_LOGIC_SANDBOX__baseImageName: "serverless-logic-sandbox-base-image" | |
SERVERLESS_LOGIC_SANDBOX__baseImageTag: "daily-dev" | |
SERVERLESS_LOGIC_SANDBOX__baseImageBuildTags: "daily-dev" | |
SERVERLESS_LOGIC_SANDBOX__openJdk11MvnImageRegistry: "quay.io" | |
SERVERLESS_LOGIC_SANDBOX__openJdk11MvnImageAccount: "kie-tools" | |
SERVERLESS_LOGIC_SANDBOX__openJdk11MvnImageName: "openjdk11-mvn-image" | |
SERVERLESS_LOGIC_SANDBOX__openJdk11MvnImageTag: "daily-dev" | |
SERVERLESS_LOGIC_SANDBOX__openJdk11MvnImageBuildTags: "daily-dev" | |
SERVERLESS_LOGIC_SANDBOX__corsProxyUrl: "https://daily-dev-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 ::set-output name=version::$(node -e "console.log(require('./package.json').version);") | |
shell: bash | |
- name: "Cache Maven packages" | |
uses: actions/cache@v2 | |
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_SANDBOX__kieSandboxExtendedServicesDownloadUrlLinux: "https://github.com/kiegroup/kie-tools/releases/download/${{ env.SERVERLESS_LOGIC_SANDBOX_EXTENDED_SERVICES_VERSION }}/kie_sandbox_extended_services_linux_${{ env.SERVERLESS_LOGIC_SANDBOX_EXTENDED_SERVICES_VERSION }}.tar.gz" | |
SERVERLESS_LOGIC_SANDBOX__kieSandboxExtendedServicesDownloadUrlMacOs: "https://github.com/kiegroup/kie-tools/releases/download/${{ env.SERVERLESS_LOGIC_SANDBOX_EXTENDED_SERVICES_VERSION }}/kie_sandbox_extended_services_macos_${{ env.SERVERLESS_LOGIC_SANDBOX_EXTENDED_SERVICES_VERSION }}.dmg" | |
SERVERLESS_LOGIC_SANDBOX__kieSandboxExtendedServicesDownloadUrlWindows: "https://github.com/kiegroup/kie-tools/releases/download/${{ env.SERVERLESS_LOGIC_SANDBOX_EXTENDED_SERVICES_VERSION }}/kie_sandbox_extended_services_windows_${{ env.SERVERLESS_LOGIC_SANDBOX_EXTENDED_SERVICES_VERSION }}.exe" | |
SERVERLESS_LOGIC_SANDBOX__kieSandboxExtendedServicesCompatibleVersion: "${{ env.SERVERLESS_LOGIC_SANDBOX_EXTENDED_SERVICES_VERSION }}" | |
SERVERLESS_LOGIC_SANDBOX__buildInfo: "${{ steps.version.outputs.version }} (daily-dev) @ ${{ github.sha }}" | |
run: | | |
cd kie-tools | |
pnpm -r build:prod | |
- name: "Push dmn-dev-sandbox-deployment-base-image to quay.io (Ubuntu only)" | |
if: runner.os == 'Linux' | |
uses: redhat-actions/push-to-registry@v2 | |
with: | |
image: "${{ env.DMN_DEV_SANDBOX__baseImageName }}" | |
tags: "${{ env.DMN_DEV_SANDBOX__baseImageBuildTags }}" | |
registry: "${{ env.DMN_DEV_SANDBOX__baseImageRegistry }}/${{ env.DMN_DEV_SANDBOX__baseImageAccount }}" | |
username: "${{ env.DMN_DEV_SANDBOX__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 cors-proxy-image to quay.io (Ubuntu only)" | |
if: runner.os == 'Linux' | |
uses: redhat-actions/push-to-registry@v2 | |
with: | |
image: "${{ env.CORS_PROXY__imageName }}" | |
tags: "${{ env.CORS_PROXY__imageBuildTags }}" | |
registry: "${{ env.CORS_PROXY__imageRegistry }}/${{ env.CORS_PROXY__imageAccount }}" | |
username: "${{ env.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-sandbox-base-image to quay.io (Ubuntu only)" | |
if: runner.os == 'Linux' | |
uses: redhat-actions/push-to-registry@v2 | |
with: | |
image: "${{ env.SERVERLESS_LOGIC_SANDBOX__baseImageName }}" | |
tags: "${{ env.SERVERLESS_LOGIC_SANDBOX__baseImageBuildTags }}" | |
registry: "${{ env.SERVERLESS_LOGIC_SANDBOX__baseImageRegistry }}/${{ env.SERVERLESS_LOGIC_SANDBOX__baseImageAccount }}" | |
username: "${{ env.SERVERLESS_LOGIC_SANDBOX__baseImageAccount }}" | |
password: "${{ secrets.QUAY_REGISTRY_PASSWORD }}" | |
- name: "Push openjdk11-mvn-image to quay.io (Ubuntu only)" | |
if: runner.os == 'Linux' | |
uses: redhat-actions/push-to-registry@v2 | |
with: | |
image: "${{ env.SERVERLESS_LOGIC_SANDBOX__openJdk11MvnImageName }}" | |
tags: "${{ env.SERVERLESS_LOGIC_SANDBOX__openJdk11MvnImageBuildTags }}" | |
registry: "${{ env.SERVERLESS_LOGIC_SANDBOX__openJdk11MvnImageRegistry }}/${{ env.SERVERLESS_LOGIC_SANDBOX__openJdk11MvnImageAccount }}" | |
username: "${{ env.SERVERLESS_LOGIC_SANDBOX__openJdk11MvnImageAccount }}" | |
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 cors-proxy-image to OpenShift (Ubuntu only)" | |
id: deploy_cors_proxy_image | |
if: runner.os == 'Linux' | |
uses: ./kie-tools/.github/actions/deploy-openshift | |
with: | |
image_tag: ${{ env.DEPLOY_TAG }} | |
image_url: "${{ env.CORS_PROXY__imageRegistry }}/${{ env.CORS_PROXY__imageAccount }}/${{ env.CORS_PROXY__imageName }}:${{ env.DEPLOY_TAG }}" | |
app_name: "daily-dev-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 "CORS_PROXY_URL=${{ steps.deploy_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 (Ubuntu only)" | |
if: runner.os == 'Linux' | |
uses: actions/upload-artifact@v1 | |
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 VS Code Extension (dev) (Ubuntu only)" | |
if: runner.os == 'Linux' | |
uses: actions/upload-artifact@v1 | |
with: | |
name: vscode-extension | |
path: kie-tools/packages/vscode-extension-pack-kogito-kie-editors/dist/vscode_extension_kogito_kie_editors_${{ steps.version.outputs.version }}.vsix | |
- name: "Upload Backend VS Code Extension (dev) (Ubuntu only)" | |
if: runner.os == 'Linux' | |
uses: actions/upload-artifact@v1 | |
with: | |
name: vscode-extension-backend | |
path: kie-tools/packages/vscode-extension-backend/dist/vscode-extension-backend_${{ steps.version.outputs.version }}.vsix | |
- name: "Upload Chrome Extension for KIE Editors (Ubuntu only)" | |
if: runner.os == 'Linux' | |
uses: actions/upload-artifact@v1 | |
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@v1 | |
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: "Upload Desktop App - Ubuntu (Ubuntu only)" | |
if: runner.os == 'Linux' | |
uses: actions/upload-artifact@v1 | |
with: | |
name: desktop-app-linux | |
path: kie-tools/packages/desktop/out/Business Modeler Preview-linux-x64.tar.gz | |
- name: "Upload Desktop App - macOS (macOS only)" | |
if: runner.os == 'macOS' | |
uses: actions/upload-artifact@v1 | |
with: | |
name: desktop-app-macos | |
path: kie-tools/packages/desktop/out/Business Modeler Preview-darwin-x64.zip | |
- name: "Upload Desktop App - Windows (Windows only)" | |
if: runner.os == 'Windows' | |
uses: actions/upload-artifact@v1 | |
with: | |
name: desktop-app-windows | |
path: kie-tools/packages/desktop/out/Business Modeler Preview-win32-x64 | |
- 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-sandbox/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 - |