Skip to content

Commit ccaf864

Browse files
authored
add retry (#6)
* add retry * add wait. fix scheme
1 parent 29f91a7 commit ccaf864

File tree

3 files changed

+17
-3
lines changed

3 files changed

+17
-3
lines changed

codefresh/deploy.yaml

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,17 @@ steps:
1919
type: pending-approval
2020
title: Deploy release?
2121

22+
wait:
23+
title: Wait
24+
stage: Prepare
25+
image: codefresh/cli:latest
26+
commands:
27+
- codefresh get builds --pipeline=deploy --status running --limit 1000 -o json | jq --arg id ${{CF_BUILD_ID}} -ser 'flatten|.[-1].id==$id'
28+
retry:
29+
maxAttempts: 10
30+
delay: 20
31+
exponentialFactor: 1.1
32+
2233
deploy_helmfile:
2334
title: "Deploy with helmfile"
2435
stage: "Deploy"
@@ -33,4 +44,4 @@ steps:
3344
steps:
3445
- name: ask_for_permission
3546
on:
36-
- approved
47+
- approved

codefresh/release.yaml

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,10 @@ steps:
1818
title: Pull image with commit sha
1919
stage: "Promote"
2020
image: "${{CF_DOCKER_REPO_URL}}/${{CF_REPO_NAME}}:${{CF_REVISION}}"
21+
retry:
22+
maxAttempts: 10
23+
delay: 20
24+
exponentialFactor: 1.1
2125
commands:
2226
- "true"
2327

@@ -39,4 +43,4 @@ steps:
3943
when:
4044
condition:
4145
all:
42-
stageDefined: "'${{STAGE}}' != ''"
46+
stageDefined: "'${{STAGE}}' != ''"

deploy/releases/app.yaml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -86,7 +86,6 @@ releases:
8686
timeoutSeconds: 3
8787
successThreshold: 1
8888
failureThreshold: 2
89-
scheme: HTTP
9089

9190
# Probe that ensures service has started
9291
readinessProbe:

0 commit comments

Comments
 (0)