From aaf045e8678e99957ef68fa40b3fd86dd6158530 Mon Sep 17 00:00:00 2001 From: zakisk <49492007+zakisk@users.noreply.github.com> Date: Wed, 13 Nov 2024 15:23:43 +0530 Subject: [PATCH] Add secrets for bitbucket server on upstream PAC repo (#1821) added secrets for bitbucket server for E2E testing on upstream PAC repo. Signed-off-by: Zaki Shaikh --- .github/workflows/kind-e2e-tests.yaml | 12 +++++++++--- hack/gh-workflow-ci.sh | 13 +++++++++++-- 2 files changed, 20 insertions(+), 5 deletions(-) diff --git a/.github/workflows/kind-e2e-tests.yaml b/.github/workflows/kind-e2e-tests.yaml index 496a3d76e..27ad76f65 100644 --- a/.github/workflows/kind-e2e-tests.yaml +++ b/.github/workflows/kind-e2e-tests.yaml @@ -11,7 +11,7 @@ on: required: false default: false pull_request_target: - types: [opened, synchronize, reopened] + types: [ opened, synchronize, reopened ] paths: - "**.go" jobs: @@ -84,7 +84,10 @@ jobs: "${{ secrets.INSTALLATION_ID }}" \ "${{ secrets.GH_APPS_TOKEN }}" \ "${{ secrets.TEST_GITHUB_SECOND_TOKEN }}" \ - "${{ secrets.GITLAB_TOKEN }}" + "${{ secrets.GITLAB_TOKEN }}" \ + "${{ secrets.BITBUCKET_SERVER_TOKEN }}" \ + "${{ secrets.BITBUCKET_SERVER_API_URL }}" \ + "${{ secrets.BITBUCKET_SERVER_WEBHOOK_SECRET }}" - name: Run E2E Tests on nightly if: ${{ github.event_name == 'schedule' || github.event_name == 'workflow_dispatch' }} @@ -97,7 +100,10 @@ jobs: "${{ secrets.INSTALLATION_ID }}" \ "${{ secrets.GH_APPS_TOKEN }}" \ "${{ secrets.TEST_GITHUB_SECOND_TOKEN }}" \ - "${{ secrets.GITLAB_TOKEN }}" + "${{ secrets.GITLAB_TOKEN }}" \ + "${{ secrets.BITBUCKET_SERVER_TOKEN }}" \ + "${{ secrets.BITBUCKET_SERVER_API_URL }}" \ + "${{ secrets.BITBUCKET_SERVER_WEBHOOK_SECRET }}" - name: Collect logs if: ${{ always() }} diff --git a/hack/gh-workflow-ci.sh b/hack/gh-workflow-ci.sh index 459f53bc5..ce20fffa9 100755 --- a/hack/gh-workflow-ci.sh +++ b/hack/gh-workflow-ci.sh @@ -71,6 +71,9 @@ run_e2e_tests() { gh_apps_token="${5}" test_github_second_token="${6}" gitlab_token="${7}" + bitbucket_server_token="${8}" + bitbucket_server_api_url="${9}" + bitbucket_server_webhook_secret="${10}" # Nothing specific to webhook here it just that repo is private in that org and that's what we want to test export TEST_GITHUB_PRIVATE_TASK_URL="https://github.com/openshift-pipelines/pipelines-as-code-e2e-tests-private/blob/main/remote_task.yaml" @@ -112,6 +115,12 @@ run_e2e_tests() { export TEST_GITLAB_PROJECT_ID="34405323" export TEST_GITLAB_TOKEN=${gitlab_token} # https://gitlab.com/gitlab-com/alliances/ibm-red-hat/sandbox/openshift-pipelines/pac-e2e-tests + + export TEST_BITBUCKET_SERVER_TOKEN="${bitbucket_server_token}" + export TEST_BITBUCKET_SERVER_API_URL="${bitbucket_server_api_url}" + export TEST_BITBUCKET_SERVER_WEBHOOK_SECRET="${bitbucket_server_webhook_secret}" + export TEST_BITBUCKET_SERVER_USER="pipelines" + export TEST_BITBUCKET_SERVER_E2E_REPOSITORY="PAC/pac-e2e-tests" make test-e2e } @@ -147,7 +156,7 @@ help() { create_second_github_app_controller_on_ghe Create the second controller on GHE - run_e2e_tests + run_e2e_tests Run the e2e tests collect_logs @@ -163,7 +172,7 @@ create_second_github_app_controller_on_ghe) create_second_github_app_controller_on_ghe "${2}" "${3}" "${4}" ;; run_e2e_tests) - run_e2e_tests "${2}" "${3}" "${4}" "${5}" "${6}" "${7}" "${8}" + run_e2e_tests "${2}" "${3}" "${4}" "${5}" "${6}" "${7}" "${8}" "${9}" "${10}" "${11}" ;; collect_logs) collect_logs