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: ability to run cmx tests against staging #4423

Closed
wants to merge 2 commits into from
Closed
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
5 changes: 5 additions & 0 deletions .github/actions/kots-e2e/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,9 @@ inputs:
replicated-api-token:
description: 'Replicated API token for C11y matrix'
required: false
replicated-api-endpoint:
description: 'Replicated API endpoint for C11y matrix'
required: false

outputs:
cluster-id:
Expand All @@ -93,6 +96,7 @@ runs:
uses: replicatedhq/replicated-actions/create-cluster@v1
if: ${{ inputs.k8s-distribution != 'k3s-local' }}
with:
replicated-api-endpoint: ${{ inputs.replicated-api-endpoint }}
api-token: ${{ inputs.replicated-api-token }}
kubernetes-distribution: ${{ inputs.k8s-distribution }}
kubernetes-version: ${{ inputs.k8s-version }}
Expand Down Expand Up @@ -160,5 +164,6 @@ runs:
if: ${{ always() && inputs.k8s-cluster-skip-teardown != 'true' && steps.create-cluster.outputs.cluster-id != '' }}
continue-on-error: true
with:
replicated-api-endpoint: ${{ inputs.replicated-api-endpoint }}
api-token: ${{ inputs.replicated-api-token }}
cluster-id: ${{ steps.create-cluster.outputs.cluster-id }}
53 changes: 38 additions & 15 deletions .github/workflows/build-test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -33,10 +33,18 @@ jobs:
# Use this to disable tests when iteratig on a specific test to save time
enable-tests:
runs-on: ubuntu-20.04
outputs:
cmx_api_token: ${{ steps.vars.outputs.cmx_api_token }}
cmx_api_endpoint: ${{ steps.vars.outputs.cmx_api_endpoint }}
steps:
- name: ok
# change 0 to a positive interger to prevent all tests from running
run: exit 0
- name: set outputs
id: vars
run: |
echo "cmx_api_endpoint=" >> "$GITHUB_OUTPUT"
echo "cmx_api_token=${{ secrets.C11Y_MATRIX_TOKEN }}" >> "$GITHUB_OUTPUT"


generate-tag:
Expand Down Expand Up @@ -564,7 +572,8 @@ jobs:
id: cmx-versions-to-test
uses: ./.github/actions/cmx-versions
with:
replicated-api-token: ${{ secrets.C11Y_MATRIX_TOKEN }}
replicated-api-endpoint: ${{ needs.enable-tests.outputs.cmx_api_endpoint }}
replicated-api-token: ${{ needs.enable-tests.outputs.cmx_api_token }}
outputs:
versions-to-test: ${{ steps.cmx-versions-to-test.outputs.versions-to-test }}

Expand Down Expand Up @@ -599,7 +608,8 @@ jobs:
testim-access-token: '${{ secrets.TESTIM_ACCESS_TOKEN }}'
aws-access-key-id: '${{ secrets.E2E_SUPPORT_BUNDLE_AWS_ACCESS_KEY_ID }}'
aws-secret-access-key: '${{ secrets.E2E_SUPPORT_BUNDLE_AWS_SECRET_ACCESS_KEY }}'
replicated-api-token: '${{ secrets.C11Y_MATRIX_TOKEN }}'
replicated-api-endpoint: ${{ needs.enable-tests.outputs.cmx_api_endpoint }}
replicated-api-token: ${{ needs.enable-tests.outputs.cmx_api_token }}
kots-dockerhub-username: '${{ secrets.E2E_DOCKERHUB_USERNAME }}'
kots-dockerhub-password: '${{ secrets.E2E_DOCKERHUB_PASSWORD }}'

Expand Down Expand Up @@ -639,7 +649,8 @@ jobs:
testim-branch: ${{ github.head_ref == 'main' && 'master' || github.head_ref }}
aws-access-key-id: '${{ secrets.E2E_SUPPORT_BUNDLE_AWS_ACCESS_KEY_ID }}'
aws-secret-access-key: '${{ secrets.E2E_SUPPORT_BUNDLE_AWS_SECRET_ACCESS_KEY }}'
replicated-api-token: '${{ secrets.C11Y_MATRIX_TOKEN }}'
replicated-api-endpoint: ${{ needs.enable-tests.outputs.cmx_api_endpoint }}
replicated-api-token: ${{ needs.enable-tests.outputs.cmx_api_token }}
kots-dockerhub-username: '${{ secrets.E2E_DOCKERHUB_USERNAME }}'
kots-dockerhub-password: '${{ secrets.E2E_DOCKERHUB_PASSWORD }}'

Expand Down Expand Up @@ -791,7 +802,8 @@ jobs:
testim-branch: ${{ github.head_ref == 'main' && 'master' || github.head_ref }}
aws-access-key-id: '${{ secrets.E2E_SUPPORT_BUNDLE_AWS_ACCESS_KEY_ID }}'
aws-secret-access-key: '${{ secrets.E2E_SUPPORT_BUNDLE_AWS_SECRET_ACCESS_KEY }}'
replicated-api-token: '${{ secrets.C11Y_MATRIX_TOKEN }}'
replicated-api-endpoint: ${{ needs.enable-tests.outputs.cmx_api_endpoint }}
replicated-api-token: ${{ needs.enable-tests.outputs.cmx_api_token }}
kots-dockerhub-username: '${{ secrets.E2E_DOCKERHUB_USERNAME }}'
kots-dockerhub-password: '${{ secrets.E2E_DOCKERHUB_PASSWORD }}'

Expand Down Expand Up @@ -831,7 +843,8 @@ jobs:
testim-branch: ${{ github.head_ref == 'main' && 'master' || github.head_ref }}
aws-access-key-id: '${{ secrets.E2E_SUPPORT_BUNDLE_AWS_ACCESS_KEY_ID }}'
aws-secret-access-key: '${{ secrets.E2E_SUPPORT_BUNDLE_AWS_SECRET_ACCESS_KEY }}'
replicated-api-token: '${{ secrets.C11Y_MATRIX_TOKEN }}'
replicated-api-endpoint: ${{ needs.enable-tests.outputs.cmx_api_endpoint }}
replicated-api-token: ${{ needs.enable-tests.outputs.cmx_api_token }}
kots-dockerhub-username: '${{ secrets.E2E_DOCKERHUB_USERNAME }}'
kots-dockerhub-password: '${{ secrets.E2E_DOCKERHUB_PASSWORD }}'

Expand Down Expand Up @@ -980,7 +993,8 @@ jobs:
testim-branch: ${{ github.head_ref == 'main' && 'master' || github.head_ref }}
aws-access-key-id: '${{ secrets.E2E_SUPPORT_BUNDLE_AWS_ACCESS_KEY_ID }}'
aws-secret-access-key: '${{ secrets.E2E_SUPPORT_BUNDLE_AWS_SECRET_ACCESS_KEY }}'
replicated-api-token: '${{ secrets.C11Y_MATRIX_TOKEN }}'
replicated-api-endpoint: ${{ needs.enable-tests.outputs.cmx_api_endpoint }}
replicated-api-token: ${{ needs.enable-tests.outputs.cmx_api_token }}
kots-dockerhub-username: '${{ secrets.E2E_DOCKERHUB_USERNAME }}'
kots-dockerhub-password: '${{ secrets.E2E_DOCKERHUB_PASSWORD }}'

Expand Down Expand Up @@ -1059,7 +1073,8 @@ jobs:
testim-branch: ${{ github.head_ref == 'main' && 'master' || github.head_ref }}
aws-access-key-id: '${{ secrets.E2E_SUPPORT_BUNDLE_AWS_ACCESS_KEY_ID }}'
aws-secret-access-key: '${{ secrets.E2E_SUPPORT_BUNDLE_AWS_SECRET_ACCESS_KEY }}'
replicated-api-token: '${{ secrets.C11Y_MATRIX_TOKEN }}'
replicated-api-endpoint: ${{ needs.enable-tests.outputs.cmx_api_endpoint }}
replicated-api-token: ${{ needs.enable-tests.outputs.cmx_api_token }}
kots-dockerhub-username: '${{ secrets.E2E_DOCKERHUB_USERNAME }}'
kots-dockerhub-password: '${{ secrets.E2E_DOCKERHUB_PASSWORD }}'

Expand Down Expand Up @@ -2234,7 +2249,8 @@ jobs:
kotsadm-image-registry: ttl.sh
aws-access-key-id: '${{ secrets.E2E_SUPPORT_BUNDLE_AWS_ACCESS_KEY_ID }}'
aws-secret-access-key: '${{ secrets.E2E_SUPPORT_BUNDLE_AWS_SECRET_ACCESS_KEY }}'
replicated-api-token: '${{ secrets.C11Y_MATRIX_TOKEN }}'
replicated-api-endpoint: ${{ needs.enable-tests.outputs.cmx_api_endpoint }}
replicated-api-token: ${{ needs.enable-tests.outputs.cmx_api_token }}
kots-dockerhub-username: '${{ secrets.E2E_DOCKERHUB_USERNAME }}'
kots-dockerhub-password: '${{ secrets.E2E_DOCKERHUB_PASSWORD }}'
k8s-cluster-skip-teardown: true
Expand Down Expand Up @@ -2301,7 +2317,8 @@ jobs:
testim-branch: ${{ github.head_ref == 'main' && 'master' || github.head_ref }}
aws-access-key-id: '${{ secrets.E2E_SUPPORT_BUNDLE_AWS_ACCESS_KEY_ID }}'
aws-secret-access-key: '${{ secrets.E2E_SUPPORT_BUNDLE_AWS_SECRET_ACCESS_KEY }}'
replicated-api-token: '${{ secrets.C11Y_MATRIX_TOKEN }}'
replicated-api-endpoint: ${{ needs.enable-tests.outputs.cmx_api_endpoint }}
replicated-api-token: ${{ needs.enable-tests.outputs.cmx_api_token }}
kots-dockerhub-username: '${{ secrets.E2E_DOCKERHUB_USERNAME }}'
kots-dockerhub-password: '${{ secrets.E2E_DOCKERHUB_PASSWORD }}'
k8s-cluster-skip-teardown: true
Expand Down Expand Up @@ -2368,7 +2385,8 @@ jobs:
testim-branch: ${{ github.head_ref == 'main' && 'master' || github.head_ref }}
aws-access-key-id: '${{ secrets.E2E_SUPPORT_BUNDLE_AWS_ACCESS_KEY_ID }}'
aws-secret-access-key: '${{ secrets.E2E_SUPPORT_BUNDLE_AWS_SECRET_ACCESS_KEY }}'
replicated-api-token: '${{ secrets.C11Y_MATRIX_TOKEN }}'
replicated-api-endpoint: ${{ needs.enable-tests.outputs.cmx_api_endpoint }}
replicated-api-token: ${{ needs.enable-tests.outputs.cmx_api_token }}
kots-dockerhub-username: '${{ secrets.E2E_DOCKERHUB_USERNAME }}'
kots-dockerhub-password: '${{ secrets.E2E_DOCKERHUB_PASSWORD }}'
k8s-cluster-skip-teardown: true
Expand Down Expand Up @@ -2760,7 +2778,8 @@ jobs:
testim-branch: ${{ github.head_ref == 'main' && 'master' || github.head_ref }}
aws-access-key-id: '${{ secrets.E2E_SUPPORT_BUNDLE_AWS_ACCESS_KEY_ID }}'
aws-secret-access-key: '${{ secrets.E2E_SUPPORT_BUNDLE_AWS_SECRET_ACCESS_KEY }}'
replicated-api-token: '${{ secrets.C11Y_MATRIX_TOKEN }}'
replicated-api-endpoint: ${{ needs.enable-tests.outputs.cmx_api_endpoint }}
replicated-api-token: ${{ needs.enable-tests.outputs.cmx_api_token }}
kots-dockerhub-username: '${{ secrets.E2E_DOCKERHUB_USERNAME }}'
kots-dockerhub-password: '${{ secrets.E2E_DOCKERHUB_PASSWORD }}'

Expand Down Expand Up @@ -2800,7 +2819,8 @@ jobs:
testim-branch: ${{ github.head_ref == 'main' && 'master' || github.head_ref }}
aws-access-key-id: '${{ secrets.E2E_SUPPORT_BUNDLE_AWS_ACCESS_KEY_ID }}'
aws-secret-access-key: '${{ secrets.E2E_SUPPORT_BUNDLE_AWS_SECRET_ACCESS_KEY }}'
replicated-api-token: '${{ secrets.C11Y_MATRIX_TOKEN }}'
replicated-api-endpoint: ${{ needs.enable-tests.outputs.cmx_api_endpoint }}
replicated-api-token: ${{ needs.enable-tests.outputs.cmx_api_token }}
kots-dockerhub-username: '${{ secrets.E2E_DOCKERHUB_USERNAME }}'
kots-dockerhub-password: '${{ secrets.E2E_DOCKERHUB_PASSWORD }}'

Expand Down Expand Up @@ -2841,7 +2861,8 @@ jobs:
kots-airgap: true
aws-access-key-id: '${{ secrets.E2E_SUPPORT_BUNDLE_AWS_ACCESS_KEY_ID }}'
aws-secret-access-key: '${{ secrets.E2E_SUPPORT_BUNDLE_AWS_SECRET_ACCESS_KEY }}'
replicated-api-token: '${{ secrets.C11Y_MATRIX_TOKEN }}'
replicated-api-endpoint: ${{ needs.enable-tests.outputs.cmx_api_endpoint }}
replicated-api-token: ${{ needs.enable-tests.outputs.cmx_api_token }}
kots-dockerhub-username: '${{ secrets.E2E_DOCKERHUB_USERNAME }}'
kots-dockerhub-password: '${{ secrets.E2E_DOCKERHUB_PASSWORD }}'

Expand Down Expand Up @@ -3860,7 +3881,8 @@ jobs:
testim-branch: ${{ github.head_ref == 'main' && 'master' || github.head_ref }}
aws-access-key-id: '${{ secrets.E2E_SUPPORT_BUNDLE_AWS_ACCESS_KEY_ID }}'
aws-secret-access-key: '${{ secrets.E2E_SUPPORT_BUNDLE_AWS_SECRET_ACCESS_KEY }}'
replicated-api-token: '${{ secrets.C11Y_MATRIX_TOKEN }}'
replicated-api-endpoint: ${{ needs.enable-tests.outputs.cmx_api_endpoint }}
replicated-api-token: ${{ needs.enable-tests.outputs.cmx_api_token }}
kots-dockerhub-username: '${{ secrets.E2E_DOCKERHUB_USERNAME }}'
kots-dockerhub-password: '${{ secrets.E2E_DOCKERHUB_PASSWORD }}'

Expand Down Expand Up @@ -3900,7 +3922,8 @@ jobs:
testim-branch: ${{ github.head_ref == 'main' && 'master' || github.head_ref }}
aws-access-key-id: '${{ secrets.E2E_SUPPORT_BUNDLE_AWS_ACCESS_KEY_ID }}'
aws-secret-access-key: '${{ secrets.E2E_SUPPORT_BUNDLE_AWS_SECRET_ACCESS_KEY }}'
replicated-api-token: '${{ secrets.C11Y_MATRIX_TOKEN }}'
replicated-api-endpoint: ${{ needs.enable-tests.outputs.cmx_api_endpoint }}
replicated-api-token: ${{ needs.enable-tests.outputs.cmx_api_token }}
kots-dockerhub-username: '${{ secrets.E2E_DOCKERHUB_USERNAME }}'
kots-dockerhub-password: '${{ secrets.E2E_DOCKERHUB_PASSWORD }}'

Expand Down
Loading