Skip to content

Commit e79f9f2

Browse files
Cr 14126- fix (#551)
* support bitbucket cloud * bump * generic retry * lint fix * lint fix * add one sec sleep between retries * wip * bump
1 parent be6f083 commit e79f9f2

File tree

5 files changed

+13
-7
lines changed

5 files changed

+13
-7
lines changed

Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
VERSION=v0.0.494
1+
VERSION=v0.0.495
22

33
OUT_DIR=dist
44
YEAR?=$(shell date +"%Y")

cmd/commands/runtime_install.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -687,7 +687,7 @@ func runRuntimeInstall(ctx context.Context, opts *RuntimeInstallOptions) error {
687687
return updateCodefreshCM(ctx, opts, rt, server)
688688
}
689689
},
690-
Sleep: 2,
690+
Sleep: 2 * time.Second,
691691
})
692692
handleCliStep(reporter.InstallStepCreateOrUpdateConfigMap, "Creating/Updating codefresh-cm", err, false, true)
693693
if err != nil {

docs/releases/release_notes.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ cf version
2323

2424
```bash
2525
# download and extract the binary
26-
curl -L --output - https://github.com/codefresh-io/cli-v2/releases/download/v0.0.494/cf-linux-amd64.tar.gz | tar zx
26+
curl -L --output - https://github.com/codefresh-io/cli-v2/releases/download/v0.0.495/cf-linux-amd64.tar.gz | tar zx
2727

2828
# move the binary to your $PATH
2929
mv ./cf-linux-amd64 /usr/local/bin/cf
@@ -36,7 +36,7 @@ cf version
3636

3737
```bash
3838
# download and extract the binary
39-
curl -L --output - https://github.com/codefresh-io/cli-v2/releases/download/v0.0.494/cf-darwin-amd64.tar.gz | tar zx
39+
curl -L --output - https://github.com/codefresh-io/cli-v2/releases/download/v0.0.495/cf-darwin-amd64.tar.gz | tar zx
4040

4141
# move the binary to your $PATH
4242
mv ./cf-darwin-amd64 /usr/local/bin/cf

manifests/runtime.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ metadata:
55
namespace: "{{ namespace }}"
66
spec:
77
defVersion: 1.0.1
8-
version: 0.0.494
8+
version: 0.0.495
99
bootstrapSpecifier: github.com/codefresh-io/cli-v2/manifests/argo-cd
1010
components:
1111
- name: events

pkg/util/util.go

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ import (
4242
type RetryOptions struct {
4343
Func func() error
4444
Retries int
45-
Sleep int
45+
Sleep time.Duration
4646
}
4747

4848
const (
@@ -368,7 +368,13 @@ func Retry(ctx context.Context, opts *RetryOptions) error {
368368
log.G(ctx).WithFields(log.Fields{
369369
"retry": try,
370370
"err": err.Error(),
371-
}).Warn("Failed to create event reporter, trying again")
371+
}).Warn("Function call failed, trying again")
372+
373+
if opts.Sleep != 0 {
374+
time.Sleep(opts.Sleep)
375+
} else {
376+
time.Sleep(time.Second)
377+
}
372378
}
373379

374380
return err

0 commit comments

Comments
 (0)