Skip to content

Commit

Permalink
Merge pull request #220 from DFE-Digital/devops/slack/initial
Browse files Browse the repository at this point in the history
Added calls to Slack
  • Loading branch information
sfawcett123 authored Aug 19, 2020
2 parents b86616f + 044b73e commit 045dd12
Show file tree
Hide file tree
Showing 6 changed files with 95 additions and 0 deletions.
11 changes: 11 additions & 0 deletions .github/workflows/cve.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,3 +30,14 @@ jobs:
name: AnchoreReports
path: ./anchore-reports/

- 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 }}

18 changes: 18 additions & 0 deletions .github/workflows/dockerbuild.yml
Original file line number Diff line number Diff line change
Expand Up @@ -86,6 +86,13 @@ jobs:
wget -O ${{ env.CF_PROVIDER_DIR }} https://github.com/cloudfoundry-community/terraform-provider-cf/releases/latest/download/terraform-provider-cloudfoundry_linux_amd64
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

- name: Terraform Init
run: |
cd terraform/paas && pwd
Expand Down Expand Up @@ -125,4 +132,15 @@ jobs:
run: |
tests/confidence/healthcheck.sh "get-into-teaching-api-dev" "${{steps.sha.outputs.short}}"
- 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 }}


12 changes: 12 additions & 0 deletions .github/workflows/monitoring.yml
Original file line number Diff line number Diff line change
Expand Up @@ -41,3 +41,15 @@ jobs:
terraform apply -auto-approve plan
env:
ARM_ACCESS_KEY: "${{ secrets.DEV_ARM_ACCESS_KEY }}"

- 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 }}

18 changes: 18 additions & 0 deletions .github/workflows/pull_request.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,20 +12,38 @@ jobs:
test_dot_net:
runs-on: ubuntu-latest
steps:

- uses: actions/checkout@v2

- name: Setup .NET Core
uses: actions/setup-dotnet@v1
with:
dotnet-version: 3.1.200

- name: Install NotifyBintray
run: dotnet nuget add source --name NotifyBintray https://api.bintray.com/nuget/gov-uk-notify/nuget

- name: Install dependencies
run: sudo dotnet restore && sudo apt-get update && sudo apt-get install -y libsqlite3-mod-spatialite

- name: Build
run: sudo dotnet build --configuration Release --no-restore /warnaserror

- name: Test
run: sudo dotnet test --no-restore --verbosity normal

- name: Lint Dockerfile
uses: brpaz/hadolint-action@master
with:
dockerfile: "Dockerfile"

- 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 }}
20 changes: 20 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,13 @@ jobs:
wget -O ${{ env.CF_PROVIDER_DIR }} https://github.com/cloudfoundry-community/terraform-provider-cf/releases/latest/download/terraform-provider-cloudfoundry_linux_amd64
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

- name: Terraform Init
run: |
cd terraform/paas && pwd
Expand Down Expand Up @@ -72,10 +79,23 @@ jobs:
tests/confidence/healthcheck.sh "get-into-teaching-api-test" "${{ 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: qa

- 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 }}

16 changes: 16 additions & 0 deletions .github/workflows/sonarcloud.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,15 +12,20 @@ jobs:
- uses: actions/setup-java@v1
with:
java-version: '11'

- uses: actions/checkout@v2
with:
fetch-depth: 0

- name: Install NotifyBintray
run: dotnet nuget add source --name NotifyBintray https://api.bintray.com/nuget/gov-uk-notify/nuget

- name: Install dotnet-sonarscanner
run: dotnet tool install --global dotnet-sonarscanner --version 4.8.0

- name: Install dependencies
run: sudo dotnet restore && sudo apt-get update && sudo apt-get install -y libsqlite3-mod-spatialite

- name: SonarCloud
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
Expand Down Expand Up @@ -49,3 +54,14 @@ jobs:
sudo dotnet test --no-build --logger:trx /p:CollectCoverage=true /p:CoverletOutputFormat=opencover
dotnet sonarscanner end /d:sonar.login="${{ secrets.SONAR_TOKEN }}"
- 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 }}

0 comments on commit 045dd12

Please sign in to comment.