Skip to content

Commit

Permalink
Fix actions input parameters naming
Browse files Browse the repository at this point in the history
  • Loading branch information
kolodziejczak committed Dec 18, 2024
1 parent b330eed commit c7e9e74
Show file tree
Hide file tree
Showing 7 changed files with 61 additions and 61 deletions.
12 changes: 6 additions & 6 deletions .github/actions/e2e-test-gardener/action.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -19,13 +19,13 @@ inputs:
test_make_target:
description: 'Make target for integration tests to run'
required: true
client_id:
test_client_id:
description: "Client id for oidc"
required: false
client_secret:
test_client_secret:
description: "Client secret for oidc"
required: false
oidc_well_known_url:
test_oidc_well_known_url:
description: "OIDC well known URL"
required: false
dns_secret_json:
Expand Down Expand Up @@ -69,9 +69,9 @@ runs:
shell: bash
env:
IMG: ${{ inputs.manager_image }}
CLIENT_ID: ${{ inputs.client_id }}
CLIENT_SECRET: ${{ inputs.client_secret }}
OIDC_CONFIG_URL: ${{ inputs.oidc_well_known_url }}
TEST_CLIENT_ID: ${{ inputs.test_client_id }}
TEST_CLIENT_SECRET: ${{ inputs.test_client_secret }}
TEST_OIDC_CONFIG_URL: ${{ inputs.test_oidc_well_known_url }}
TEST_SA_ACCESS_KEY_PATH: "${{ github.workspace }}/service-account.json"
CLUSTER_KUBECONFIG: "${{ github.workspace }}/${{ env.CLUSTER_NAME }}_kubeconfig.yaml"
TEST_CUSTOM_DOMAIN: ${{ inputs.test_custom_domain }}
Expand Down
12 changes: 6 additions & 6 deletions .github/actions/e2e-test-k3d/action.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -7,13 +7,13 @@ inputs:
test_make_target:
description: 'Make target for integration tests to run'
required: true
client_id:
test_client_id:
description: "Client id for oidc"
required: false
client_secret:
test_client_secret:
description: "Client secret for oidc"
required: false
oidc_well_known_url:
test_oidc_well_known_url:
description: "OIDC well known URL"
required: false
runs:
Expand All @@ -36,9 +36,9 @@ runs:
shell: bash
env:
TEST_DOMAIN: "local.kyma.dev"
CLIENT_ID: ${{ inputs.client_id }}
CLIENT_SECRET: ${{ inputs.client_secret }}
OIDC_CONFIG_URL: ${{ inputs.oidc_well_known_url }}
TEST_CLIENT_ID: ${{ inputs.test_client_id }}
TEST_CLIENT_SECRET: ${{ inputs.test_client_secret }}
TEST_OIDC_CONFIG_URL: ${{ inputs.test_oidc_well_known_url }}
IMG: ${{ inputs.manager_image }}
run: |
if [ "${{ github.event_name }}" == "pull_request" ]; then
Expand Down
12 changes: 6 additions & 6 deletions .github/actions/k8s-compatibility-test/action.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -7,13 +7,13 @@ inputs:
test_make_target:
description: 'Make target for integration tests to run'
default: 'test-integration'
client_id:
test_client_id:
description: "Client id for oidc"
required: false
client_secret:
test_client_secret:
description: "Client secret for oidc"
required: false
oidc_well_known_url:
test_oidc_well_known_url:
description: "OIDC well known URL"
required: false
runs:
Expand All @@ -36,9 +36,9 @@ runs:
shell: bash
env:
TEST_DOMAIN: "local.kyma.dev"
CLIENT_ID: ${{ inputs.client_id }}
CLIENT_SECRET: ${{ inputs.client_secret }}
OIDC_CONFIG_URL: ${{ inputs.oidc_well_known_url }}
TEST_CLIENT_ID: ${{ inputs.test_client_id }}
TEST_CLIENT_SECRET: ${{ inputs.test_client_secret }}
TEST_OIDC_CONFIG_URL: ${{ inputs.test_oidc_well_known_url }}
IMG: ${{ inputs.manager_image }}
run: |
if [ "${{ github.event_name }}" == "pull_request" ]; then
Expand Down
12 changes: 6 additions & 6 deletions .github/actions/upgrade-test/action.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,13 @@ inputs:
manager_image:
description: 'Manager image used for test'
required: true
client_id:
test_client_id:
description: "Client id for oidc"
required: false
client_secret:
test_client_secret:
description: "Client secret for oidc"
required: false
oidc_well_known_url:
test_oidc_well_known_url:
description: "OIDC well known URL"
required: false
target_branch:
Expand Down Expand Up @@ -38,9 +38,9 @@ runs:
env:
TEST_DOMAIN: "local.kyma.dev"
TEST_UPGRADE_IMG: ${{ inputs.manager_image }}
CLIENT_ID: ${{ inputs.client_id }}
CLIENT_SECRET: ${{ inputs.client_secret }}
OIDC_CONFIG_URL: ${{ inputs.oidc_well_known_url }}
TEST_CLIENT_ID: ${{ inputs.test_client_id }}
TEST_CLIENT_SECRET: ${{ inputs.test_client_secret }}
TEST_OIDC_CONFIG_URL: ${{ inputs.test_oidc_well_known_url }}
run: |
if [ "${{ github.event_name }}" == "pull_request" ]; then
k3d image import ${{ inputs.manager_image }} -c k3s-default
Expand Down
30 changes: 15 additions & 15 deletions .github/workflows/call-integration-release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -24,9 +24,9 @@ jobs:
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
client_id: ${{ secrets.CLIENT_ID }}
client_secret: ${{ secrets.CLIENT_SECRET }}
oidc_well_known_url: "${{ secrets.OIDC_ISSUER_URL }}/.well-known/openid-configuration"
test_client_id: ${{ secrets.CLIENT_ID }}
test_client_secret: ${{ secrets.CLIENT_SECRET }}
test_oidc_well_known_url: "${{ secrets.OIDC_ISSUER_URL }}/.well-known/openid-configuration"
manager_image: ${{ inputs.image }}
test_make_target: ${{ matrix.test_make_target }}

Expand Down Expand Up @@ -65,9 +65,9 @@ jobs:
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
client_id: ${{ secrets.CLIENT_ID }}
client_secret: ${{ secrets.CLIENT_SECRET }}
oidc_well_known_url: "${{ secrets.OIDC_ISSUER_URL }}/.well-known/openid-configuration"
test_client_id: ${{ secrets.CLIENT_ID }}
test_client_secret: ${{ secrets.CLIENT_SECRET }}
test_oidc_well_known_url: "${{ secrets.OIDC_ISSUER_URL }}/.well-known/openid-configuration"
manager_image: ${{ inputs.image }}
test_make_target: ${{ matrix.test_make_target }}

Expand All @@ -84,9 +84,9 @@ jobs:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
manager_image: ${{ inputs.image }}
client_id: ${{ secrets.CLIENT_ID }}
client_secret: ${{ secrets.CLIENT_SECRET }}
oidc_well_known_url: "${{ secrets.OIDC_ISSUER_URL }}/.well-known/openid-configuration"
test_client_id: ${{ secrets.CLIENT_ID }}
test_client_secret: ${{ secrets.CLIENT_SECRET }}
test_oidc_well_known_url: "${{ secrets.OIDC_ISSUER_URL }}/.well-known/openid-configuration"
target_branch: ${{ github.base_ref }}

e2e-custom-domain-gcp:
Expand All @@ -109,9 +109,9 @@ jobs:
gardener_secret: ${{ secrets.GARDENER_TOKEN }}
gardener_project_name: ${{ vars.GARDENER_PROJECT_NAME }}
gardener_provider: gcp
client_id: ${{ secrets.CLIENT_ID }}
client_secret: ${{ secrets.CLIENT_SECRET }}
oidc_well_known_url: "${{ secrets.OIDC_ISSUER_URL }}/.well-known/openid-configuration"
test_client_id: ${{ secrets.CLIENT_ID }}
test_client_secret: ${{ secrets.CLIENT_SECRET }}
test_oidc_well_known_url: "${{ secrets.OIDC_ISSUER_URL }}/.well-known/openid-configuration"
dns_secret_json: ${{ secrets.DNS_SECRET_JSON }}
test_make_target: ${{ matrix.test_make_target }}
test_custom_domain: ${{ vars.TEST_CUSTOM_DOMAIN }}
Expand All @@ -136,9 +136,9 @@ jobs:
gardener_secret: ${{ secrets.GARDENER_TOKEN }}
gardener_project_name: ${{ vars.GARDENER_PROJECT_NAME }}
gardener_provider: aws
client_id: ${{ secrets.CLIENT_ID }}
client_secret: ${{ secrets.CLIENT_SECRET }}
oidc_well_known_url: "${{ secrets.OIDC_ISSUER_URL }}/.well-known/openid-configuration"
test_client_id: ${{ secrets.CLIENT_ID }}
test_client_secret: ${{ secrets.CLIENT_SECRET }}
test_oidc_well_known_url: "${{ secrets.OIDC_ISSUER_URL }}/.well-known/openid-configuration"
dns_secret_json: ${{ secrets.DNS_SECRET_JSON }}
test_make_target: ${{ matrix.test_make_target }}
test_custom_domain: ${{ vars.TEST_CUSTOM_DOMAIN }}
36 changes: 18 additions & 18 deletions .github/workflows/post-main-integration.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -72,9 +72,9 @@ jobs:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
manager_image: "europe-docker.pkg.dev/kyma-project/prod/api-gateway/main/api-gateway-manager:${{ needs.get-sha.outputs.sha }}"
client_id: ${{ secrets.CLIENT_ID }}
client_secret: ${{ secrets.CLIENT_SECRET }}
oidc_well_known_url: "${{ secrets.OIDC_ISSUER_URL }}/.well-known/openid-configuration"
test_client_id: ${{ secrets.CLIENT_ID }}
test_client_secret: ${{ secrets.CLIENT_SECRET }}
test_oidc_well_known_url: "${{ secrets.OIDC_ISSUER_URL }}/.well-known/openid-configuration"
test_make_target: ${{ matrix.test_make_target }}

e2e-tests-aws:
Expand All @@ -100,9 +100,9 @@ jobs:
gardener_secret: ${{ secrets.GARDENER_TOKEN }}
gardener_project_name: ${{ vars.GARDENER_PROJECT_NAME }}
gardener_provider: aws
client_id: ${{ secrets.CLIENT_ID }}
client_secret: ${{ secrets.CLIENT_SECRET }}
oidc_well_known_url: "${{ secrets.OIDC_ISSUER_URL }}/.well-known/openid-configuration"
test_client_id: ${{ secrets.CLIENT_ID }}
test_client_secret: ${{ secrets.CLIENT_SECRET }}
test_oidc_well_known_url: "${{ secrets.OIDC_ISSUER_URL }}/.well-known/openid-configuration"
test_make_target: ${{ matrix.test_make_target }}

migration-downtime-tests:
Expand Down Expand Up @@ -149,9 +149,9 @@ jobs:
gardener_secret: ${{ secrets.GARDENER_TOKEN }}
gardener_project_name: ${{ vars.GARDENER_PROJECT_NAME }}
gardener_provider: aws
client_id: ${{ secrets.CLIENT_ID }}
client_secret: ${{ secrets.CLIENT_SECRET }}
oidc_well_known_url: "${{ secrets.OIDC_ISSUER_URL }}/.well-known/openid-configuration"
test_client_id: ${{ secrets.CLIENT_ID }}
test_client_secret: ${{ secrets.CLIENT_SECRET }}
test_oidc_well_known_url: "${{ secrets.OIDC_ISSUER_URL }}/.well-known/openid-configuration"
test_make_target: test-migration-zero-downtime-${{ matrix.handler }}

upgrade-tests-k3d:
Expand All @@ -169,9 +169,9 @@ jobs:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
manager_image: "europe-docker.pkg.dev/kyma-project/prod/api-gateway/main/api-gateway-manager:${{ needs.get-sha.outputs.sha }}"
client_id: ${{ secrets.CLIENT_ID }}
client_secret: ${{ secrets.CLIENT_SECRET }}
oidc_well_known_url: "${{ secrets.OIDC_ISSUER_URL }}/.well-known/openid-configuration"
test_client_id: ${{ secrets.CLIENT_ID }}
test_client_secret: ${{ secrets.CLIENT_SECRET }}
test_oidc_well_known_url: "${{ secrets.OIDC_ISSUER_URL }}/.well-known/openid-configuration"
target_branch: ${{github.ref_name}}

e2e-custom-domain-gcp:
Expand All @@ -193,9 +193,9 @@ jobs:
gardener_secret: ${{ secrets.GARDENER_TOKEN }}
gardener_project_name: ${{ vars.GARDENER_PROJECT_NAME }}
gardener_provider: gcp
client_id: ${{ secrets.CLIENT_ID }}
client_secret: ${{ secrets.CLIENT_SECRET }}
oidc_well_known_url: "${{ secrets.OIDC_ISSUER_URL }}/.well-known/openid-configuration"
test_client_id: ${{ secrets.CLIENT_ID }}
test_client_secret: ${{ secrets.CLIENT_SECRET }}
test_oidc_well_known_url: "${{ secrets.OIDC_ISSUER_URL }}/.well-known/openid-configuration"
dns_secret_json: ${{ secrets.DNS_SECRET_JSON }}
test_custom_domain: ${{ vars.TEST_CUSTOM_DOMAIN }}
test_make_target: 'test-custom-domain'
Expand All @@ -219,9 +219,9 @@ jobs:
gardener_secret: ${{ secrets.GARDENER_TOKEN }}
gardener_project_name: ${{ vars.GARDENER_PROJECT_NAME }}
gardener_provider: aws
client_id: ${{ secrets.CLIENT_ID }}
client_secret: ${{ secrets.CLIENT_SECRET }}
oidc_well_known_url: "${{ secrets.OIDC_ISSUER_URL }}/.well-known/openid-configuration"
test_client_id: ${{ secrets.CLIENT_ID }}
test_client_secret: ${{ secrets.CLIENT_SECRET }}
test_oidc_well_known_url: "${{ secrets.OIDC_ISSUER_URL }}/.well-known/openid-configuration"
dns_secret_json: ${{ secrets.DNS_SECRET_JSON }}
test_custom_domain: ${{ vars.TEST_CUSTOM_DOMAIN }}
test_make_target: 'test-custom-domain'
Expand Down
8 changes: 4 additions & 4 deletions tests/integration/scripts/test-zero-downtime.sh
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ run_zero_downtime_requests() {


if [ "$handler" == "jwt" ] || [ "$handler" == "oauth2_introspection" ]; then
if [ -z "${OIDC_CONFIG_URL}" ]; then
if [ -z "${TEST_OIDC_CONFIG_URL}" ]; then
echo "zero-downtime: No OIDC_CONFIG_URL provided, assuming oauth mock"
# Wait until the OAuth2 mock server host is available
wait_for_url "https://oauth2-mock.${TEST_DOMAIN}/.well-known/openid-configuration"
Expand All @@ -59,11 +59,11 @@ run_zero_downtime_requests() {
bearer_token=$(curl --fail --silent -kX POST "$token_url" -d "grant_type=client_credentials" -d "token_format=jwt" \
-H "Content-Type: application/x-www-form-urlencoded" | jq -r ".access_token")
else
echo "zero-downtime: OIDC_CONFIG_URL provided, getting token url"
token_url=$(curl --fail --silent "${OIDC_CONFIG_URL}/.well-known/openid-configuration" | jq -r .token_endpoint)
echo "zero-downtime: TEST_OIDC_CONFIG_URL provided, getting token url"
token_url=$(curl --fail --silent "${TEST_OIDC_CONFIG_URL}/.well-known/openid-configuration" | jq -r .token_endpoint)

echo "zero-downtime: Getting access token"
bearer_token=$(curl --fail --silent -kX POST "$token_url" -u "${CLIENT_ID}:${CLIENT_SECRET}" -d "grant_type=client_credentials" -d "token_format=jwt" \
bearer_token=$(curl --fail --silent -kX POST "$token_url" -u "${TEST_CLIENT_ID}:${TEST_CLIENT_SECRET}" -d "grant_type=client_credentials" -d "token_format=jwt" \
-H "Content-Type: application/x-www-form-urlencoded" | jq -r ".access_token")
fi
fi
Expand Down

0 comments on commit c7e9e74

Please sign in to comment.