diff --git a/.github/actions/notify-slack/action.yaml b/.github/actions/notify-slack/action.yaml deleted file mode 100644 index 7ce383f8d8..0000000000 --- a/.github/actions/notify-slack/action.yaml +++ /dev/null @@ -1,48 +0,0 @@ -name: "Notify slack" -description: "Send a message by webhook" -inputs: - webhook-url: - description: "Webhook URL to send the message to" - required: true - message: - description: "Message text" - required: true - channel: - description: "Slack channel" - required: true -outputs: {} -runs: - using: "composite" - steps: - - name: Notify slack - shell: bash - env: - msg: | - { - "channel": "${{ inputs.channel }}", - "blocks": [ - { - "type": "section", - "text": { - "type": "mrkdwn", - "text": "${{ inputs.message }}" - } - }, - { - "type": "actions", - "elements": [ - { - "type": "button", - "text": { - "type": "plain_text", - "text": "View run" - }, - "url": "https://github.com/${{ github.repository }}/actions/runs/${{ github.run_id }}" - } - ] - } - ] - } - # Using curl here is just hard to read (and - # https://github.com/curl/curl/issues/1978) - run: printenv msg | http --body --check-status "${{ inputs.webhook-url }}" diff --git a/.github/aws-nuke-config.yaml b/.github/aws-nuke-config.yaml deleted file mode 100644 index c85279c907..0000000000 --- a/.github/aws-nuke-config.yaml +++ /dev/null @@ -1,15 +0,0 @@ ---- -regions: - - "us-west-2" - -account-blocklist: - - "we-dont-have-a-prod-account-to-blacklist-but-this-field-is-mandatory" - -accounts: - AWS_ACCOUNT_ID_REPLACE_ME: - filters: - CloudFormationStack: - - "EC2RoleWatchDog" - - "Create-PatchBaseline" - - "PVRE-ComplianceReporting" - - "aws-sam-cli-managed-default" diff --git a/.github/workflows/aws-cleanup.yaml b/.github/workflows/aws-cleanup.yaml deleted file mode 100644 index 0c66512366..0000000000 --- a/.github/workflows/aws-cleanup.yaml +++ /dev/null @@ -1,34 +0,0 @@ -name: AWS cleanup - -on: - schedule: - - cron: '0 0 * * 0' - workflow_dispatch: {} - -jobs: - cleanup: - name: Cleanup AWS resources - environment: "Integration tests" - runs-on: ubuntu-latest - steps: - - name: Checkout - uses: actions/checkout@v2 - - name: Run AWS nuke - timeout-minutes: 1200 - env: - AWS_ACCESS_KEY_ID: "${{ secrets.AWS_ACCESS_KEY_ID }}" - AWS_SECRET_ACCESS_KEY: "${{ secrets.AWS_SECRET_ACCESS_KEY }}" - AWS_ACCOUNT_ID: "${{ secrets.AWS_ACCOUNT_ID }}" - working-directory: .github - # Cloudformation deletes are slow and not in parallel, so your better off deleting all EKS resources first as they - # run in parallel. - run: | - sed -i "s/AWS_ACCOUNT_ID_REPLACE_ME/$AWS_ACCOUNT_ID/" aws-nuke-config.yaml - wget https://github.com/rebuy-de/aws-nuke/releases/download/v2.15.0-rc.3/aws-nuke-v2.15.0.rc.3-linux-amd64.tar.gz - tar -xvf aws-nuke-v2.15.0.rc.3-linux-amd64.tar.gz - mv aws-nuke-v2.15.0.rc.3-linux-amd64 aws-nuke - chmod +x aws-nuke - ./aws-nuke -c aws-nuke-config.yaml --force --no-dry-run --target=EKSNodegroups,EKSFargateProfiles,EKSCluster - ./aws-nuke -c aws-nuke-config.yaml --force --no-dry-run --target=CloudFormationStack - ./aws-nuke -c aws-nuke-config.yaml --force --no-dry-run --target=EC2VPC - diff --git a/.github/workflows/integration-tests.yaml b/.github/workflows/integration-tests.yaml deleted file mode 100644 index 07afa27a3d..0000000000 --- a/.github/workflows/integration-tests.yaml +++ /dev/null @@ -1,59 +0,0 @@ -name: Integration tests - -on: - schedule: - - cron: '0 */12 * * 1,2,3,4,5,6' - workflow_dispatch: {} - -jobs: - it: - name: Run integration tests - environment: "Integration tests" - runs-on: ubuntu-latest - container: weaveworks/eksctl-build:83999a3391d78ed18a2e6093328d1122c927956f - env: - SSH: "/root/.ssh" - steps: - - name: Checkout - uses: actions/checkout@v2 - - name: Cache go-build and mod - uses: actions/cache@v2 - with: - path: | - ~/.cache/go-build/ - ~/go/pkg/mod/ - key: ${{ hashFiles('go.sum') }} - - name: Setup SSH known hosts - shell: bash - run: | - mkdir -p ${SSH} && chmod 700 ${SSH} - ssh-keyscan github.com >> ${SSH}/known_hosts - - name: Setup SSH key - shell: bash - env: - SSH_AUTH_SOCK: /tmp/ssh_agent.sock - run: | - ssh-agent -a $SSH_AUTH_SOCK > /dev/null - ssh-add - <<< "${{ secrets.EKSCTLBOT_SSH_KEY }}" - - name: Run integration tests - env: - SSH_AUTH_SOCK: /tmp/ssh_agent.sock - AWS_ACCESS_KEY_ID: "${{ secrets.AWS_ACCESS_KEY_ID }}" - AWS_SECRET_ACCESS_KEY: "${{ secrets.AWS_SECRET_ACCESS_KEY }}" - TEST_V: "1" - GITHUB_TOKEN: "${{ secrets.EKSCTLBOT_TOKEN }}" - run: make integration-test - - name: Notify slack on success - if: success() && github.event_name == 'schedule' - uses: ./.github/actions/notify-slack - with: - webhook-url: "${{ secrets.SLACK_WEBHOOK }}" - message: ":deal-with-it-parrot: An integration test run succeeded!" - channel: team-pitch-black - - name: Notify slack on failure - if: failure() && github.event_name == 'schedule' - uses: ./.github/actions/notify-slack - with: - webhook-url: "${{ secrets.SLACK_WEBHOOK }}" - message: ":ahhhhhhhhh: An integration test run failed!" - channel: team-pitch-black diff --git a/.github/workflows/release-candidate.yaml b/.github/workflows/release-candidate.yaml index 060c6c3935..762e2fc4a9 100644 --- a/.github/workflows/release-candidate.yaml +++ b/.github/workflows/release-candidate.yaml @@ -1,11 +1,7 @@ name: Release candidate on: - workflow_dispatch: - inputs: - skipIntegrationTests: - description: 'Skip check for successful integration tests:' - default: 'false' + workflow_dispatch: {} jobs: rc: @@ -13,27 +9,6 @@ jobs: runs-on: ubuntu-latest container: weaveworks/eksctl-build:83999a3391d78ed18a2e6093328d1122c927956f steps: - - uses: actions/github-script@v3 - name: Get integration tests status - id: it-status - with: - github-token: ${{ secrets.WEAVEWORKSBOT_TOKEN }} - script: | - // There's no other way to identify the integration test job - // GH branch protections are also just a string - // must be in sync with integration-tests.yaml - const integrationTestsCheckName = "Run integration tests"; - const { data } = await github.checks.listForRef({ - ...context.repo, - ref: "${{ github.sha }}", - check_name: integrationTestsCheckName, - }); - return data.check_runs.some(cr => - cr.status === "completed" && cr.conclusion === "success" - ); - - name: Fail if integration tests not passed - if: "!fromJson(steps.it-status.outputs.result) && !fromJson(github.event.inputs.skipIntegrationTests)" - run: echo "Integration tests haven't passed yet!" && exit 1 - name: Checkout uses: actions/checkout@v2 with: