diff --git a/.github/ISSUE_TEMPLATE.md b/.github/ISSUE_TEMPLATE.md deleted file mode 100644 index 6fe72226..00000000 --- a/.github/ISSUE_TEMPLATE.md +++ /dev/null @@ -1,6 +0,0 @@ -### What did you do? (steps to reproduce) - -### What happened? (actual results) - -### What should have happened? (expected results) - diff --git a/.github/PULL_REQUEST_TEMPLATE.md b/.github/PULL_REQUEST_TEMPLATE.md deleted file mode 100644 index 6bd42bdb..00000000 --- a/.github/PULL_REQUEST_TEMPLATE.md +++ /dev/null @@ -1,15 +0,0 @@ -## Ticket and context - -Ticket: [HFEYP-###](https://dfedigital.atlassian.net/browse/HFEYP-###) -## Tech review - -### Is there anything that the code reviewer should know? - -### Code quality checks -- [ ] All commit messages are meaningful and true - -## Product review - -### How can someone see it in review app? -1. Click the link to review app (posted by a `github-actions` bot below) -2. Follow the steps from the ticket. \ No newline at end of file diff --git a/.github/workflows/deploy_service_unavailable.yml b/.github/workflows/deploy_service_unavailable.yml deleted file mode 100644 index 53add31a..00000000 --- a/.github/workflows/deploy_service_unavailable.yml +++ /dev/null @@ -1,33 +0,0 @@ -name: Deploy Service Unavailable - -on: - workflow_dispatch: - inputs: - confirm_action: - description: Confirm deploy - type: boolean - default: false - -jobs: - deploy-service-unavailable: - runs-on: ubuntu-20.04 - if: ${{ github.event.inputs.confirm_action }} - steps: - - name: Install CF CLI on Prod - uses: DFE-Digital/github-actions/setup-cf-cli@master - with: - CF_USERNAME: ${{ secrets.GOVPAAS_USERNAME_PROD }} - CF_PASSWORD: ${{ secrets.GOVPAAS_PASSWORD_PROD }} - CF_SPACE_NAME: eyfs-prod - # Optional inputs - CF_CLI_VERSION: v7 # default v7, allowed values: v6 or v7 - CF_ORG_NAME: dfe # default - CF_API_URL: https://api.london.cloud.service.gov.uk # default - INSTALL_CONDUIT: false # default: false - - name: make-unavailable - run: | - cf target -s eyfs-prod - cd service_unavailable && cf push - cf map-route eyfs-service-unavailable education.gov.uk --hostname help-for-early-years-providers - echo Waiting 5s for route to be registered... && sleep 5 - cf unmap-route eyfs-prod education.gov.uk --hostname help-for-early-years-providers diff --git a/.github/workflows/deploy_to_dev.yml b/.github/workflows/deploy_to_dev.yml deleted file mode 100644 index c2f942af..00000000 --- a/.github/workflows/deploy_to_dev.yml +++ /dev/null @@ -1,104 +0,0 @@ -name: deploy_to_dev - -on: - push: - branches: - - main - paths-ignore: - - 'documentation/**' - -jobs: - build: - runs-on: ubuntu-20.04 - env: - DOCKER_IMAGE: ghcr.io/dfe-digital/help-for-early-years-providers - steps: - - name: Check workflow concurrency - uses: softprops/turnstyle@v1 - with: - poll-interval-seconds: 20 - same-branch-only: true - env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - - - name: Checkout Code - uses: actions/checkout@v2 - - - name: Pin Terraform version - uses: hashicorp/setup-terraform@v1.3.2 - with: - terraform_version: 0.14.0 - - - name: Set up Docker Buildx - uses: docker/setup-buildx-action@v2 - with: - version: v0.9.1 - - - name: Login to Github Container Registry - uses: docker/login-action@v2 - with: - registry: ghcr.io - username: ${{ github.repository_owner }} - password: ${{ secrets.GITHUB_TOKEN }} - - - name: Build and push docker image from builder target - uses: docker/build-push-action@v4 - with: - context: . - build-args: BUILDKIT_INLINE_CACHE=1 - cache-from: | - ${{ env.DOCKER_IMAGE }}-dev:builder - push: true - tags: ${{ env.DOCKER_IMAGE }}-dev:builder - target: builder - - - name: Build and push docker image from help-for-early-years-providers-gems-node-modules target - uses: docker/build-push-action@v4 - with: - context: . - build-args: BUILDKIT_INLINE_CACHE=1 - cache-from: | - ${{ env.DOCKER_IMAGE }}-dev:gems-node-modules - push: true - tags: ${{ env.DOCKER_IMAGE }}-dev:gems-node-modules - target: help-for-early-years-providers-gems-node-modules - - - name: Build and push docker image from assets-precompile target - uses: docker/build-push-action@v4 - with: - context: . - build-args: BUILDKIT_INLINE_CACHE=1 - cache-from: | - ${{ env.DOCKER_IMAGE }}-dev:assets-precompile - push: true - tags: ${{ env.DOCKER_IMAGE }}-dev:assets-precompile - target: assets-precompile - - - name: Build and push docker image from production target - uses: docker/build-push-action@v4 - with: - context: . - build-args: | - BUILDKIT_INLINE_CACHE=1 - SHA=${{ github.sha }} - cache-from: | - type=registry,ref=${{ env.DOCKER_IMAGE }}-prod:latest - push: true - tags: | - ${{ env.DOCKER_IMAGE }}-prod:latest - ${{ env.DOCKER_IMAGE }}-prod:${{ github.sha }} - target: production - - - name: Deploy to dev - env: - AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }} - AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }} - TF_VAR_paas_user: ${{ secrets.GOVPAAS_USERNAME }} - TF_VAR_paas_password: ${{ secrets.GOVPAAS_PASSWORD }} - TF_VAR_statuscake_username: ${{ secrets.STATUSCAKE_USERNAME }} - TF_VAR_statuscake_apikey: ${{ secrets.STATUSCAKE_APIKEY }} - run: | - export TF_VAR_paas_app_docker_image=${{ env.DOCKER_IMAGE }}-prod:${{ github.sha }} - cd terraform/app - terraform init -reconfigure -input=false -backend-config="bucket=${{secrets.AWS_BUCKET}}" - terraform apply -input=false -auto-approve -var-file ../workspace-variables/dev.tfvars -var='secret_paas_app_env_values={"RAILS_MASTER_KEY":"${{secrets.RAILS_MASTER_KEY_DEV}}", "AWS_ACCESS_KEY_ID": "${{secrets.AWS_ACCESS_KEY_ID}}", "AWS_SECRET_ACCESS_KEY": "${{secrets.AWS_SECRET_ACCESS_KEY}}", "AWS_REGION": "${{secrets.AWS_REGION}}", "AWS_BUCKET": "${{secrets.AWS_BUCKET}}", "BASIC_AUTH_USER": "${{secrets.BASIC_AUTH_USER}}", "BASIC_AUTH_PASSWORD": "${{secrets.BASIC_AUTH_PASSWORD}}", "GOOGLE_ANALYTICS_CONTAINER_ID": "${{ secrets.GA_CONTAINER_ID_DEV }}", "GOOGLE_ANALYTICS_TRACKING_ID": "${{ secrets.GA_TRACKING_ID_DEV }}"}' diff --git a/.github/workflows/deploy_to_production.yml b/.github/workflows/deploy_to_production.yml deleted file mode 100644 index 9d8b7d74..00000000 --- a/.github/workflows/deploy_to_production.yml +++ /dev/null @@ -1,62 +0,0 @@ -name: Deploy to Production - -on: - workflow_dispatch: - inputs: - version: - description: Version to deploy - required: true - -jobs: - deploy-to-production: - runs-on: ubuntu-20.04 - env: - DOCKER_IMAGE: ghcr.io/dfe-digital/help-for-early-years-providers-prod - steps: - - name: Check workflow concurrency - uses: softprops/turnstyle@v1 - with: - poll-interval-seconds: 20 - same-branch-only: true - env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - - - name: Checkout code - uses: actions/checkout@v2 - with: - ref: ${{ github.event.inputs.version }} - - - name: Pin Terraform version - uses: hashicorp/setup-terraform@v1.3.2 - with: - terraform_version: 0.14.0 - - - name: Deploy to production - env: - AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID_PROD }} - AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY_PROD }} - TF_VAR_paas_user: ${{ secrets.GOVPAAS_USERNAME_PROD }} - TF_VAR_paas_password: ${{ secrets.GOVPAAS_PASSWORD_PROD }} - TF_VAR_statuscake_username: ${{ secrets.STATUSCAKE_USERNAME }} - TF_VAR_statuscake_apikey: ${{ secrets.STATUSCAKE_APIKEY }} - run: | - export TF_VAR_paas_app_docker_image=${{ env.DOCKER_IMAGE }}:${{ github.event.inputs.version }} - cd terraform/app - terraform init -reconfigure -input=false -backend-config="bucket=${{secrets.AWS_BUCKET_PROD}}" - terraform apply -input=false -auto-approve -var-file ../workspace-variables/prod.tfvars -var='secret_paas_app_env_values={"RAILS_MASTER_KEY":"${{secrets.RAILS_MASTER_KEY_PROD}}", "RELEASE_VERSION":"${{github.event.inputs.version}}", "AWS_ACCESS_KEY_ID": "${{secrets.AWS_ACCESS_KEY_ID_PROD}}", "AWS_SECRET_ACCESS_KEY": "${{secrets.AWS_SECRET_ACCESS_KEY_PROD}}", "AWS_REGION": "${{secrets.AWS_REGION}}", "AWS_BUCKET": "${{secrets.AWS_BUCKET_PROD}}", "BASIC_AUTH_USER": "${{secrets.BASIC_AUTH_USER}}", "BASIC_AUTH_PASSWORD": "${{secrets.BASIC_AUTH_PASSWORD}}"}' - - - name: Install CF CLI on Prod - uses: DFE-Digital/github-actions/setup-cf-cli@master - with: - CF_USERNAME: ${{ secrets.GOVPAAS_USERNAME_PROD }} - CF_PASSWORD: ${{ secrets.GOVPAAS_PASSWORD_PROD }} - CF_SPACE_NAME: eyfs-prod - # Optional inputs - CF_CLI_VERSION: v7 # default v7, allowed values: v6 or v7 - CF_ORG_NAME: dfe # default - CF_API_URL: https://api.london.cloud.service.gov.uk # default - INSTALL_CONDUIT: false # default: false - - - name: Remap DNS route on Prod - run: | - cf map-route eyfs-prod education.gov.uk --hostname help-for-early-years-providers diff --git a/.github/workflows/deploy_to_sandbox.yml b/.github/workflows/deploy_to_sandbox.yml deleted file mode 100644 index c9f6fe98..00000000 --- a/.github/workflows/deploy_to_sandbox.yml +++ /dev/null @@ -1,44 +0,0 @@ -name: Deploy to Sandbox - -on: - workflow_dispatch: - inputs: - version: - description: Version to deploy - required: true - -jobs: - deploy: - runs-on: ubuntu-20.04 - env: - DOCKER_IMAGE: ghcr.io/dfe-digital/help-for-early-years-providers-prod - steps: - - name: Check workflow concurrency - uses: softprops/turnstyle@v1 - with: - poll-interval-seconds: 20 - same-branch-only: true - env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - - - name: Checkout code - uses: actions/checkout@v2 - - - name: Pin Terraform version - uses: hashicorp/setup-terraform@v1.3.2 - with: - terraform_version: 0.14.0 - - - name: Deploy to Sandbox - env: - AWS_ACCESS_KEY_ID: ${{secrets.AWS_ACCESS_KEY_ID_SANDBOX }} - AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY_SANDBOX }} - TF_VAR_paas_user: ${{ secrets.GOVPAAS_USERNAME }} - TF_VAR_paas_password: ${{ secrets.GOVPAAS_PASSWORD }} - TF_VAR_statuscake_username: ${{ secrets.STATUSCAKE_USERNAME }} - TF_VAR_statuscake_apikey: ${{ secrets.STATUSCAKE_APIKEY }} - run: | - export TF_VAR_paas_app_docker_image=${{ env.DOCKER_IMAGE }}:${{ github.event.inputs.version }} - cd terraform/app - terraform init -reconfigure -input=false -backend-config="bucket=${{secrets.AWS_BUCKET_SANDBOX}}" - terraform apply -input=false -auto-approve -var-file ../workspace-variables/sandbox.tfvars -var='secret_paas_app_env_values={"RAILS_MASTER_KEY":"${{secrets.RAILS_MASTER_KEY_SANDBOX}}", "RELEASE_VERSION":"${{github.event.inputs.version}}", "AWS_ACCESS_KEY_ID": "${{secrets.AWS_ACCESS_KEY_ID_SANDBOX}}", "AWS_SECRET_ACCESS_KEY": "${{secrets.AWS_SECRET_ACCESS_KEY_SANDBOX}}", "AWS_REGION": "${{secrets.AWS_REGION}}", "AWS_BUCKET": "${{secrets.AWS_BUCKET_SANDBOX}}", "BASIC_AUTH_USER": "${{secrets.BASIC_AUTH_USER}}", "BASIC_AUTH_PASSWORD": "${{secrets.BASIC_AUTH_PASSWORD}}"}' diff --git a/.github/workflows/deploy_to_staging.yml b/.github/workflows/deploy_to_staging.yml deleted file mode 100644 index 0b2c02dd..00000000 --- a/.github/workflows/deploy_to_staging.yml +++ /dev/null @@ -1,74 +0,0 @@ -name: Deploy to staging - -on: - workflow_dispatch: - inputs: - version: - description: Which version are you creating? ("vx.x.x") - required: true - ref: - description: Git ref/branch to deploy - required: true - default: main -jobs: - deploy-to-staging: - runs-on: ubuntu-20.04 - env: - DOCKER_IMAGE: ghcr.io/dfe-digital/help-for-early-years-providers-prod - steps: - - name: Check workflow concurrency - uses: softprops/turnstyle@v1 - with: - poll-interval-seconds: 20 - same-branch-only: true - env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - - - name: Check tag format - run: | - echo ${{ github.event.inputs.version }} | grep -E '^v[0-9]+\.[0-9]+\.[0-9]+$' - - - name: Pin Terraform version - uses: hashicorp/setup-terraform@v1.3.2 - with: - terraform_version: 0.14.0 - - - uses: actions/checkout@v2 - name: Checkout Code - with: - ref: ${{ github.event.inputs.ref }} - - - name: Tag deployment - run: | - git tag --force ${{ github.event.inputs.version }} - git push --force origin refs/tags/${{ github.event.inputs.version }} - echo "HEAD=$(git rev-parse ${{ github.event.inputs.version }})" >> $GITHUB_ENV - - - name: Login to Github Container Registry - uses: docker/login-action@v2 - with: - registry: ghcr.io - username: ${{ github.repository_owner }} - password: ${{ secrets.GITHUB_TOKEN }} - - - name: retag docker image - run: | - docker pull ${{ env.DOCKER_IMAGE }}:${{ env.HEAD }} - docker tag ${{ env.DOCKER_IMAGE }}:${{ env.HEAD }} ${{ env.DOCKER_IMAGE }}:${{ github.event.inputs.version }} - docker push ${{ env.DOCKER_IMAGE }}:${{ github.event.inputs.version }} - - - name: Deploy to staging - env: - AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID_STAGING }} - AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY_STAGING }} - TF_VAR_paas_user: ${{ secrets.GOVPAAS_USERNAME_PREPROD }} - TF_VAR_paas_password: ${{ secrets.GOVPAAS_PASSWORD_PREPROD }} - TF_VAR_statuscake_username: ${{ secrets.STATUSCAKE_USERNAME }} - TF_VAR_statuscake_apikey: ${{ secrets.STATUSCAKE_APIKEY }} - run: | - echo "ENV:" - echo ${{env}} - export TF_VAR_paas_app_docker_image=${{ env.DOCKER_IMAGE }}:${{ github.event.inputs.version }} - cd terraform/app - terraform init -reconfigure -input=false -backend-config="bucket=${{secrets.AWS_BUCKET_STAGING}}" - terraform apply -input=false -auto-approve -var-file ../workspace-variables/preprod.tfvars -var='secret_paas_app_env_values={"RAILS_MASTER_KEY":"${{secrets.RAILS_MASTER_KEY_STAGING}}", "RELEASE_VERSION":"${{github.event.inputs.version}}"}' diff --git a/.github/workflows/destroy.yml b/.github/workflows/destroy.yml deleted file mode 100644 index 3616290f..00000000 --- a/.github/workflows/destroy.yml +++ /dev/null @@ -1,41 +0,0 @@ -name: Destroy -on: - pull_request: - branches: [ main ] - types: [ closed ] - -jobs: - destroy: - runs-on: ubuntu-20.04 - steps: - - uses: actions/checkout@v2 - name: Checkout Code - - - name: Terraform pin version - uses: hashicorp/setup-terraform@v1.3.2 - with: - terraform_version: 0.14.0 - - - name: Destroy review app - env: - AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }} - AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }} - TF_VAR_paas_user: ${{ secrets.GOVPAAS_USERNAME }} - TF_VAR_paas_password: ${{ secrets.GOVPAAS_PASSWORD }} - TF_VAR_statuscake_username: ${{ secrets.STATUSCAKE_USERNAME }} - TF_VAR_statuscake_apikey: ${{ secrets.STATUSCAKE_APIKEY }} - run: | - cd terraform/app - terraform init -reconfigure -input=false -backend-config="bucket=${{ secrets.AWS_BUCKET }}" -backend-config="key=review-pr-${{ github.event.number }}/terraform.tfstate" - terraform destroy -input=false -auto-approve -var-file ../workspace-variables/review.tfvars -var='environment=${{github.event.inputs.environment}}' - - - name: Configure AWS credentials - uses: aws-actions/configure-aws-credentials@v1 - with: - aws-access-key-id: ${{ secrets.AWS_ACCESS_KEY_ID }} - aws-secret-access-key: ${{ secrets.AWS_SECRET_ACCESS_KEY }} - aws-region: ${{ secrets.AWS_REGION }} - - - name: Delete terraform backend files - run: | - aws s3 rm s3://${{ secrets.AWS_BUCKET }}/review-pr-${{ github.event.number }}/terraform.tfstate diff --git a/.github/workflows/review.yml b/.github/workflows/review.yml deleted file mode 100644 index 46a186e3..00000000 --- a/.github/workflows/review.yml +++ /dev/null @@ -1,122 +0,0 @@ -name: Create Review App -on: - pull_request: - branches: [ main ] - types: [ opened, synchronize, reopened ] - paths-ignore: - - 'documentation/**' - -jobs: - deploy: - runs-on: ubuntu-20.04 - env: - DOCKER_IMAGE: ghcr.io/dfe-digital/help-for-early-years-provider-review - steps: - - uses: softprops/turnstyle@v1 - name: Check workflow concurrency - with: - poll-interval-seconds: 20 - same-branch-only: true - env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - - - name: setup-inputs - run: | - echo "ENVIRONMENT=review-pr-${{ github.event.number }}" >> $GITHUB_ENV - - - name: Checkout Code - uses: actions/checkout@v2 - with: - ref: ${{ github.event.pull_request.head.sha }} - - - name: Pin Terraform version - uses: hashicorp/setup-terraform@v1.2.1 - with: - terraform_version: 0.14.0 - - - name: Set up Docker Buildx - uses: docker/setup-buildx-action@v2 - with: - version: v0.9.1 - - - name: Login to Github Container Registry - uses: docker/login-action@v2 - with: - registry: ghcr.io - username: ${{ github.repository_owner }} - password: ${{ secrets.GITHUB_TOKEN }} - - - name: Build and push docker image from builder target - uses: docker/build-push-action@v4 - with: - context: . - build-args: BUILDKIT_INLINE_CACHE=1 - cache-from: | - ${{ env.DOCKER_IMAGE }}:builder - push: true - tags: ${{ env.DOCKER_IMAGE }}:builder - target: builder - - - name: Build and push docker image from help-for-early-years-providers-gems-node-modules target - uses: docker/build-push-action@v4 - with: - context: . - build-args: BUILDKIT_INLINE_CACHE=1 - cache-from: | - ${{ env.DOCKER_IMAGE }}:gems-node-modules - push: true - tags: ${{ env.DOCKER_IMAGE }}:gems-node-modules - target: help-for-early-years-providers-gems-node-modules - - - name: Build and push docker image from assets-precompile target - uses: docker/build-push-action@v4 - with: - context: . - build-args: BUILDKIT_INLINE_CACHE=1 - cache-from: | - ${{ env.DOCKER_IMAGE }}:assets-precompile - push: true - tags: ${{ env.DOCKER_IMAGE }}:assets-precompile - target: assets-precompile - - - name: Build and push docker image from production target - uses: docker/build-push-action@v4 - with: - context: . - build-args: | - BUILDKIT_INLINE_CACHE=1 - SHA=${{ github.event.pull_request.head.sha }} - cache-from: | - ${{ env.DOCKER_IMAGE }}:${{ env.ENVIRONMENT }} - ${{ env.DOCKER_IMAGE }}:latest - push: true - tags: | - ${{ env.DOCKER_IMAGE }}:${{ github.event.pull_request.head.sha }} - ${{ env.DOCKER_IMAGE }}:${{ env.ENVIRONMENT }} - ${{ env.DOCKER_IMAGE }}:latest - target: production - - - name: Deploy review app to dev - env: - AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }} - AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }} - TF_VAR_paas_user: ${{ secrets.GOVPAAS_USERNAME }} - TF_VAR_paas_password: ${{ secrets.GOVPAAS_PASSWORD }} - TF_VAR_statuscake_username: ${{ secrets.STATUSCAKE_USERNAME }} - TF_VAR_statuscake_apikey: ${{ secrets.STATUSCAKE_APIKEY }} - run: | - echo "ENV:" - echo ${{env}} - export TF_VAR_paas_app_docker_image=${{ env.DOCKER_IMAGE }}:${{ github.event.pull_request.head.sha }} - cd terraform/app - terraform init -reconfigure -input=false -backend-config="bucket=${{ secrets.AWS_BUCKET }}" -backend-config="key=${{ env.ENVIRONMENT }}/terraform.tfstate" - terraform plan -var-file ../workspace-variables/review.tfvars - terraform apply -input=false -auto-approve -var-file ../workspace-variables/review.tfvars -var='secret_paas_app_env_values={"RAILS_MASTER_KEY":"${{secrets.RAILS_MASTER_KEY_DEV}}", "AWS_ACCESS_KEY_ID": "${{secrets.AWS_ACCESS_KEY_ID_SANDBOX}}", "AWS_SECRET_ACCESS_KEY": "${{secrets.AWS_SECRET_ACCESS_KEY_SANDBOX}}", "AWS_REGION": "${{secrets.AWS_REGION_SANDBOX}}", "AWS_BUCKET": "${{secrets.AWS_BUCKET_SANDBOX}}", "BASIC_AUTH_USER": "${{secrets.BASIC_AUTH_USER}}", "BASIC_AUTH_PASSWORD": "${{secrets.BASIC_AUTH_PASSWORD}}", "GOOGLE_ANALYTICS_CONTAINER_ID": "${{ secrets.GA_CONTAINER_ID_DEV }}", "GOOGLE_ANALYTICS_TRACKING_ID": "${{ secrets.GA_TRACKING_ID_DEV }}"}' -var='environment=${{env.ENVIRONMENT}}' - - - name: comment on PR - uses: unsplash/comment-on-pr@v1.3.0 - env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - with: - msg: "Created review web app at https://eyfs-review-pr-${{ github.event.number }}.london.cloudapps.digital and cms app https://eyfs-cms-review-pr-${{ github.event.number}}.london.cloudapps.digital" - check_for_duplicate_msg: true diff --git a/.github/workflows/revoke_service_unavailable.yml b/.github/workflows/revoke_service_unavailable.yml deleted file mode 100644 index fdfca5b7..00000000 --- a/.github/workflows/revoke_service_unavailable.yml +++ /dev/null @@ -1,33 +0,0 @@ -name: Revoke Service Unavailable - -on: - workflow_dispatch: - inputs: - confirm_action: - description: Confirm deploy - type: boolean - default: true - -jobs: - revoke-service-unavailable: - runs-on: ubuntu-20.04 - if: ${{ github.event.inputs.confirm_action }} - steps: - - name: Install CF CLI on Prod - uses: DFE-Digital/github-actions/setup-cf-cli@master - with: - CF_USERNAME: ${{ secrets.GOVPAAS_USERNAME_PROD }} - CF_PASSWORD: ${{ secrets.GOVPAAS_PASSWORD_PROD }} - CF_SPACE_NAME: eyfs-prod - # Optional inputs - CF_CLI_VERSION: v7 # default v7, allowed values: v6 or v7 - CF_ORG_NAME: dfe # default - CF_API_URL: https://api.london.cloud.service.gov.uk # default - INSTALL_CONDUIT: false # default: false - - name: revoke-unavailable - run: | - cf target -s eyfs-prod - cd service_unavailable && cf push - cf map-route eyfs-prod education.gov.uk --hostname help-for-early-years-providers - echo Waiting 5s for route to be registered... && sleep 5 - cf unmap-route eyfs-service-unavailable education.gov.uk --hostname help-for-early-years-providers diff --git a/Gemfile b/Gemfile index bebff49d..ad1d1b45 100644 --- a/Gemfile +++ b/Gemfile @@ -52,8 +52,8 @@ gem "bootsnap", ">= 1.1.0", require: false gem "dibber" # Monitor errors -gem "sentry-rails" -gem "sentry-ruby" +# gem "sentry-rails" +# gem "sentry-ruby" group :development, :test do # Call 'byebug' anywhere in the code to stop execution and get a debugger console diff --git a/Gemfile.lock b/Gemfile.lock index 0381934a..9582350c 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -555,8 +555,6 @@ DEPENDENCIES rubocop-govuk (~> 4.2) scss_lint-govuk selenium-webdriver - sentry-rails - sentry-ruby simplecov (~> 0.21) spring (>= 2.1.1) spring-watcher-listen (~> 2.0.0) diff --git a/app/constraints/cms_route_constraint.rb b/app/constraints/cms_route_constraint.rb deleted file mode 100644 index db14b2fb..00000000 --- a/app/constraints/cms_route_constraint.rb +++ /dev/null @@ -1,14 +0,0 @@ -# app/constraints/cms_route_constraint.rb - -# In production (on a CloudFoundary server), disable the -# cms and devise routes unless the subdomain contains -# the string 'cms' -class CmsRouteConstraint - def matches?(request) - if Rails.env.production? - /.*cms.*/.match request.subdomain - else - true - end - end -end diff --git a/app/views/layouts/_analytics_body.html.erb b/app/views/layouts/_analytics_body.html.erb index 1e6da317..71570525 100644 --- a/app/views/layouts/_analytics_body.html.erb +++ b/app/views/layouts/_analytics_body.html.erb @@ -1,6 +1,6 @@ diff --git a/app/views/layouts/_analytics_header.html.erb b/app/views/layouts/_analytics_header.html.erb index da94e653..afe8256e 100644 --- a/app/views/layouts/_analytics_header.html.erb +++ b/app/views/layouts/_analytics_header.html.erb @@ -1,9 +1,9 @@ - + \ No newline at end of file diff --git a/app/views/layouts/_hotjar.html b/app/views/layouts/_hotjar.html index beb3bdf7..817caaa1 100644 --- a/app/views/layouts/_hotjar.html +++ b/app/views/layouts/_hotjar.html @@ -1,10 +1,10 @@ \ No newline at end of file diff --git a/config/application.rb b/config/application.rb index 7b2cf46f..283d783e 100644 --- a/config/application.rb +++ b/config/application.rb @@ -43,13 +43,12 @@ class Application < Rails::Application config.middleware.use Rack::RejectTrace config.middleware.use Rack::Deflater - subdomain = ENV.fetch('DOMAIN', "eyfs-dev").split(".").first - allowed_spaces = %w[eyfs-dev eyfs-pre-prod eyfs-prod eyfs-sandbox eyfs-test] - config.space = allowed_spaces.include?(subdomain) ? subdomain : "eyfs-dev" config.i18n.load_path += Dir[Rails.root.join('config', 'locales', 'content', '*.{rb,yml}').to_s] - config.feedback_url = ENV.fetch('FEEDBACK_URL', '#FEEDBACK_URL_env_var_missing') - config.signup_url = ENV.fetch('SIGNUP_URL', '#SIGNUP_env_var_missing') + config.feedback_url = ENV.fetch('FEEDBACK_URL', config_for(:configuration)['feedback_url'] || '#FEEDBACK_env_var_missing') + config.signup_url = ENV.fetch('SIGNUP_URL', config_for(:configuration)['signup_url'] || '#SIGNUP_env_var_missing') + config.tracking_id = ENV.fetch('TRACKING_ID', config_for(:configuration)['tracking_id'] || '#TRACKING_ID_env_var_missing') + config.js_url = "https://www.googletagmanager.com/ns.html?id=#{config.tracking_id}" end end diff --git a/config/configuration.yml b/config/configuration.yml new file mode 100644 index 00000000..44ffb157 --- /dev/null +++ b/config/configuration.yml @@ -0,0 +1,7 @@ +shared: + tracking_id: G-2YJFCCJ520 + feedback_url: https://forms.office.com/Pages/ResponsePage.aspx?id=yXfS-grGoU2187O4s0qC-a1INvUBHVZElO6Xg1Rw2V9UM1pQNEtCN0YyVVdFVkpOUVNXNUlZNTdOUCQlQCN0PWcu + signup_url: https://forms.office.com.mcas.ms/Pages/ResponsePage.aspx?id=yXfS-grGoU2187O4s0qC-a1INvUBHVZElO6Xg1Rw2V9UQlg3SlFPTVZIRlFaVDY5MzJQQUxQTk0yQyQlQCN0PWcu + +production: + tracking_id: G-WRRWDTSGBP diff --git a/config/credentials/deployed_development.yml.enc b/config/credentials/deployed_development.yml.enc deleted file mode 100644 index aea9f8fe..00000000 --- a/config/credentials/deployed_development.yml.enc +++ /dev/null @@ -1 +0,0 @@ -fodNdI3oCSMEqUKBMrEA4OAmG1d2ltwDNu1/pvBtCYh7qtONZRZzYBfzroM91oqYBtTfX3DLbtO3gWBs3o7VF10fCInASo+loRnKIrde5Zqy9lxWegoeH8FzU2Wv/LZS+ft8OGqO2u0XEAvXgMH+eiFE87yUSYX8mmA2p5st1qvOs0i+cZNeeUHwe7CT45uOE7ykf/n7jgkPVon4sdizooAeT9SxBI0EuVQOga/Y22dnyh4mAIow0VpQA+JbAc1rocO2HZ7XQtG7d9TYDHUaQyACKtFhk22VijkguYIRUFaIpdeLlXD8/Rp6y/PZm3uNCcxnKWC466oHw1jIP1bBa3Q/MBFCZ8JylLsCrpW8BSviRkYJRrHrMx4dOpxqkl4qcgItk4c6FbJTCalUHnP6k2T7W+c0gwX32qqXZEkJrVuGanMk/rZMq7uMpDG+VqB9k6TtdnJb+3jPDMq0MVUSUCkWXfqcrm+GFlRJdSJiDZ5jVGUmdCCj3Uau/HLQzJHXBZwWbfCM0XyVXfXeGfRoOHSQyggl8A7czR1iGk8siIY8WNCmuaNPC8+gtfirk2AWiwlGNfr+0htJeFN1azyWspJ16jAFXy7HITBQHA0eB8VJ9jOzlSWZokewy8VvZDlU7r/dSrHn9mY5p6KUiCgvzc+pdrmcAvAZTXGCXVrOzwWtbKUZdUTMUPRIdw5r1lToNlfPeTpjktlfNtShK1LfchR9HEZXjBeLoL0DiR9CJwQKm88k6l4kjaGCu5CkO7LbXEH1oOHbmQf2Ni6ETA/gtKUaGsPVaVDynZLFQDa067tmcasADi0tJ0WXao3uByrh3hGdQED3nlFGn1Ww6ICgXGS5nsoKaD4AtlikwvIYwD1FKgkqOD+FRutXJBnuLIJNpnBRtQ1/Q6FooVv3OIaOdL8D8rs/aDpVpKnr1XRLcvCQVSG4H4jDnR/v1udlzqAUmg7C4c5x9Nb/VetoTIcS347KHgqr64NtlZyqCUcLFmrgei7AwcJFciQ1dHr/woBs0RuJbr9m0pxhKFSOoXCF6hfIYIzKNCrHvrrJwbYrnAPHRJS8TA9bwg==--kafRKnfrItWg+eq5--Ro68IjsavGQQ09E6KpJrXw== \ No newline at end of file diff --git a/config/credentials/development.yml.enc b/config/credentials/development.yml.enc index ecb31ad9..2f12f59d 100644 --- a/config/credentials/development.yml.enc +++ b/config/credentials/development.yml.enc @@ -1 +1 @@ -BVeMLef6JCIIqlPUpzcJ3d1UlPOXLGiRXaPEIvSlhQf8UlyCYYnf3LXBGC4jXlxgHmdtNR2Q9m335zS+x9Jx3MDdJG/ca37IMGcUlhZqHLeE/WIjAcHF1eixV8p6JwvmcUgnAqm96/VwVQbbgywdUfhdTvvxAHQcArxUZsyKlPfZiXvElcirK43TzOzP/+sV4zpVWhtasHZbltRNzERLYmmgG1Lj3k3M4Xuym562NlQlEzm9RDuRsmb7K1Q1XZn+gmERcyiJyt5UAbu8d5TO8zGs5C3WGaa6OLNn3MAGNSyTTkSm1jhhqRX54ai8RQ93yccdBaUsj+8QAi4Qm+UQWDx1iQ5oW4j/aYShFz9ZhXVAU1ViMHfepx6W7IKM1trH4C0oHRjo3hYqdagP6bxYpoNkOBlTusSr+xmtQ9EkXeoKLiotLYzjx1evrd63fTRT4qRN2zfcjQvk3joOLgGKSB/ruRBWJ90RWNRqG/xuHjzgvn4b4BrP0zzOge+X2OpND02ab//XlqcgTAGM6K+ph7qSpoJ5Gs5+GJX1wnfQHaCDj6y/BufRD7FicH1sPku7E0fZD6QzNqV2y7B9rklVQaG3A/WnjiEJA8NJSKiS5Ihp4RQSWGno2m/+7KolU05P3qsl5Xv+KMYakBnWLFLBc6LuK95clRJAT6G0ivDVzXfiHZ/WsBx56nqmd5gb64ZnsQGvw3+tOKQ16iZ2yhAsuR/4FZuchgHx99OkGCwoQfSdHaxMsUh1vzQjZAfzZb5mrITOwXrd1PSrtMNMhadi5LqE6VuBut3ePtANbNLCQBsTTOS5g4g2s9i+S4gDeufCdzW10SvdQSj7hCGYCfVnEKVqJ53N2nbGi3erqA9KFF0BpR2R8FnMswMzWDui7kcvw0t36QOyqdr+zeryXfICB71mbv6ARaqU0kBEjcRPNbvVm8n242zJfSiiQKse9rSW1oTvV35rtnHgodtnMXo/LcRi9e2E5Fg/hnU+3EYEIgBQAO8uJQDtoHWf7wp8BUWWNSlEsaAfLemjekv0BJeR7AxlhxQsG/KDIRNY9ySE90sV--awI3U18bYsjG2pmZ--cKAkmA7tTp1oISJdX4qemQ== \ No newline at end of file +avjCEifWw7XonVxY+AP8YzeN/D6WI77QcbJ8Ii9s3MilHONBiBy8qAFNaep/2hqhCn0swmaC/wBLf+79xwtbp3kYfEE6C3PPc6TY/txndc51b1uNd0sNmEN40X+GS33jWH8KjaJm5+xVkt5BL0FcgKc+ANOv7ohGXJKi42En2Ug+G+nRhYQQToirjXYE+1KtEZDUC8ER4/X3wf0xbETzQsVhR2EaEGQ30/JrjZXoL4T1lbcr7wro7TFVtAmG0q6M0LpMBhWKDATXyOYVfFOWn3Vfi2Z1+H1BK+XYxJ+nzaNje0xTs30SRXpftO+rnbHWdHTSpLHxBF89vtznmZU34zqYFnJg0YmXf+2WPOL9/5YDMl/niOLc6WVArPm4/sJ7wBcWDj21mFcgpMXupQ/7RI+TnphbyNoXypZIjCfUuK3xtNKTZWMpMYGxXy3NH/ROqd/U0S1pC6W5M/vaJNEVY0qd60nBRyWRccu8+IJs0xulGYp3Nn6kQLLXByxhHzyLBojfyQv2gRbLBuhjIabGmOOY/5ZsDrtSPoxrkzCVUKsne7lC4G+eoj2DF2S3DPj2ZdVzeBnY8VGLfXYUU0DX4AKg+D2cV+RR/1nfIN2e8vGwBMzMpxJdUzw/oRg1h8Cxdt2qa8HA/J4=--1z6I1nltBZHkciFk--Y+MsuSztkBDgaR+/hCqthQ== \ No newline at end of file diff --git a/config/credentials/sandbox.yml.enc b/config/credentials/sandbox.yml.enc deleted file mode 100644 index 79e1e0cb..00000000 --- a/config/credentials/sandbox.yml.enc +++ /dev/null @@ -1 +0,0 @@ -ivTSGnf6/3PVuKP0GAqmIsEztimVVICr/sp8CgMOowMItEuMiHlMFeoQolXjcHUkW4yLh6q0DLGEBIT3ZjFmQJcTz10=--ky38f1P8Ox5+tsiB--pkMraRAop8BZWNBee4trGQ== \ No newline at end of file diff --git a/config/credentials/staging.yml.enc b/config/credentials/staging.yml.enc deleted file mode 100644 index e4478c54..00000000 --- a/config/credentials/staging.yml.enc +++ /dev/null @@ -1 +0,0 @@ -sH6rNjcUHGY6tUpUKjzYPuX4xXc7BTWurXfgz6LBQ+bI6ukGPJWr+8iaez5V+DiF3xlHeGQm365hoOtewmAMzzwptaRCHU/ZdjuwFUIlBi78fm/anPP4YYeokazjl9lRW+hkNW4+cwdRtwuu3VYTGumulQ+nRdLPQwAzdNsNDpYrZzWs658HXkh640YqezN0qPkTOD+6gQmgevK4J9RgN3SYS7V373cAHQSSPVBolKeCRfY+mEDoqXsXInfihinQJjTaeqYOciB8SqnAfDCunTrDtZ+bVEoTZP5FKhReAJC9ps/qgezJ+cvrH0e+IVcotQ6h7XYiCG582vWKxJjMR9PXS6uI7TRxwLprSYv03Sak85MRgo87DABc0pw1wzHey6VqkYrwaFuBHkP0puMhYsCwnUDDJoZn41g5OjG6GCc6v6t5agjKcKtyrvqBqW4LMeAAkdM2GpScyE+igxPJ4RrHds4oMNM8Rfxz4y+tYp+1IDI9FrnzXYfUER1GR1i3t0Ix6HLyDbry+EA03RIMZSlR0j4xm51YM6HYPKSGhfHDXGHK9+z52NhJU9udGBEZ8rz9IDr3DNGlNG+IQMg+mUnad7pEFCFDzMwQvM1RO7+AHIpQ+UMuZfHFHIwkU0p26YEgPLFFCiig2JMT8sJMc5Cj/G+fjibhN/I987BMxmURCgOJtxvnrNHBcRNNcPE1zA1Clax7aF1xHsoc/hQM69s5l53yn+oUVrwYOtKhCkdHUAEt4q+W05Wwmu8fCa2CsvVL+jRsQZuzHXvrAlDK7fFMXXhWXuwifcUgy1Pbs8/YB/5tZpb+7j4L6o1QWNiigV59tLnIhOrUDVg2QFY2faBwpz4U43wuv7E2Ja6LytCtq2GW7pqqijJkZ0S6ZGdboKbsqnng0Ga0ajQOE3Zk7d0VDZUII3AgwyjrtlPEvCj4I+F6Dh1qnDOPJuxXMXneFmLZnalCxKwTI++AD7Wy52UfGobpIT+PD9CvQsWdg1soY5/rWCee9IglMLkqk7cFnE9dr/7UEu8A--jdql9gLIl1nCNPIR--a5viSALkWuhIDi9/1Z6NTw== \ No newline at end of file diff --git a/config/initializers/google_analytics.rb b/config/initializers/google_analytics.rb deleted file mode 100644 index 7fe2c4d8..00000000 --- a/config/initializers/google_analytics.rb +++ /dev/null @@ -1,6 +0,0 @@ -# frozen_string_literal: true - -module GoogleAnalytics - TRACKING_ID = ENV.fetch("TRACKING_ID", "#TRACKING_ID_env_var_missing") - JS_URL = "https://www.googletagmanager.com/ns.html?id=#{GoogleAnalytics::TRACKING_ID}" -end diff --git a/config/initializers/sentry.rb b/config/initializers/sentry.rb index a34409a1..0efed550 100644 --- a/config/initializers/sentry.rb +++ b/config/initializers/sentry.rb @@ -1,10 +1,10 @@ -Sentry.init do |config| - config.dsn = "https://77cb385b90b249718df362e6dcdfdc46@o1115461.ingest.sentry.io/6274627" - config.breadcrumbs_logger = %i[active_support_logger http_logger] - config.enabled_environments = %w[production] +# Sentry.init do |config| +# config.dsn = "https://77cb385b90b249718df362e6dcdfdc46@o1115461.ingest.sentry.io/6274627" +# config.breadcrumbs_logger = %i[active_support_logger http_logger] +# config.enabled_environments = %w[production] - # Set tracesSampleRate to 1.0 to capture 100% - # of transactions for performance monitoring. - # We recommend adjusting this value in production - config.traces_sample_rate = 0.1 -end +# Set tracesSampleRate to 1.0 to capture 100% +# of transactions for performance monitoring. +# We recommend adjusting this value in production +# config.traces_sample_rate = 0.1 +# end