Skip to content

Commit c33da86

Browse files
committed
APM-3095 Control retain hours on pipeline
1 parent 9514d5d commit c33da86

2 files changed

Lines changed: 7 additions & 1 deletion

File tree

azure/cleanup-ecs-pr-proxies.yml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,9 @@ parameters:
1919
- "1"
2020
- "2"
2121
- "3"
22+
- name: retain_hours
23+
type: string
24+
default: "72"
2225

2326
jobs:
2427
- job: build
@@ -63,6 +66,7 @@ jobs:
6366
- template: ./components/cleanup-ecs-pr-proxies-job.yml
6467
parameters:
6568
retry: '${{ retry }}'
69+
retain_hours: '${{ parameters.retain_hours }}'
6670

6771
- bash: |
6872
echo "AWS role session has timed out after multiple retries"

azure/components/cleanup-ecs-pr-proxies-job.yml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
11
parameters:
22
- name: retry
33
type: string
4+
- name: retain_hours
5+
type: string
46

57
steps:
68
- template: ./aws-assume-role.yml
@@ -12,7 +14,7 @@ steps:
1214
displayName: Remove stale locks
1315

1416
- bash: |
15-
export retain_hours=72
17+
export retain_hours="${{ parameters.retain_hours }}"
1618
ANSIBLE_FORCE_COLOR=yes make -C ansible remove-old-ecs-pr-deploys
1719
ERROR_CODE=$?
1820
echo ERROR_CODE - $ERROR_CODE

0 commit comments

Comments
 (0)