Created
November 13, 2025 17:32
-
-
Save fantonangeli/4ac2aee838d5c04a9adb1e471c757ea9 to your computer and use it in GitHub Desktop.
kie-tools Upstream ACT GHAs
This file contains hidden or 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
| # | |
| # 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: "CI :: Build" | |
| on: | |
| workflow_dispatch: | |
| concurrency: | |
| group: ${{ github.event.pull_request && format('ci-build-full-pr-{0}', github.event.pull_request.number) || format('ci-build-full-push-main-{0}', github.sha) }} | |
| cancel-in-progress: true | |
| env: | |
| TMPDIR: "/tmp" | |
| BUILD_ENV__accessErrorsLogFileAbsolutePath: "/tmp/build-env-access-errors.log" | |
| jobs: | |
| run: | |
| if: github.event.pull_request.draft == false | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| os: [ubuntu-latest] | |
| runs-on: ${{ matrix.os }} | |
| steps: | |
| - name: "Checkout @ GitHub default" | |
| uses: actions/checkout@v3 | |
| - name: "Setup environment" | |
| if: steps.setup_build_mode.outputs.mode != 'none' | |
| uses: ./.github/actions/setup-env | |
| - name: Apply local fixes#################################################################################################### | |
| shell: bash | |
| run: | | |
| rm -rf packages/sonataflow-builder-image/dist/tmp-m2/repository || true | |
| rm -r ./packages/maven-base/.mvn || true | |
| rm -r /home/fantonan/NotBackedUp/repos/kie-tools/tmp || true | |
| rm -r /home/fantonan/NotBackedUp/repos/drools || true | |
| rm -r /home/fantonan/NotBackedUp/repos/kogito-runtimes || true | |
| rm -r /home/fantonan/NotBackedUp/repos/kogito-apps || true | |
| sed -i 's/go mod tidy/true/g' \ | |
| examples/kie-sandbox-commit-message-validation-service/package.json \ | |
| packages/dev-deployment-upload-service/package.json \ | |
| packages/extended-services/package.json \ | |
| packages/image-env-to-json/package.json \ | |
| packages/kn-plugin-workflow/package.json \ | |
| packages/sonataflow-operator/Makefile \ | |
| packages/sonataflow-operator/package.json | |
| rm -rf packages/drools-and-kogito/dist || true | |
| - name: "Bootstrap" | |
| if: steps.setup_build_mode.outputs.mode != 'none' | |
| env: | |
| MAVEN_ARGS: "-B -Puse-maven-repo-local-tail" | |
| MAVEN_OPTS: "-Xmx3g" | |
| uses: ./.github/actions/bootstrap | |
| with: | |
| pnpm_filter_string: "" | |
This file contains hidden or 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
| # | |
| # 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: "CI :: Build" | |
| on: | |
| push: | |
| branches: [main] | |
| pull_request: | |
| branches: ["**"] | |
| types: [opened, reopened, ready_for_review, synchronize] | |
| concurrency: | |
| group: ${{ github.event.pull_request && format('ci-build-full-pr-{0}', github.event.pull_request.number) || format('ci-build-full-push-main-{0}', github.sha) }} | |
| cancel-in-progress: true | |
| env: | |
| TMPDIR: "/tmp" | |
| BUILD_ENV__accessErrorsLogFileAbsolutePath: "/tmp/build-env-access-errors.log" | |
| jobs: | |
| run: | |
| if: github.event.pull_request.draft == false | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| os: [ubuntu-latest] | |
| partition: [0] | |
| runs-on: ${{ matrix.os }} | |
| steps: | |
| - name: "Support longpaths" | |
| if: runner.os == 'Windows' | |
| run: git config --system core.longpaths true | |
| - name: "Checkout @ GitHub default" | |
| uses: actions/checkout@v3 | |
| - name: Apply local fixes#################################################################################################### | |
| shell: bash | |
| run: | | |
| rm -rf tmp || true | |
| rm -rf packages/sonataflow-builder-image/dist/tmp-m2/repository || true | |
| rm -r ./packages/maven-base/.mvn || true | |
| sed -i 's/go mod tidy/true/g' \ | |
| examples/kie-sandbox-commit-message-validation-service/package.json \ | |
| packages/dev-deployment-upload-service/package.json \ | |
| packages/extended-services/package.json \ | |
| packages/image-env-to-json/package.json \ | |
| packages/kn-plugin-workflow/package.json \ | |
| packages/sonataflow-operator/Makefile \ | |
| packages/sonataflow-operator/package.json | |
| rm -rf packages/drools-and-kogito/dist || true | |
| # - name: "Checkout @ Simulated squashed-merge if PR" | |
| # id: checkout_pr | |
| # uses: ./.github/actions/checkout-pr | |
| # with: | |
| # ref: ${{ github.base_ref }} | |
| - name: "Setup pnpm" | |
| uses: pnpm/action-setup@v3 | |
| with: | |
| version: 9.3.0 | |
| - name: "Setup Node" | |
| uses: actions/setup-node@v4 | |
| with: | |
| node-version: 22.14.0 | |
| - name: "Setup CI patterns" | |
| id: ci_patterns | |
| uses: ./.github/actions/setup-ci-patterns | |
| - name: "Setup build mode {none,full,partial}" | |
| id: setup_build_mode | |
| shell: bash | |
| run: | | |
| npm -g install bun@1.1.6 turbo@2.1.2 | |
| echo '{}' > turbo.json | |
| turbo telemetry disable | |
| bun ./.github/supporting-files/ci/build-partitioning/build_partitioning.ts \ | |
| --outputPath='/tmp/partitions.json' \ | |
| --tmpPartitionFilterPath='/tmp/partition-filter.txt' \ | |
| --forceFull='${{ !github.event.pull_request }}' \ | |
| --baseSha='HEAD' \ | |
| --headSha='cc650810c8' \ | |
| --graphJsonPath='./repo/graph.json' \ | |
| --partition='./.github/supporting-files/ci/partitions/partition0.txt' \ | |
| --partition='./.github/supporting-files/ci/partitions/partition1.txt' | |
| npm -g uninstall bun turbo | |
| rm turbo.json | |
| echo "mode=$(jq --raw-output '.[${{ matrix.partition }}].mode' /tmp/partitions.json)" >> $GITHUB_OUTPUT | |
| echo "bootstrapPnpmFilterString=$(jq --raw-output '.[${{ matrix.partition }}].bootstrapPnpmFilterString' /tmp/partitions.json)" >> $GITHUB_OUTPUT | |
| echo "fullBuildPnpmFilterString=$(jq --raw-output '.[${{ matrix.partition }}].fullBuildPnpmFilterString' /tmp/partitions.json)" >> $GITHUB_OUTPUT | |
| echo "upstreamPnpmFilterString=$(jq --raw-output '.[${{ matrix.partition }}].upstreamPnpmFilterString' /tmp/partitions.json)" >> $GITHUB_OUTPUT | |
| echo "affectedPnpmFilterString=$(jq --raw-output '.[${{ matrix.partition }}].affectedPnpmFilterString' /tmp/partitions.json)" >> $GITHUB_OUTPUT | |
| echo "Done." | |
| # - name: "Setup environment" | |
| # if: steps.setup_build_mode.outputs.mode != 'none' | |
| # uses: ./.github/actions/setup-env | |
| - name: "Bootstrap" | |
| if: steps.setup_build_mode.outputs.mode != 'none' | |
| env: | |
| MAVEN_ARGS: "-B -Puse-maven-repo-local-tail" | |
| MAVEN_OPTS: "-Xmx3g" | |
| uses: ./.github/actions/bootstrap | |
| with: | |
| pnpm_filter_string: ${{ steps.setup_build_mode.outputs.bootstrapPnpmFilterString }} | |
| # - name: "Check hanging uncommitted files after bootstrapping (you should either commit or not modify those!)" | |
| # if: steps.setup_build_mode.outputs.mode != 'none' | |
| # shell: bash | |
| # run: | | |
| # git diff | |
| # [ "0" == "$(git diff | wc -l | tr -d ' ')" ] | |
| - name: "FULL → Build" | |
| if: steps.setup_build_mode.outputs.mode == 'full' | |
| shell: bash | |
| env: | |
| WEBPACK__minimize: "false" | |
| WEBPACK__tsLoaderTranspileOnly: "false" | |
| KIE_TOOLS_BUILD__runLinters: "true" | |
| KIE_TOOLS_BUILD__runTests: "true" | |
| KIE_TOOLS_BUILD__runEndToEndTests: ${{ runner.os == 'Linux' }} | |
| KIE_TOOLS_BUILD__containerizedEndToEndTests: ${{ runner.os == 'Linux' }} | |
| KIE_TOOLS_BUILD__buildContainerImages: ${{ runner.os == 'Linux' }} | |
| KIE_TOOLS_BUILD__buildExamples: "true" | |
| KIE_TOOLS_BUILD__ignoreTestFailures: ${{ !github.event.pull_request }} | |
| KIE_TOOLS_BUILD__ignoreEndToEndTestFailures: ${{ !github.event.pull_request }} | |
| DISPLAY: ":99.0" | |
| START_SERVER_AND_TEST_INSECURE: "true" | |
| NODE_OPTIONS: "--max_old_space_size=6144" | |
| MAVEN_ARGS: "-B -Puse-maven-repo-local-tail" | |
| MAVEN_OPTS: "-Xmx2g" | |
| run: >- | |
| eval "pnpm ${{ steps.setup_build_mode.outputs.fullBuildPnpmFilterString }} --workspace-concurrency=1 build:prod" | |
| - name: "PARTIAL → Build upstream" | |
| if: steps.setup_build_mode.outputs.mode == 'partial' && steps.setup_build_mode.outputs.upstreamPnpmFilterString != '' | |
| shell: bash | |
| env: | |
| KIE_TOOLS_BUILD__buildContainerImages: ${{ runner.os == 'Linux' }} | |
| KIE_TOOLS_BUILD__buildExamples: "true" | |
| NODE_OPTIONS: "--max_old_space_size=6144" | |
| MAVEN_ARGS: "-B -Puse-maven-repo-local-tail" | |
| MAVEN_OPTS: "-Xmx2g" | |
| run: | | |
| eval "pnpm ${{ steps.setup_build_mode.outputs.upstreamPnpmFilterString }} build:dev" | |
| - name: "PARTIAL → Build changed and downstream" | |
| shell: bash | |
| if: steps.setup_build_mode.outputs.mode == 'partial' | |
| env: | |
| WEBPACK__minimize: "false" | |
| KIE_TOOLS_BUILD__runLinters: "true" | |
| KIE_TOOLS_BUILD__runTests: "true" | |
| KIE_TOOLS_BUILD__runEndToEndTests: ${{ runner.os == 'Linux' }} | |
| KIE_TOOLS_BUILD__buildContainerImages: ${{ runner.os == 'Linux' }} | |
| KIE_TOOLS_BUILD__buildExamples: "true" | |
| DISPLAY: ":99.0" | |
| START_SERVER_AND_TEST_INSECURE: "true" | |
| NODE_OPTIONS: "--max_old_space_size=6144" | |
| MAVEN_ARGS: "-B -Puse-maven-repo-local-tail" | |
| MAVEN_OPTS: "-Xmx2g" | |
| run: | | |
| eval "pnpm ${{ steps.setup_build_mode.outputs.affectedPnpmFilterString }} --workspace-concurrency=1 build:prod" | |
| - name: "Check tests result (`main` only)" | |
| if: always() && !cancelled() && steps.setup_build_mode.outputs.mode != 'none' | |
| uses: actions/github-script@v6 | |
| env: | |
| KIE_TOOLS_CI__JUNIT_REPORT_RESULTS_PATTERNS: |- | |
| ${{ steps.ci_patterns.outputs.tests_reports_patterns }} | |
| ${{ steps.ci_patterns.outputs.end_to_end_tests_reports_patterns }} | |
| with: | |
| result-encoding: string | |
| script: | | |
| const patterns = process.env["KIE_TOOLS_CI__JUNIT_REPORT_RESULTS_PATTERNS"] | |
| .split("\n") | |
| .map(p => p.trim()) | |
| .filter(p => p); | |
| const script = require("./scripts/check-junit-report-results/src/index.js"); | |
| await script({ core, glob, patterns }); | |
| - name: "Check build-env access errors log" | |
| if: always() && !cancelled() && steps.setup_build_mode.outputs.mode != 'none' | |
| shell: bash | |
| run: | | |
| touch "$BUILD_ENV__accessErrorsLogFileAbsolutePath" | |
| cat "$BUILD_ENV__accessErrorsLogFileAbsolutePath" | |
| [ "0" == "$(cat "$BUILD_ENV__accessErrorsLogFileAbsolutePath" | wc -l | tr -d ' ')" ] | |
| # - name: "Check hanging uncommitted files after building (you should either commit or not modify those!)" | |
| # if: always() && !cancelled() && steps.setup_build_mode.outputs.mode != 'none' | |
| # shell: bash | |
| # run: | | |
| # git diff | |
| # [ "0" == "$(git diff | wc -l | tr -d ' ')" ] | |
| # | |
| # - name: "Upload reports and artifacts" | |
| # if: always() && !cancelled() && steps.setup_build_mode.outputs.mode != 'none' | |
| # uses: ./.github/actions/upload-ci-reports-and-artifacts | |
| # with: | |
| # partition_index: ${{ matrix.partition }} | |
| # | |
| # - name: "Upload end-to-end tests results to Buildkite (`main` only)" | |
| # if: always() && !cancelled() && steps.setup_build_mode.outputs.mode != 'none' && !github.event.pull_request | |
| # shell: bash | |
| # env: | |
| # BUILDKITE_ANALYTICS_TOKEN: ${{ secrets.BUILDKITE_TOKEN }} | |
| # BUILDKITE_BRANCH: ${{ github.ref_name }} | |
| # BUILDKITE_MESSAGE: ${{ github.event.commits[0].message }} | |
| # run: | | |
| # eval "find -P * -type f ${{ steps.ci_patterns.outputs.end_to_end_tests_reports_patterns_for_find }}" | |
| # echo "---------------------------- starting upload -----------------------" | |
| # eval "find -P * -type f ${{ steps.ci_patterns.outputs.end_to_end_tests_reports_patterns_for_find }}" | xargs -I{} curl -X POST \ | |
| # -H "Authorization: Token token=\"$BUILDKITE_ANALYTICS_TOKEN\"" \ | |
| # -F "format=junit" \ | |
| # -F "data=@{}" \ | |
| # -F "run_env[CI]=github_actions" \ | |
| # -F "run_env[key]=$GITHUB_ACTION-$GITHUB_RUN_NUMBER-$GITHUB_RUN_ATTEMPT" \ | |
| # -F "run_env[number]=$GITHUB_RUN_NUMBER" \ | |
| # -F "run_env[branch]=$BUILDKITE_BRANCH" \ | |
| # -F "run_env[commit_sha]=$GITHUB_SHA" \ | |
| # -F "run_env[message]=$BUILDKITE_MESSAGE" \ | |
| # -F "run_env[url]=https://github.com/$GITHUB_REPOSITORY/actions/runs/$GITHUB_RUN_ID" \ | |
| # https://analytics-api.buildkite.com/v1/uploads | |
| - name: "Print storage usage (after build)" | |
| if: always() && !cancelled() | |
| shell: bash | |
| run: | | |
| df -h . |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment