Skip to content

Commit

Permalink
Add secrets for bitbucket server on upstream PAC repo (#1821)
Browse files Browse the repository at this point in the history
added secrets for bitbucket server for E2E testing
on upstream PAC repo.

Signed-off-by: Zaki Shaikh <[email protected]>
  • Loading branch information
zakisk authored Nov 13, 2024
1 parent 5ae9bba commit aaf045e
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 5 deletions.
12 changes: 9 additions & 3 deletions .github/workflows/kind-e2e-tests.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ on:
required: false
default: false
pull_request_target:
types: [opened, synchronize, reopened]
types: [ opened, synchronize, reopened ]
paths:
- "**.go"
jobs:
Expand Down Expand Up @@ -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' }}
Expand All @@ -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() }}
Expand Down
13 changes: 11 additions & 2 deletions hack/gh-workflow-ci.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down Expand Up @@ -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
}

Expand Down Expand Up @@ -147,7 +156,7 @@ help() {
create_second_github_app_controller_on_ghe <test_github_second_smee_url> <test_github_second_private_key> <test_github_second_webhook_secret>
Create the second controller on GHE
run_e2e_tests <bitbucket_cloud_token> <webhook_secret> <test_gitea_smeeurl> <installation_id> <gh_apps_token> <test_github_second_token> <gitlab_token>
run_e2e_tests <bitbucket_cloud_token> <webhook_secret> <test_gitea_smeeurl> <installation_id> <gh_apps_token> <test_github_second_token> <gitlab_token> <bitbucket_server_token> <bitbucket_server_api_url> <bitbucket_server_webhook_secret>
Run the e2e tests
collect_logs
Expand All @@ -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
Expand Down

0 comments on commit aaf045e

Please sign in to comment.