From 41be4434153fe7732629bf31da1271057e370bde Mon Sep 17 00:00:00 2001 From: Dmitriy Ivolgin Date: Fri, 16 Jun 2023 16:30:33 -0700 Subject: [PATCH] kgrid has reached EOL and is no longer maintained (#3942) --- .github/workflows/release.yaml | 40 -------------------------------- hack/deploy-kgrid.sh | 42 ---------------------------------- hack/wait-kgrid.sh | 41 --------------------------------- 3 files changed, 123 deletions(-) delete mode 100755 hack/deploy-kgrid.sh delete mode 100755 hack/wait-kgrid.sh diff --git a/.github/workflows/release.yaml b/.github/workflows/release.yaml index bd5720bd9b..7b344f1383 100644 --- a/.github/workflows/release.yaml +++ b/.github/workflows/release.yaml @@ -449,43 +449,3 @@ jobs: TESTIM_ACCESS_TOKEN: ${{ secrets.TESTIM_ACCESS_TOKEN }} E2E_GH_PAT: ${{ secrets.E2E_GH_PAT }} KOTS_BUILD_STATUS_SLACK_WEBHOOK_URL: ${{ secrets.KOTS_BUILD_STATUS_SLACK_WEBHOOK_URL }} - - # start-kgrid-test: - # runs-on: ubuntu-20.04 - # needs: [release-go-api-tagged, generate-tag] - # if: github.ref_type == 'branch' - # env: - # GIT_TAG: ${{ needs.generate-tag.outputs.tag }} - # steps: - # - name: Checkout - # uses: actions/checkout@v3 - # - uses: kceb/pull-request-url-action@v2 - # id: pr_url - # - name: Expose git commit data - # uses: rlespinasse/git-commit-data-action@v1.x # no v1 tag - # - name: Create staging gitops commit - # env: - # REPLICATEDCOM_GITHUB_PRIVATE_KEY: ${{ secrets.REPLICATEDCOM_GITHUB_PRIVATE_KEY }} - # PR_URL: ${{ steps.pr_url.outputs.url }} - # GITOPS_OWNER: replicatedcom - # GITOPS_REPO: gitops-deploy - # GITOPS_BRANCH: main - # RUN_ID: ${{ github.run_id }} - # run: ./hack/deploy-kgrid.sh - # - name: Create production gitops commit - # id: deploy_kgrid - # env: - # REPLICATEDCOM_GITHUB_PRIVATE_KEY: ${{ secrets.REPLICATEDCOM_GITHUB_PRIVATE_KEY }} - # PR_URL: ${{ steps.pr_url.outputs.url }} - # OVERLAY: production - # GITOPS_OWNER: replicatedcom - # GITOPS_REPO: gitops-deploy - # GITOPS_BRANCH: release - # run: ./hack/deploy-kgrid.sh - # - name: Wait for production kgrid tests - # env: - # KGRID_API_TOKEN: ${{ secrets.KGRID_API_TOKEN }} - # KGRID_RUN_ID: ${{ steps.deploy_kgrid.outputs.kgrid-run-id }} - # run: | - # printf "\n\nSupport bundles are available in the Replicated production AWS account under the 'kgrid-support-bundles' S3 bucket. To download a support bundle, you can do so using the AWS Management Console, or by configuring the AWS cli tool with the appropriate credentials and running the following command: \n\naws s3 cp .tar.gz\n\n" - # ./hack/wait-kgrid.sh diff --git a/hack/deploy-kgrid.sh b/hack/deploy-kgrid.sh deleted file mode 100755 index 7ca575b933..0000000000 --- a/hack/deploy-kgrid.sh +++ /dev/null @@ -1,42 +0,0 @@ -#!/bin/bash - -if [ -z ${GIT_TAG} ]; then - echo "This script must run from GithubActions with GIT_TAG env variable set" - exit 1 -fi - -if [ -z ${GITHUB_RUN_ID} ]; then - echo "This script must run from GithubActions with GITHUB_RUN_ID env variable set" - exit 1 -fi - -export KGRID_RUN_ID=`date +%s`-${GITHUB_RUN_ID} - -echo ${REPLICATEDCOM_GITHUB_PRIVATE_KEY} | base64 -d > ~/github_private_key -chmod 600 ~/github_private_key -export GIT_SSH_COMMAND='ssh -i ~/github_private_key' -git config --global user.email ${GIT_COMMIT_COMMITTER_EMAIL} -git config --global user.name ${GIT_COMMIT_COMMITTER_NAME} - -rm -rf ${GITOPS_REPO} -git clone --single-branch -b ${GITOPS_BRANCH} git@github.com:${GITOPS_OWNER}/${GITOPS_REPO} -cd ${GITOPS_REPO} - -cat < kgrid/version.yaml -apiVersion: kgrid.replicated.com/v1alpha1 -kind: Version -metadata: - name: version - namespace: kgrid-system - labels: - runId: ${KGRID_RUN_ID} -spec: - kots: - latest: "${GIT_TAG}" -EOT - -git add . -git commit --allow-empty -m "${PR_URL}" -git push origin ${GITOPS_BRANCH} - -echo "kgrid-run-id=$KGRID_RUN_ID" >> "$GITHUB_OUTPUT" \ No newline at end of file diff --git a/hack/wait-kgrid.sh b/hack/wait-kgrid.sh deleted file mode 100755 index ba8e663500..0000000000 --- a/hack/wait-kgrid.sh +++ /dev/null @@ -1,41 +0,0 @@ -#!/bin/bash - -if [ -z ${KGRID_API_TOKEN} ]; then - echo "KGRID_API_TOKEN must be set" - exit 1 -fi - -if [ -z ${KGRID_RUN_ID} ]; then - echo "KGRID_RUN_ID must be set" - exit 1 -fi - -touch -d '+40 minute' kgrid_timeout -while true; do - curl -s https://kgrid.replicated.systems/v1/run/${KGRID_RUN_ID}/outcome \ - -H "Authorization: $KGRID_API_TOKEN" \ - > outcome.json - - RUN_RESULT=`cat outcome.json | jq ".outcome"` - - if [ "$RUN_RESULT" == "\"Pass\"" ]; then - echo "Passed" - cat outcome.json | jq . - exit 0 - fi - - if [ "$RUN_RESULT" == "\"Fail\"" ]; then - echo "Failed" - cat outcome.json | jq . - exit 1 - fi - - touch kgrid_now - if test kgrid_now -nt kgrid_timeout; then - echo "Timed out" - cat outcome.json | jq . - exit 1 - fi - - sleep 30 -done