chore: refactor pipelines #97

Merged
marcel.henselin merged 28 commits from test/pipelines into main 2026-03-27 15:23:31 +00:00
3 changed files with 11 additions and 5 deletions
Showing only changes of commit 2d4e9c723f - Show all commits

View file

@ -71,7 +71,7 @@ outputs:
description: "the output of the tests" description: "the output of the tests"
status: status:
value: ${{ steps.testrun.status }} value: ${{ steps.status.status }}
description: "the status of the tests" description: "the status of the tests"
runs: runs:
@ -239,10 +239,9 @@ runs:
echo "Test failed, see acc_test_run.log for details" 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") 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 "result=FAIL: ${res}" >> "$GITHUB_OUTPUT"
echo "status=FAILED" >> "$GITHUB_OUTPUT"
exit 1 exit 1
else else
echo "status=SUCCESS" >> "$GITHUB_OUTPUT" echo "result=no FAIL detected" >> "$GITHUB_OUTPUT"
fi fi
echo "::endgroup::" echo "::endgroup::"
env: env:
@ -254,6 +253,13 @@ runs:
TF_ACC_KEK_KEY_VERSION: ${{ inputs.tf_acc_kek_key_version }} TF_ACC_KEK_KEY_VERSION: ${{ inputs.tf_acc_kek_key_version }}
TF_ACC_KEK_SERVICE_ACCOUNT: ${{ inputs.tf_acc_kek_service_account }} 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 - name: Upload test log artifact
if: always() if: always()
uses: actions/upload-artifact@v3 uses: actions/upload-artifact@v3

View file

@ -84,7 +84,7 @@ runs:
PAYLOAD=$(jq -n -r \ PAYLOAD=$(jq -n -r \
--arg header "${{ inputs.title }}" \ --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 imgurl "https://cdn.simpleicons.org/${{ inputs.image_slug }}/${{ steps.status.outputs.color }}" \
--arg title "${{ inputs.event_title || 'no event title given' }}" \ --arg title "${{ inputs.event_title || 'no event title given' }}" \
--arg body "${{ inputs.event_body || 'no event body given' }}" \ --arg body "${{ inputs.event_body || 'no event body given' }}" \

View file

@ -93,7 +93,7 @@ jobs:
subtitle: "${{ forgejo.event_name == 'workflow_dispatch' && steps.manual_run.outputs.status || steps.automatic_run.outputs.status }}" subtitle: "${{ forgejo.event_name == 'workflow_dispatch' && steps.manual_run.outputs.status || steps.automatic_run.outputs.status }}"
event_title: ${{ forgejo.event_name }} event_title: ${{ forgejo.event_name }}
event_author: ${{ forgejo.actor }} 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_number: ${{ forgejo.event.id }}
event_url: "https://tf-provider.git.onstackit.cloud/stackit-dev-tools/terraform-provider-stackitprivatepreview/actions/runs/${{ forgejo.run_number }}" 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 }}" status: "${{ forgejo.event_name == 'workflow_dispatch' && steps.manual_run.outputs.status || steps.automatic_run.outputs.status }}"