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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 0b065a39283ec6d6aedf0e41a38c59e36cc8d6652ff9b97cbac69dd9b697c8a5
4
- data.tar.gz: 87a37081eae0b8418cbe5bafeacf568e3f242279857b42859f3ceaba4d48a800
3
+ metadata.gz: 567efd39fc8d796033685c545fd64681422c060455c92581400dc9fe6345595b
4
+ data.tar.gz: 645a2e2184b33a38e1f53f2a7fd88746f9a16424d80df81070e5703857a9a1cf
5
5
  SHA512:
6
- metadata.gz: 060c2ddf30267bd453233981511f85e9f27aae375cfd32fe0945fa811670976adfbaa8d353e4a5ca267c6a5666ff3e9883b2519203e0896506b9a65e2a5ed2d7
7
- data.tar.gz: 5c5594293a2580e5d395c43e7ff035e78fec4e8b7f63f47c4aaf82ff3e06cfcc2b81c92fe763339f049086f3fa486b28a590e1c205e6867b9aab73dafe1bb12e
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
@@ -1,6 +1,8 @@
1
1
  FROM ruby:2.7-alpine
2
2
 
3
- ARG GUARDIAN_VERSION="0.7.11"
3
+ LABEL "org.opencontainers.image.source"="https://github.com/base2Services/cfn-guardian"
4
+
5
+ ARG GUARDIAN_VERSION="*"
4
6
 
5
7
  COPY . /src
6
8
 
@@ -529,7 +529,11 @@ module CfnGuardian
529
529
  super(resource)
530
530
  @group = 'Jenkins'
531
531
  @namespace = 'Ciinabox/Jenkins'
532
- @dimensions = { Jenkins: resource['Id'], Monitoring: 'JenkMon' }
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 = 'NoSuccess'
7
- alarm.metric_name = 'Success'
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)
@@ -1,4 +1,4 @@
1
1
  module CfnGuardian
2
- VERSION = "0.7.14"
2
+ VERSION = "0.7.15"
3
3
  CHANGE_SET_VERSION = VERSION.gsub('.', '-').freeze
4
4
  end
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.14
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-20 00:00:00.000000000 Z
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"