Skip to content

Commit

Permalink
Test the pipelines
Browse files Browse the repository at this point in the history
  • Loading branch information
pkosiec committed Mar 7, 2024
1 parent 3133e29 commit 58fcbd5
Show file tree
Hide file tree
Showing 2 changed files with 80 additions and 79 deletions.
24 changes: 12 additions & 12 deletions .github/actions/cloud-slack-e2e/action.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -123,15 +123,15 @@ runs:
echo "footer=${FOOTER}" >> $GITHUB_OUTPUT
- name: Slack Notification
uses: rtCamp/action-slack-notify@v2
if: ${{ failure() }}
env:
SLACK_CHANNEL: 'botkube-cloud-ci-alerts'
SLACK_USERNAME: Botkube Cloud CI
SLACK_COLOR: 'red'
SLACK_TITLE: 'Message'
SLACK_MESSAGE: "Cloud Slack ${{ inputs.e2e_type }} E2E tests failed :scream:"
SLACK_ICON_EMOJI: ':this-is-fine-fire:'
SLACK_FOOTER: ${{ steps.footer.outputs.footer }}
SLACK_WEBHOOK: ${{ inputs.slack_alerts_webhook }}
# - name: Slack Notification
# uses: rtCamp/action-slack-notify@v2
# if: ${{ failure() }}
# env:
# SLACK_CHANNEL: 'botkube-cloud-ci-alerts'
# SLACK_USERNAME: Botkube Cloud CI
# SLACK_COLOR: 'red'
# SLACK_TITLE: 'Message'
# SLACK_MESSAGE: "Cloud Slack ${{ inputs.e2e_type }} E2E tests failed :scream:"
# SLACK_ICON_EMOJI: ':this-is-fine-fire:'
# SLACK_FOOTER: ${{ steps.footer.outputs.footer }}
# SLACK_WEBHOOK: ${{ inputs.slack_alerts_webhook }}
135 changes: 68 additions & 67 deletions .github/workflows/branch-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ on:
push:
branches:
- main
- fix-e2e-tests
repository_dispatch:
types: [ trigger-e2e-tests ]

Expand All @@ -30,52 +31,52 @@ jobs:
id: extract-version
run: |
IMAGE_VERSION=$(git rev-parse --short HEAD)
echo "versions={\"image-version\":[\"v9.99.9-dev\",\"0.0.0-${IMAGE_VERSION}\"]}" >> $GITHUB_OUTPUT
build:
if: github.event_name != 'repository_dispatch' # skip if triggered by repository_dispatch
needs: [extract-metadata]
strategy:
matrix: ${{ fromJson(needs.extract-metadata.outputs.versions) }}
runs-on: ubuntu-latest
env:
GO111MODULE: on
GOPATH: /home/runner/work/botkube
GOBIN: /home/runner/work/botkube/bin
DOCKER_CLI_EXPERIMENTAL: "enabled"
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Setup Go
uses: actions/setup-go@v5
with:
go-version-file: 'go.mod'
cache: true
- name: Set up QEMU
uses: docker/setup-qemu-action@v3
- name: Docker Login
uses: docker/login-action@v1
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Install GoReleaser
uses: goreleaser/goreleaser-action@v5
with:
install-only: true
version: latest
- name: Run GoReleaser
run: |
make release-snapshot
env:
ANALYTICS_API_KEY: ${{ secrets.ANALYTICS_API_KEY }}
GORELEASER_CURRENT_TAG: ${{ matrix.image-version }}
IMAGE_TAG: ${{ matrix.image-version }}
echo "versions={\"image-version\":[\"v9.99.9-dev\",\"0.0.0-ced876da\"]}" >> $GITHUB_OUTPUT
# build:
# if: github.event_name != 'repository_dispatch' # skip if triggered by repository_dispatch
# needs: [extract-metadata]
# strategy:
# matrix: ${{ fromJson(needs.extract-metadata.outputs.versions) }}
# runs-on: ubuntu-latest
# env:
# GO111MODULE: on
# GOPATH: /home/runner/work/botkube
# GOBIN: /home/runner/work/botkube/bin
# DOCKER_CLI_EXPERIMENTAL: "enabled"
# steps:
# - name: Checkout
# uses: actions/checkout@v4
# - name: Setup Go
# uses: actions/setup-go@v5
# with:
# go-version-file: 'go.mod'
# cache: true
# - name: Set up QEMU
# uses: docker/setup-qemu-action@v3
# - name: Docker Login
# uses: docker/login-action@v1
# with:
# registry: ghcr.io
# username: ${{ github.actor }}
# password: ${{ secrets.GITHUB_TOKEN }}
# - name: Install GoReleaser
# uses: goreleaser/goreleaser-action@v5
# with:
# install-only: true
# version: latest
# - name: Run GoReleaser
# run: |
# make release-snapshot
# env:
# ANALYTICS_API_KEY: ${{ secrets.ANALYTICS_API_KEY }}
# GORELEASER_CURRENT_TAG: ${{ matrix.image-version }}
# IMAGE_TAG: ${{ matrix.image-version }}

integration-tests:
if: github.event_name != 'repository_dispatch' # skip if triggered by repository_dispatch
name: Integration tests
runs-on: ubuntu-latest
needs: [ build ]
needs: [ extract-metadata ]
permissions:
contents: read
packages: read
Expand Down Expand Up @@ -194,23 +195,23 @@ jobs:
KUBECONFIG=$(k3d kubeconfig write ${{ matrix.integration }}-test-cluster) \
make test-integration-${{ matrix.integration }}
- name: Slack Notification
uses: rtCamp/action-slack-notify@v2
if: ${{ failure() }}
env:
SLACK_USERNAME: Botkube Cloud CI
SLACK_COLOR: 'red'
SLACK_TITLE: 'Message'
SLACK_CHANNEL: 'botkube-cloud-ci-alerts'
SLACK_MESSAGE: 'Integration ${{ matrix.integration }} test failed :scream:'
SLACK_ICON_EMOJI: ':this-is-fine-fire:'
SLACK_WEBHOOK: ${{ secrets.SLACK_CI_ALERTS_WEBHOOK }}
SLACK_FOOTER: "Fingers crossed it's just an outdated/flaky test..."
# - name: Slack Notification
# uses: rtCamp/action-slack-notify@v2
# if: ${{ failure() }}
# env:
# SLACK_USERNAME: Botkube Cloud CI
# SLACK_COLOR: 'red'
# SLACK_TITLE: 'Message'
# SLACK_CHANNEL: 'botkube-cloud-ci-alerts'
# SLACK_MESSAGE: 'Integration ${{ matrix.integration }} test failed :scream:'
# SLACK_ICON_EMOJI: ':this-is-fine-fire:'
# SLACK_WEBHOOK: ${{ secrets.SLACK_CI_ALERTS_WEBHOOK }}
# SLACK_FOOTER: "Fingers crossed it's just an outdated/flaky test..."

cli-migration-e2e:
name: CLI Migration E2E tests
runs-on: ubuntu-latest
needs: [ build ]
needs: [ extract-metadata ]
permissions:
contents: read
packages: read
Expand Down Expand Up @@ -274,23 +275,23 @@ jobs:
if: ${{ failure() }}
uses: ./.github/actions/dump-cluster

- name: Slack Notification
uses: rtCamp/action-slack-notify@v2
if: ${{ failure() }}
env:
SLACK_USERNAME: Botkube Cloud CI
SLACK_COLOR: 'red'
SLACK_TITLE: 'Message'
SLACK_CHANNEL: 'botkube-cloud-ci-alerts'
SLACK_MESSAGE: 'CLI Migration E2E tests failed :scream:'
SLACK_ICON_EMOJI: ':this-is-fine-fire:'
SLACK_FOOTER: "Fingers crossed it's just an outdated/flaky test..."
SLACK_WEBHOOK: ${{ secrets.SLACK_CI_ALERTS_WEBHOOK }}
# - name: Slack Notification
# uses: rtCamp/action-slack-notify@v2
# if: ${{ failure() }}
# env:
# SLACK_USERNAME: Botkube Cloud CI
# SLACK_COLOR: 'red'
# SLACK_TITLE: 'Message'
# SLACK_CHANNEL: 'botkube-cloud-ci-alerts'
# SLACK_MESSAGE: 'CLI Migration E2E tests failed :scream:'
# SLACK_ICON_EMOJI: ':this-is-fine-fire:'
# SLACK_FOOTER: "Fingers crossed it's just an outdated/flaky test..."
# SLACK_WEBHOOK: ${{ secrets.SLACK_CI_ALERTS_WEBHOOK }}

cloud-slack-dev-e2e:
name: Botkube Cloud Slack Dev E2E
runs-on: ubuntu-latest
needs: [ build ]
needs: [ extract-metadata ]
permissions:
contents: read
packages: read
Expand Down

0 comments on commit 58fcbd5

Please sign in to comment.