Skip to content

Fix plugin assert in migration job #4

Fix plugin assert in migration job

Fix plugin assert in migration job #4

name: CLI Migration E2E tests
concurrency:
group: cli-migration-e2e
cancel-in-progress: false
on:
push:
branches:
- 'main' # TODO: Ensure it runs after branch build
- 'cloud-slack-dev-e2e' # TODO: Remove before merge
repository_dispatch:
types: [ trigger-e2e-tests ]
env:
HELM_VERSION: v3.9.0
K3D_VERSION: v5.4.6
IMAGE_REGISTRY: "ghcr.io"
IMAGE_REPOSITORY: "kubeshop/botkube"
IMAGE_TAG: v9.99.9-dev # TODO: Use commit hash tag to make the predictable builds for each commit on branch
jobs:
migration-e2e-test:
name: Migration e2e test
runs-on: ubuntu-latest
permissions:
contents: read
packages: read
strategy:
fail-fast: false
matrix:
e2e:
- discord
steps:
- name: Checkout code
uses: actions/checkout@v3
with:
persist-credentials: false
- name: Install GoReleaser
uses: goreleaser/goreleaser-action@v2
with:
install-only: true
version: latest
- name: Setup Go
uses: actions/setup-go@v3
with:
go-version-file: 'go.mod'
cache: true
- name: Run GoReleaser
run: make release-snapshot-cli
- name: Add botkube alias
run: |
echo BOTKUBE_BINARY_PATH="$PWD/dist/botkube-cli_linux_amd64_v1/botkube" >> $GITHUB_ENV
- name: Install Helm
uses: azure/setup-helm@v1
with:
version: ${{ env.HELM_VERSION }}
- name: Download k3d
run: "wget -q -O - https://raw.githubusercontent.com/k3d-io/k3d/main/install.sh | TAG=${K3D_VERSION} bash"
- name: Create k3d cluster
run: "k3d cluster create migration-test-cluster --wait --timeout=5m"
- name: Run e2e tests for botkube client
env:
DISCORD_BOT_ID: ${{ secrets.DISCORD_BOT_ID }}
DISCORD_BOT_TOKEN: ${{ secrets.DISCORD_BOT_TOKEN }}
DISCORD_GUILD_ID: ${{ secrets.DISCORD_GUILD_ID }}
DISCORD_TESTER_APP_TOKEN: ${{ secrets.DISCORD_TESTER_APP_TOKEN }}
BOTKUBE_CLOUD_DEV_GQL_ENDPOINT: ${{ secrets.BOTKUBE_CLOUD_DEV_GQL_ENDPOINT }}
BOTKUBE_CLOUD_DEV_REFRESH_TOKEN: ${{ secrets.BOTKUBE_CLOUD_DEV_REFRESH_TOKEN }}
BOTKUBE_CLOUD_DEV_AUTH0_CLIENT_ID: ${{ secrets.BOTKUBE_CLOUD_DEV_AUTH0_CLIENT_ID }}
run: |
KUBECONFIG=$(k3d kubeconfig write migration-test-cluster) \
make test-migration-tool
- name: Upload artifacts
uses: actions/upload-artifact@v3
if: ${{ always() }}
with:
name: screenshots_dump_${{github.sha}}
path: ${{ runner.temp }}/screenshots
retention-days: 5
- name: Dump cluster state
if: ${{ failure() }}
uses: ./.github/actions/dump-cluster
# TODO: Uncomment
# slackNotification:
# name: Slack Notification
# runs-on: ubuntu-latest
# needs: [ e2e ]
# if: failure()
# steps:
# - name: Slack Notification
# uses: rtCamp/action-slack-notify@v2
# 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 }}