Skip to content

Commit 3bff91b

Browse files
CR-8634 (#202)
* initial commit and bump * reporter successful push message * algined line * defVersion bump * no defVersion bump * forigving warning to graphql API call failing while waiting for installation to complete
1 parent 2adb99d commit 3bff91b

File tree

5 files changed

+30
-12
lines changed

5 files changed

+30
-12
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.183
1+
VERSION=v0.0.184
22

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

cmd/commands/runtime.go

Lines changed: 15 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -292,7 +292,7 @@ func getComponents(rt *runtime.Runtime, opts *RuntimeInstallOptions) []string {
292292
}
293293

294294
// should find a more dynamic way to get these additional components
295-
additionalComponents := []string{"events-reporter", "workflow-reporter", "replicaset-reporter"}
295+
additionalComponents := []string{"events-reporter", "workflow-reporter", "replicaset-reporter", "rollout-reporter"}
296296
for _, additionalComponentName := range additionalComponents {
297297
componentFullName := fmt.Sprintf("%s-%s", opts.RuntimeName, additionalComponentName)
298298
componentNames = append(componentNames, componentFullName)
@@ -524,6 +524,16 @@ func installComponents(ctx context.Context, opts *RuntimeInstallOptions, rt *run
524524
return fmt.Errorf("failed to create replicaset-reporter: %w", err)
525525
}
526526

527+
if err = createReporter(ctx, opts.InsCloneOpts, opts, reporterCreateOptions{
528+
reporterName: store.Get().RolloutReporterName,
529+
resourceName: store.Get().RolloutResourceName,
530+
group: "argoproj.io",
531+
version: "v1alpha1",
532+
saName: store.Get().RolloutReporterServiceAccount,
533+
}); err != nil {
534+
return fmt.Errorf("failed to create rollout-reporter: %w", err)
535+
}
536+
527537
return nil
528538
}
529539

@@ -610,7 +620,7 @@ func intervalCheckIsRuntimePersisted(ctx context.Context, runtimeName string) er
610620
for triesLeft := maxRetries; triesLeft > 0; triesLeft, _ = triesLeft-1, <-ticker.C {
611621
runtime, err := cfConfig.NewClient().V2().Runtime().Get(ctx, runtimeName)
612622
if err != nil {
613-
return fmt.Errorf("failed to complete the runtime installation. Error: %w", err)
623+
log.G(ctx).Warn("retrying the call to graphql API. Error: %w", err)
614624
}
615625

616626
if runtime.InstallationStatus == model.InstallationStatusCompleted {
@@ -1235,7 +1245,9 @@ func createReporter(ctx context.Context, cloneOpts *git.CloneOptions, opts *Runt
12351245

12361246
log.G(ctx).Info("Pushing Codefresh ", strings.Title(reporterCreateOpts.reporterName), " mainifests")
12371247

1238-
return apu.PushWithMessage(ctx, r, "Created Codefresh Workflow Reporter")
1248+
pushMessage := "Created Codefresh" + strings.Title(reporterCreateOpts.reporterName) + "Reporter"
1249+
1250+
return apu.PushWithMessage(ctx, r, pushMessage)
12391251
}
12401252

12411253
func updateProject(repofs fs.FS, rt *runtime.Runtime) error {

docs/releases/release_notes.md

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
### Installed Applications:
22

3-
- Argo CD [v2.1.5](https://github.com/codefresh-io/argo-cd/releases/tag/v2.1.3)
4-
- Argo CD ApplicationSet Controller [v0.2.0](https://github.com/argoproj-labs/applicationset/releases/tag/v0.2.0)
5-
- Argo Events [v1.5.5](https://github.com/argoproj/argo-events/releases/tag/v1.4.0)
6-
- Argo Rollouts [v1.1.0](https://github.com/argoproj/argo-rollouts/releases/tag/v1.1.0)
7-
- Argo Workflows [v3.2.4](https://github.com/argoproj/argo-workflows/releases/tag/v3.1.8)
3+
- Argo CD [v2.1.5](https://github.com/codefresh-io/argo-cd/releases/tag/v2.1.3)
4+
- Argo CD ApplicationSet Controller [v0.2.0](https://github.com/argoproj-labs/applicationset/releases/tag/v0.2.0)
5+
- Argo Events [v1.5.5](https://github.com/argoproj/argo-events/releases/tag/v1.4.0)
6+
- Argo Rollouts [v1.1.0](https://github.com/argoproj/argo-rollouts/releases/tag/v1.1.0)
7+
- Argo Workflows [v3.2.4](https://github.com/argoproj/argo-workflows/releases/tag/v3.1.8)
88

99
### Using brew:
1010

@@ -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.183/cf-linux-amd64.tar.gz | tar zx
26+
curl -L --output - https://github.com/codefresh-io/cli-v2/releases/download/v0.0.184/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.183/cf-darwin-amd64.tar.gz | tar zx
39+
curl -L --output - https://github.com/codefresh-io/cli-v2/releases/download/v0.0.184/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.0
8-
version: 0.0.183
8+
version: 0.0.184
99
bootstrapSpecifier: github.com/codefresh-io/cli-v2/manifests/argo-cd
1010
components:
1111
- name: events

pkg/store/store.go

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -132,6 +132,9 @@ type Store struct {
132132
ReplicaSetReporterServiceAccount string
133133
ReplicaSetResourceName string
134134
WorkflowResourceName string
135+
RolloutReporterName string
136+
RolloutResourceName string
137+
RolloutReporterServiceAccount string
135138
}
136139

137140
// Get returns the global store
@@ -210,6 +213,9 @@ func init() {
210213
s.ReplicaSetReporterServiceAccount = "replicaset-reporter-sa"
211214
s.ReplicaSetResourceName = "replicasets"
212215
s.WorkflowResourceName = "workflows"
216+
s.RolloutReporterName = "rollout-reporter"
217+
s.RolloutResourceName = "rollouts"
218+
s.RolloutReporterServiceAccount = "rollout-reporter-sa"
213219
initVersion()
214220
}
215221

0 commit comments

Comments
 (0)