-
Notifications
You must be signed in to change notification settings - Fork 5
59 lines (51 loc) · 1.63 KB
/
deploy-alertmanager.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
---
name: Deploy Alertmanager
on:
push:
branches:
- main
tags:
- '*'
paths:
- 'alertmanager/**'
- '.github/workflows/deploy-alertmanager.yaml'
- '!**.md' # Ignore all markdown files in the repository
release:
types: [released]
jobs:
check-config:
uses: GSA-TTS/identity-idva-monitoring/.github/workflows/check-config.yaml@main
deploy:
if: github.repository_owner == 'GSA-TTS'
runs-on: ubuntu-latest
needs: check-config
steps:
- uses: actions/checkout@v4
- uses: GSA-TTS/identity-idva-cf-setup@v2
id: cf-setup
with:
cf-username: ${{ secrets.CF_USERNAME }}
cf-password: ${{ secrets.CF_PASSWORD }}
cf-org: ${{ secrets.CF_ORG }}
space-suffix: "-public"
- name: Install Alertmanager
run: ./install_alertmanager.sh
working-directory: ./alertmanager
- name: Generate config files
run: |
envsubst < alertmanager/alert-config.yml > alertmanager/alertmanager.yml
env:
ENVIRONMENT_NAME: ${{ steps.cf-setup.outputs.target-environment }}
SLACK_URL: ${{ secrets.SLACK_URL }}
- name: Deploy Alertmanager
run: cf push
--var ENVIRONMENT_NAME=${{ steps.cf-setup.outputs.target-environment }}
--var SLACK_URL=${{ secrets.SLACK_URL }}
--memory 64MB
--instances 2
--strategy rolling
working-directory: ./alertmanager
- name: Apply CF Network Policies
run: ./create-network-policies.sh
env:
ENVIRONMENT_NAME: ${{ steps.cf-setup.outputs.target-environment }}