cfn-guardian 0.7.14 → 0.7.15
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.github/workflows/push.yml +36 -0
- data/Dockerfile +3 -1
- data/lib/cfnguardian/models/alarm.rb +5 -1
- data/lib/cfnguardian/resources/jenkins.rb +5 -4
- data/lib/cfnguardian/version.rb +1 -1
- metadata +3 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 567efd39fc8d796033685c545fd64681422c060455c92581400dc9fe6345595b
|
4
|
+
data.tar.gz: 645a2e2184b33a38e1f53f2a7fd88746f9a16424d80df81070e5703857a9a1cf
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 108eae0146b64f8a3d68027fd8b97509cfedb838aa7ecb0f4dff8cdb55c238112a379deb9ce5003bc04146a1bd400a4ca9983e54a24deff8dbb619136af8ba22
|
7
|
+
data.tar.gz: 9df078700af6df291765e7ef78ab100ef0076e54a5b846f9ed161a8d4349f04c2b46e655ea975808ee3f8388d6a56d5b77fb32c275bd0ce1357a43e0cb5ea1f9
|
@@ -0,0 +1,36 @@
|
|
1
|
+
name: build image
|
2
|
+
on:
|
3
|
+
push:
|
4
|
+
branches:
|
5
|
+
- master
|
6
|
+
- feature/*
|
7
|
+
|
8
|
+
jobs:
|
9
|
+
build:
|
10
|
+
name: Build + Publish Container Image
|
11
|
+
runs-on: ubuntu-latest
|
12
|
+
|
13
|
+
steps:
|
14
|
+
- name: Check out the repo
|
15
|
+
uses: actions/checkout@v2
|
16
|
+
|
17
|
+
- name: Inject slug/short variables
|
18
|
+
uses: rlespinasse/github-slug-action@v3.x
|
19
|
+
|
20
|
+
- name: Set up Docker Buildx
|
21
|
+
uses: docker/setup-buildx-action@v1
|
22
|
+
|
23
|
+
- name: Login to GitHub Container Repository
|
24
|
+
uses: docker/login-action@v1
|
25
|
+
with:
|
26
|
+
registry: ghcr.io
|
27
|
+
username: ${{ github.repository_owner }}
|
28
|
+
password: ${{ secrets.GHCR_PUSH_TOKEN }}
|
29
|
+
|
30
|
+
- name: Build and push Container Image to GitHub Container Repository
|
31
|
+
uses: docker/build-push-action@v2
|
32
|
+
with:
|
33
|
+
context: .
|
34
|
+
file: ./Dockerfile
|
35
|
+
push: true
|
36
|
+
tags: ghcr.io/base2services/guardian:snapshot_${{env.GITHUB_REF_SLUG}}
|
data/Dockerfile
CHANGED
@@ -529,7 +529,11 @@ module CfnGuardian
|
|
529
529
|
super(resource)
|
530
530
|
@group = 'Jenkins'
|
531
531
|
@namespace = 'Ciinabox/Jenkins'
|
532
|
-
@dimensions = {
|
532
|
+
@dimensions = {
|
533
|
+
Jenkins: resource['Id'],
|
534
|
+
Label: resource['Label'],
|
535
|
+
Monitoring: 'JenkMon'
|
536
|
+
}
|
533
537
|
end
|
534
538
|
end
|
535
539
|
|
@@ -1,14 +1,15 @@
|
|
1
1
|
module CfnGuardian::Resource
|
2
2
|
class Jenkins < Base
|
3
|
-
|
4
3
|
def default_alarms
|
4
|
+
# evaluate this alarm every hour but only alert if there is no data point after 25 hours
|
5
5
|
alarm = CfnGuardian::Models::JenkinsAlarm.new(@resource)
|
6
|
-
alarm.name = '
|
7
|
-
alarm.metric_name = '
|
6
|
+
alarm.name = 'HealthyAgent'
|
7
|
+
alarm.metric_name = 'HealthyAgent'
|
8
8
|
alarm.statistic = 'Maximum'
|
9
9
|
alarm.treat_missing_data = 'breaching'
|
10
10
|
alarm.alarm_action = 'Warning'
|
11
|
-
alarm.period = 3600
|
11
|
+
alarm.period = 3600 # 1 hour
|
12
|
+
alarm.evaluation_periods = 24 # 24 hours
|
12
13
|
alarm.comparison_operator = 'LessThanThreshold'
|
13
14
|
alarm.threshold = 1
|
14
15
|
@alarms.push(alarm)
|
data/lib/cfnguardian/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: cfn-guardian
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.7.
|
4
|
+
version: 0.7.15
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Guslington
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2022-04
|
11
|
+
date: 2022-05-04 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: thor
|
@@ -222,6 +222,7 @@ extra_rdoc_files: []
|
|
222
222
|
files:
|
223
223
|
- ".dockerignore"
|
224
224
|
- ".github/workflows/build-gem.yml"
|
225
|
+
- ".github/workflows/push.yml"
|
225
226
|
- ".github/workflows/release-gem.yml"
|
226
227
|
- ".github/workflows/release-image.yml"
|
227
228
|
- ".gitignore"
|