From f42f3c520f60b37d302afbf31cf0ee83985ea696 Mon Sep 17 00:00:00 2001 From: Mateusz Szostok Date: Wed, 7 Feb 2024 18:50:00 +0100 Subject: [PATCH] Clean-up after CI testing --- .github/actions/cloud-slack-e2e/action.yaml | 24 +- .github/workflows/branch-build.yml | 284 ++++++++++---------- test/commplatform/generic.go | 4 + test/commplatform/slack_tester.go | 17 +- test/e2e/bots_test.go | 26 -- test/helmx/helm_helpers.go | 4 - 6 files changed, 162 insertions(+), 197 deletions(-) diff --git a/.github/actions/cloud-slack-e2e/action.yaml b/.github/actions/cloud-slack-e2e/action.yaml index bf8d1516a..8528d2f45 100644 --- a/.github/actions/cloud-slack-e2e/action.yaml +++ b/.github/actions/cloud-slack-e2e/action.yaml @@ -109,15 +109,15 @@ runs: 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: "Cloud Slack ${{ inputs.e2e_type }} E2E tests failed :scream:" -# SLACK_ICON_EMOJI: ':this-is-fine-fire:' -# SLACK_FOOTER: "Fingers crossed it's just an outdated/flaky test..." -# SLACK_WEBHOOK: ${{ inputs.slack_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: "Cloud Slack ${{ inputs.e2e_type }} E2E tests failed :scream:" + SLACK_ICON_EMOJI: ':this-is-fine-fire:' + SLACK_FOOTER: "Fingers crossed it's just an outdated/flaky test..." + SLACK_WEBHOOK: ${{ inputs.slack_alerts_webhook }} diff --git a/.github/workflows/branch-build.yml b/.github/workflows/branch-build.yml index ffed8457b..05e9b10bc 100644 --- a/.github/workflows/branch-build.yml +++ b/.github/workflows/branch-build.yml @@ -3,8 +3,7 @@ name: Branch build on: push: branches: -# - main - - respond-in-thread-by-default + - main repository_dispatch: types: [ trigger-e2e-tests ] @@ -12,72 +11,71 @@ env: HELM_VERSION: v3.9.0 K3D_VERSION: v5.4.6 IMAGE_REGISTRY: "ghcr.io" - IMAGE_REPOSITORY: "kubeshop/pr/botkube" - IMAGE_TAG: 1371-PR # TODO: Use commit hash tag to make the predictable builds for each commit on branch + 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 GIT_USER: botkube-dev jobs: -# extract-metadata: -# if: github.event_name != 'repository_dispatch' # skip if triggered by repository_dispatch -# runs-on: ubuntu-latest -# outputs: -# versions: ${{ steps.extract-version.outputs.versions }} -# steps: -# - name: Checkout -# uses: actions/checkout@v4 -# with: -# fetch-depth: 0 -# - name: Extract version -# 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@v4 -# 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 }} -# + extract-metadata: + if: github.event_name != 'repository_dispatch' # skip if triggered by repository_dispatch + runs-on: ubuntu-latest + outputs: + versions: ${{ steps.extract-version.outputs.versions }} + steps: + - name: Checkout + uses: actions/checkout@v4 + with: + fetch-depth: 0 + - name: Extract version + 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@v4 + 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: [ build ] permissions: contents: read packages: read @@ -193,93 +191,93 @@ jobs: run: | KUBECONFIG=$(k3d kubeconfig write ${{ matrix.integration }}-test-cluster) \ make test-integration-${{ matrix.integration }} -# -# cli-migration-e2e: -# name: CLI Migration E2E tests -# runs-on: ubuntu-latest -# needs: [ build ] -# permissions: -# contents: read -# packages: read -# concurrency: -# group: cli-migration-e2e -# cancel-in-progress: false -# strategy: -# fail-fast: false -# steps: -# - name: Checkout code -# uses: actions/checkout@v4 -# with: -# persist-credentials: false -# - name: Install GoReleaser -# uses: goreleaser/goreleaser-action@v5 -# with: -# install-only: true -# version: latest -# - name: Setup Go -# uses: actions/setup-go@v4 -# with: -# go-version-file: 'go.mod' -# cache: true -# - name: Setup Go modules -# uses: ./.github/actions/setup-go-mod-private -# with: -# access_token: ${{ secrets.E2E_TEST_GH_DEV_ACCOUNT_PAT }} -# username: ${{ env.GIT_USER }} -# - 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@v3 -# 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 cli-migration-e2e-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 cli-migration-e2e-cluster) make test-cli-migration-e2e -# -# - 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 -# -# - 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 }} + + cli-migration-e2e: + name: CLI Migration E2E tests + runs-on: ubuntu-latest + needs: [ build ] + permissions: + contents: read + packages: read + concurrency: + group: cli-migration-e2e + cancel-in-progress: false + strategy: + fail-fast: false + steps: + - name: Checkout code + uses: actions/checkout@v4 + with: + persist-credentials: false + - name: Install GoReleaser + uses: goreleaser/goreleaser-action@v5 + with: + install-only: true + version: latest + - name: Setup Go + uses: actions/setup-go@v4 + with: + go-version-file: 'go.mod' + cache: true + - name: Setup Go modules + uses: ./.github/actions/setup-go-mod-private + with: + access_token: ${{ secrets.E2E_TEST_GH_DEV_ACCOUNT_PAT }} + username: ${{ env.GIT_USER }} + - 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@v3 + 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 cli-migration-e2e-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 cli-migration-e2e-cluster) make test-cli-migration-e2e + + - 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 + + - 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: [ build ] permissions: contents: read packages: read diff --git a/test/commplatform/generic.go b/test/commplatform/generic.go index 4653a9720..0f2f96721 100644 --- a/test/commplatform/generic.go +++ b/test/commplatform/generic.go @@ -51,6 +51,10 @@ type BotDriver interface { Timeout() time.Duration ReplaceBotNamePlaceholder(msg *interactive.CoreMessage, clusterName string) AssertEquals(expectedMessage string) MessageAssertion + // OnChannel sets the expectation that the message should be posted in the channel. This is necessary when Bots + // by default expect a given message to be posted in the thread of the recently sent message. + // For example, in the context of source notification, we need to alter that default behavior + // and expect the message on the channel instead. OnChannel() BotDriver } diff --git a/test/commplatform/slack_tester.go b/test/commplatform/slack_tester.go index 156640df8..61cc9d346 100644 --- a/test/commplatform/slack_tester.go +++ b/test/commplatform/slack_tester.go @@ -232,12 +232,6 @@ func (s *SlackTester) AssertEquals(expectedMsg string) MessageAssertion { } } -func (s *SlackTester) restoreMsgTsIfNeeded() { - if s.restoreRecentlyPostedMsgTS != nil { - s.restoreRecentlyPostedMsgTS() - } - s.restoreRecentlyPostedMsgTS = nil -} func (s *SlackTester) WaitForMessagePosted(userID, channelID string, limitMessages int, assertFn MessageAssertion) error { defer s.restoreMsgTsIfNeeded() @@ -586,6 +580,7 @@ func (s *SlackTester) trimAttachmentTimestamp(in string) (string, string) { } // OnChannel removes expectation that messages should be posted in the thread of recently sent message. +// After first assertion it restores expectation. func (s *SlackTester) OnChannel() BotDriver { old := make(map[string]string) maps.Copy(old, s.recentlyPostedMsgTS) @@ -596,13 +591,11 @@ func (s *SlackTester) OnChannel() BotDriver { return s } -// ExpectChannelMessageRestore removes expectation that messages should be posted in the thread of recently sent message. -func (s *SlackTester) ExpectChannelMessageRestore(channelID string) func() { - old := s.recentlyPostedMsgTS[channelID] - s.recentlyPostedMsgTS[channelID] = "" - return func() { - s.recentlyPostedMsgTS[channelID] = old +func (s *SlackTester) restoreMsgTsIfNeeded() { + if s.restoreRecentlyPostedMsgTS != nil { + s.restoreRecentlyPostedMsgTS() } + s.restoreRecentlyPostedMsgTS = nil } var emojiSlackMapping = map[string]string{ diff --git a/test/e2e/bots_test.go b/test/e2e/bots_test.go index 96322de7b..1ac88ba1d 100644 --- a/test/e2e/bots_test.go +++ b/test/e2e/bots_test.go @@ -492,7 +492,6 @@ func runBotTest(t *testing.T, t.Log("Expecting bot message channel...") expectedMsg := fmt.Sprintf("Plugin cm-watcher detected `ADDED` event on `%s/%s`", cfgMap.Namespace, cfgMap.Name) - //ensureChannelMessageIsExpected(botDriver, botDriver.FirstChannel().ID()) err = waitForLastPlaintextMessageEqual(botDriver, botDriver.FirstChannel().ID(), expectedMsg) assert.NoError(t, err) }) @@ -525,7 +524,6 @@ func runBotTest(t *testing.T, t.Log("Expecting bot message channel...") expectedMsg := fmt.Sprintf("*Incoming webhook event:* %s", message) - //ensureChannelMessageIsExpected(botDriver, botDriver.FirstChannel().ID()) err = waitForLastPlaintextMessageEqual(botDriver, botDriver.FirstChannel().ID(), expectedMsg) assert.NoError(t, err) }) @@ -570,7 +568,6 @@ func runBotTest(t *testing.T, err = botDriver.WaitForLastMessageContains(userId, botDriver.FirstChannel().ID(), expMessage) if err != nil && botDriver.Type() == commplatform.SlackBot { // the new cloud backend not release yet t.Logf("Fallback to the old behavior with message sent at the channel level...") - //ensureChannelMessageIsExpected(botDriver, botDriver.FirstChannel().ID()) err = botDriver.OnChannel().WaitForLastMessageContains(userId, botDriver.FirstChannel().ID(), expMessage) } assert.NoError(t, err) @@ -664,7 +661,6 @@ func runBotTest(t *testing.T, assertionFn := func(msg string) (bool, int, string) { return hasValidHeader(command, msg), 0, "" } - //ensureChannelMessageIsExpected(botDriver, botDriver.FirstChannel().ID()) err = botDriver.OnChannel().WaitForMessagePosted(botDriver.BotUserID(), botDriver.FirstChannel().ID(), 1, assertionFn) }) @@ -876,7 +872,6 @@ func runBotTest(t *testing.T, }, }, } - //ensureChannelMessageIsExpected(botDriver, botDriver.FirstChannel().ID()) err = botDriver.OnChannel().WaitForMessagePostedWithAttachment(botDriver.BotUserID(), botDriver.FirstChannel().ID(), limitMessages(), expAttachmentIn) require.NoError(t, err) @@ -914,7 +909,6 @@ func runBotTest(t *testing.T, // Third (RBAC) channel is isolated from this channelIDs := []string{channels[deployEnvChannelIDName].ID(), channels[deployEnvSecondaryChannelIDName].ID()} for _, channelID := range channelIDs { - //ensureChannelMessageIsExpected(botDriver, channelID) err = botDriver.OnChannel().WaitForMessagePostedWithAttachment(botDriver.BotUserID(), channelID, 2, commplatform.ExpAttachmentInput{ AllowedTimestampDelta: time.Minute, Message: api.Message{ @@ -1004,7 +998,6 @@ func runBotTest(t *testing.T, }, } t.Log("Expecting bot message in second channel...") - //ensureChannelMessageIsExpected(botDriver, botDriver.SecondChannel().ID()) err = botDriver.OnChannel().WaitForMessagePostedWithAttachment(botDriver.BotUserID(), botDriver.SecondChannel().ID(), 2, secondCMUpdate) assert.NoError(t, err) @@ -1068,7 +1061,6 @@ func runBotTest(t *testing.T, }, } t.Log("Expecting bot message on first channel...") - //ensureChannelMessageIsExpected(botDriver, botDriver.FirstChannel().ID()) err = botDriver.OnChannel().WaitForMessagePostedWithAttachment(botDriver.BotUserID(), botDriver.FirstChannel().ID(), 2, firstCMUpdate) require.NoError(t, err) @@ -1106,7 +1098,6 @@ func runBotTest(t *testing.T, t.Cleanup(func() { cleanupCreatedPod(t, podDefaultNSCli, podIgnored.Name) }) time.Sleep(appCfg.Slack.MessageWaitTimeout) - //ensureChannelMessageIsExpected(botDriver, botDriver.FirstChannel().ID()) err = botDriver.OnChannel().WaitForMessagePostedWithAttachment(botDriver.BotUserID(), botDriver.FirstChannel().ID(), limitMessages(), firstCMUpdate) require.NoError(t, err) @@ -1356,7 +1347,6 @@ func runBotTest(t *testing.T, t.Log("Expecting bot message in third channel...") expectedMsg := fmt.Sprintf("Plugin cm-watcher detected `DELETED` event on `%s/%s`", cfgMap.Namespace, cfgMap.Name) - //ensureChannelMessageIsExpected(botDriver, botDriver.ThirdChannel().ID()) err = waitForLastPlaintextMessageEqual(botDriver, botDriver.ThirdChannel().ID(), expectedMsg) require.NoError(t, err) @@ -1381,7 +1371,6 @@ func runBotTest(t *testing.T, require.NoError(t, err) t.Log("Expecting bot event message...") - //ensureChannelMessageIsExpected(botDriver, botDriver.FirstChannel().ID()) err = botDriver.OnChannel().WaitForMessagePostedWithAttachment(botDriver.BotUserID(), botDriver.FirstChannel().ID(), 2, commplatform.ExpAttachmentInput{ AllowedTimestampDelta: time.Minute, Message: api.Message{ @@ -1512,7 +1501,6 @@ func runBotTest(t *testing.T, assertionFn := func(msg string) (bool, int, string) { return strings.Contains(msg, expectedMessage), 0, "" } - //ensureChannelMessageIsExpected(botDriver, botDriver.FirstChannel().ID()) err = botDriver.OnChannel().WaitForMessagePosted(botDriver.BotUserID(), botDriver.FirstChannel().ID(), 3, assertionFn) require.NoError(t, err) @@ -1677,8 +1665,6 @@ func crashConfigMapSourcePlugin(t *testing.T, cfgMapCli corev1.ConfigMapInterfac func waitForRestart(t *testing.T, tester commplatform.BotDriver, userID, channel, clusterName string) { t.Log("Waiting for restart...") - //revert := ensureChannelMessageIsExpected(tester, channel) - //defer revert() originalTimeout := tester.Timeout() tester.SetTimeout(90 * time.Second) @@ -1789,15 +1775,3 @@ func createCloudDeployment(t *testing.T, gqlCli *Client, driver commplatform.Bot } return nil } - -// ensureChannelMessageIsExpected is needed because Cloud Slack, by default, expects that a given message is posted in the thread -// of the recently sent message. In the context of source notification, we need to alter that default behavior and expect -// the message on the channel instead. -func ensureChannelMessageIsExpected(driver commplatform.BotDriver, channelID string) func() { - // in the context of Cloud Slack we need to reset it TS to expect channel message - switch t := driver.(type) { - case *commplatform.SlackTester: - return t.ExpectChannelMessageRestore(channelID) - } - return func() {} -} diff --git a/test/helmx/helm_helpers.go b/test/helmx/helm_helpers.go index a8a847b9e..9b6c59802 100644 --- a/test/helmx/helm_helpers.go +++ b/test/helmx/helm_helpers.go @@ -42,10 +42,6 @@ func (p *InstallChartParams) ToOptions(version string) []string { fmt.Sprintf("extraEnv[0].name=%s", "BOTKUBE_PLUGINS_REPOSITORIES_BOTKUBE_URL"), "--set-string", fmt.Sprintf("extraEnv[0].value=%s", p.PluginRepoURL), - "--set", - fmt.Sprintf("image.repository=%s", "kubeshop/pr/botkube"), - "--set", - fmt.Sprintf("image.tag=%s", "1371-PR"), } cmdParts = append(cmdParts, extraEnvs...) return cmdParts