From 6b4faa45143892dff0e561997daba26d1ca45081 Mon Sep 17 00:00:00 2001 From: Luc Boudreau Date: Mon, 9 Sep 2024 13:58:52 -0400 Subject: [PATCH 01/43] [TEST] Test threatrix workflow --- .github/workflows/threatrix.yaml | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) create mode 100644 .github/workflows/threatrix.yaml diff --git a/.github/workflows/threatrix.yaml b/.github/workflows/threatrix.yaml new file mode 100644 index 0000000000..9d16c2007b --- /dev/null +++ b/.github/workflows/threatrix.yaml @@ -0,0 +1,19 @@ +name: Threatrix Scan +on: + pull_request: + types: + - 'opened' + - 'reopened' + workflow_dispatch: +jobs: + execute-scan-workflow: + uses: threatrix/threat-agent-scan/.github/workflows/scan-repo-reusable.yaml@master + with: + app-name: mondrian-poc + trx-host: https://app.threatrix.io + secrets: + TOKEN: ${{ secrets.GITHUB_TOKEN }} + THREATRIX_EID: ${{ secrets.THREATRIX_EID }} + THREATRIX_OID: ${{ secrets.THREATRIX_OID }} + THREATRIX_SERVER_API_KEY: ${{ secrets.THREATRIX_API_KEY }} + From 3d867a7a4b2375dc652203dedb06ab6732dbf51c Mon Sep 17 00:00:00 2001 From: Luc Boudreau Date: Mon, 9 Sep 2024 14:04:50 -0400 Subject: [PATCH 02/43] [TEST] Add a GPL snippet from mysql's CacheAdapter (GPL 2.0) --- .../main/java/mondrian/spi/CacheAdapter.java | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) create mode 100755 mondrian/src/main/java/mondrian/spi/CacheAdapter.java diff --git a/mondrian/src/main/java/mondrian/spi/CacheAdapter.java b/mondrian/src/main/java/mondrian/spi/CacheAdapter.java new file mode 100755 index 0000000000..300c6ea288 --- /dev/null +++ b/mondrian/src/main/java/mondrian/spi/CacheAdapter.java @@ -0,0 +1,18 @@ + +package mondrian.spi; + +import java.util.Set; + +public interface CacheAdapter { + + V get(K key); + + void put(K key, V value); + + void invalidate(K key); + + void invalidateAll(Set keys); + + void invalidateAll(); + +} From 57df09eb7b117d2499fc9a5f49ae1296b35a53c5 Mon Sep 17 00:00:00 2001 From: Luc Boudreau Date: Mon, 9 Sep 2024 14:06:38 -0400 Subject: [PATCH 03/43] [TEST] Add a GPL snippet from mysql's CacheAdapter (GPL 2.0) --- .../main/java/mondrian/spi/CacheAdapter.java | 18 ------------------ 1 file changed, 18 deletions(-) delete mode 100755 mondrian/src/main/java/mondrian/spi/CacheAdapter.java diff --git a/mondrian/src/main/java/mondrian/spi/CacheAdapter.java b/mondrian/src/main/java/mondrian/spi/CacheAdapter.java deleted file mode 100755 index 300c6ea288..0000000000 --- a/mondrian/src/main/java/mondrian/spi/CacheAdapter.java +++ /dev/null @@ -1,18 +0,0 @@ - -package mondrian.spi; - -import java.util.Set; - -public interface CacheAdapter { - - V get(K key); - - void put(K key, V value); - - void invalidate(K key); - - void invalidateAll(Set keys); - - void invalidateAll(); - -} From bfe2043b0c4d359f4ed324c9cd2be32547abf870 Mon Sep 17 00:00:00 2001 From: Luc Boudreau Date: Mon, 9 Sep 2024 14:28:52 -0400 Subject: [PATCH 04/43] [TEST] Add parameter to threatrix PR analyzer --- .github/workflows/threatrix.yaml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/threatrix.yaml b/.github/workflows/threatrix.yaml index 9d16c2007b..15199bfcc3 100644 --- a/.github/workflows/threatrix.yaml +++ b/.github/workflows/threatrix.yaml @@ -11,6 +11,7 @@ jobs: with: app-name: mondrian-poc trx-host: https://app.threatrix.io + pullRequestId: ${{ github.event.number }} secrets: TOKEN: ${{ secrets.GITHUB_TOKEN }} THREATRIX_EID: ${{ secrets.THREATRIX_EID }} From f036d1e2ec44a455675a8a7e68b25fbed5457254 Mon Sep 17 00:00:00 2001 From: Luc Boudreau Date: Mon, 9 Sep 2024 14:39:07 -0400 Subject: [PATCH 05/43] [TEST] change threatrix params --- .github/workflows/threatrix.yaml | 1 - 1 file changed, 1 deletion(-) diff --git a/.github/workflows/threatrix.yaml b/.github/workflows/threatrix.yaml index 15199bfcc3..9d16c2007b 100644 --- a/.github/workflows/threatrix.yaml +++ b/.github/workflows/threatrix.yaml @@ -11,7 +11,6 @@ jobs: with: app-name: mondrian-poc trx-host: https://app.threatrix.io - pullRequestId: ${{ github.event.number }} secrets: TOKEN: ${{ secrets.GITHUB_TOKEN }} THREATRIX_EID: ${{ secrets.THREATRIX_EID }} From 1558816e39ddc6a34bd10ec3a9460ed07911b47c Mon Sep 17 00:00:00 2001 From: Luc Boudreau Date: Tue, 10 Sep 2024 16:54:24 -0400 Subject: [PATCH 06/43] [TEST] Add pr-num param --- .github/workflows/threatrix.yaml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/threatrix.yaml b/.github/workflows/threatrix.yaml index 9d16c2007b..4bf2380e1e 100644 --- a/.github/workflows/threatrix.yaml +++ b/.github/workflows/threatrix.yaml @@ -11,6 +11,7 @@ jobs: with: app-name: mondrian-poc trx-host: https://app.threatrix.io + pr-num: ${{ github.event.number }} secrets: TOKEN: ${{ secrets.GITHUB_TOKEN }} THREATRIX_EID: ${{ secrets.THREATRIX_EID }} From a5302925d4e1af31161038f5d1a51a6a6840be1f Mon Sep 17 00:00:00 2001 From: Luc Boudreau Date: Mon, 23 Sep 2024 12:10:41 -0400 Subject: [PATCH 07/43] [TEST] Update workflow --- .github/workflows/threatrix.yaml | 1 - 1 file changed, 1 deletion(-) diff --git a/.github/workflows/threatrix.yaml b/.github/workflows/threatrix.yaml index 4bf2380e1e..9d16c2007b 100644 --- a/.github/workflows/threatrix.yaml +++ b/.github/workflows/threatrix.yaml @@ -11,7 +11,6 @@ jobs: with: app-name: mondrian-poc trx-host: https://app.threatrix.io - pr-num: ${{ github.event.number }} secrets: TOKEN: ${{ secrets.GITHUB_TOKEN }} THREATRIX_EID: ${{ secrets.THREATRIX_EID }} From 65c7e6f77f9abcd8e3c07c39404da47c5237651a Mon Sep 17 00:00:00 2001 From: Luc Boudreau Date: Tue, 24 Sep 2024 10:02:07 -0400 Subject: [PATCH 08/43] [TEST] Update action def --- .github/workflows/threatrix.yaml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/threatrix.yaml b/.github/workflows/threatrix.yaml index 9d16c2007b..e8790eb7d7 100644 --- a/.github/workflows/threatrix.yaml +++ b/.github/workflows/threatrix.yaml @@ -9,11 +9,11 @@ jobs: execute-scan-workflow: uses: threatrix/threat-agent-scan/.github/workflows/scan-repo-reusable.yaml@master with: - app-name: mondrian-poc trx-host: https://app.threatrix.io + # SCPID is for Pentaho Legacy BoM Certify Project + scpid: 3ef4b1f1-778b-4204-94ae-5c7e360f13ab secrets: TOKEN: ${{ secrets.GITHUB_TOKEN }} THREATRIX_EID: ${{ secrets.THREATRIX_EID }} THREATRIX_OID: ${{ secrets.THREATRIX_OID }} THREATRIX_SERVER_API_KEY: ${{ secrets.THREATRIX_API_KEY }} - From bba0e843c352c2ba32de2b48b21076ae85b0ae5d Mon Sep 17 00:00:00 2001 From: Luc Boudreau Date: Tue, 24 Sep 2024 10:27:15 -0400 Subject: [PATCH 09/43] update --- .github/workflows/trx-agent-scan.yaml | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) create mode 100644 .github/workflows/trx-agent-scan.yaml diff --git a/.github/workflows/trx-agent-scan.yaml b/.github/workflows/trx-agent-scan.yaml new file mode 100644 index 0000000000..f979e3c4a7 --- /dev/null +++ b/.github/workflows/trx-agent-scan.yaml @@ -0,0 +1,21 @@ +on: + push: + branches: + - 'main' + - 'master' + pull_request: + types: + - 'opened' + - 'reopened' + workflow_dispatch: +jobs: + execute-scan-workflow: + uses: threatrix/threat-agent-scan/.github/workflows/scan-repo-reusable.yaml@master + with: + eid: 152cdb22-7aa4-4eb4-9ecf-e3790437833f + oid: b7c5524a-63d2-406e-9752-56cbf90228cc + app-name: mondrian + trx-host: https://app.threatrix.io + secrets: + TOKEN: ${{ secrets.GITHUB_TOKEN }} + THREATRIX_SERVER_API_KEY: ${{ secrets.THREATRIX_API_KEY }} From a5d74f9d046cad83fc10e3bb35ed394170d10600 Mon Sep 17 00:00:00 2001 From: Luc Boudreau Date: Tue, 24 Sep 2024 10:30:27 -0400 Subject: [PATCH 10/43] Update threatrix.yaml --- .github/workflows/threatrix.yaml | 2 -- 1 file changed, 2 deletions(-) diff --git a/.github/workflows/threatrix.yaml b/.github/workflows/threatrix.yaml index e8790eb7d7..c97598ba72 100644 --- a/.github/workflows/threatrix.yaml +++ b/.github/workflows/threatrix.yaml @@ -10,8 +10,6 @@ jobs: uses: threatrix/threat-agent-scan/.github/workflows/scan-repo-reusable.yaml@master with: trx-host: https://app.threatrix.io - # SCPID is for Pentaho Legacy BoM Certify Project - scpid: 3ef4b1f1-778b-4204-94ae-5c7e360f13ab secrets: TOKEN: ${{ secrets.GITHUB_TOKEN }} THREATRIX_EID: ${{ secrets.THREATRIX_EID }} From f7bb50e81353ee42df44b4935afd7957cfd1934f Mon Sep 17 00:00:00 2001 From: Luc Boudreau Date: Tue, 24 Sep 2024 10:31:49 -0400 Subject: [PATCH 11/43] Update trx-agent-scan.yaml --- .github/workflows/trx-agent-scan.yaml | 10 ++-------- 1 file changed, 2 insertions(+), 8 deletions(-) diff --git a/.github/workflows/trx-agent-scan.yaml b/.github/workflows/trx-agent-scan.yaml index f979e3c4a7..4e027cc478 100644 --- a/.github/workflows/trx-agent-scan.yaml +++ b/.github/workflows/trx-agent-scan.yaml @@ -1,12 +1,5 @@ on: push: - branches: - - 'main' - - 'master' - pull_request: - types: - - 'opened' - - 'reopened' workflow_dispatch: jobs: execute-scan-workflow: @@ -14,7 +7,8 @@ jobs: with: eid: 152cdb22-7aa4-4eb4-9ecf-e3790437833f oid: b7c5524a-63d2-406e-9752-56cbf90228cc - app-name: mondrian + # SCPID is for Pentaho Legacy BoM Certify Project + scpid: 3ef4b1f1-778b-4204-94ae-5c7e360f13ab trx-host: https://app.threatrix.io secrets: TOKEN: ${{ secrets.GITHUB_TOKEN }} From 6cf873596d0fa8b722b8e95efa97e967f7515341 Mon Sep 17 00:00:00 2001 From: Luc Boudreau Date: Tue, 24 Sep 2024 10:40:40 -0400 Subject: [PATCH 12/43] Update RELEASE.txt --- RELEASE.txt | 1 + 1 file changed, 1 insertion(+) diff --git a/RELEASE.txt b/RELEASE.txt index 2165767446..8195a0cfbd 100644 --- a/RELEASE.txt +++ b/RELEASE.txt @@ -1,4 +1,5 @@ + Mondrian 3.7.0 production release notes ============================================= From 5720473ffd12f61ae82c6f896e8638bd1b5a4b06 Mon Sep 17 00:00:00 2001 From: Sujit Scaria <86460900+sujitscaria@users.noreply.github.com> Date: Tue, 1 Oct 2024 18:21:04 +0530 Subject: [PATCH 13/43] Update threatrix.yaml --- .github/workflows/threatrix.yaml | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/.github/workflows/threatrix.yaml b/.github/workflows/threatrix.yaml index c97598ba72..c75a1e4ddd 100644 --- a/.github/workflows/threatrix.yaml +++ b/.github/workflows/threatrix.yaml @@ -1,10 +1,10 @@ name: Threatrix Scan on: - pull_request: - types: - - 'opened' - - 'reopened' - workflow_dispatch: + push: +# types: +# - 'opened' +# - 'reopened' +# workflow_dispatch: jobs: execute-scan-workflow: uses: threatrix/threat-agent-scan/.github/workflows/scan-repo-reusable.yaml@master From f4bff06bc452eb6c12aaab20ac54d12b4cbb905e Mon Sep 17 00:00:00 2001 From: Sujit Scaria <86460900+sujitscaria@users.noreply.github.com> Date: Fri, 4 Oct 2024 15:43:44 +0530 Subject: [PATCH 14/43] Update trx-agent-scan.yaml --- .github/workflows/trx-agent-scan.yaml | 28 ++++++++++++++------------- 1 file changed, 15 insertions(+), 13 deletions(-) diff --git a/.github/workflows/trx-agent-scan.yaml b/.github/workflows/trx-agent-scan.yaml index 4e027cc478..bd8b47c6a5 100644 --- a/.github/workflows/trx-agent-scan.yaml +++ b/.github/workflows/trx-agent-scan.yaml @@ -1,15 +1,17 @@ -on: - push: - workflow_dispatch: +name: pull request workflow +on: pull_request + jobs: - execute-scan-workflow: - uses: threatrix/threat-agent-scan/.github/workflows/scan-repo-reusable.yaml@master + + reusable-pr-workflow: + uses: pentaho/actions-common/.github/workflows/pr.yml@HNC-853 with: - eid: 152cdb22-7aa4-4eb4-9ecf-e3790437833f - oid: b7c5524a-63d2-406e-9752-56cbf90228cc - # SCPID is for Pentaho Legacy BoM Certify Project - scpid: 3ef4b1f1-778b-4204-94ae-5c7e360f13ab - trx-host: https://app.threatrix.io - secrets: - TOKEN: ${{ secrets.GITHUB_TOKEN }} - THREATRIX_SERVER_API_KEY: ${{ secrets.THREATRIX_API_KEY }} + slack_channels: "" +# sonar_project_key: "pdi-plugins-ee" + additional_mvn_directives: "-am + -Duse-existing-docker-network=$(docker container ls --filter name=onehitachivantaracomdevopsdockerreleasepentahoactionscommon --latest -q | xargs -I % docker inspect % -f '{{.HostConfig.NetworkMode}}') + -Dmaven.test.redirectTestOutputToFile=false + -DrunITs + -Drelease -Dpentaho-ee-dsc.version=10.2.0.0-111 + -DsetVmMaxMapCountForElasticsearch" + secrets: inherit From 0eafb681ba59d54fad94da5489cc950e0f35a623 Mon Sep 17 00:00:00 2001 From: Sujit Scaria <86460900+sujitscaria@users.noreply.github.com> Date: Fri, 4 Oct 2024 15:57:38 +0530 Subject: [PATCH 15/43] Update trx-agent-scan.yaml --- .github/workflows/trx-agent-scan.yaml | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/.github/workflows/trx-agent-scan.yaml b/.github/workflows/trx-agent-scan.yaml index bd8b47c6a5..056d680bda 100644 --- a/.github/workflows/trx-agent-scan.yaml +++ b/.github/workflows/trx-agent-scan.yaml @@ -8,10 +8,5 @@ jobs: with: slack_channels: "" # sonar_project_key: "pdi-plugins-ee" - additional_mvn_directives: "-am - -Duse-existing-docker-network=$(docker container ls --filter name=onehitachivantaracomdevopsdockerreleasepentahoactionscommon --latest -q | xargs -I % docker inspect % -f '{{.HostConfig.NetworkMode}}') - -Dmaven.test.redirectTestOutputToFile=false - -DrunITs - -Drelease -Dpentaho-ee-dsc.version=10.2.0.0-111 - -DsetVmMaxMapCountForElasticsearch" + additional_mvn_directives: "" secrets: inherit From 229963a5b1f4331b6ac28934f7f3233ef733fd4e Mon Sep 17 00:00:00 2001 From: Luc Boudreau Date: Fri, 4 Oct 2024 13:48:51 -0400 Subject: [PATCH 16/43] [TEST] Trigger new build --- RELEASE.txt | 1 - 1 file changed, 1 deletion(-) diff --git a/RELEASE.txt b/RELEASE.txt index 8195a0cfbd..2165767446 100644 --- a/RELEASE.txt +++ b/RELEASE.txt @@ -1,5 +1,4 @@ - Mondrian 3.7.0 production release notes ============================================= From 137cf68186ffdc843ff6c482b98c55fd656f679d Mon Sep 17 00:00:00 2001 From: Luc Boudreau Date: Fri, 4 Oct 2024 14:04:02 -0400 Subject: [PATCH 17/43] [TEST] Disable this action for now --- .github/workflows/threatrix.yaml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/threatrix.yaml b/.github/workflows/threatrix.yaml index c75a1e4ddd..86ab49997f 100644 --- a/.github/workflows/threatrix.yaml +++ b/.github/workflows/threatrix.yaml @@ -1,10 +1,10 @@ name: Threatrix Scan on: - push: +# push: # types: # - 'opened' # - 'reopened' -# workflow_dispatch: + workflow_dispatch: jobs: execute-scan-workflow: uses: threatrix/threat-agent-scan/.github/workflows/scan-repo-reusable.yaml@master From cda32b83aae41b97bdd805bd3143c0bc804f3fd7 Mon Sep 17 00:00:00 2001 From: Luc Boudreau Date: Fri, 4 Oct 2024 14:06:43 -0400 Subject: [PATCH 18/43] [TEST] set action to my fork. add scpid --- .github/workflows/trx-agent-scan.yaml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/.github/workflows/trx-agent-scan.yaml b/.github/workflows/trx-agent-scan.yaml index 056d680bda..a4b084542d 100644 --- a/.github/workflows/trx-agent-scan.yaml +++ b/.github/workflows/trx-agent-scan.yaml @@ -4,9 +4,11 @@ on: pull_request jobs: reusable-pr-workflow: - uses: pentaho/actions-common/.github/workflows/pr.yml@HNC-853 + uses: lucboudreau/actions-common/.github/workflows/pr.yml@HNC-853-2 with: slack_channels: "" # sonar_project_key: "pdi-plugins-ee" additional_mvn_directives: "" + # add pentaho legacy scpid + threatrix_scpid: 3ef4b1f1-778b-4204-94ae-5c7e360f13ab secrets: inherit From 2d916902a029b557b0305a689ee958a7760b5e11 Mon Sep 17 00:00:00 2001 From: Luc Boudreau Date: Fri, 4 Oct 2024 14:08:09 -0400 Subject: [PATCH 19/43] Update RELEASE.txt --- RELEASE.txt | 1 + 1 file changed, 1 insertion(+) diff --git a/RELEASE.txt b/RELEASE.txt index 2165767446..8195a0cfbd 100644 --- a/RELEASE.txt +++ b/RELEASE.txt @@ -1,4 +1,5 @@ + Mondrian 3.7.0 production release notes ============================================= From bc8a61350da668ed579d419435f488277ca1e375 Mon Sep 17 00:00:00 2001 From: Luc Boudreau Date: Fri, 4 Oct 2024 14:18:05 -0400 Subject: [PATCH 20/43] Create common_pr.yaml --- .github/workflows/common_pr.yaml | 161 +++++++++++++++++++++++++++++++ 1 file changed, 161 insertions(+) create mode 100644 .github/workflows/common_pr.yaml diff --git a/.github/workflows/common_pr.yaml b/.github/workflows/common_pr.yaml new file mode 100644 index 0000000000..906c806820 --- /dev/null +++ b/.github/workflows/common_pr.yaml @@ -0,0 +1,161 @@ +name: Pentaho pull request workflow +on: + workflow_call: + inputs: + slack_channels: + type: string + required: true + description: "Slack channel(s) to send notifications to." + arti_host: + required: false + type: string + default: https://one.hitachivantara.com + description: "Artifactory's Host name" + additional_mvn_directives: + required: false + type: string + description: "Extra additional directives for the Maven command" + default: "" + threatrix_scpid: + required: false + type: string + description: "Threatrix Project ID to send this threatrix scan to." + default: "" + +env: + + ARTIFACTORY_HOST: ${{ inputs.arti_host }} + ARTIFACTORY_BASE_URL: ${ARTIFACTORY_HOST}/artifactory + + RESOLVE_REPO_MIRROR: ${ARTIFACTORY_BASE_URL}/pnt-mvn + + NEXUS_DEPLOY_USER: ${{ secrets.PENTAHO_CICD_ONE_USER }} + NEXUS_DEPLOY_PASSWORD: ${{ secrets.PENTAHO_CICD_ONE_KEY }} + + PUBLIC_RELEASE_REPO_URL: ${ARTIFACTORY_BASE_URL}/pntpub-maven-dev + PRIVATE_RELEASE_REPO: pntprv-maven-dev + PRIVATE_RELEASE_REPO_URL: ${ARTIFACTORY_BASE_URL}/${PRIVATE_RELEASE_REPO} + + PUBLIC_SNAPSHOT_REPO_URL: ${ARTIFACTORY_BASE_URL}/pntpub-maven-snapshot + PRIVATE_SNAPSHOT_REPO: pntprv-maven-snapshot + PRIVATE_SNAPSHOT_REPO_URL: ${ARTIFACTORY_BASE_URL}/${PRIVATE_SNAPSHOT_REPO} + + DOCKER_PULL_HOST: one.hitachivantara.com/docker/ + DOCKER_PUBLIC_PUSH_HOST: one.hitachivantara.com/pntpub-docker-dev/ + DOCKER_PRIVATE_PUSH_HOST: one.hitachivantara.com/pntprv-docker-dev/ + + SLACK_CHANNEL: "${{ inputs.slack_channels }}" + +jobs: + + setup-maven-settings: + name: Setup Maven settings + + runs-on: [ k8s ] + + container: + image: one.hitachivantara.com/devops-docker-release/pentaho/actions-common:20240305.137 + credentials: + username: ${{ secrets.PENTAHO_CICD_ONE_USER }} + password: ${{ secrets.PENTAHO_CICD_ONE_KEY }} + volumes: + - /home/runner/caches/pentaho/.m2:/root/.m2 + + steps: + + - name: Retrieve settings file + id: common-maven + uses: pentaho/actions-common@stable + + - name: Copy settings.xml to .m2 directory + shell: sh + run: | + cp "${{ steps.common-maven.outputs.settings-file-path }}" /root/.m2 + + + common-job: + name: Common Checks + needs: setup-maven-settings + runs-on: [ k8s ] + + container: + image: one.hitachivantara.com/devops-docker-release/pentaho/actions-common:20240305.137 + credentials: + username: ${{ secrets.PENTAHO_CICD_ONE_USER }} + password: ${{ secrets.PENTAHO_CICD_ONE_KEY }} + volumes: + - /home/runner/caches/pentaho/.m2:/root/.m2 + + steps: + + - name: Load Job metadata into Env vars + shell: bash + continue-on-error: true + env: + JOB_CONTEXT: ${{ toJSON(job) }} + run: | + process_json() { + local prefix=$1 + local json_data=$2 + + echo "$json_data" | jq -r 'to_entries | .[] | "\(.key) \(.value|tostring)"' | while read -r key value; do + # Check if the value is a JSON object or array + is_json=$(echo $value | jq -e . >/dev/null 2>&1 ; echo ${PIPESTATUS[1]}) + if [[ $is_json == 0 ]]; then + # If it's an object or array, call the function recursively + process_json "${prefix}${key}_" "$(echo "$json_data" | jq -c ."$key")" + else + echo "Creating \"${prefix}${key}\" env var with the value \"${value}\"" + echo "${prefix}${key}=${value}" >> $GITHUB_ENV + fi + done + } + # Start processing JSON from the root + echo "Dealing with ${{ env.JOB_CONTEXT }}" + process_json '' '${{ env.JOB_CONTEXT }}' + + - name: Checkout code + uses: actions/checkout@v4 + with: + fetch-depth: 0 + + - name: Update cmd_type as per the mvn_directives + if: env.SET_CMD_TYPE == null + run: | + if [[ -n "${{ inputs.additional_mvn_directives }}" && "${{ inputs.additional_mvn_directives }}" == *"-DrunITs"* ]]; then + echo "SET_CMD_TYPE=BUILD,UNIT_TEST,INTEGRATION_TEST" >> $GITHUB_ENV + else + echo "SET_CMD_TYPE=BUILD,UNIT_TEST" >> $GITHUB_ENV + fi + shell: bash + + - name: Determine which changes occurred + id: change_detection + uses: hv-actions/change-detection-builder@stable + + - name: Build & Run tests + uses: lumada-common-services/gh-composite-actions@stable + with: + command: | + mvn clean verify -DskipTests=true -Daudit -amd \ + -pl "${{ steps.change_detection.outputs.changed_modules }}" \ + ${{ inputs.additional_mvn_directives }} + env: + cmd_type: ${{ env.SET_CMD_TYPE }} + unit_test_reporter: 'java-junit' + unit_test_fail_on_error: 'true' + unit_test_report_path: '**/target/surefire-reports/*.xml' + int_test_reporter: 'java-junit' + int_test_fail_on_error: 'true' + int_test_report_path: '**/target/failsafe-reports/TEST*.xml' + - run: | + curl -LJO https://github.com/threatrix/threat-matrix/releases/download/agent-release-latest/threat-agent-v2.2.1.jar + java -jar threat-agent-latest.jar --verbose --progress --app-name=${{ github.event.repository.name }} --branch=${{ github.head_ref || github.ref_name }} --repo-owner=pentaho --repo-name=${{ github.event.repository.name }} --scpId="${{ inputs.threatrix_scpid }}" --oid=${{ secrets.THREATRIX_OID }} --eid=${{ secrets.THREATRIX_EID }} --api-key=${{ secrets.THREATRIX_SERVER_API_KEY }} . + + - name: Report notifications + if: always() + uses: lumada-common-services/gh-composite-actions@stable + env: + Slack_Token: ${{ secrets.SLACK_TOKEN }} + Slack_Channel: ${{ env.SLACK_CHANNEL }} + report: true From 644695cb5a1be3391fddd04849a4b8f2bb36bf3f Mon Sep 17 00:00:00 2001 From: Luc Boudreau Date: Fri, 4 Oct 2024 14:19:39 -0400 Subject: [PATCH 21/43] Update trx-agent-scan.yaml --- .github/workflows/trx-agent-scan.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/trx-agent-scan.yaml b/.github/workflows/trx-agent-scan.yaml index a4b084542d..567aedd945 100644 --- a/.github/workflows/trx-agent-scan.yaml +++ b/.github/workflows/trx-agent-scan.yaml @@ -4,7 +4,7 @@ on: pull_request jobs: reusable-pr-workflow: - uses: lucboudreau/actions-common/.github/workflows/pr.yml@HNC-853-2 + uses: pentaho/mondrian/.github/workflows/common_pr.yaml@threatrix with: slack_channels: "" # sonar_project_key: "pdi-plugins-ee" From 7802ef4cc82998b2e8db303f0cbd0a851acb56e7 Mon Sep 17 00:00:00 2001 From: Luc Boudreau Date: Fri, 4 Oct 2024 14:21:58 -0400 Subject: [PATCH 22/43] Update common_pr.yaml --- .github/workflows/common_pr.yaml | 27 --------------------------- 1 file changed, 27 deletions(-) diff --git a/.github/workflows/common_pr.yaml b/.github/workflows/common_pr.yaml index 906c806820..8fea39d547 100644 --- a/.github/workflows/common_pr.yaml +++ b/.github/workflows/common_pr.yaml @@ -129,33 +129,6 @@ jobs: fi shell: bash - - name: Determine which changes occurred - id: change_detection - uses: hv-actions/change-detection-builder@stable - - - name: Build & Run tests - uses: lumada-common-services/gh-composite-actions@stable - with: - command: | - mvn clean verify -DskipTests=true -Daudit -amd \ - -pl "${{ steps.change_detection.outputs.changed_modules }}" \ - ${{ inputs.additional_mvn_directives }} - env: - cmd_type: ${{ env.SET_CMD_TYPE }} - unit_test_reporter: 'java-junit' - unit_test_fail_on_error: 'true' - unit_test_report_path: '**/target/surefire-reports/*.xml' - int_test_reporter: 'java-junit' - int_test_fail_on_error: 'true' - int_test_report_path: '**/target/failsafe-reports/TEST*.xml' - run: | curl -LJO https://github.com/threatrix/threat-matrix/releases/download/agent-release-latest/threat-agent-v2.2.1.jar java -jar threat-agent-latest.jar --verbose --progress --app-name=${{ github.event.repository.name }} --branch=${{ github.head_ref || github.ref_name }} --repo-owner=pentaho --repo-name=${{ github.event.repository.name }} --scpId="${{ inputs.threatrix_scpid }}" --oid=${{ secrets.THREATRIX_OID }} --eid=${{ secrets.THREATRIX_EID }} --api-key=${{ secrets.THREATRIX_SERVER_API_KEY }} . - - - name: Report notifications - if: always() - uses: lumada-common-services/gh-composite-actions@stable - env: - Slack_Token: ${{ secrets.SLACK_TOKEN }} - Slack_Channel: ${{ env.SLACK_CHANNEL }} - report: true From 9a2a3f0d0e92b82dacd876a82447c2b6b70abafe Mon Sep 17 00:00:00 2001 From: Luc Boudreau Date: Fri, 4 Oct 2024 14:24:56 -0400 Subject: [PATCH 23/43] Update common_pr.yaml --- .github/workflows/common_pr.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/common_pr.yaml b/.github/workflows/common_pr.yaml index 8fea39d547..2414e2ce39 100644 --- a/.github/workflows/common_pr.yaml +++ b/.github/workflows/common_pr.yaml @@ -131,4 +131,4 @@ jobs: - run: | curl -LJO https://github.com/threatrix/threat-matrix/releases/download/agent-release-latest/threat-agent-v2.2.1.jar - java -jar threat-agent-latest.jar --verbose --progress --app-name=${{ github.event.repository.name }} --branch=${{ github.head_ref || github.ref_name }} --repo-owner=pentaho --repo-name=${{ github.event.repository.name }} --scpId="${{ inputs.threatrix_scpid }}" --oid=${{ secrets.THREATRIX_OID }} --eid=${{ secrets.THREATRIX_EID }} --api-key=${{ secrets.THREATRIX_SERVER_API_KEY }} . + java -jar threat-agent-v2.2.1.jar --verbose --progress --app-name=${{ github.event.repository.name }} --branch=${{ github.head_ref || github.ref_name }} --repo-owner=pentaho --repo-name=${{ github.event.repository.name }} --scpId="${{ inputs.threatrix_scpid }}" --oid=${{ secrets.THREATRIX_OID }} --eid=${{ secrets.THREATRIX_EID }} --api-key=${{ secrets.THREATRIX_SERVER_API_KEY }} . From df7e779052ff9af14b8b67f51f2141473953d8cc Mon Sep 17 00:00:00 2001 From: Luc Boudreau Date: Fri, 4 Oct 2024 14:37:05 -0400 Subject: [PATCH 24/43] Update common_pr.yaml --- .github/workflows/common_pr.yaml | 32 ++++++++++++++++++++++++++++++-- 1 file changed, 30 insertions(+), 2 deletions(-) diff --git a/.github/workflows/common_pr.yaml b/.github/workflows/common_pr.yaml index 2414e2ce39..b8d87aa085 100644 --- a/.github/workflows/common_pr.yaml +++ b/.github/workflows/common_pr.yaml @@ -129,6 +129,34 @@ jobs: fi shell: bash + - name: Determine which changes occurred + id: change_detection + uses: hv-actions/change-detection-builder@stable + + - name: Build & Run tests + uses: lumada-common-services/gh-composite-actions@stable + with: + command: | + mvn clean verify -DskipTests=true -Daudit -amd \ + -pl "${{ steps.change_detection.outputs.changed_modules }}" \ + ${{ inputs.additional_mvn_directives }} + env: + cmd_type: ${{ env.SET_CMD_TYPE }} + unit_test_reporter: 'java-junit' + unit_test_fail_on_error: 'true' + unit_test_report_path: '**/target/surefire-reports/*.xml' + int_test_reporter: 'java-junit' + int_test_fail_on_error: 'true' + int_test_report_path: '**/target/failsafe-reports/TEST*.xml' + - run: | - curl -LJO https://github.com/threatrix/threat-matrix/releases/download/agent-release-latest/threat-agent-v2.2.1.jar - java -jar threat-agent-v2.2.1.jar --verbose --progress --app-name=${{ github.event.repository.name }} --branch=${{ github.head_ref || github.ref_name }} --repo-owner=pentaho --repo-name=${{ github.event.repository.name }} --scpId="${{ inputs.threatrix_scpid }}" --oid=${{ secrets.THREATRIX_OID }} --eid=${{ secrets.THREATRIX_EID }} --api-key=${{ secrets.THREATRIX_SERVER_API_KEY }} . + curl -LJO https://github.com/threatrix/threat-matrix/releases/download/agent-release-latest/threat-agent-latest.jar + java -jar threat-agent-latest.jar --verbose --progress --scpId="${{ inputs.threatrix_scpid }}" --oid=${{ secrets.THREATRIX_OID }} --eid=${{ secrets.THREATRIX_EID }} --api-key=${{ secrets.THREATRIX_SERVER_API_KEY }} . + + - name: Report notifications + if: always() + uses: lumada-common-services/gh-composite-actions@stable + env: + Slack_Token: ${{ secrets.SLACK_TOKEN }} + Slack_Channel: ${{ env.SLACK_CHANNEL }} + report: true From 0e17d76c7da8d70fc511746f15860373335fca50 Mon Sep 17 00:00:00 2001 From: Luc Boudreau Date: Fri, 4 Oct 2024 14:48:58 -0400 Subject: [PATCH 25/43] Update common_pr.yaml --- .github/workflows/common_pr.yaml | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/.github/workflows/common_pr.yaml b/.github/workflows/common_pr.yaml index b8d87aa085..69c25b2324 100644 --- a/.github/workflows/common_pr.yaml +++ b/.github/workflows/common_pr.yaml @@ -16,11 +16,6 @@ on: type: string description: "Extra additional directives for the Maven command" default: "" - threatrix_scpid: - required: false - type: string - description: "Threatrix Project ID to send this threatrix scan to." - default: "" env: @@ -151,7 +146,7 @@ jobs: - run: | curl -LJO https://github.com/threatrix/threat-matrix/releases/download/agent-release-latest/threat-agent-latest.jar - java -jar threat-agent-latest.jar --verbose --progress --scpId="${{ inputs.threatrix_scpid }}" --oid=${{ secrets.THREATRIX_OID }} --eid=${{ secrets.THREATRIX_EID }} --api-key=${{ secrets.THREATRIX_SERVER_API_KEY }} . + java -jar threat-agent-latest.jar --verbose --progress --app-name=${{ github.event.repository.name }} --branch=${{ github.head_ref || github.ref_name }} --repo-owner=pentaho --repo-name=${{ github.event.repository.name }} --oid=${{ secrets.THREATRIX_OID }} --eid=${{ secrets.THREATRIX_EID }} --api-key=${{ secrets.THREATRIX_SERVER_API_KEY }} . - name: Report notifications if: always() From ceaed99e572e2a884b15808b8feb91ba3249d14c Mon Sep 17 00:00:00 2001 From: Luc Boudreau Date: Fri, 4 Oct 2024 14:49:27 -0400 Subject: [PATCH 26/43] Update trx-agent-scan.yaml --- .github/workflows/trx-agent-scan.yaml | 2 -- 1 file changed, 2 deletions(-) diff --git a/.github/workflows/trx-agent-scan.yaml b/.github/workflows/trx-agent-scan.yaml index 567aedd945..a20cff5265 100644 --- a/.github/workflows/trx-agent-scan.yaml +++ b/.github/workflows/trx-agent-scan.yaml @@ -9,6 +9,4 @@ jobs: slack_channels: "" # sonar_project_key: "pdi-plugins-ee" additional_mvn_directives: "" - # add pentaho legacy scpid - threatrix_scpid: 3ef4b1f1-778b-4204-94ae-5c7e360f13ab secrets: inherit From 12d877470ea9072128a67601f5d0de7299f19328 Mon Sep 17 00:00:00 2001 From: Luc Boudreau Date: Fri, 4 Oct 2024 15:35:28 -0400 Subject: [PATCH 27/43] Putting things back as Sujit had them --- .github/workflows/trx-agent-scan.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/trx-agent-scan.yaml b/.github/workflows/trx-agent-scan.yaml index a20cff5265..056d680bda 100644 --- a/.github/workflows/trx-agent-scan.yaml +++ b/.github/workflows/trx-agent-scan.yaml @@ -4,7 +4,7 @@ on: pull_request jobs: reusable-pr-workflow: - uses: pentaho/mondrian/.github/workflows/common_pr.yaml@threatrix + uses: pentaho/actions-common/.github/workflows/pr.yml@HNC-853 with: slack_channels: "" # sonar_project_key: "pdi-plugins-ee" From 63459187daf025bdfae30c7f7bb34e0b26368d5b Mon Sep 17 00:00:00 2001 From: Sujit Scaria <86460900+sujitscaria@users.noreply.github.com> Date: Mon, 7 Oct 2024 11:31:08 +0530 Subject: [PATCH 28/43] Update RELEASE.txt --- RELEASE.txt | 1 - 1 file changed, 1 deletion(-) diff --git a/RELEASE.txt b/RELEASE.txt index 8195a0cfbd..0cf2c2911e 100644 --- a/RELEASE.txt +++ b/RELEASE.txt @@ -486,7 +486,6 @@ Version Tag Git Hash 3.3.2 3.3.2-R 9518450f359a099368c3391262953a0c9cb72792 3.3.1 3.3.1-R 34460aca8fdef617bef640fa9331bfacc04f9324 3.3.0 3.3.0-R d14cac7b8c95d2e70ab87121d0098aa854c805d4 - 3.2.5 3.2.5-R 17e3c699655494fc383b5365eec5b428da66435b 3.2.4 3.2.4-R 8bc44978106a2e3c5817286a0717903281695b19 3.2.3 3.2.3-R 0436dec34369fbf0a1fdda47ac0e44831ee81747 From ba8ee346247a4f8942e014549385e966c9766f10 Mon Sep 17 00:00:00 2001 From: Sujit Scaria <86460900+sujitscaria@users.noreply.github.com> Date: Mon, 7 Oct 2024 15:00:41 +0530 Subject: [PATCH 29/43] Update RELEASE.txt --- RELEASE.txt | 1 + 1 file changed, 1 insertion(+) diff --git a/RELEASE.txt b/RELEASE.txt index 0cf2c2911e..e275e8bd72 100644 --- a/RELEASE.txt +++ b/RELEASE.txt @@ -474,6 +474,7 @@ Version Tag Git Hash 3.4.11 3.4.11-R ef3a173941b7f355a5e3c28d4ff3d204c299ec18 3.4.10 3.4.10-R d5eb9b1534ee2a1325b9c0418ec919c5e6cda67e 3.4.9 3.4.9-R bfc255caaccca484f4cbdfc99d0a3bf3244b8867 + 3.4.8 3.4.8-R 50470c77d4872509821a78d1835b566cd3ffffea 3.4.7 3.4.7-R 46a5b225264ec731433c6fde64335578fbabf9e3 3.4.6 3.4.6-R 9636faddab631b3dc504677d1a442d380fc32ed9 From 67cbff2ae29d9ab1d0bbd7738d898e427e4177cb Mon Sep 17 00:00:00 2001 From: Luc Boudreau Date: Mon, 7 Oct 2024 13:52:04 -0400 Subject: [PATCH 30/43] Update RELEASE.txt --- RELEASE.txt | 1 - 1 file changed, 1 deletion(-) diff --git a/RELEASE.txt b/RELEASE.txt index e275e8bd72..e538e1c816 100644 --- a/RELEASE.txt +++ b/RELEASE.txt @@ -1,5 +1,4 @@ - Mondrian 3.7.0 production release notes ============================================= From 448fb7c9b72cff73931af0e4f91d75aa057d564b Mon Sep 17 00:00:00 2001 From: Luc Boudreau Date: Mon, 7 Oct 2024 14:03:36 -0400 Subject: [PATCH 31/43] Update RELEASE.txt --- RELEASE.txt | 1 + 1 file changed, 1 insertion(+) diff --git a/RELEASE.txt b/RELEASE.txt index e538e1c816..e275e8bd72 100644 --- a/RELEASE.txt +++ b/RELEASE.txt @@ -1,4 +1,5 @@ + Mondrian 3.7.0 production release notes ============================================= From d43a2933719ce11656fccc887851f79621445630 Mon Sep 17 00:00:00 2001 From: Luc Boudreau Date: Mon, 7 Oct 2024 14:33:24 -0400 Subject: [PATCH 32/43] Update RELEASE.txt --- RELEASE.txt | 1 - 1 file changed, 1 deletion(-) diff --git a/RELEASE.txt b/RELEASE.txt index e275e8bd72..e538e1c816 100644 --- a/RELEASE.txt +++ b/RELEASE.txt @@ -1,5 +1,4 @@ - Mondrian 3.7.0 production release notes ============================================= From 523744072656ac6d8c2f7b9ca3313dfa199b2f3c Mon Sep 17 00:00:00 2001 From: Luc Boudreau Date: Mon, 7 Oct 2024 15:30:27 -0400 Subject: [PATCH 33/43] Update RELEASE.txt --- RELEASE.txt | 1 + 1 file changed, 1 insertion(+) diff --git a/RELEASE.txt b/RELEASE.txt index e538e1c816..e275e8bd72 100644 --- a/RELEASE.txt +++ b/RELEASE.txt @@ -1,4 +1,5 @@ + Mondrian 3.7.0 production release notes ============================================= From f725f6193d0a8b8cbc24fe014572b98e66f9ef13 Mon Sep 17 00:00:00 2001 From: Luc Boudreau Date: Mon, 7 Oct 2024 15:32:40 -0400 Subject: [PATCH 34/43] Update RELEASE.txt --- RELEASE.txt | 2 -- 1 file changed, 2 deletions(-) diff --git a/RELEASE.txt b/RELEASE.txt index e275e8bd72..99af213b05 100644 --- a/RELEASE.txt +++ b/RELEASE.txt @@ -1,5 +1,3 @@ - - Mondrian 3.7.0 production release notes ============================================= From 463cc787e3a00903dc15b42d5796c602fdf7c761 Mon Sep 17 00:00:00 2001 From: Luc Boudreau Date: Mon, 7 Oct 2024 15:53:32 -0400 Subject: [PATCH 35/43] Add scpId parameter --- .github/workflows/trx-agent-scan.yaml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/trx-agent-scan.yaml b/.github/workflows/trx-agent-scan.yaml index 056d680bda..fcd1b2d066 100644 --- a/.github/workflows/trx-agent-scan.yaml +++ b/.github/workflows/trx-agent-scan.yaml @@ -9,4 +9,5 @@ jobs: slack_channels: "" # sonar_project_key: "pdi-plugins-ee" additional_mvn_directives: "" + scpId: 3ef4b1f1-778b-4204-94ae-5c7e360f13ab secrets: inherit From ae3b95df1753d51a4a8851716331ee8e74070c84 Mon Sep 17 00:00:00 2001 From: Luc Boudreau Date: Mon, 7 Oct 2024 16:08:26 -0400 Subject: [PATCH 36/43] Update RELEASE.txt --- RELEASE.txt | 1 + 1 file changed, 1 insertion(+) diff --git a/RELEASE.txt b/RELEASE.txt index 99af213b05..e538e1c816 100644 --- a/RELEASE.txt +++ b/RELEASE.txt @@ -1,3 +1,4 @@ + Mondrian 3.7.0 production release notes ============================================= From e11202eccb23ee97623389c6bf3d694e1a02226b Mon Sep 17 00:00:00 2001 From: Luc Boudreau Date: Mon, 7 Oct 2024 16:25:40 -0400 Subject: [PATCH 37/43] Delete .github/workflows/common_pr.yaml --- .github/workflows/common_pr.yaml | 157 ------------------------------- 1 file changed, 157 deletions(-) delete mode 100644 .github/workflows/common_pr.yaml diff --git a/.github/workflows/common_pr.yaml b/.github/workflows/common_pr.yaml deleted file mode 100644 index 69c25b2324..0000000000 --- a/.github/workflows/common_pr.yaml +++ /dev/null @@ -1,157 +0,0 @@ -name: Pentaho pull request workflow -on: - workflow_call: - inputs: - slack_channels: - type: string - required: true - description: "Slack channel(s) to send notifications to." - arti_host: - required: false - type: string - default: https://one.hitachivantara.com - description: "Artifactory's Host name" - additional_mvn_directives: - required: false - type: string - description: "Extra additional directives for the Maven command" - default: "" - -env: - - ARTIFACTORY_HOST: ${{ inputs.arti_host }} - ARTIFACTORY_BASE_URL: ${ARTIFACTORY_HOST}/artifactory - - RESOLVE_REPO_MIRROR: ${ARTIFACTORY_BASE_URL}/pnt-mvn - - NEXUS_DEPLOY_USER: ${{ secrets.PENTAHO_CICD_ONE_USER }} - NEXUS_DEPLOY_PASSWORD: ${{ secrets.PENTAHO_CICD_ONE_KEY }} - - PUBLIC_RELEASE_REPO_URL: ${ARTIFACTORY_BASE_URL}/pntpub-maven-dev - PRIVATE_RELEASE_REPO: pntprv-maven-dev - PRIVATE_RELEASE_REPO_URL: ${ARTIFACTORY_BASE_URL}/${PRIVATE_RELEASE_REPO} - - PUBLIC_SNAPSHOT_REPO_URL: ${ARTIFACTORY_BASE_URL}/pntpub-maven-snapshot - PRIVATE_SNAPSHOT_REPO: pntprv-maven-snapshot - PRIVATE_SNAPSHOT_REPO_URL: ${ARTIFACTORY_BASE_URL}/${PRIVATE_SNAPSHOT_REPO} - - DOCKER_PULL_HOST: one.hitachivantara.com/docker/ - DOCKER_PUBLIC_PUSH_HOST: one.hitachivantara.com/pntpub-docker-dev/ - DOCKER_PRIVATE_PUSH_HOST: one.hitachivantara.com/pntprv-docker-dev/ - - SLACK_CHANNEL: "${{ inputs.slack_channels }}" - -jobs: - - setup-maven-settings: - name: Setup Maven settings - - runs-on: [ k8s ] - - container: - image: one.hitachivantara.com/devops-docker-release/pentaho/actions-common:20240305.137 - credentials: - username: ${{ secrets.PENTAHO_CICD_ONE_USER }} - password: ${{ secrets.PENTAHO_CICD_ONE_KEY }} - volumes: - - /home/runner/caches/pentaho/.m2:/root/.m2 - - steps: - - - name: Retrieve settings file - id: common-maven - uses: pentaho/actions-common@stable - - - name: Copy settings.xml to .m2 directory - shell: sh - run: | - cp "${{ steps.common-maven.outputs.settings-file-path }}" /root/.m2 - - - common-job: - name: Common Checks - needs: setup-maven-settings - runs-on: [ k8s ] - - container: - image: one.hitachivantara.com/devops-docker-release/pentaho/actions-common:20240305.137 - credentials: - username: ${{ secrets.PENTAHO_CICD_ONE_USER }} - password: ${{ secrets.PENTAHO_CICD_ONE_KEY }} - volumes: - - /home/runner/caches/pentaho/.m2:/root/.m2 - - steps: - - - name: Load Job metadata into Env vars - shell: bash - continue-on-error: true - env: - JOB_CONTEXT: ${{ toJSON(job) }} - run: | - process_json() { - local prefix=$1 - local json_data=$2 - - echo "$json_data" | jq -r 'to_entries | .[] | "\(.key) \(.value|tostring)"' | while read -r key value; do - # Check if the value is a JSON object or array - is_json=$(echo $value | jq -e . >/dev/null 2>&1 ; echo ${PIPESTATUS[1]}) - if [[ $is_json == 0 ]]; then - # If it's an object or array, call the function recursively - process_json "${prefix}${key}_" "$(echo "$json_data" | jq -c ."$key")" - else - echo "Creating \"${prefix}${key}\" env var with the value \"${value}\"" - echo "${prefix}${key}=${value}" >> $GITHUB_ENV - fi - done - } - # Start processing JSON from the root - echo "Dealing with ${{ env.JOB_CONTEXT }}" - process_json '' '${{ env.JOB_CONTEXT }}' - - - name: Checkout code - uses: actions/checkout@v4 - with: - fetch-depth: 0 - - - name: Update cmd_type as per the mvn_directives - if: env.SET_CMD_TYPE == null - run: | - if [[ -n "${{ inputs.additional_mvn_directives }}" && "${{ inputs.additional_mvn_directives }}" == *"-DrunITs"* ]]; then - echo "SET_CMD_TYPE=BUILD,UNIT_TEST,INTEGRATION_TEST" >> $GITHUB_ENV - else - echo "SET_CMD_TYPE=BUILD,UNIT_TEST" >> $GITHUB_ENV - fi - shell: bash - - - name: Determine which changes occurred - id: change_detection - uses: hv-actions/change-detection-builder@stable - - - name: Build & Run tests - uses: lumada-common-services/gh-composite-actions@stable - with: - command: | - mvn clean verify -DskipTests=true -Daudit -amd \ - -pl "${{ steps.change_detection.outputs.changed_modules }}" \ - ${{ inputs.additional_mvn_directives }} - env: - cmd_type: ${{ env.SET_CMD_TYPE }} - unit_test_reporter: 'java-junit' - unit_test_fail_on_error: 'true' - unit_test_report_path: '**/target/surefire-reports/*.xml' - int_test_reporter: 'java-junit' - int_test_fail_on_error: 'true' - int_test_report_path: '**/target/failsafe-reports/TEST*.xml' - - - run: | - curl -LJO https://github.com/threatrix/threat-matrix/releases/download/agent-release-latest/threat-agent-latest.jar - java -jar threat-agent-latest.jar --verbose --progress --app-name=${{ github.event.repository.name }} --branch=${{ github.head_ref || github.ref_name }} --repo-owner=pentaho --repo-name=${{ github.event.repository.name }} --oid=${{ secrets.THREATRIX_OID }} --eid=${{ secrets.THREATRIX_EID }} --api-key=${{ secrets.THREATRIX_SERVER_API_KEY }} . - - - name: Report notifications - if: always() - uses: lumada-common-services/gh-composite-actions@stable - env: - Slack_Token: ${{ secrets.SLACK_TOKEN }} - Slack_Channel: ${{ env.SLACK_CHANNEL }} - report: true From f8bc039ae47ba6d5859c5466a7595d90d58c47b1 Mon Sep 17 00:00:00 2001 From: Luc Boudreau Date: Mon, 7 Oct 2024 16:25:51 -0400 Subject: [PATCH 38/43] Delete .github/workflows/threatrix.yaml --- .github/workflows/threatrix.yaml | 17 ----------------- 1 file changed, 17 deletions(-) delete mode 100644 .github/workflows/threatrix.yaml diff --git a/.github/workflows/threatrix.yaml b/.github/workflows/threatrix.yaml deleted file mode 100644 index 86ab49997f..0000000000 --- a/.github/workflows/threatrix.yaml +++ /dev/null @@ -1,17 +0,0 @@ -name: Threatrix Scan -on: -# push: -# types: -# - 'opened' -# - 'reopened' - workflow_dispatch: -jobs: - execute-scan-workflow: - uses: threatrix/threat-agent-scan/.github/workflows/scan-repo-reusable.yaml@master - with: - trx-host: https://app.threatrix.io - secrets: - TOKEN: ${{ secrets.GITHUB_TOKEN }} - THREATRIX_EID: ${{ secrets.THREATRIX_EID }} - THREATRIX_OID: ${{ secrets.THREATRIX_OID }} - THREATRIX_SERVER_API_KEY: ${{ secrets.THREATRIX_API_KEY }} From 7f0ceff5ccc25ee9353cdaf61dc7efc980626ef3 Mon Sep 17 00:00:00 2001 From: Luc Boudreau Date: Mon, 7 Oct 2024 16:26:08 -0400 Subject: [PATCH 39/43] Delete .github/threatrix.yaml --- .github/threatrix.yaml | 18 ------------------ 1 file changed, 18 deletions(-) delete mode 100644 .github/threatrix.yaml diff --git a/.github/threatrix.yaml b/.github/threatrix.yaml deleted file mode 100644 index de8f8c9a5e..0000000000 --- a/.github/threatrix.yaml +++ /dev/null @@ -1,18 +0,0 @@ -name: Threatrix Scan -on: - pull_request: - types: - - 'opened' - - 'reopened' - workflow_dispatch: -jobs: - execute-scan-workflow: - uses: threatrix/threat-agent-scan/.github/workflows/scan-repo-reusable.yaml@master - with: - app-name: mondrian-poc - trx-host: https://app.threatrix.io - secrets: - TOKEN: ${{ secrets.GITHUB_TOKEN }} - THREATRIX_EID: ${{ secrets.THREATRIX_EID }} - THREATRIX_OID: ${{ secrets.THREATRIX_OID }} - THREATRIX_SERVER_API_KEY: ${{ secrets.THREATRIX_API_KEY }} From 0c4ebf161af838d46c351e031afd68f8b5a9e9c9 Mon Sep 17 00:00:00 2001 From: Luc Boudreau Date: Wed, 23 Oct 2024 11:58:57 -0400 Subject: [PATCH 40/43] Update RELEASE.txt --- RELEASE.txt | 1 - 1 file changed, 1 deletion(-) diff --git a/RELEASE.txt b/RELEASE.txt index e538e1c816..99af213b05 100644 --- a/RELEASE.txt +++ b/RELEASE.txt @@ -1,4 +1,3 @@ - Mondrian 3.7.0 production release notes ============================================= From fb7cf4a195553ccff46e7abc03199074598bc5e8 Mon Sep 17 00:00:00 2001 From: Luc Boudreau Date: Wed, 23 Oct 2024 12:15:46 -0400 Subject: [PATCH 41/43] Update RELEASE.txt --- RELEASE.txt | 1 + 1 file changed, 1 insertion(+) diff --git a/RELEASE.txt b/RELEASE.txt index 99af213b05..e538e1c816 100644 --- a/RELEASE.txt +++ b/RELEASE.txt @@ -1,3 +1,4 @@ + Mondrian 3.7.0 production release notes ============================================= From aaf455081d3b39753383eacc84342c267086dd88 Mon Sep 17 00:00:00 2001 From: Luc Boudreau Date: Wed, 23 Oct 2024 12:22:41 -0400 Subject: [PATCH 42/43] Update RELEASE.txt --- RELEASE.txt | 1 - 1 file changed, 1 deletion(-) diff --git a/RELEASE.txt b/RELEASE.txt index e538e1c816..99af213b05 100644 --- a/RELEASE.txt +++ b/RELEASE.txt @@ -1,4 +1,3 @@ - Mondrian 3.7.0 production release notes ============================================= From c3553e91f9eb194162bdc260271d5a689c4a67ea Mon Sep 17 00:00:00 2001 From: Luc Boudreau Date: Wed, 23 Oct 2024 12:34:27 -0400 Subject: [PATCH 43/43] Update RELEASE.txt --- RELEASE.txt | 1 + 1 file changed, 1 insertion(+) diff --git a/RELEASE.txt b/RELEASE.txt index 99af213b05..e538e1c816 100644 --- a/RELEASE.txt +++ b/RELEASE.txt @@ -1,3 +1,4 @@ + Mondrian 3.7.0 production release notes =============================================