From 13dbb8b1ccbf85c9c0dd8039c304fd79543406aa Mon Sep 17 00:00:00 2001 From: Adrian Stobbe Date: Thu, 16 Nov 2023 11:02:27 +0100 Subject: [PATCH] debug action --- .github/actions/notify_e2e_failure/action.yml | 32 +++++++++++-------- .github/workflows/e2e-test.yml | 19 ++++++++++- 2 files changed, 37 insertions(+), 14 deletions(-) diff --git a/.github/actions/notify_e2e_failure/action.yml b/.github/actions/notify_e2e_failure/action.yml index fba8b82170..89de9329f1 100644 --- a/.github/actions/notify_e2e_failure/action.yml +++ b/.github/actions/notify_e2e_failure/action.yml @@ -29,14 +29,16 @@ runs: steps: - name: Pick assignee id: pick-assignee - uses: ./.github/actions/pick_assigne + uses: ./.github/actions/pick_assignee - name: Get the current date id: date + shell: bash run: echo "::set-output name=date::$(date +'%Y-%m-%d %H:%M:%S')" - name: Create body template id: body-template + shell: bash run: | # TODO(katexochen): add job number when possible jobURL="https://github.com/${{ github.repository }}/actions/runs/${{ github.run_id }}" @@ -51,14 +53,17 @@ runs: EOF - cat header.md .github/failure_project_template.md > body.md + cat header.md .github/failure_project_template.md > .github/body.md + + - run: cat .github/body.md + shell: bash - uses: ./.github/actions/gh_create_issue id: gh_create_issue with: title: "${{ inputs.test }} - ${{ steps.date.outputs.date }}" #body: test // TODO - body-file: body.md + body-file: .github/body.md repo: issues labels: e2e failure assignee: steps.pick-assignee.outputs.assignee @@ -68,8 +73,9 @@ runs: cloudProvider: ${{ inputs.provider }} test: ${{ inputs.test }} refStream: ${{ inputs.refStream }} - token: ${{ secrets.PROJECT_WRITE_TOKEN }} + token: ${{ inputs.projectWriteToken }} - run: echo ${{ steps.gh_create_issue.outputs.issue-url }} # TODO rm + shell: bash - name: Create project card in case of failure id: create-project-card @@ -153,12 +159,12 @@ runs: echo "additionalFields=$(cat facts.json)" | tee -a "$GITHUB_OUTPUT" echo "additionalButtons=$buttons" | tee -a "$GITHUB_OUTPUT" - - name: Notify teams channel - continue-on-error: true - uses: ./.github/actions/notify_teams - with: - teamsWebhookURI: ${{ inputs.teamsWebhookUri }} - title: "Constellation E2E test failed" - assignee: ${{ steps.pick-assignee.outputs.assignee }} - additionalFields: ${{ steps.create-fields.outputs.additionalFields }} - additionalButtons: ${{ steps.create-fields.outputs.additionalButtons }} + #- name: Notify teams channel + # continue-on-error: true + # uses: ./.github/actions/notify_teams + # with: + # teamsWebhookURI: ${{ inputs.teamsWebhookUri }} + # title: "Constellation E2E test failed" + # assignee: ${{ steps.pick-assignee.outputs.assignee }} + # additionalFields: ${{ steps.create-fields.outputs.additionalFields }} + # additionalButtons: ${{ steps.create-fields.outputs.additionalButtons }} diff --git a/.github/workflows/e2e-test.yml b/.github/workflows/e2e-test.yml index bff823518f..ce52fa8029 100644 --- a/.github/workflows/e2e-test.yml +++ b/.github/workflows/e2e-test.yml @@ -165,7 +165,7 @@ jobs: uses: actions/checkout@f43a0e5ff2bd294095638e18286ca9a3d1956744 # v3.6.0 with: ref: ${{ inputs.git-ref }} - + - name: Get Latest Image id: find-latest-image uses: ./.github/actions/find_latest_image @@ -202,6 +202,23 @@ jobs: with: ref: ${{ inputs.git-ref }} + - name: Notify about failure + continue-on-error: true + uses: ./.github/actions/notify_e2e_failure + with: + projectWriteToken: ${{ secrets.PROJECT_WRITE_TOKEN }} + teamsWebhookUri: ${{ secrets.MS_TEAMS_WEBHOOK_URI }} + refStream: test + test: E2E manual + kubernetesVersion: v1.99.0 + provider: aws + selfManagedInfra: "false" + + - run: exit 1 + shell: bash + + + - name: Set up gcloud CLI (macOS) if: inputs.cloudProvider == 'gcp' && runner.os == 'macOS' uses: google-github-actions/setup-gcloud@e30db14379863a8c79331b04a9969f4c1e225e0b # v1.1.1