Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 0 additions & 3 deletions .github/env.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,3 @@ DOCKERHUB_REPOSITORY: dfedigital/get-into-teaching-api
DOMAIN: london.cloudapps.digital
APPLICATION: Get Into Teaching API Service
PAAS_APPLICATION_NAME: get-into-teaching-api
SLACK_FAILURE: '#ff0000'
SLACK_SUCCESS: '#00ff00'
SLACK_ICON: https://raw.githubusercontent.com/DFE-Digital/GetIntoTeachingAPI/master/.github/image.png?size=48
3 changes: 0 additions & 3 deletions .github/workflows/test-setup-environment-variables.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,3 @@ jobs:
echo DOMAIN=${{ env.DOMAIN }}
echo APPLICATION=${{ env.APPLICATION }}
echo PAAS_APPLICATION_NAME=${{ env.PAAS_APPLICATION_NAME }}
echo SLACK_FAILURE=${{ env.SLACK_FAILURE }}
echo SLACK_SUCCESS=${{ env.SLACK_SUCCESS }}
echo SLACK_ICON=${{ env.SLACK_ICON }}
1 change: 0 additions & 1 deletion backup-postgres/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@ Federated credentials must be set up to allow the action to authenticate to Azur
- `azure-subscription-id`: Azure service principal or managed identity subscription ID when using OIDC
- `azure-tenant-id`: Azure service principal or managed identity tenant ID when using OIDC
- `backup-file`: Name of the backup file. The file will be compressed and the .gz extension added to this name. (Required)
- `slack-webhook`: A slack webhook to send a slack message to the service tech channel (Optional)
- `teams-webhook-url`: A valid webhook URL for the destination Teams channel (Optional)
- `db-server-name` : Alternate database server (Optional)
- `exclude-tables`: A string of table names to exclude data from while preserving their schema. Use for creating sanitized backups. (Optional, defaults to '')
Expand Down
14 changes: 1 addition & 13 deletions backup-postgres/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -35,9 +35,6 @@ inputs:
backup-file:
description: Name of the backup file
required: true
slack-webhook:
description: Name of the slack webhook
required: false
db-server-name:
description: |
Name of the database server. Default is the live server. When backing up a point-in-time (PTR) server, use the full name of the PTR server. (Optional)
Expand Down Expand Up @@ -172,16 +169,7 @@ runs:
env:
DB_SERVER: ${{ inputs.db-server-name || 'default for app' }}

- name: Notify Slack channel on job failure
if: failure()
uses: rtCamp/action-slack-notify@e31e87e03dd19038e411e38ae27cbad084a90661 # Pinned at v2.3.3
env:
SLACK_USERNAME: CI Deployment
SLACK_TITLE: Database ${{ inputs.db-server-name }} backup failure
SLACK_MESSAGE: ${{ inputs.app-name }} backup job failed
SLACK_WEBHOOK: ${{ inputs.slack-webhook }}
SLACK_COLOR: failure
SLACK_FOOTER: Sent from backup job in backup-db workflow


- name: Notify teams channel on job failure
if: ${{ failure() && inputs.teams-webhook-url != '' }}
Expand Down
1 change: 0 additions & 1 deletion build-docker-image/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,6 @@ e.g.
- `docker-repository`: Repository name in the container registry. e.g. ghcr.io/dfe-digital/register-trainee-teachers. Defaults to current Github repository name.
- `max-cache`: Set to true to use maximum cache level when reuse-cache is set. Defaults to minimum (false)
- `extra-cache-repo`: Extra repository to use for cached images (Optional)
- `slack-webhook`: A slack webhook to send a slack message to the service tech channel. See https://technical-guidance.education.gov.uk/infrastructure/monitoring/slack/#content (Optional)
- `teams-webhook-url`: A valid webhook URL for the destination Teams channel (Optional)
- `main-branch`: The primary repo branch (Default = 'main')
- `docker-sha`: The docker sha (Default is the long commit sha)
Expand Down
14 changes: 0 additions & 14 deletions build-docker-image/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,8 +29,6 @@ inputs:
description: Use cache from separate repo
default: ''
required: false
slack-webhook:
required: false
main-branch:
required: false
default: "main"
Expand Down Expand Up @@ -287,18 +285,6 @@ runs:
echo EOF
} >> "$GITHUB_ENV"

- name: Notify slack channel on job failure
uses: rtCamp/action-slack-notify@e31e87e03dd19038e411e38ae27cbad084a90661 # Pinned at v2.3.3
if: ${{ failure() && github.ref == 'refs/heads/main' && inputs.slack-webhook != '' }}
with:
SLACK_USERNAME: CI Deployment
SLACK_COLOR: failure
SLACK_ICON_EMOJI: ':github-logo:'
SLACK_TITLE: 'Build failure'
SLACK_MESSAGE: ':alert: Build failure on commit ${{env.IMAGE_TAG}} :sadparrot:'
SLACK_WEBHOOK: ${{ inputs.slack-webhook }}
SLACK_FOOTER: Sent from build-docker-image

- name: Notify teams channel on job failure
if: ${{ failure() && github.ref == 'refs/heads/main' && inputs.teams-webhook-url != '' }}
uses: DFE-Digital/github-actions/send-to-teams-channel@master
Expand Down
1 change: 0 additions & 1 deletion deploy-domains-env/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@ Deploy the Environment Domains
- `azure-tenant-id`: Azure service principal or managed identity tenant ID when using OIDC
- `environment`: the name of the environment for the domains (Required)
- `healthcheck` : Health check path, without first / e.g. 'healthcheck/all' (Optional)
- `slack-webhook` : A slack webhook to send a slack message to the service tech channel on deploy failure. See https://technical-guidance.education.gov.uk/infrastructure/monitoring/slack/#content (Optional)
- `teams-webhook-url` : A valid webhook URL for the destination Teams channel (Optional)
- `terraform-base` : Name of the base terraform path (default: 'terraform/domains/environment')

Expand Down
12 changes: 0 additions & 12 deletions deploy-domains-env/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,9 +17,6 @@ inputs:
environment:
description: the name of the environment for the domains.
required: true
slack-webhook:
description: Name of the slack webhook
required: false
healthcheck:
description: Health check path
required: false
Expand Down Expand Up @@ -74,15 +71,6 @@ runs:
curl -sS --fail "$url/${{ inputs.healthcheck }}" > /dev/null
done

- name: Slack Notification
if: failure()
uses: rtCamp/action-slack-notify@e31e87e03dd19038e411e38ae27cbad084a90661 # Pinned at v2.3.3
env:
SLACK_COLOR: failure
SLACK_TITLE: Failure deploying domains environment to ${{ inputs.environment }}
SLACK_MESSAGE: Failure deploying domains environment to ${{ inputs.environment }}
SLACK_WEBHOOK: ${{ inputs.slack-webhook }}

- name: Notify teams channel on job failure
if: ${{ failure() && inputs.teams-webhook-url != '' }}
uses: DFE-Digital/github-actions/send-to-teams-channel@master
Expand Down
1 change: 0 additions & 1 deletion deploy-domains-infra/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@ Deploy the infrastructure Domains
- `azure-client-id`: Azure service principal or managed identity client ID when using OIDC
- `azure-subscription-id`: Azure service principal or managed identity subscription ID when using OIDC
- `azure-tenant-id`: Azure service principal or managed identity tenant ID when using OIDC
- `slack-webhook` : A slack webhook to send a slack message to the service tech channel on deploy failure. See https://technical-guidance.education.gov.uk/infrastructure/monitoring/slack/#content (Optional)
- `teams-webhook-url` : A valid webhook URL for the destination Teams channel (Optional)
- `terraform-base` : Name of the base terraform path (default: 'terraform/domains/infrastructure')

Expand Down
12 changes: 0 additions & 12 deletions deploy-domains-infra/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,6 @@ inputs:
description: Azure service principal or managed identity tenant ID when using OIDC
required: false
default: ''
slack-webhook:
description: Name of the slack webhook
required: false
terraform-base:
description: Path to the terraform files
required: false
Expand Down Expand Up @@ -59,15 +56,6 @@ runs:
run: |
make ci domains-infra-apply

- name: Slack Notification
if: failure()
uses: rtCamp/action-slack-notify@e31e87e03dd19038e411e38ae27cbad084a90661 # Pinned at v2.3.3
env:
SLACK_COLOR: failure
SLACK_TITLE: Failure deploying domains infrastructure
SLACK_MESSAGE: Failure deploying domains infrastructure
SLACK_WEBHOOK: ${{ inputs.slack-webhook }}

- name: Notify teams channel on job failure
if: ${{ failure() && inputs.teams-webhook-url != '' }}
uses: DFE-Digital/github-actions/send-to-teams-channel@master
Expand Down
1 change: 0 additions & 1 deletion deploy-to-aks/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,6 @@ Federated credentials must be set up to allow the action to authenticate to Azur
- `pr-number`: Pull Request Number if deploying a review app (Optional)
- `db-seed`: Run seed command after a deployment. Should only be used for review apps (default: false)
- `sha`: Commit sha corresponding to the docker image tag to be deployed (Required)
- `slack-webhook` : A slack webhook to send a slack message to the service tech channel on deploy failure. See https://technical-guidance.education.gov.uk/infrastructure/monitoring/slack/#content (Optional)
- `teams-webhook-url` : A valid webhook URL for the destination Teams channel (Optional)
- `smoke-test` : Run an application smoke test after deployment (default: false)
- `healthcheck` : Health check path, without first / e.g. 'healthcheck/all' (Optional)
Expand Down
14 changes: 0 additions & 14 deletions deploy-to-aks/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -33,9 +33,6 @@ inputs:
sha:
description: Commit sha to be deployed
required: true
slack-webhook:
description: Name of the slack webhook
required: false
db-seed:
description: Run seed command after a deployment. Normally only used for review apps.
required: false
Expand Down Expand Up @@ -165,17 +162,6 @@ runs:
run: |
make ci ${{ inputs.environment }} smoke-test

- name: Notify Slack channel on job failure
if: ${{ failure() && github.ref == 'refs/heads/main' && inputs.slack-webhook != '' }}
uses: rtCamp/action-slack-notify@e31e87e03dd19038e411e38ae27cbad084a90661 # Pinned at v2.3.3
env:
SLACK_USERNAME: CI Deployment
SLACK_TITLE: Deployment failure
SLACK_MESSAGE: ${{ inputs.environment }} deployment job failed
SLACK_WEBHOOK: ${{ inputs.slack-webhook }}
SLACK_COLOR: failure
SLACK_FOOTER: Sent from deploy-to-aks

- name: Notify teams channel on job failure
if: ${{ failure() && github.ref == 'refs/heads/main' && inputs.teams-webhook-url != '' }}
uses: DFE-Digital/github-actions/send-to-teams-channel@master
Expand Down
1 change: 0 additions & 1 deletion monitor-postgres-wal/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@ If logical replication is enabled for a database, then we want to monitor the re
- `azure-client-id`: Azure service principal or managed identity client ID when using OIDC
- `azure-subscription-id`: Azure service principal or managed identity subscription ID when using OIDC
- `azure-tenant-id`: Azure service principal or managed identity tenant ID when using OIDC
- `slack-webhook`: A slack webhook to send a slack message to the service tech channel (Optional)
- `teams-webhook-url`: A valid webhook URL for the destination Teams channel (Optional)
- `tf-vars-path` : terraform config file path (default: 'terraform/application/config')

Expand Down
25 changes: 0 additions & 25 deletions monitor-postgres-wal/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,9 +23,6 @@ inputs:
description: Azure service principal or managed identity tenant ID when using OIDC
required: false
default: ''
slack-webhook:
description: Name of the slack webhook
required: false
tf-vars-path:
description: Path to the terraform config files
required: false
Expand Down Expand Up @@ -121,28 +118,6 @@ runs:
echo "No replication slot"
fi

- name: Notify Slack channel if the replication slot is removed
if: ${{ env.REMOVED_SLOT != '' }}
uses: rtCamp/action-slack-notify@e31e87e03dd19038e411e38ae27cbad084a90661 # Pinned at v2.3.3
env:
SLACK_USERNAME: DB monitor
SLACK_TITLE: Database replication slot removed
SLACK_MESSAGE: ${{ inputs.app-name }} replication slot removed
SLACK_WEBHOOK: ${{ inputs.slack-webhook }}
SLACK_COLOR: failure
SLACK_FOOTER: Sent from monitor database workflow

- name: Notify Slack channel on job failure
if: failure()
uses: rtCamp/action-slack-notify@e31e87e03dd19038e411e38ae27cbad084a90661 # Pinned at v2.3.3
env:
SLACK_USERNAME: DB monitor
SLACK_TITLE: Database monitor failure
SLACK_MESSAGE: ${{ inputs.app-name }} replication monitor job failed
SLACK_WEBHOOK: ${{ inputs.slack-webhook }}
SLACK_COLOR: failure
SLACK_FOOTER: Sent from monitor database workflow

- name: Notify teams channel if the replication slot is removed
if: ${{ env.REMOVED_SLOT != '' && inputs.teams-webhook-url != '' }}
uses: DFE-Digital/github-actions/send-to-teams-channel@master
Expand Down
3 changes: 0 additions & 3 deletions set-up-environment/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,11 +24,8 @@ location for these variables.

- name: Print
run: |
echo "URL = ${{env.SLACK_ICON}}"
echo "APPLICATION = ${{env.APPLICATION}}"
echo "DOCKERHUB_REPOSITORY = ${{env.DOCKERHUB_REPOSITORY}}"
echo "DOMAIN = ${{env.DOMAIN}}"
echo "PAAS_APPLICATION_NAME = ${{env.PAAS_APPLICATION_NAME}}"
echo "SLACK_FAILURE = ${{env.SLACK_FAILURE}}"
echo "SLACK_SUCCESS = ${{env.SLACK_SUCCESS}}"
```
4 changes: 0 additions & 4 deletions validate-infra/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,6 @@ Your Makefile's terraform plan commands should use `${DETAILED_EXITCODE}` to inc
azure-subscription-id: ${{ secrets.AZURE_SUBSCRIPTION_ID }}
azure-tenant-id: ${{ secrets.AZURE_TENANT_ID }}
environment: production
slack-webhook: ${{ secrets.SLACK_WEBHOOK }}
teams-webhook-url: ${{ secrets.TEAMS_WEBHOOK_URL }}
```

Expand All @@ -50,7 +49,6 @@ Your Makefile's terraform plan commands should use `${DETAILED_EXITCODE}` to inc
| `terraform-main-ref` | Git ref (branch/tag/SHA) to use for terraform code | No | `main` |
| `terraform-base` | Path to the terraform files | No | `cluster/terraform_aks_cluster` |
| `terraform-version-file`| Name of file containing terraform version | No | `terraform.tf` |
| `slack-webhook` | Slack webhook URL for notifications | No | - |
| `teams-webhook-url` | A valid webhook URL for the destination Teams channel | No | - |

## Outputs
Expand Down Expand Up @@ -101,7 +99,6 @@ jobs:
environment: ${{ github.event.inputs.environment || 'production' }}
gcp-wip: ${{ vars.GCP_WIP }}
gcp-project-id: ${{ vars.GCP_PROJECT_ID }}
slack-webhook: ${{ secrets.SLACK_WEBHOOK }}
teams-webhook-url: ${{ secrets.TEAMS_WEBHOOK_URL }}
```

Expand All @@ -114,7 +111,6 @@ jobs:
- `domains-plan` - Domains environment validation
- `domains-infra-plan` - Domains infrastructure validation
- The `ci` and environment targets must be defined in your Makefile
- (Optional) Slack webhook for notifications
- (Optional) Teams webhook for notifications

### Example Makefile Targets
Expand Down
Loading