Skip to content

force notification #2012

force notification

force notification #2012

Workflow file for this run

on:
push:
branches:
- smoke-test-failures-notify
workflow_dispatch:
name: deploy
jobs:
smoke-tests-github:
uses: ./.github/workflows/acceptance-test-always-fails.yaml
with:
os-name: linux
timeout-minutes: 60
label-filter: "--label-filter='smoke&&capd'"
kubectl-version: "v1.21.1"
login_user_type: "oidc"
git-provider: github
git-provider_hostname: github.com
cluster_resource_set: true
management-cluster-kind: kind
capi_provider: capd
gitops-bin-path: /usr/local/bin/gitops
test-artifact-name: smoke-tests-github
secrets:
WGE_CLUSTER_ADMIN_PASSWORD: "${{ secrets.WGE_CLUSTER_ADMIN_PASSWORD }}"
WGE_CLUSTER_ADMIN_PASSWORD_HASH: "${{ secrets.WGE_CLUSTER_ADMIN_PASSWORD_HASH }}"
WGE_DEX_CLIENT_SECRET: ${{ secrets.WGE_DEX_CLIENT_SECRET }}
WGE_GIT_PROVIDER_PRIVATE_KEY: ${{ secrets.WGE_GITHUB_PRIVATE_KEY }}
WGE_GITHUB_TOKEN: ${{ secrets.WGE_GITHUB_TOKEN }}
WGE_GITHUB_ORG: ${{ secrets.WGE_GITHUB_ORG }}
WGE_GITHUB_USER: ${{ secrets.WGE_GITHUB_USER }}
WGE_GITHUB_PASSWORD: ${{ secrets.WGE_GITHUB_PASSWORD }}
WGE_GITHUB_MFA_KEY: ${{ secrets.WGE_GITHUB_MFA_KEY }}
smoke-test-results:
if: ${{ always() }}
needs:
[smoke-tests-github]
uses: ./.github/workflows/publish-test-results.yaml
with:
runs-on: ubuntu-latest
junit-results-glob-pattern: "*smoke-tests*.xml"
slack-notification: true
secrets:
SLACK_BOT_TOKEN: ${{ secrets.SLACK_BOT_TOKEN }}
notify-failure:
name: Notify Slack on Failure
runs-on: ubuntu-latest
needs: [smoke-tests-github]
if: ${{ failure() && github.ref == 'refs/heads/main' }}
steps:
- name: Send alert
uses: archive/github-actions-slack@d9dae40827adf93bddf939db6552d1e392259d7d # v2.7.0
with:
slack-bot-user-oauth-access-token: ${{ secrets.WEAVEWORKS_SLACK_GENERICBOT_TOKEN }}
slack-channel: C01M1BJQ7AT # weave-gitops-dev
slack-text: |
:sad-parrot: The <https://github.com/weaveworks/weave-gitops-enterprise/commit/${{ github.sha }}|latest commit> from ${{ github.actor }} is failing on main. <https://github.com/${{ github.repository }}/actions/runs/${{ github.run_id }}|Click here> and weep. Then fix the underlying issue and ensure main remains green.
slack-optional-icon_url: "https://avatars.githubusercontent.com/u/9976052"