Skip to content

Commit 95225cf

Browse files
authored
added default gitsource name (#12)
* added default gitsource name * added rollout to eventsource * updated argocd to v2.0.4 * updated version to v0.0.17
1 parent 5acfab8 commit 95225cf

File tree

3 files changed

+19
-3
lines changed

3 files changed

+19
-3
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.16
1+
VERSION=v0.0.17
22
OUT_DIR=dist
33
YEAR?=$(shell date +"%Y")
44

cmd/commands/runtime.go

Lines changed: 17 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -168,6 +168,14 @@ func RunRuntimeCreate(ctx context.Context, opts *RuntimeCreateOptions) error {
168168
return fmt.Errorf("failed to create components-reporter: %w", err)
169169
}
170170

171+
if opts.gsCreateOpts.Owner == "" {
172+
opts.gsCreateOpts.Owner = opts.insCreateOpts.Owner
173+
}
174+
175+
if opts.gsCreateOpts.Repo == "" {
176+
opts.gsCreateOpts.Repo = opts.insCreateOpts.Repo + "-git-source"
177+
}
178+
171179
if opts.gsCreateOpts.Token == "" {
172180
opts.gsCreateOpts.Token = opts.insCreateOpts.Token
173181
}
@@ -538,6 +546,13 @@ func createGitSource(ctx context.Context, insCloneOpts *git.CloneOptions, gsClon
538546
Namespace: runtimeName,
539547
Selectors: selectors,
540548
},
549+
"rollout": {
550+
Group: "argoproj.io",
551+
Version: "v1alpha1",
552+
Resource: "rollouts",
553+
Namespace: runtimeName,
554+
Selectors: selectors,
555+
},
541556
},
542557
})
543558
if err := insFs.WriteYamls(insFs.Join(resPath, "event-source.yaml"), eventSource); err != nil {
@@ -551,14 +566,15 @@ func createGitSource(ctx context.Context, insCloneOpts *git.CloneOptions, gsClon
551566
EventBusName: store.Get().EventBusName,
552567
TriggerURL: cfConfig.GetCurrentContext().URL + store.Get().EventReportingEndpoint,
553568
Triggers: []string{
554-
"clusterWorkflowTemplate",
569+
// "clusterWorkflowTemplate",
555570
"workflowTemplate",
556571
"workflow",
557572
"appProject",
558573
"application",
559574
"eventBus",
560575
"eventSource",
561576
"sensor",
577+
"rollout",
562578
},
563579
})
564580
if err = insFs.WriteYamls(insFs.Join(resPath, "sensor.yaml"), sensor); err != nil {

manifests/argo-cd/kustomization.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
apiVersion: kustomize.config.k8s.io/v1beta1
22
kind: Kustomization
33
resources:
4-
- https://raw.githubusercontent.com/argoproj/argo-cd/v2.0.3/manifests/install.yaml
4+
- https://raw.githubusercontent.com/argoproj/argo-cd/v2.0.4/manifests/install.yaml
55
- https://raw.githubusercontent.com/argoproj-labs/applicationset/master/manifests/install.yaml # TODO: switch to the next release when available

0 commit comments

Comments
 (0)