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

ci: use license action #1103

Merged
merged 1 commit into from
Nov 9, 2023
Merged
Show file tree
Hide file tree
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
13 changes: 10 additions & 3 deletions .github/workflows/integration-enterprise.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -28,22 +28,29 @@ jobs:
env:
KONG_ANONYMOUS_REPORTS: "off"
KONG_IMAGE: ${{ matrix.kong_image }}
KONG_LICENSE_DATA: ${{ secrets.KONG_LICENSE_DATA }}

runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Setup go
uses: actions/setup-go@v4
with:
go-version: '^1.20'
- name: Checkout repository
uses: actions/checkout@v4
- name: Login to Docker Hub
uses: docker/login-action@v3
with:
username: ${{secrets.DOCKERHUB_PULL_USERNAME}}
password: ${{secrets.DOCKERHUB_PULL_TOKEN}}
- uses: Kong/kong-license@master
id: license
with:
password: ${{ secrets.PULP_PASSWORD }}
- name: Setup Kong
env:
KONG_LICENSE_DATA: ${{ steps.license.outputs.license }}
Comment on lines +50 to +51
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

see https://github.com/Kong/kong-license#github-action

This shouldn't be necessary to set the ENV explicitly, the action will already have it set (exported). There are multiple occurrences of this.

Unless the explicitness of the current approach is preferred, then this is fine.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I forgot about this feature of license action but yes:

Unless the explicitness of the current approach is preferred, then this is fine.

IMHO this might make it easier for the readers that do not know this hidden (albeit documented!) behavior of this action.

run: make setup-kong-ee
- name: Run integration tests
env:
KONG_LICENSE_DATA: ${{ steps.license.outputs.license }}
run: make test-integration
4 changes: 2 additions & 2 deletions .github/workflows/integration-konnect.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -12,11 +12,11 @@ jobs:
DECK_KONNECT_TOKEN : ${{ secrets.DECK_KONNECT_TOKEN }}
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Setup go
uses: actions/setup-go@v4
with:
go-version: '^1.20'
- name: Checkout repository
uses: actions/checkout@v4
- name: Run integration tests
run: make test-integration
4 changes: 2 additions & 2 deletions .github/workflows/integration.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -32,12 +32,12 @@ jobs:
KONG_IMAGE: ${{ matrix.kong_image }}
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Setup go
uses: actions/setup-go@v4
with:
go-version: '^1.20'
- name: Checkout repository
uses: actions/checkout@v4
- name: Setup Kong
run: make setup-kong
- name: Run integration tests
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -10,12 +10,12 @@ jobs:
test:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Setup go
uses: actions/setup-go@v4
with:
go-version: '^1.20'
- name: Checkout repository
uses: actions/checkout@v4
- name: Setup golangci-lint
uses: golangci/[email protected]
- name: Verify Codegen
Expand Down
15 changes: 11 additions & 4 deletions .github/workflows/validate-kong-release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -18,22 +18,29 @@ jobs:
env:
KONG_ANONYMOUS_REPORTS: "off"
KONG_IMAGE: ${{ inputs.kong_image }}
KONG_LICENSE_DATA: ${{ secrets.KONG_LICENSE_DATA }}
runs-on: ubuntu-latest
steps:
- name: Execution Information
run: |
echo "Kong Gateway Image = ${{ inputs.kong_image }}"
echo "decK Branch = ${{ inputs.branch }}"
- name: Checkout repository
uses: actions/checkout@v4
with:
ref: ${{ inputs.branch }}
- name: Setup go
uses: actions/setup-go@v4
with:
go-version: '^1.20'
- name: Checkout repository
uses: actions/checkout@v4
- uses: Kong/kong-license@master
id: license
with:
ref: ${{ inputs.branch }}
password: ${{ secrets.PULP_PASSWORD }}
- name: Setup Kong
env:
KONG_LICENSE_DATA: ${{ steps.license.outputs.license }}
run: make setup-kong-ee
- name: Run integration tests
env:
KONG_LICENSE_DATA: ${{ steps.license.outputs.license }}
run: make test-integration
Loading