From 94a6211b63146c36fc42540a00e1a1ddb9406f2c Mon Sep 17 00:00:00 2001 From: Brett McHargue Date: Thu, 2 Nov 2023 10:09:00 +0000 Subject: [PATCH] Fix health check --- .github/workflows/azure-deploy-dev.yml | 1 + .github/workflows/azure-deploy-stage.yml | 21 +++++++++++---------- config/routes.rb | 1 + 3 files changed, 13 insertions(+), 10 deletions(-) diff --git a/.github/workflows/azure-deploy-dev.yml b/.github/workflows/azure-deploy-dev.yml index 252ca7f1..10442132 100644 --- a/.github/workflows/azure-deploy-dev.yml +++ b/.github/workflows/azure-deploy-dev.yml @@ -28,6 +28,7 @@ env: ARM_SUBSCRIPTION_ID: ${{ secrets.AZURE_SUBSCRIPTION_ID }} ARM_TENANT_ID: ${{ secrets.AZURE_TENANT_ID }} DOCKER_IMAGE: ghcr.io/dfe-digital/help-for-early-years-providers + RELEASE_VERSION: ${{ github.sha }} jobs: build-and-deploy: diff --git a/.github/workflows/azure-deploy-stage.yml b/.github/workflows/azure-deploy-stage.yml index 24a264f4..66ff56a4 100644 --- a/.github/workflows/azure-deploy-stage.yml +++ b/.github/workflows/azure-deploy-stage.yml @@ -2,16 +2,16 @@ name: 'HfEYP App Deploy [Azure - STAGE]' on: workflow_dispatch: - #inputs: - # candidate: - # description: 'Create release candidate version ("rcx.x.x")' - # type: string - # required: true - # ref: - # description: 'Git ref or branch to deploy' - # type: string - # required: true - # default: main + inputs: + candidate: + description: 'Create release candidate version ("rcx.x.x")' + type: string + required: true + ref: + description: 'Git ref or branch to deploy' + type: string + required: true + default: main push: branches: - ER-861-hfeyp-staging @@ -29,6 +29,7 @@ env: ARM_SUBSCRIPTION_ID: ${{ secrets.AZURE_SUBSCRIPTION_ID }} ARM_TENANT_ID: ${{ secrets.AZURE_TENANT_ID }} DOCKER_IMAGE: ghcr.io/dfe-digital/help-for-early-years-providers + RELEASE_VERSION: ${{ inputs.candidate || github.sha }} jobs: build-and-deploy: diff --git a/config/routes.rb b/config/routes.rb index 16c50039..b2cae70a 100644 --- a/config/routes.rb +++ b/config/routes.rb @@ -1,5 +1,6 @@ Rails.application.routes.draw do get "/check" => "application#check" + get "/health" => "application#check" # Note These have to be above the wildcard route get "/404", to: "errors#not_found", via: :all