From b366c95c7f95cb094050f1be6b764a52aa842652 Mon Sep 17 00:00:00 2001 From: Mateusz Szostok Date: Fri, 15 Nov 2024 12:46:57 +0100 Subject: [PATCH] Remove cloud dev e2e testing --- .github/actions/cloud-slack-e2e/action.yaml | 144 -------------------- .github/workflows/branch-build.yml | 34 ----- 2 files changed, 178 deletions(-) delete mode 100644 .github/actions/cloud-slack-e2e/action.yaml diff --git a/.github/actions/cloud-slack-e2e/action.yaml b/.github/actions/cloud-slack-e2e/action.yaml deleted file mode 100644 index 1ed03b798..000000000 --- a/.github/actions/cloud-slack-e2e/action.yaml +++ /dev/null @@ -1,144 +0,0 @@ -name: Runs e2e Cloud Slack tests -description: Runs e2e Cloud Slack tests - -inputs: - access_token: - description: GitHub personal access token used for cloning private repositories - required: true - - slack_workspace_name: - description: 'Slack Workspace Name' - required: true - slack_email: - description: 'Slack Email' - required: true - slack_password: - description: 'Slack Password' - required: true - slack_tester_bot_token: - description: 'Slack Tester Bot Token' - required: true - slack_bot_display_name: - description: 'Slack Bot Display Name' - required: true - slack_tester_bot_name: - description: 'Slack Tester Bot Name' - required: true - - botkube_cloud_api_base_url: - description: 'BotKube Cloud API Base URL' - required: true - botkube_cloud_ui_base_url: - description: 'BotKube Cloud UI Base URL' - required: true - botkube_cloud_email: - description: 'BotKube Cloud Email' - required: true - botkube_cloud_password: - description: 'BotKube Cloud Password' - required: true - botkube_cloud_team_organization_id: - description: 'BotKube Cloud Team Organization ID' - required: true - - slack_token: - description: 'Slack Alerts Webhook' - required: true - - e2e_type: - description: "Type of e2e test" - required: true - -runs: - using: "composite" - steps: - - name: Download k3d - shell: bash - run: "wget -q -O - https://raw.githubusercontent.com/k3d-io/k3d/main/install.sh | TAG=${K3D_VERSION} bash" - - - name: Create k3d cluster - id: k3d - shell: bash - run: "k3d cluster create cloud-slack-e2e-cluster --wait --timeout=5m" - - - name: Download Botkube CLI - shell: bash - run: | - curl -Lo botkube https://github.com/kubeshop/botkube/releases/download/v1.12.0/botkube-linux-amd64 - chmod +x botkube - - - name: Add Botkube CLI to env - shell: bash - run: | - echo BOTKUBE_CLI_BINARY_PATH="$PWD/botkube" >> $GITHUB_ENV - - - name: Setup Go modules - id: modules - uses: ./.github/actions/setup-go-mod-private - with: - access_token: ${{ inputs.access_token }} - username: ${{ env.GIT_USER }} - - - name: Run e2e tests - id: tests - shell: bash - env: - SLACK_WORKSPACE_NAME: ${{ inputs.slack_workspace_name }} - SLACK_EMAIL: ${{ inputs.slack_email }} - SLACK_PASSWORD: ${{ inputs.slack_password }} - SLACK_TESTER_TESTER_BOT_TOKEN: ${{ inputs.slack_tester_bot_token }} - SLACK_BOT_DISPLAY_NAME: ${{ inputs.slack_bot_display_name }} - SLACK_TESTER_BOT_NAME: ${{ inputs.slack_tester_bot_name }} - SLACK_TESTER_MESSAGE_WAIT_TIMEOUT: 180s - - BOTKUBE_CLOUD_UI_BASE_URL: ${{ inputs.botkube_cloud_ui_base_url }} - BOTKUBE_CLOUD_API_BASE_URL: ${{ inputs.botkube_cloud_api_base_url }} - BOTKUBE_CLOUD_EMAIL: ${{ inputs.botkube_cloud_email }} - BOTKUBE_CLOUD_PASSWORD: ${{ inputs.botkube_cloud_password }} - BOTKUBE_CLOUD_TEAM_ORGANIZATION_ID: ${{ inputs.botkube_cloud_team_organization_id }} - SCREENSHOTS_DIR: ${{ github.workspace }}/screenshots - DEBUG_MODE: "true" - run: | - KUBECONFIG=$(k3d kubeconfig write cloud-slack-e2e-cluster) make test-cloud-slack-dev-e2e - - name: Upload artifacts - uses: actions/upload-artifact@v4 - if: ${{ always() }} - with: - name: screenshots_dump_${{github.sha}} - path: ${{ github.workspace }}/screenshots - retention-days: 5 - - - name: Dump cluster state - if: ${{ failure() }} - uses: ./.github/actions/dump-cluster - with: - name: cloud-slack-e2e - - - name: Select the latest screenshot - if: ${{ failure() }} - shell: bash - run: | - FILE=$(find "${{ github.workspace }}/screenshots" -type f -exec ls -t1 {} + | head -1) - echo "SCREENSHOT_LOCATION=${FILE}" >> $GITHUB_ENV - - - name: Detect failed jobs - if: ${{ failure() }} - id: footer - shell: bash - run: | - FOOTER='https://github.com/kubeshop/botkube/actions/runs/${{ github.run_id }}' - 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_TOKEN: ${{ inputs.slack_token }} - SLACK_FILE_UPLOAD: ${{ env.SCREENSHOT_LOCATION }} diff --git a/.github/workflows/branch-build.yml b/.github/workflows/branch-build.yml index 476b31cef..3471d5cf4 100644 --- a/.github/workflows/branch-build.yml +++ b/.github/workflows/branch-build.yml @@ -212,37 +212,3 @@ jobs: 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..." - - cloud-slack-dev-e2e: - name: Botkube Cloud Slack Dev E2E - runs-on: ubuntu-latest - permissions: - contents: read - packages: read - concurrency: - group: cloud-slack-dev-e2e - cancel-in-progress: false - steps: - - name: Checkout - uses: actions/checkout@v4 - - name: Run e2e tests - uses: ./.github/actions/cloud-slack-e2e - with: - access_token: ${{ secrets.E2E_TEST_GH_DEV_ACCOUNT_PAT }} - - slack_workspace_name: ${{ secrets.E2E_DEV_SLACK_WORKSPACE_NAME }} - slack_email: ${{ secrets.E2E_DEV_SLACK_EMAIL }} - slack_password: ${{ secrets.E2E_DEV_SLACK_USER_PASSWORD }} - slack_bot_display_name: "BotkubeDev" - slack_tester_bot_token: ${{ secrets.E2E_DEV_SLACK_TESTER_BOT_TOKEN }} - slack_tester_bot_name: "botkubedev" - - botkube_cloud_ui_base_url: "https://app-dev.botkube.io" - botkube_cloud_api_base_url: "https://api-dev.botkube.io" - botkube_cloud_email: ${{ secrets.E2E_DEV_BOTKUBE_CLOUD_EMAIL }} - botkube_cloud_password: ${{ secrets.E2E_DEV_BOTKUBE_CLOUD_PASSWORD }} - botkube_cloud_team_organization_id: ${{ secrets.E2E_DEV_BOTKUBE_CLOUD_TEAM_ORGANIZATION_ID }} - - slack_token: ${{ secrets.SLACK_APP_TOKEN_FOR_CI_ALERTS }} - - e2e_type: "DEV"