Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore(ci): add optional step fetching Kong EE license in release workflow #789

Merged
merged 1 commit into from
Oct 24, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
26 changes: 21 additions & 5 deletions .github/workflows/__release-workflow.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -16,12 +16,12 @@ on:
gh-pat:
required: true
description: "The GitHub Personal Access Token to create the release PR"
kong-license-data:
required: false
description: "The Kong License to use in the tests (required by EE build)"
konnect-pat:
required: true
description: "The Konnect PAT to use in the tests"
op-service-account-token:
required: false
description: "The 1Password service account token to fetch the Kong Enterprise License. If left empty, no license will be fetched"
inputs:
dockerhub-push-username:
description: "The username to push images to Docker Hub"
Expand Down Expand Up @@ -147,10 +147,18 @@ jobs:
with:
install: false

- name: Get Kong Enterprise License
if: secrets.op-service-account-token != ''
id: get-license
uses: Kong/kong-license@master
with:
# OP (1Password) token is used to fetch the Kong Enterprise License from 1Password.
op-token: ${{ secrets.op-service-account-token }}

- name: integration tests
run: make test.integration
env:
KONG_LICENSE_DATA: ${{ secrets.kong-license-data }}
KONG_LICENSE_DATA: ${{ steps.get-license.outputs.license || '' }} # The license is optional for OSS tests.
WEBHOOK_ENABLED: ${{ matrix.webhook-enabled }}
KONG_TEST_KONNECT_ACCESS_TOKEN: ${{ secrets.konnect-pat }}
KONG_TEST_KONNECT_SERVER_URL: us.api.konghq.tech
Expand Down Expand Up @@ -186,10 +194,18 @@ jobs:
with:
install: false

- name: Get Kong Enterprise License
if: ${{ secrets.op-service-account-token }}
id: get-license
uses: Kong/kong-license@master
with:
# OP (1Password) token is used to fetch the Kong Enterprise License from 1Password.
op-token: ${{ secrets.op-service-account-token }}

- name: E2E Tests
run: make test.e2e
env:
KONG_LICENSE_DATA: ${{ secrets.kong-license-data }}
KONG_LICENSE_DATA: ${{ steps.get-license.outputs.license || '' }} # The license is optional for OSS tests.
KONG_TEST_GATEWAY_OPERATOR_IMAGE_OVERRIDE: ${{ needs.build-push-images.outputs.full_tag }}
KONG_TEST_KONNECT_ACCESS_TOKEN: ${{ secrets.konnect-pat }}
KONG_TEST_KONNECT_SERVER_URL: us.api.konghq.tech
Expand Down
Loading