-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #240 from DFE-Digital/devops/status_cake/frequency…
…_update Changed status Cake check frequency to every minute
- Loading branch information
Showing
4 changed files
with
62 additions
and
5 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,61 @@ | ||
name: Deploy Status Cake (Beta Test) | ||
on: | ||
workflow_dispatch: | ||
|
||
jobs: | ||
deploy: | ||
name: Status Cake Configuration | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Check out the repo | ||
uses: actions/checkout@v2 | ||
|
||
- uses: hashicorp/setup-terraform@v1 | ||
with: | ||
terraform_version: 0.12.29 | ||
|
||
- name: Get Short SHA | ||
id: sha | ||
run: echo ::set-output name=short::$(git rev-parse --short $GITHUB_SHA) | ||
|
||
- name: Smoke Test | ||
run: | | ||
tests/confidence/healthcheck.sh "get-into-teaching-api-test" "${{steps.sha.outputs.short}}" | ||
- name: Terraform Init | ||
run: | | ||
cd terraform/statuscake && pwd | ||
terraform init -backend-config=test.bk.vars | ||
env: | ||
ARM_ACCESS_KEY: "${{ secrets.TEST_ARM_ACCESS_KEY }}" | ||
TF_VAR_sc_username: "DfEStatusCake" | ||
TF_VAR_sc_api_key: "${{ secrets.STATUS_CAKE_API }}" | ||
|
||
- name: Terraform Plan | ||
run: | | ||
cd terraform/statuscake && pwd | ||
terraform plan -var-file=test.env.tfvars -out plan | ||
env: | ||
ARM_ACCESS_KEY: "${{ secrets.TEST_ARM_ACCESS_KEY }}" | ||
TF_VAR_sc_username: "DfEStatusCake" | ||
TF_VAR_sc_api_key: "${{ secrets.STATUS_CAKE_API }}" | ||
|
||
- name: Terraform Apply | ||
run: | | ||
cd terraform/statuscake && pwd | ||
terraform apply -auto-approve plan | ||
env: | ||
ARM_ACCESS_KEY: "${{ secrets.TEST_ARM_ACCESS_KEY }}" | ||
TF_VAR_sc_username: "DfEStatusCake" | ||
TF_VAR_sc_api_key: "${{ secrets.STATUS_CAKE_API }}" | ||
|
||
- 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: Get-Into-Teaching-API Pipeline Failed Configuring Status Cake ${{github.job}} :disappointed_relieved:' | ||
SLACK_TITLE: 'Failure: ${{ github.workflow }}' | ||
SLACK_WEBHOOK: ${{ secrets.SLACK_WEBHOOK }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters