From 7620c77b9591bb69070764ed9bed416fda2c0cb3 Mon Sep 17 00:00:00 2001 From: Lukas Goodfellow Date: Thu, 14 Apr 2022 08:21:04 -0700 Subject: [PATCH 1/4] update image version --- incubating/pagerduty-alert/Dockerfile | 2 +- incubating/pagerduty-alert/step.yaml | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/incubating/pagerduty-alert/Dockerfile b/incubating/pagerduty-alert/Dockerfile index a464bfe10..d51fe14b1 100644 --- a/incubating/pagerduty-alert/Dockerfile +++ b/incubating/pagerduty-alert/Dockerfile @@ -1,4 +1,4 @@ -FROM python:3.9.7-alpine3.14 +FROM python:3.9.12-alpine3.15 RUN pip install pdpyras diff --git a/incubating/pagerduty-alert/step.yaml b/incubating/pagerduty-alert/step.yaml index d44cefc03..57be6e189 100644 --- a/incubating/pagerduty-alert/step.yaml +++ b/incubating/pagerduty-alert/step.yaml @@ -2,7 +2,7 @@ kind: step-type version: '1.0' metadata: name: pagerduty-alert - version: 1.0.1 + version: 1.0.2 isPublic: true description: Sends Alerts (Incidents or Change Events) to PagerDuty API sources: @@ -102,7 +102,7 @@ spec: stepsTemplate: |- pagerduty-alert: name: pagerduty-alert - image: quay.io/codefreshplugins/pagerduty-alert:1.0.0 + image: quay.io/codefreshplugins/pagerduty-alert:1.0.2 environment: [[ range $key, $val := .Arguments ]] - '[[ $key ]]=[[ $val ]]' From cba10082429f5c77ecff48900eed292d36bf3825 Mon Sep 17 00:00:00 2001 From: Lukas Goodfellow Date: Thu, 14 Apr 2022 09:56:52 -0700 Subject: [PATCH 2/4] updated pagerduty python script and step yaml --- incubating/pagerduty-alert/lib/pagerduty_alert.py | 3 ++- incubating/pagerduty-alert/step.yaml | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/incubating/pagerduty-alert/lib/pagerduty_alert.py b/incubating/pagerduty-alert/lib/pagerduty_alert.py index 687093033..d3f497677 100644 --- a/incubating/pagerduty-alert/lib/pagerduty_alert.py +++ b/incubating/pagerduty-alert/lib/pagerduty_alert.py @@ -26,7 +26,8 @@ def main(): 'type': 'service_reference' } } - if assignee_user_id: + if assignee_user_id != "False": + print(f"assignee_user_id = {assignee_user_id}") payload['assignments'] = [ { 'assignee': { diff --git a/incubating/pagerduty-alert/step.yaml b/incubating/pagerduty-alert/step.yaml index 57be6e189..be38d9acb 100644 --- a/incubating/pagerduty-alert/step.yaml +++ b/incubating/pagerduty-alert/step.yaml @@ -73,7 +73,7 @@ spec: }, "ASSIGNEE_USER_ID": { "type": "string", - "description": "Required for incident type, PagerDuty User ID" + "description": "Optional for incident type when an escalation policy is in place, PagerDuty User ID" }, "FROM_EMAIL": { "type": "string", From e29196be20b0fb0de0d46706af2573592d508370 Mon Sep 17 00:00:00 2001 From: Lukas Goodfellow Date: Thu, 14 Apr 2022 09:58:10 -0700 Subject: [PATCH 3/4] removed print statment --- incubating/pagerduty-alert/lib/pagerduty_alert.py | 1 - 1 file changed, 1 deletion(-) diff --git a/incubating/pagerduty-alert/lib/pagerduty_alert.py b/incubating/pagerduty-alert/lib/pagerduty_alert.py index d3f497677..938167acc 100644 --- a/incubating/pagerduty-alert/lib/pagerduty_alert.py +++ b/incubating/pagerduty-alert/lib/pagerduty_alert.py @@ -27,7 +27,6 @@ def main(): } } if assignee_user_id != "False": - print(f"assignee_user_id = {assignee_user_id}") payload['assignments'] = [ { 'assignee': { From dbffb1d98a1289d359f0aacfa9baf4d39944b972 Mon Sep 17 00:00:00 2001 From: Lukas Goodfellow Date: Thu, 14 Apr 2022 10:13:00 -0700 Subject: [PATCH 4/4] updated python script --- incubating/pagerduty-alert/lib/pagerduty_alert.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/incubating/pagerduty-alert/lib/pagerduty_alert.py b/incubating/pagerduty-alert/lib/pagerduty_alert.py index 938167acc..687093033 100644 --- a/incubating/pagerduty-alert/lib/pagerduty_alert.py +++ b/incubating/pagerduty-alert/lib/pagerduty_alert.py @@ -26,7 +26,7 @@ def main(): 'type': 'service_reference' } } - if assignee_user_id != "False": + if assignee_user_id: payload['assignments'] = [ { 'assignee': {