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

remove yamlescape e2e test #4114

Merged
merged 1 commit into from
Oct 31, 2023
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
99 changes: 0 additions & 99 deletions .github/workflows/build-test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -1555,104 +1555,6 @@ jobs:
cluster-id: ${{ steps.create-cluster.outputs.cluster-id }}


validate-yamlescape:
runs-on: ubuntu-20.04
needs: [ enable-tests, can-run-ci, cmx-versions, build-push-kotsadm-image, build-e2e, build-kurl-proxy, build-migrations, push-minio, push-mc, push-rqlite ]
strategy:
fail-fast: false
matrix:
cluster: ${{ fromJson(needs.cmx-versions.outputs.versions-to-test) }}
continue-on-error: ${{ matrix.cluster.stage != 'stable' }}
env:
APP_SLUG: yamlescape
steps:
- name: Checkout
uses: actions/checkout@v3

- name: Create Cluster
id: create-cluster
uses: replicatedhq/replicated-actions/create-cluster@v1
with:
api-token: ${{ secrets.C11Y_MATRIX_TOKEN }}
kubernetes-distribution: ${{ matrix.cluster.distribution }}
kubernetes-version: ${{ matrix.cluster.version }}
cluster-name: automated-kots-${{ github.run_id }}-${{ matrix.cluster.distribution }}-${{ matrix.cluster.version }}
timeout-minutes: '120'
ttl: 2h
instance-type: ${{ matrix.cluster.distribution == 'gke' && 'n2-standard-4' || '' }}
export-kubeconfig: true

- name: download kots binary
uses: actions/download-artifact@v3
with:
name: kots
path: bin/

- run: chmod +x bin/kots

- name: create namespace and dockerhub secret
run: |
kubectl create ns "$APP_SLUG"
kubectl create secret docker-registry kotsadm-dockerhub --docker-server index.docker.io --docker-username "${{ secrets.E2E_DOCKERHUB_USERNAME }}" --docker-password "${{ secrets.E2E_DOCKERHUB_PASSWORD }}" --namespace "$APP_SLUG"

- name: run the test
run: |
set +e
echo ${{ secrets.YAMLESCAPE_LICENSE }} | base64 -d > license.yaml
./bin/kots \
install "$APP_SLUG/automated" \
--license-file license.yaml \
--no-port-forward \
--namespace "$APP_SLUG" \
--shared-password password \
--kotsadm-registry ttl.sh \
--kotsadm-namespace automated-${{ github.run_id }} \
--skip-preflights \
--kotsadm-tag 24h

EXIT_CODE=$?
if [ $EXIT_CODE -ne 0 ]; then
echo "------pods:"
kubectl -n "$APP_SLUG" get pods
echo "------kotsadm logs"
kubectl logs -l app=kotsadm --tail=100 --namespace "$APP_SLUG"
exit $EXIT_CODE
fi

COUNTER=1
while [ "$(./bin/kots get apps --namespace "$APP_SLUG" | awk 'NR>1{print $2}')" != "ready" ]; do
((COUNTER += 1))
if [ $COUNTER -gt 120 ]; then
echo "Timed out waiting for app to be ready"
./bin/kots get apps --namespace "$APP_SLUG"
echo "kotsadm logs:"
kubectl logs -l app=kotsadm --tail=100 --namespace "$APP_SLUG"
exit 1
fi
sleep 1
done

printf "App is installed successfully and is ready\n\n"
./bin/kots get apps --namespace "$APP_SLUG"

- name: Generate support bundle on failure
if: failure()
uses: ./.github/actions/generate-support-bundle
with:
kots-namespace: "$APP_SLUG"
aws-access-key-id: '${{ secrets.E2E_SUPPORT_BUNDLE_AWS_ACCESS_KEY_ID }}'
aws-secret-access-key: '${{ secrets.E2E_SUPPORT_BUNDLE_AWS_SECRET_ACCESS_KEY }}'

- name: Remove Cluster
id: remove-cluster
uses: replicatedhq/replicated-actions/remove-cluster@v1
if: ${{ always() && steps.create-cluster.outputs.cluster-id != '' }}
continue-on-error: true
with:
api-token: ${{ secrets.C11Y_MATRIX_TOKEN }}
cluster-id: ${{ steps.create-cluster.outputs.cluster-id }}


validate-no-redeploy-on-restart:
runs-on: ubuntu-20.04
needs: [ enable-tests, can-run-ci, build-push-kotsadm-image, build-kurl-proxy, build-migrations, push-minio, push-mc, push-rqlite ]
Expand Down Expand Up @@ -3518,7 +3420,6 @@ jobs:
- validate-kots-pull
- validate-app-version-label
- validate-helm-install-order
- validate-yamlescape
- validate-no-redeploy-on-restart
- validate-kubernetes-installer-preflight
- validate-kots-upgrade
Expand Down
Loading