diff --git a/.github/workflows/ur.yml b/.github/workflows/ur.yml deleted file mode 100644 index e894822ca..000000000 --- a/.github/workflows/ur.yml +++ /dev/null @@ -1,105 +0,0 @@ ---- -name: Release to UR -on: - workflow_dispatch: - -env: - DOCKERHUB_REPOSITORY: dfedigital/get-into-teaching-api - CF_PROVIDER_DIR: $HOME/.terraform.d/plugins/linux_amd64/terraform-provider-cloudfoundry - CF_PROVIDER_URL: https://github.com/cloudfoundry-community/terraform-provider-cloudfoundry/releases/download/v0.12.3/terraform-provider-cloudfoundry_v0.12.3_linux_amd64 - -jobs: - deploy_qa: - name: 'Deploy to User Research (UR)' - runs-on: ubuntu-latest - - defaults: - run: - shell: bash - - steps: - - - name: Checkout - uses: actions/checkout@v2 - - - name: Get Short SHA - id: sha - run: echo ::set-output name=short::$(git rev-parse --short $GITHUB_SHA) - - - name: Install Terraform CloudFoundry Provider - run: | - mkdir -p $HOME/.terraform.d/plugins/linux_amd64 - wget -O ${{ env.CF_PROVIDER_DIR }} ${{ env.CF_PROVIDER_URL }} - chmod +x ${{ env.CF_PROVIDER_DIR }} - - - name: Wait for any previous runs to complete - uses: softprops/turnstyle@v1 - env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - with: - continue-after-seconds: 180 - - - uses: hashicorp/setup-terraform@v1 - with: - terraform_version: 0.12.29 - - - name: Terraform Init - run: | - cd terraform/paas && pwd - terraform init -backend-config=ur.bk.vars - env: - ARM_ACCESS_KEY: "${{ secrets.TEST_ARM_ACCESS_KEY }}" - TF_VAR_user: "${{ secrets.GOVUKPAAS_USERNAME }}" - TF_VAR_password: "${{ secrets.GOVUKPAAS_PASSWORD }}" - - - name: Terraform Plan - run: | - cd terraform/paas && pwd - terraform plan -var-file=ur.env.tfvars -out plan - env: - ARM_ACCESS_KEY: "${{ secrets.TEST_ARM_ACCESS_KEY }}" - TF_VAR_user: "${{ secrets.GOVUKPAAS_USERNAME }}" - TF_VAR_password: "${{ secrets.GOVUKPAAS_PASSWORD }}" - TF_VAR_paas_api_docker_image: ${{env.DOCKERHUB_REPOSITORY}}:sha-${{ steps.sha.outputs.short}} - TF_VAR_CRM_SERVICE_URL: "${{ secrets.CRM_SERVICE_URL }}" - TF_VAR_CRM_CLIENT_ID: "${{ secrets.CRM_CLIENT_ID }}" - TF_VAR_CRM_CLIENT_SECRET: "${{ secrets.CRM_CLIENT_SECRET }}" - TF_VAR_CRM_TENANT_ID: "${{ secrets.CRM_TENANT_ID }}" - TF_VAR_SHARED_SECRET: "${{ secrets.SHARED_SECRET }}" - TF_VAR_NOTIFY_API_KEY: "${{ secrets.NOTIFY_API_KEY }}" - TF_VAR_TOTP_SECRET_KEY: "${{ secrets.TOTP_SECRET_KEY }}" - - - name: Terraform Apply - run: | - cd terraform/paas && pwd - terraform apply -auto-approve plan - env: - ARM_ACCESS_KEY: "${{ secrets.TEST_ARM_ACCESS_KEY }}" - TF_VAR_user: "${{ secrets.GOVUKPAAS_USERNAME }}" - TF_VAR_password: "${{ secrets.GOVUKPAAS_PASSWORD }}" - - - name: Smoke Test - run: | - tests/confidence/healthcheck.sh "get-into-teaching-api-ur" "${{ steps.sha.outputs.short}}" - - - name: Create Sentry release - if: success() - uses: getsentry/action-release@v1.0.0 - env: - SENTRY_AUTH_TOKEN: ${{ secrets.SENTRY_AUTH_TOKEN }} - SENTRY_ORG: ${{ secrets.SENTRY_ORG }} - SENTRY_PROJECT: ${{ secrets.SENTRY_PROJECT }} - with: - environment: ur - - - name: Slack Notification - if: failure() - uses: rtCamp/action-slack-notify@master - env: - SLACK_CHANNEL: getintoteaching_tech - SLACK_COLOR: '#3278BD' - SLACK_ICON: https://github.com/rtCamp.png?size=48 - SLACK_MESSAGE: ':disappointed_relieved: Pipeline Failure carrying out job ${{github.job}} :disappointed_relieved:' - SLACK_TITLE: 'Failure: ${{ github.workflow }}' - SLACK_WEBHOOK: ${{ secrets.SLACK_WEBHOOK }} -