From d91367909ac155feeb323730af5ff4c73906fb9a Mon Sep 17 00:00:00 2001 From: "Marcel S. Henselin" Date: Thu, 26 Mar 2026 13:36:38 +0100 Subject: [PATCH 01/28] chore: modify test action [skip ci] --- .github/actions/acc_test/action.yaml | 13 ++----------- 1 file changed, 2 insertions(+), 11 deletions(-) diff --git a/.github/actions/acc_test/action.yaml b/.github/actions/acc_test/action.yaml index 13674a9a..4056dba4 100644 --- a/.github/actions/acc_test/action.yaml +++ b/.github/actions/acc_test/action.yaml @@ -229,6 +229,7 @@ runs: go test -v ${testfile} -timeout=${{ inputs.test_timeout_string }} | tee -a acc_test_run.log echo "::endgroup::" set -e + echo "::endgroup::" echo "::group::go test result" if [ $? -ne 0 ]; then echo "Test failed, see acc_test_run.log for details" @@ -246,19 +247,9 @@ runs: TF_ACC_KEK_KEY_VERSION: ${{ inputs.tf_acc_kek_key_version }} TF_ACC_KEK_SERVICE_ACCOUNT: ${{ inputs.tf_acc_kek_service_account }} - - name: Artifact upload start - shell: bash - run: | - echo "::group::artifact upload" - - name: Upload test log artifact if: always() - uses: actions/upload-artifact@v3 + uses: actions/upload-artifact@v4 with: name: acc_test.log path: "stackit/acc_test_run.log" - - - name: Artifact upload finish - shell: bash - run: | - echo "::endgroup::" -- 2.49.1 From 2ff61315d243dec17d0a6feb712328ee585bed68 Mon Sep 17 00:00:00 2001 From: "Marcel S. Henselin" Date: Thu, 26 Mar 2026 14:55:49 +0100 Subject: [PATCH 02/28] chore: modify test action [skip ci] --- .github/actions/acc_test/action.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/actions/acc_test/action.yaml b/.github/actions/acc_test/action.yaml index 4056dba4..9b2a8edb 100644 --- a/.github/actions/acc_test/action.yaml +++ b/.github/actions/acc_test/action.yaml @@ -249,7 +249,7 @@ runs: - name: Upload test log artifact if: always() - uses: actions/upload-artifact@v4 + uses: actions/upload-artifact@v6 with: name: acc_test.log path: "stackit/acc_test_run.log" -- 2.49.1 From e6bc1bfc7206036ad2f19071443fcdfa4defb300 Mon Sep 17 00:00:00 2001 From: "Marcel S. Henselin" Date: Thu, 26 Mar 2026 15:25:10 +0100 Subject: [PATCH 03/28] chore: modify test action [skip ci] --- .github/actions/acc_test/action.yaml | 1 - 1 file changed, 1 deletion(-) diff --git a/.github/actions/acc_test/action.yaml b/.github/actions/acc_test/action.yaml index 9b2a8edb..229a5f83 100644 --- a/.github/actions/acc_test/action.yaml +++ b/.github/actions/acc_test/action.yaml @@ -229,7 +229,6 @@ runs: go test -v ${testfile} -timeout=${{ inputs.test_timeout_string }} | tee -a acc_test_run.log echo "::endgroup::" set -e - echo "::endgroup::" echo "::group::go test result" if [ $? -ne 0 ]; then echo "Test failed, see acc_test_run.log for details" -- 2.49.1 From c4d872d39ba7880d7abf261bbf41c98804e27273 Mon Sep 17 00:00:00 2001 From: "Marcel S. Henselin" Date: Thu, 26 Mar 2026 16:46:07 +0100 Subject: [PATCH 04/28] chore: modify test action [skip ci] --- .github/actions/acc_test/action.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/actions/acc_test/action.yaml b/.github/actions/acc_test/action.yaml index 229a5f83..6cf2419b 100644 --- a/.github/actions/acc_test/action.yaml +++ b/.github/actions/acc_test/action.yaml @@ -248,7 +248,7 @@ runs: - name: Upload test log artifact if: always() - uses: actions/upload-artifact@v6 + uses: actions/upload-artifact@v3 with: name: acc_test.log path: "stackit/acc_test_run.log" -- 2.49.1 From 5a5752d90216fa3f3b02e233025ec3bc5da4a8f2 Mon Sep 17 00:00:00 2001 From: "Marcel S. Henselin" Date: Thu, 26 Mar 2026 17:07:27 +0100 Subject: [PATCH 05/28] chore: modify test action [skip ci] --- .github/actions/acc_test/action.yaml | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/.github/actions/acc_test/action.yaml b/.github/actions/acc_test/action.yaml index 6cf2419b..13674a9a 100644 --- a/.github/actions/acc_test/action.yaml +++ b/.github/actions/acc_test/action.yaml @@ -246,9 +246,19 @@ runs: TF_ACC_KEK_KEY_VERSION: ${{ inputs.tf_acc_kek_key_version }} TF_ACC_KEK_SERVICE_ACCOUNT: ${{ inputs.tf_acc_kek_service_account }} + - name: Artifact upload start + shell: bash + run: | + echo "::group::artifact upload" + - name: Upload test log artifact if: always() uses: actions/upload-artifact@v3 with: name: acc_test.log path: "stackit/acc_test_run.log" + + - name: Artifact upload finish + shell: bash + run: | + echo "::endgroup::" -- 2.49.1 From 66b385835172aadf631992fbaaf8371c0c8ddbfc Mon Sep 17 00:00:00 2001 From: "Marcel S. Henselin" Date: Fri, 27 Mar 2026 09:11:21 +0100 Subject: [PATCH 06/28] chore: modify test action [skip ci] --- .github/actions/acc_test/action.yaml | 22 ++++++++++------------ .github/actions/notify/action.yaml | 23 +++++++++++++++++++---- .github/workflows/tf-acc-test.yaml | 2 ++ 3 files changed, 31 insertions(+), 16 deletions(-) diff --git a/.github/actions/acc_test/action.yaml b/.github/actions/acc_test/action.yaml index 13674a9a..614e186f 100644 --- a/.github/actions/acc_test/action.yaml +++ b/.github/actions/acc_test/action.yaml @@ -70,6 +70,10 @@ outputs: value: ${{ steps.testrun.result }} description: "the output of the tests" + status: + value: ${{ steps.testrun.status }} + description: "the status of the tests" + runs: using: "composite" steps: @@ -230,11 +234,15 @@ runs: echo "::endgroup::" set -e echo "::group::go test result" - if [ $? -ne 0 ]; then + + if [[ $(cat acc_test_run.log | grep "FAIL") ]]; then echo "Test failed, see acc_test_run.log for details" res=$(cat acc_test_run.log | grep -v "=== RUN" | grep -v "\-\-\- PASS" | grep -v "=== CONT" | grep -v "=== PAUSE") - echo "result=${res}" >> "$GITHUB_OUTPUT" + echo "result=FAIL: ${res}" >> "$GITHUB_OUTPUT" + echo "status=FAILED" >> "$GITHUB_OUTPUT" exit 1 + else + echo "status=SUCCESS" >> "$GITHUB_OUTPUT" fi echo "::endgroup::" env: @@ -246,19 +254,9 @@ runs: TF_ACC_KEK_KEY_VERSION: ${{ inputs.tf_acc_kek_key_version }} TF_ACC_KEK_SERVICE_ACCOUNT: ${{ inputs.tf_acc_kek_service_account }} - - name: Artifact upload start - shell: bash - run: | - echo "::group::artifact upload" - - name: Upload test log artifact if: always() uses: actions/upload-artifact@v3 with: name: acc_test.log path: "stackit/acc_test_run.log" - - - name: Artifact upload finish - shell: bash - run: | - echo "::endgroup::" diff --git a/.github/actions/notify/action.yaml b/.github/actions/notify/action.yaml index f260d087..0de7da68 100644 --- a/.github/actions/notify/action.yaml +++ b/.github/actions/notify/action.yaml @@ -11,6 +11,15 @@ inputs: required: true default: 'no title provided' + subtitle: + description: "The subtitle of the notification." + required: true + default: 'no subtitle provided' + + image_url: + description: "The URL of the image to be included in the notification." + required: false + event_author: description: "The author of the event." required: true @@ -35,6 +44,11 @@ inputs: required: true default: 'none' + status: + description: "The status of the event." + required: true + default: 'unknown' + runs: using: "composite" steps: @@ -69,7 +83,8 @@ runs: PAYLOAD=$(jq -n -r \ --arg header "${{ inputs.title }}" \ - --arg repo "${{ github.repository || '' }}" \ + --arg subtitle "${{ inputs.subtitle || '' }}" \ + --arg imgurl "${{ inputs.image_url || 'https://cdn.jsdelivr.net/gh/homarr-labs/dashboard-icons/png/git.png' }}" \ --arg title "${{ inputs.event_title || 'no event title given' }}" \ --arg body "${{ inputs.event_body || 'no event body given' }}" \ --arg author "${{ inputs.event_author || 'no event author given' }}" \ @@ -77,8 +92,8 @@ runs: '{ "cardsV2": [ { "cardId": "notify-${{ github.run_id }}", "card": { "header": { "title": "\($header)", - "subtitle": "Repo: \($repo)", - "imageUrl": "https://cdn.jsdelivr.net/gh/homarr-labs/dashboard-icons/png/git.png", + "subtitle": "\($subtitle)", + "imageUrl": "\($imgurl)", "imageType": "SQUARE" }, "sections": [ @@ -91,7 +106,7 @@ runs: "icon": { "knownIcon": "PERSON" }, - "text": "Opened by: \($author)" + "text": "\($author)" } }, { diff --git a/.github/workflows/tf-acc-test.yaml b/.github/workflows/tf-acc-test.yaml index 642fe63b..20101c67 100644 --- a/.github/workflows/tf-acc-test.yaml +++ b/.github/workflows/tf-acc-test.yaml @@ -45,6 +45,7 @@ jobs: with: webhook_url: ${{ secrets.GOOGLE_WEBHOOK_URL }} title: Terraform Acceptance Tests started + subtitle: "${{ github.repository }}" event_title: ${{ github.event_name }} event_author: ${{ github.actor }} event_body: ${{ inputs.test_file }} @@ -89,6 +90,7 @@ jobs: with: webhook_url: ${{ secrets.GOOGLE_WEBHOOK_URL }} title: Terraform Acceptance Tests finished + subtitle: "" event_title: ${{ github.event_name }} event_author: ${{ github.actor }} event_body: "${{ steps.automatic_run.outputs.result || steps.manual_run.outputs.result }}" -- 2.49.1 From 06e61f2b3aa8aece57dd9500d59218b538e8cb9b Mon Sep 17 00:00:00 2001 From: "Marcel S. Henselin" Date: Fri, 27 Mar 2026 10:18:36 +0100 Subject: [PATCH 07/28] chore: modify test action [skip ci] --- .github/actions/notify/action.yaml | 3 ++- .github/workflows/tf-acc-test.yaml | 2 ++ 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/.github/actions/notify/action.yaml b/.github/actions/notify/action.yaml index 0de7da68..e3ca0499 100644 --- a/.github/actions/notify/action.yaml +++ b/.github/actions/notify/action.yaml @@ -19,6 +19,7 @@ inputs: image_url: description: "The URL of the image to be included in the notification." required: false + default: 'https://cdn.jsdelivr.net/npm/simple-icons@v16/icons/git.svg' event_author: description: "The author of the event." @@ -84,7 +85,7 @@ runs: PAYLOAD=$(jq -n -r \ --arg header "${{ inputs.title }}" \ --arg subtitle "${{ inputs.subtitle || '' }}" \ - --arg imgurl "${{ inputs.image_url || 'https://cdn.jsdelivr.net/gh/homarr-labs/dashboard-icons/png/git.png' }}" \ + --arg imgurl "${{ inputs.image_url }}" \ --arg title "${{ inputs.event_title || 'no event title given' }}" \ --arg body "${{ inputs.event_body || 'no event body given' }}" \ --arg author "${{ inputs.event_author || 'no event author given' }}" \ diff --git a/.github/workflows/tf-acc-test.yaml b/.github/workflows/tf-acc-test.yaml index 20101c67..ec7316ee 100644 --- a/.github/workflows/tf-acc-test.yaml +++ b/.github/workflows/tf-acc-test.yaml @@ -51,6 +51,7 @@ jobs: event_body: ${{ inputs.test_file }} event_number: ${{ github.run_id }} event_url: "https://tf-provider.git.onstackit.cloud/stackit-dev-tools/terraform-provider-stackitprivatepreview/actions/runs/${{ forgejo.run_number }}" + image_url: 'https://cdn.simpleicons.org/git/483d8b' - name: Run Test (workflow dispatch) if: ${{ github.event_name == 'workflow_dispatch' }} @@ -96,3 +97,4 @@ jobs: event_body: "${{ steps.automatic_run.outputs.result || steps.manual_run.outputs.result }}" event_number: ${{ github.event.id }} event_url: "https://tf-provider.git.onstackit.cloud/stackit-dev-tools/terraform-provider-stackitprivatepreview/actions/runs/${{ forgejo.run_number }}" + image_url: ${{ (steps.manual_run.outputs.status || steps.automatic_run.outputs.status) != 'SUCCESS' && 'https://cdn.simpleicons.org/git/8b0000/dc143c' || 'https://cdn.simpleicons.org/git/006400/228b22' }} -- 2.49.1 From 1c3ba8f65ed87ee16506ae5c0448e0a15143c01d Mon Sep 17 00:00:00 2001 From: "Marcel S. Henselin" Date: Fri, 27 Mar 2026 10:23:47 +0100 Subject: [PATCH 08/28] chore: modify test action [skip ci] --- .github/workflows/tf-acc-test.yaml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/tf-acc-test.yaml b/.github/workflows/tf-acc-test.yaml index ec7316ee..80b1382c 100644 --- a/.github/workflows/tf-acc-test.yaml +++ b/.github/workflows/tf-acc-test.yaml @@ -44,7 +44,7 @@ jobs: uses: ./.github/actions/notify with: webhook_url: ${{ secrets.GOOGLE_WEBHOOK_URL }} - title: Terraform Acceptance Tests started + title: [START] Terraform Acceptance Tests subtitle: "${{ github.repository }}" event_title: ${{ github.event_name }} event_author: ${{ github.actor }} @@ -90,8 +90,8 @@ jobs: uses: ./.github/actions/notify with: webhook_url: ${{ secrets.GOOGLE_WEBHOOK_URL }} - title: Terraform Acceptance Tests finished - subtitle: "" + title: [END] Terraform Acceptance Tests + subtitle: ${{ (steps.manual_run.outputs.status || steps.automatic_run.outputs.status) }} event_title: ${{ github.event_name }} event_author: ${{ github.actor }} event_body: "${{ steps.automatic_run.outputs.result || steps.manual_run.outputs.result }}" -- 2.49.1 From 3ff3a0355c6105d66be6f4bd3f98f2b1b8aa13e6 Mon Sep 17 00:00:00 2001 From: "Marcel S. Henselin" Date: Fri, 27 Mar 2026 10:35:58 +0100 Subject: [PATCH 09/28] chore: modify test action [skip ci] --- .github/actions/notify/action.yaml | 37 ++++++++++++++++-------------- .github/workflows/tf-acc-test.yaml | 3 +-- 2 files changed, 21 insertions(+), 19 deletions(-) diff --git a/.github/actions/notify/action.yaml b/.github/actions/notify/action.yaml index e3ca0499..153bd0b3 100644 --- a/.github/actions/notify/action.yaml +++ b/.github/actions/notify/action.yaml @@ -16,10 +16,10 @@ inputs: required: true default: 'no subtitle provided' - image_url: - description: "The URL of the image to be included in the notification." + image_slug: + description: "The slug of the image to be included in the notification." required: false - default: 'https://cdn.jsdelivr.net/npm/simple-icons@v16/icons/git.svg' + default: 'git' event_author: description: "The author of the event." @@ -53,19 +53,6 @@ inputs: runs: using: "composite" steps: -# - name: event list -# shell: bash -# run: | -# cat <<'EOF' -# ${{ toJSON(github) }} -# EOF -# -# - name: print env -# shell: bash -# run: | -# env -# exit 1 - - name: Install prerequisites shell: bash run: | @@ -75,6 +62,22 @@ runs: apt install -y curl jq echo "::endgroup::" + - name: Determine status color + id: status + shell: bash + run: | + case "${{ inputs.status }}" in + SUCCESS) + STATUS_COLOR="006400/228b22" + ;; + FAILURE) + STATUS_COLOR="8b0000/dc143c" + ;; + *) + STATUS_COLOR="483d8b/6495ed" + ;; + echo "color=${STATUS_COLOR}" >> "$GITHUB_OUTPUT" + - name: Notify via Google Chat Webhook shell: bash env: @@ -85,7 +88,7 @@ runs: PAYLOAD=$(jq -n -r \ --arg header "${{ inputs.title }}" \ --arg subtitle "${{ inputs.subtitle || '' }}" \ - --arg imgurl "${{ inputs.image_url }}" \ + --arg imgurl "https://cdn.simpleicons.org/${{ inputs.image_slug }}/${{ steps.status.outputs.color }}" \ --arg title "${{ inputs.event_title || 'no event title given' }}" \ --arg body "${{ inputs.event_body || 'no event body given' }}" \ --arg author "${{ inputs.event_author || 'no event author given' }}" \ diff --git a/.github/workflows/tf-acc-test.yaml b/.github/workflows/tf-acc-test.yaml index 80b1382c..58a787b4 100644 --- a/.github/workflows/tf-acc-test.yaml +++ b/.github/workflows/tf-acc-test.yaml @@ -51,7 +51,6 @@ jobs: event_body: ${{ inputs.test_file }} event_number: ${{ github.run_id }} event_url: "https://tf-provider.git.onstackit.cloud/stackit-dev-tools/terraform-provider-stackitprivatepreview/actions/runs/${{ forgejo.run_number }}" - image_url: 'https://cdn.simpleicons.org/git/483d8b' - name: Run Test (workflow dispatch) if: ${{ github.event_name == 'workflow_dispatch' }} @@ -97,4 +96,4 @@ jobs: event_body: "${{ steps.automatic_run.outputs.result || steps.manual_run.outputs.result }}" event_number: ${{ github.event.id }} event_url: "https://tf-provider.git.onstackit.cloud/stackit-dev-tools/terraform-provider-stackitprivatepreview/actions/runs/${{ forgejo.run_number }}" - image_url: ${{ (steps.manual_run.outputs.status || steps.automatic_run.outputs.status) != 'SUCCESS' && 'https://cdn.simpleicons.org/git/8b0000/dc143c' || 'https://cdn.simpleicons.org/git/006400/228b22' }} + status: ${{ (steps.manual_run.outputs.status || steps.automatic_run.outputs.status) }} -- 2.49.1 From af8481a003b036cb303cea250168570b45d01607 Mon Sep 17 00:00:00 2001 From: "Marcel S. Henselin" Date: Fri, 27 Mar 2026 10:52:18 +0100 Subject: [PATCH 10/28] chore: modify test action [skip ci] --- .github/actions/notify/action.yaml | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/.github/actions/notify/action.yaml b/.github/actions/notify/action.yaml index 153bd0b3..f9957867 100644 --- a/.github/actions/notify/action.yaml +++ b/.github/actions/notify/action.yaml @@ -48,7 +48,7 @@ inputs: status: description: "The status of the event." required: true - default: 'unknown' + default: 'UNKNOWN' runs: using: "composite" @@ -69,14 +69,18 @@ runs: case "${{ inputs.status }}" in SUCCESS) STATUS_COLOR="006400/228b22" + ADD='{"decoratedText": {"startIcon": {"materialIcon": {"name": "check_circle"}},"text": "\($status)"}},' ;; FAILURE) STATUS_COLOR="8b0000/dc143c" + ADD='{"decoratedText": {"startIcon": {"materialIcon": {"name": "stop_circle"}},"text": "\($status)"}},' ;; *) STATUS_COLOR="483d8b/6495ed" + ADD='' ;; echo "color=${STATUS_COLOR}" >> "$GITHUB_OUTPUT" + echo "status_add=${ADD}" >> "$GITHUB_OUTPUT" - name: Notify via Google Chat Webhook shell: bash @@ -105,9 +109,10 @@ runs: "header": "\($title)", "collapsible": false, "widgets": [ + ${{ steps.status.outputs.status_add }} { "decoratedText": { - "icon": { + "startIcon": { "knownIcon": "PERSON" }, "text": "\($author)" -- 2.49.1 From 8886b60c25dfa0d318aa26c1cb366c9f3121078a Mon Sep 17 00:00:00 2001 From: "Marcel S. Henselin" Date: Fri, 27 Mar 2026 11:00:14 +0100 Subject: [PATCH 11/28] chore: modify test action [skip ci] --- .github/workflows/tf-acc-test.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/tf-acc-test.yaml b/.github/workflows/tf-acc-test.yaml index 58a787b4..ef630175 100644 --- a/.github/workflows/tf-acc-test.yaml +++ b/.github/workflows/tf-acc-test.yaml @@ -96,4 +96,4 @@ jobs: event_body: "${{ steps.automatic_run.outputs.result || steps.manual_run.outputs.result }}" event_number: ${{ github.event.id }} event_url: "https://tf-provider.git.onstackit.cloud/stackit-dev-tools/terraform-provider-stackitprivatepreview/actions/runs/${{ forgejo.run_number }}" - status: ${{ (steps.manual_run.outputs.status || steps.automatic_run.outputs.status) }} + status: "${{ (steps.manual_run.outputs.status || steps.automatic_run.outputs.status) }}" -- 2.49.1 From 29db481bed341632a39b747998c1844e110cb308 Mon Sep 17 00:00:00 2001 From: "Marcel S. Henselin" Date: Fri, 27 Mar 2026 11:03:45 +0100 Subject: [PATCH 12/28] chore: modify test action [skip ci] --- .github/actions/notify/action.yaml | 8 -------- .github/workflows/tf-acc-test.yaml | 20 ++++++++++---------- 2 files changed, 10 insertions(+), 18 deletions(-) diff --git a/.github/actions/notify/action.yaml b/.github/actions/notify/action.yaml index f9957867..d475fd30 100644 --- a/.github/actions/notify/action.yaml +++ b/.github/actions/notify/action.yaml @@ -9,21 +9,17 @@ inputs: title: description: "The title of the notification." required: true - default: 'no title provided' subtitle: description: "The subtitle of the notification." - required: true default: 'no subtitle provided' image_slug: description: "The slug of the image to be included in the notification." - required: false default: 'git' event_author: description: "The author of the event." - required: true default: 'unknown' event_title: @@ -32,22 +28,18 @@ inputs: event_body: description: "The body of the event." - required: true default: 'no body provided' event_number: description: "The number of the event." - required: true default: 'no number provided' event_url: description: "The url of the event." - required: true default: 'none' status: description: "The status of the event." - required: true default: 'UNKNOWN' runs: diff --git a/.github/workflows/tf-acc-test.yaml b/.github/workflows/tf-acc-test.yaml index ef630175..03ff328c 100644 --- a/.github/workflows/tf-acc-test.yaml +++ b/.github/workflows/tf-acc-test.yaml @@ -45,15 +45,15 @@ jobs: with: webhook_url: ${{ secrets.GOOGLE_WEBHOOK_URL }} title: [START] Terraform Acceptance Tests - subtitle: "${{ github.repository }}" - event_title: ${{ github.event_name }} - event_author: ${{ github.actor }} + subtitle: "${{ forgejo.repository }}" + event_title: ${{ forgejo.event_name }} + event_author: ${{ forgejo.actor }} event_body: ${{ inputs.test_file }} - event_number: ${{ github.run_id }} + event_number: ${{ forgejo.run_number }} event_url: "https://tf-provider.git.onstackit.cloud/stackit-dev-tools/terraform-provider-stackitprivatepreview/actions/runs/${{ forgejo.run_number }}" - name: Run Test (workflow dispatch) - if: ${{ github.event_name == 'workflow_dispatch' }} + if: ${{ forgejo.event_name == 'workflow_dispatch' }} id: manual_run uses: ./.github/actions/acc_test with: @@ -71,7 +71,7 @@ jobs: test_file: ${{ inputs.test_file }} - name: Run Test (automatic) - if: ${{ github.event_name != 'workflow_dispatch' }} + if: ${{ forgejo.event_name != 'workflow_dispatch' }} id: automatic_run uses: ./.github/actions/acc_test with: @@ -91,9 +91,9 @@ jobs: webhook_url: ${{ secrets.GOOGLE_WEBHOOK_URL }} title: [END] Terraform Acceptance Tests subtitle: ${{ (steps.manual_run.outputs.status || steps.automatic_run.outputs.status) }} - event_title: ${{ github.event_name }} - event_author: ${{ github.actor }} + event_title: ${{ forgejo.event_name }} + event_author: ${{ forgejo.actor }} event_body: "${{ steps.automatic_run.outputs.result || steps.manual_run.outputs.result }}" - event_number: ${{ github.event.id }} + event_number: ${{ forgejo.event.id }} event_url: "https://tf-provider.git.onstackit.cloud/stackit-dev-tools/terraform-provider-stackitprivatepreview/actions/runs/${{ forgejo.run_number }}" - status: "${{ (steps.manual_run.outputs.status || steps.automatic_run.outputs.status) }}" + status: "${{ forgejo.event_name == 'workflow_dispatch' && steps.manual_run.outputs.status || steps.automatic_run.outputs.status }}" -- 2.49.1 From fddd242be85d4394120cd06d973f7342f1d3d85f Mon Sep 17 00:00:00 2001 From: "Marcel S. Henselin" Date: Fri, 27 Mar 2026 11:08:25 +0100 Subject: [PATCH 13/28] chore: modify test action [skip ci] --- .github/actions/notify/action.yaml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/actions/notify/action.yaml b/.github/actions/notify/action.yaml index d475fd30..d365ac1c 100644 --- a/.github/actions/notify/action.yaml +++ b/.github/actions/notify/action.yaml @@ -71,6 +71,7 @@ runs: STATUS_COLOR="483d8b/6495ed" ADD='' ;; + esac echo "color=${STATUS_COLOR}" >> "$GITHUB_OUTPUT" echo "status_add=${ADD}" >> "$GITHUB_OUTPUT" -- 2.49.1 From e703ba9184aa39aa515e24013d1f16cb8027b484 Mon Sep 17 00:00:00 2001 From: "Marcel S. Henselin" Date: Fri, 27 Mar 2026 11:12:35 +0100 Subject: [PATCH 14/28] chore: modify test action [skip ci] --- .github/workflows/tf-acc-test.yaml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/.github/workflows/tf-acc-test.yaml b/.github/workflows/tf-acc-test.yaml index 03ff328c..dcade21b 100644 --- a/.github/workflows/tf-acc-test.yaml +++ b/.github/workflows/tf-acc-test.yaml @@ -29,7 +29,7 @@ on: - tf-provider.git.onstackit.cloud/stackit-dev-tools/terraform-provider-stackitprivatepreview/stackit/internal/services/postgresflexalpha - tf-provider.git.onstackit.cloud/stackit-dev-tools/terraform-provider-stackitprivatepreview/stackit/internal/wait/sqlserverflexbeta - tf-provider.git.onstackit.cloud/stackit-dev-tools/terraform-provider-stackitprivatepreview/stackit/internal/services/sqlserverflexbeta - default: '' + default: 'tf-provider.git.onstackit.cloud/stackit-dev-tools/terraform-provider-stackitprivatepreview/stackit/internal/wait/postgresflexalpha' required: true jobs: @@ -44,7 +44,7 @@ jobs: uses: ./.github/actions/notify with: webhook_url: ${{ secrets.GOOGLE_WEBHOOK_URL }} - title: [START] Terraform Acceptance Tests + title: "[START] Terraform Acceptance Tests" subtitle: "${{ forgejo.repository }}" event_title: ${{ forgejo.event_name }} event_author: ${{ forgejo.actor }} @@ -89,8 +89,8 @@ jobs: uses: ./.github/actions/notify with: webhook_url: ${{ secrets.GOOGLE_WEBHOOK_URL }} - title: [END] Terraform Acceptance Tests - subtitle: ${{ (steps.manual_run.outputs.status || steps.automatic_run.outputs.status) }} + title: "[END] Terraform Acceptance Tests" + subtitle: "${{ forgejo.event_name == 'workflow_dispatch' && steps.manual_run.outputs.status || steps.automatic_run.outputs.status }}" event_title: ${{ forgejo.event_name }} event_author: ${{ forgejo.actor }} event_body: "${{ steps.automatic_run.outputs.result || steps.manual_run.outputs.result }}" -- 2.49.1 From 92eaf875823471822020224016aea4550cc889df Mon Sep 17 00:00:00 2001 From: "Marcel S. Henselin" Date: Fri, 27 Mar 2026 11:23:27 +0100 Subject: [PATCH 15/28] chore: modify test action [skip ci] --- .github/workflows/clean_up.yaml | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/.github/workflows/clean_up.yaml b/.github/workflows/clean_up.yaml index b366488f..1c6cabfb 100644 --- a/.github/workflows/clean_up.yaml +++ b/.github/workflows/clean_up.yaml @@ -38,10 +38,11 @@ jobs: uses: ./.github/actions/notify with: webhook_url: ${{ secrets.GOOGLE_WEBHOOK_URL }} - title: CLEAN UP pipeline started + title: "[START] CLEAN UP pipeline" + subtitle: "${{ forgejo.repository }}" event_title: ${{ forgejo.event_name }} event_author: ${{ forgejo.actor }} - event_body: "Filter: ${{ inputs.res_prefix }}" + event_body: "try to remove all resources with prefix ${{ inputs.res_prefix }}" event_number: ${{ forgejo.run_number }} event_url: "https://tf-provider.git.onstackit.cloud/stackit-dev-tools/terraform-provider-stackitprivatepreview/actions/runs/${{ forgejo.run_number }}" -- 2.49.1 From 2d4e9c723fcecf644f636324ba0e590dec9cab5e Mon Sep 17 00:00:00 2001 From: "Marcel S. Henselin" Date: Fri, 27 Mar 2026 11:31:56 +0100 Subject: [PATCH 16/28] chore: modify test action [skip ci] --- .github/actions/acc_test/action.yaml | 12 +++++++++--- .github/actions/notify/action.yaml | 2 +- .github/workflows/tf-acc-test.yaml | 2 +- 3 files changed, 11 insertions(+), 5 deletions(-) diff --git a/.github/actions/acc_test/action.yaml b/.github/actions/acc_test/action.yaml index 614e186f..9a80b0ed 100644 --- a/.github/actions/acc_test/action.yaml +++ b/.github/actions/acc_test/action.yaml @@ -71,7 +71,7 @@ outputs: description: "the output of the tests" status: - value: ${{ steps.testrun.status }} + value: ${{ steps.status.status }} description: "the status of the tests" runs: @@ -239,10 +239,9 @@ runs: echo "Test failed, see acc_test_run.log for details" res=$(cat acc_test_run.log | grep -v "=== RUN" | grep -v "\-\-\- PASS" | grep -v "=== CONT" | grep -v "=== PAUSE") echo "result=FAIL: ${res}" >> "$GITHUB_OUTPUT" - echo "status=FAILED" >> "$GITHUB_OUTPUT" exit 1 else - echo "status=SUCCESS" >> "$GITHUB_OUTPUT" + echo "result=no FAIL detected" >> "$GITHUB_OUTPUT" fi echo "::endgroup::" env: @@ -254,6 +253,13 @@ runs: TF_ACC_KEK_KEY_VERSION: ${{ inputs.tf_acc_kek_key_version }} TF_ACC_KEK_SERVICE_ACCOUNT: ${{ inputs.tf_acc_kek_service_account }} + - name: Set status output variable + if: always() + id: status + shell: bash + run: | + echo "status=${{ steps.testrun.outcome == 'success' && 'SUCCESS' || 'FAILURE' }}" >> "$GITHUB_OUTPUT" + - name: Upload test log artifact if: always() uses: actions/upload-artifact@v3 diff --git a/.github/actions/notify/action.yaml b/.github/actions/notify/action.yaml index d365ac1c..fe1fc703 100644 --- a/.github/actions/notify/action.yaml +++ b/.github/actions/notify/action.yaml @@ -84,7 +84,7 @@ runs: PAYLOAD=$(jq -n -r \ --arg header "${{ inputs.title }}" \ - --arg subtitle "${{ inputs.subtitle || '' }}" \ + --arg subtitle "${{ inputs.subtitle }}" \ --arg imgurl "https://cdn.simpleicons.org/${{ inputs.image_slug }}/${{ steps.status.outputs.color }}" \ --arg title "${{ inputs.event_title || 'no event title given' }}" \ --arg body "${{ inputs.event_body || 'no event body given' }}" \ diff --git a/.github/workflows/tf-acc-test.yaml b/.github/workflows/tf-acc-test.yaml index dcade21b..d7175145 100644 --- a/.github/workflows/tf-acc-test.yaml +++ b/.github/workflows/tf-acc-test.yaml @@ -93,7 +93,7 @@ jobs: subtitle: "${{ forgejo.event_name == 'workflow_dispatch' && steps.manual_run.outputs.status || steps.automatic_run.outputs.status }}" event_title: ${{ forgejo.event_name }} event_author: ${{ forgejo.actor }} - event_body: "${{ steps.automatic_run.outputs.result || steps.manual_run.outputs.result }}" + event_body: "${{ forgejo.event_name == 'workflow_dispatch' && steps.manual_run.outputs.result || steps.automatic_run.outputs.result }}" event_number: ${{ forgejo.event.id }} event_url: "https://tf-provider.git.onstackit.cloud/stackit-dev-tools/terraform-provider-stackitprivatepreview/actions/runs/${{ forgejo.run_number }}" status: "${{ forgejo.event_name == 'workflow_dispatch' && steps.manual_run.outputs.status || steps.automatic_run.outputs.status }}" -- 2.49.1 From 5828ce3a770824cf02f3d43a6115bf5823e00a9d Mon Sep 17 00:00:00 2001 From: "Marcel S. Henselin" Date: Fri, 27 Mar 2026 11:33:58 +0100 Subject: [PATCH 17/28] chore: modify test action [skip ci] --- .github/workflows/clean_up.yaml | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/.github/workflows/clean_up.yaml b/.github/workflows/clean_up.yaml index 1c6cabfb..d3389ce0 100644 --- a/.github/workflows/clean_up.yaml +++ b/.github/workflows/clean_up.yaml @@ -47,6 +47,7 @@ jobs: event_url: "https://tf-provider.git.onstackit.cloud/stackit-dev-tools/terraform-provider-stackitprivatepreview/actions/runs/${{ forgejo.run_number }}" - name: Clean + id: clean uses: ./.github/actions/clean_up with: project_id: ${{ vars.TF_ACC_PROJECT_ID }} @@ -55,3 +56,17 @@ jobs: service_account_json_content_b64: "${{ secrets.TF_ACC_SERVICE_ACCOUNT_JSON_B64 }}" list_only: ${{ inputs.list_only }} log_level: ${{ inputs.log_level }} + + - name: Notify + if: always() + uses: ./.github/actions/notify + with: + webhook_url: ${{ secrets.GOOGLE_WEBHOOK_URL }} + title: "[END] CLEAN UP pipeline" + subtitle: "${{ forgejo.repository }}" + event_title: ${{ forgejo.event_name }} + event_author: ${{ forgejo.actor }} + event_body: "try to remove all resources with prefix ${{ inputs.res_prefix }}" + event_number: ${{ forgejo.run_number }} + event_url: "https://tf-provider.git.onstackit.cloud/stackit-dev-tools/terraform-provider-stackitprivatepreview/actions/runs/${{ forgejo.run_number }}" + status: ${{ steps.clean.outcome == 'success' && 'SUCCESS' || 'FAILURE' }} -- 2.49.1 From a92d0febcd327d4d4fabe16fcb53b0cd20944594 Mon Sep 17 00:00:00 2001 From: "Marcel S. Henselin" Date: Fri, 27 Mar 2026 11:46:19 +0100 Subject: [PATCH 18/28] chore: modify test action [skip ci] --- .github/actions/clean_up/action.yaml | 42 ++++++++++++++++++++++++++-- .github/workflows/clean_up.yaml | 2 +- 2 files changed, 40 insertions(+), 4 deletions(-) diff --git a/.github/actions/clean_up/action.yaml b/.github/actions/clean_up/action.yaml index 1cea3615..6beb772d 100644 --- a/.github/actions/clean_up/action.yaml +++ b/.github/actions/clean_up/action.yaml @@ -41,6 +41,14 @@ outputs: description: "stackit cli version" value: ${{ steps.stackit_version.outputs.version }} + pre_count: + description: "number of resources found" + value: ${{ steps.retrieve_pre.outputs.count }} + + post_count: + description: "number of resources found" + value: ${{ steps.retrieve_post.outputs.count }} + runs: using: "composite" steps: @@ -115,7 +123,8 @@ runs: exit 1 fi - - name: Retrieve resources + - name: Retrieve resources before + id: retrieve_pre run: | echo "::group::retrieve resources" set -e @@ -125,11 +134,15 @@ runs: stackit auth activate-service-account --service-account-key-path .svc_acc.json echo "SQL Server Flex resources:" - stackit --verbosity ${{ inputs.log_level }} --project-id "${{ inputs.project_id }}" beta sqlserverflex instance list --output-format json | jq -r '.[] | select(.name | startswith("${{ inputs.tf_resource_prefix }}"))' + sql_res=$(stackit --verbosity ${{ inputs.log_level }} --project-id "${{ inputs.project_id }}" beta sqlserverflex instance list --output-format json | jq -r '.[] | select(.name | startswith("${{ inputs.tf_resource_prefix }}"))') + sql_count=$(echo "$sql_res" | jq -r '.id' | wc -l) echo "PostgreSQL Flex resources:" - stackit --verbosity ${{ inputs.log_level }} --project-id "${{ inputs.project_id }}" postgresflex instance list --output-format json | jq -r '.[] | select(.name | startswith("${{ inputs.tf_resource_prefix }}"))' + pg_res=$(stackit --verbosity ${{ inputs.log_level }} --project-id "${{ inputs.project_id }}" postgresflex instance list --output-format json | jq -r '.[] | select(.name | startswith("${{ inputs.tf_resource_prefix }}"))') + pg_count=$(echo "$pg_res" | jq -r '.id' | wc -l) + echo "Number of resources found: ${sql_count} SQL Server Flex, ${pg_count} PostgreSQL Flex" + echo "count=$(( ${pg_count} + ${sql_count} ))" >> $GITHUB_OUTPUT echo "::endgroup::" shell: bash @@ -166,3 +179,26 @@ runs: set -e echo "Skip deleting: list only mode" shell: bash + + - name: Retrieve resources after + id: retrieve_post + run: | + echo "::group::retrieve resources" + set -e + echo "authenticating api" + STACKIT_SERVICE_ACCOUNT_KEY_PATH="${PWD}/.svc_acc.json" + export STACKIT_SERVICE_ACCOUNT_KEY_PATH + stackit auth activate-service-account --service-account-key-path .svc_acc.json + + echo "SQL Server Flex resources:" + sql_res=$(stackit --verbosity ${{ inputs.log_level }} --project-id "${{ inputs.project_id }}" beta sqlserverflex instance list --output-format json | jq -r '.[] | select(.name | startswith("${{ inputs.tf_resource_prefix }}"))') + sql_count=$(echo "$sql_res" | jq -r '.id' | wc -l) + + echo "PostgreSQL Flex resources:" + pg_res=$(stackit --verbosity ${{ inputs.log_level }} --project-id "${{ inputs.project_id }}" postgresflex instance list --output-format json | jq -r '.[] | select(.name | startswith("${{ inputs.tf_resource_prefix }}"))') + pg_count=$(echo "$pg_res" | jq -r '.id' | wc -l) + + echo "Number of resources found: ${sql_count} SQL Server Flex, ${pg_count} PostgreSQL Flex" + echo "count=$(( ${pg_count} + ${sql_count} ))" >> $GITHUB_OUTPUT + echo "::endgroup::" + shell: bash diff --git a/.github/workflows/clean_up.yaml b/.github/workflows/clean_up.yaml index d3389ce0..c57d0c1f 100644 --- a/.github/workflows/clean_up.yaml +++ b/.github/workflows/clean_up.yaml @@ -66,7 +66,7 @@ jobs: subtitle: "${{ forgejo.repository }}" event_title: ${{ forgejo.event_name }} event_author: ${{ forgejo.actor }} - event_body: "try to remove all resources with prefix ${{ inputs.res_prefix }}" + event_body: "count before cleaning: ${{ steps.clean.outputs.pre_count }}
count after cleaning: ${{ steps.clean.outputs.post_count }}" event_number: ${{ forgejo.run_number }} event_url: "https://tf-provider.git.onstackit.cloud/stackit-dev-tools/terraform-provider-stackitprivatepreview/actions/runs/${{ forgejo.run_number }}" status: ${{ steps.clean.outcome == 'success' && 'SUCCESS' || 'FAILURE' }} -- 2.49.1 From d1c6464f59dd5c1387dc56fe6994f9e17d34bba1 Mon Sep 17 00:00:00 2001 From: "Marcel S. Henselin" Date: Fri, 27 Mar 2026 11:48:26 +0100 Subject: [PATCH 19/28] chore: modify test action [skip ci] --- .github/workflows/clean_up.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/clean_up.yaml b/.github/workflows/clean_up.yaml index c57d0c1f..d9e61d2c 100644 --- a/.github/workflows/clean_up.yaml +++ b/.github/workflows/clean_up.yaml @@ -42,7 +42,7 @@ jobs: subtitle: "${{ forgejo.repository }}" event_title: ${{ forgejo.event_name }} event_author: ${{ forgejo.actor }} - event_body: "try to remove all resources with prefix ${{ inputs.res_prefix }}" + event_body: "try to remove all resources with prefix ${{ inputs.res_prefix }}" event_number: ${{ forgejo.run_number }} event_url: "https://tf-provider.git.onstackit.cloud/stackit-dev-tools/terraform-provider-stackitprivatepreview/actions/runs/${{ forgejo.run_number }}" -- 2.49.1 From 985857bfc8c54ff65b42480d727b843646c7c1c3 Mon Sep 17 00:00:00 2001 From: "Marcel S. Henselin" Date: Fri, 27 Mar 2026 11:50:50 +0100 Subject: [PATCH 20/28] chore: modify test action [skip ci] --- .github/actions/acc_test/action.yaml | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/.github/actions/acc_test/action.yaml b/.github/actions/acc_test/action.yaml index 9a80b0ed..46565e96 100644 --- a/.github/actions/acc_test/action.yaml +++ b/.github/actions/acc_test/action.yaml @@ -67,11 +67,11 @@ inputs: outputs: result: - value: ${{ steps.testrun.result }} + value: "${{ steps.testrun.result }}" description: "the output of the tests" status: - value: ${{ steps.status.status }} + value: "${{ steps.status.status }}" description: "the status of the tests" runs: @@ -217,6 +217,8 @@ runs: fi testfile="${{ inputs.test_file }}" + + echo "result=no result before run" >> "$GITHUB_OUTPUT" echo "Running acceptance tests for the terraform provider" set +e -- 2.49.1 From 21800a5a1c2795bc5d1499323d89ec574d8c4642 Mon Sep 17 00:00:00 2001 From: "Marcel S. Henselin" Date: Fri, 27 Mar 2026 11:52:30 +0100 Subject: [PATCH 21/28] chore: modify test action [skip ci] --- .github/actions/notify/action.yaml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/actions/notify/action.yaml b/.github/actions/notify/action.yaml index fe1fc703..2e72732e 100644 --- a/.github/actions/notify/action.yaml +++ b/.github/actions/notify/action.yaml @@ -61,11 +61,11 @@ runs: case "${{ inputs.status }}" in SUCCESS) STATUS_COLOR="006400/228b22" - ADD='{"decoratedText": {"startIcon": {"materialIcon": {"name": "check_circle"}},"text": "\($status)"}},' + ADD='{"decoratedText": {"startIcon": {"materialIcon": {"name": "check_circle"}},"text": "SUCCESS"}},' ;; FAILURE) STATUS_COLOR="8b0000/dc143c" - ADD='{"decoratedText": {"startIcon": {"materialIcon": {"name": "stop_circle"}},"text": "\($status)"}},' + ADD='{"decoratedText": {"startIcon": {"materialIcon": {"name": "stop_circle"}},"text": "FAILURE"}},' ;; *) STATUS_COLOR="483d8b/6495ed" -- 2.49.1 From 4f3771e3c8a99023576df6256b8028f69c131684 Mon Sep 17 00:00:00 2001 From: "Marcel S. Henselin" Date: Fri, 27 Mar 2026 11:54:52 +0100 Subject: [PATCH 22/28] chore: modify test action [skip ci] --- .github/actions/clean_up/action.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/actions/clean_up/action.yaml b/.github/actions/clean_up/action.yaml index 6beb772d..ba407ba4 100644 --- a/.github/actions/clean_up/action.yaml +++ b/.github/actions/clean_up/action.yaml @@ -169,7 +169,7 @@ runs: echo "::group::delete PostgreSQL Flex resources" set -e stackit auth activate-service-account --service-account-key-path .svc_acc.json - for s in $(stackit --verbosity ${{ inputs.log_level }} --project-id ${{ inputs.project_id }} postgresflex instance list --output-format json | jq -r '.[] | select(.name | startswith("${{ inputs.tf_resource_prefix }}")) | .id'); do stackit --verbosity ${{ inputs.log_level }} -y --project-id ${{ inputs.project_id }} postgresflex instance delete $s; done + for s in $(stackit --verbosity ${{ inputs.log_level }} --project-id ${{ inputs.project_id }} postgresflex instance list --output-format json | jq -r '.[] | select(.name | startswith("${{ inputs.tf_resource_prefix }}")) | .id'); do stackit --verbosity ${{ inputs.log_level }} -y --project-id ${{ inputs.project_id }} postgresflex instance delete $s --force; done echo "::endgroup::" shell: bash -- 2.49.1 From 0513fa4e4c9c182f20478bfa32a2b29ceb7db119 Mon Sep 17 00:00:00 2001 From: "Marcel S. Henselin" Date: Fri, 27 Mar 2026 11:57:29 +0100 Subject: [PATCH 23/28] chore: modify test action [skip ci] --- .github/actions/clean_up/action.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/actions/clean_up/action.yaml b/.github/actions/clean_up/action.yaml index ba407ba4..72ee1dad 100644 --- a/.github/actions/clean_up/action.yaml +++ b/.github/actions/clean_up/action.yaml @@ -169,7 +169,7 @@ runs: echo "::group::delete PostgreSQL Flex resources" set -e stackit auth activate-service-account --service-account-key-path .svc_acc.json - for s in $(stackit --verbosity ${{ inputs.log_level }} --project-id ${{ inputs.project_id }} postgresflex instance list --output-format json | jq -r '.[] | select(.name | startswith("${{ inputs.tf_resource_prefix }}")) | .id'); do stackit --verbosity ${{ inputs.log_level }} -y --project-id ${{ inputs.project_id }} postgresflex instance delete $s --force; done + for s in $(stackit --verbosity ${{ inputs.log_level }} --project-id ${{ inputs.project_id }} postgresflex instance list --output-format json | jq -r '.[] | select(.name | startswith("${{ inputs.tf_resource_prefix }}")) | .id'); do stackit --verbosity ${{ inputs.log_level }} -y --project-id ${{ inputs.project_id }} postgresflex instance delete "$s" --force; done echo "::endgroup::" shell: bash -- 2.49.1 From 9536b519456b0f164f3ec619fdbc58092523a5d1 Mon Sep 17 00:00:00 2001 From: "Marcel S. Henselin" Date: Fri, 27 Mar 2026 12:10:13 +0100 Subject: [PATCH 24/28] chore: modify test action [skip ci] --- .github/workflows/tf-acc-test.yaml | 18 ++++++++++++++---- 1 file changed, 14 insertions(+), 4 deletions(-) diff --git a/.github/workflows/tf-acc-test.yaml b/.github/workflows/tf-acc-test.yaml index d7175145..1debe335 100644 --- a/.github/workflows/tf-acc-test.yaml +++ b/.github/workflows/tf-acc-test.yaml @@ -40,13 +40,18 @@ jobs: - name: Checkout uses: actions/checkout@v6 + - name: set start time + id: start_time + run: | + echo "time=$(date --rfc-3339=ns)" >> ${GITHUB_ENV} + - name: Notify uses: ./.github/actions/notify with: webhook_url: ${{ secrets.GOOGLE_WEBHOOK_URL }} title: "[START] Terraform Acceptance Tests" - subtitle: "${{ forgejo.repository }}" - event_title: ${{ forgejo.event_name }} + subtitle: "${{ forgejo.event_name }} on branch ${{ forgejo.ref }}" + event_title: "started: ${{ steps.start_time.outputs.time }}" event_author: ${{ forgejo.actor }} event_body: ${{ inputs.test_file }} event_number: ${{ forgejo.run_number }} @@ -85,13 +90,18 @@ jobs: tf_acc_kek_key_version: ${{ vars.TF_ACC_KEK_KEY_VERSION }} tf_acc_kek_service_account: ${{ vars.TF_ACC_KEK_SERVICE_ACCOUNT }} + - name: set end time + id: end_time + run: | + echo "time=$(date --rfc-3339=ns)" >> ${GITHUB_ENV} + - name: Notify uses: ./.github/actions/notify with: webhook_url: ${{ secrets.GOOGLE_WEBHOOK_URL }} title: "[END] Terraform Acceptance Tests" - subtitle: "${{ forgejo.event_name == 'workflow_dispatch' && steps.manual_run.outputs.status || steps.automatic_run.outputs.status }}" - event_title: ${{ forgejo.event_name }} + subtitle: "${{ forgejo.event_name }} on branch ${{ forgejo.ref }} with status: ${{ forgejo.event_name == 'workflow_dispatch' && steps.manual_run.outputs.status || steps.automatic_run.outputs.status }}" + event_title: "run ended: ${{ steps.end_time.outputs.time }}" event_author: ${{ forgejo.actor }} event_body: "${{ forgejo.event_name == 'workflow_dispatch' && steps.manual_run.outputs.result || steps.automatic_run.outputs.result }}" event_number: ${{ forgejo.event.id }} -- 2.49.1 From 722d56248f838c3d2a333662cc89a47a68af2a59 Mon Sep 17 00:00:00 2001 From: "Marcel S. Henselin" Date: Fri, 27 Mar 2026 12:16:28 +0100 Subject: [PATCH 25/28] chore: modify test action [skip ci] --- .github/workflows/tf-acc-test.yaml | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/.github/workflows/tf-acc-test.yaml b/.github/workflows/tf-acc-test.yaml index 1debe335..5f699efe 100644 --- a/.github/workflows/tf-acc-test.yaml +++ b/.github/workflows/tf-acc-test.yaml @@ -44,6 +44,7 @@ jobs: id: start_time run: | echo "time=$(date --rfc-3339=ns)" >> ${GITHUB_ENV} + echo "start=$(date +%s%N)" >> ${GITHUB_ENV} - name: Notify uses: ./.github/actions/notify @@ -94,6 +95,12 @@ jobs: id: end_time run: | echo "time=$(date --rfc-3339=ns)" >> ${GITHUB_ENV} + end=$(date +%s%N) + echo "end=${end}" >> ${GITHUB_ENV} + start=${{ steps.start_time.outputs.start }} + diff=$((end-start)) + duration=sprintf "%s.%s" "${diff:0: -9}" "${diff: -9:3}" + echo "duration=${duration}" >> ${GITHUB_ENV} - name: Notify uses: ./.github/actions/notify @@ -101,7 +108,7 @@ jobs: webhook_url: ${{ secrets.GOOGLE_WEBHOOK_URL }} title: "[END] Terraform Acceptance Tests" subtitle: "${{ forgejo.event_name }} on branch ${{ forgejo.ref }} with status: ${{ forgejo.event_name == 'workflow_dispatch' && steps.manual_run.outputs.status || steps.automatic_run.outputs.status }}" - event_title: "run ended: ${{ steps.end_time.outputs.time }}" + event_title: "run ended: ${{ steps.end_time.outputs.time }}, duration: ${{ steps.end_time.outputs.duration }} seconds" event_author: ${{ forgejo.actor }} event_body: "${{ forgejo.event_name == 'workflow_dispatch' && steps.manual_run.outputs.result || steps.automatic_run.outputs.result }}" event_number: ${{ forgejo.event.id }} -- 2.49.1 From 6dda34d87f72569264636b93aab59837af65fcd8 Mon Sep 17 00:00:00 2001 From: "Marcel S. Henselin" Date: Fri, 27 Mar 2026 13:46:35 +0100 Subject: [PATCH 26/28] chore: modify test action [skip ci] --- .github/workflows/tf-acc-test.yaml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/tf-acc-test.yaml b/.github/workflows/tf-acc-test.yaml index 5f699efe..1d11070e 100644 --- a/.github/workflows/tf-acc-test.yaml +++ b/.github/workflows/tf-acc-test.yaml @@ -97,9 +97,9 @@ jobs: echo "time=$(date --rfc-3339=ns)" >> ${GITHUB_ENV} end=$(date +%s%N) echo "end=${end}" >> ${GITHUB_ENV} - start=${{ steps.start_time.outputs.start }} + start="${{ steps.start_time.outputs.start }}" diff=$((end-start)) - duration=sprintf "%s.%s" "${diff:0: -9}" "${diff: -9:3}" + duration=$(printf "%s.%s" "${diff:0: -9}" "${diff: -9:3}") echo "duration=${duration}" >> ${GITHUB_ENV} - name: Notify -- 2.49.1 From 888452ed45d79ac381d347a7f92c7e9e6a396150 Mon Sep 17 00:00:00 2001 From: "Marcel S. Henselin" Date: Fri, 27 Mar 2026 14:03:14 +0100 Subject: [PATCH 27/28] chore: modify test action [skip ci] --- .github/workflows/tf-acc-test.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/tf-acc-test.yaml b/.github/workflows/tf-acc-test.yaml index 1d11070e..c0614d58 100644 --- a/.github/workflows/tf-acc-test.yaml +++ b/.github/workflows/tf-acc-test.yaml @@ -97,7 +97,7 @@ jobs: echo "time=$(date --rfc-3339=ns)" >> ${GITHUB_ENV} end=$(date +%s%N) echo "end=${end}" >> ${GITHUB_ENV} - start="${{ steps.start_time.outputs.start }}" + start=${{ steps.start_time.outputs.start }} diff=$((end-start)) duration=$(printf "%s.%s" "${diff:0: -9}" "${diff: -9:3}") echo "duration=${duration}" >> ${GITHUB_ENV} -- 2.49.1 From f18c5484864498ec59b2485a03b455edc1af73c6 Mon Sep 17 00:00:00 2001 From: "Marcel S. Henselin" Date: Fri, 27 Mar 2026 16:21:06 +0100 Subject: [PATCH 28/28] chore: modify test action [skip ci] --- .github/workflows/tf-acc-test.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/tf-acc-test.yaml b/.github/workflows/tf-acc-test.yaml index c0614d58..504324ba 100644 --- a/.github/workflows/tf-acc-test.yaml +++ b/.github/workflows/tf-acc-test.yaml @@ -29,7 +29,7 @@ on: - tf-provider.git.onstackit.cloud/stackit-dev-tools/terraform-provider-stackitprivatepreview/stackit/internal/services/postgresflexalpha - tf-provider.git.onstackit.cloud/stackit-dev-tools/terraform-provider-stackitprivatepreview/stackit/internal/wait/sqlserverflexbeta - tf-provider.git.onstackit.cloud/stackit-dev-tools/terraform-provider-stackitprivatepreview/stackit/internal/services/sqlserverflexbeta - default: 'tf-provider.git.onstackit.cloud/stackit-dev-tools/terraform-provider-stackitprivatepreview/stackit/internal/wait/postgresflexalpha' + default: '' required: true jobs: -- 2.49.1