Skip to content

Commit

Permalink
added default gitsource name (#12)
Browse files Browse the repository at this point in the history
* added default gitsource name
* added rollout to eventsource
* updated argocd to v2.0.4
* updated version to v0.0.17
  • Loading branch information
ATGardner authored Jun 23, 2021
1 parent 5acfab8 commit 95225cf
Show file tree
Hide file tree
Showing 3 changed files with 19 additions and 3 deletions.
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
VERSION=v0.0.16
VERSION=v0.0.17
OUT_DIR=dist
YEAR?=$(shell date +"%Y")

Expand Down
18 changes: 17 additions & 1 deletion cmd/commands/runtime.go
Original file line number Diff line number Diff line change
Expand Up @@ -168,6 +168,14 @@ func RunRuntimeCreate(ctx context.Context, opts *RuntimeCreateOptions) error {
return fmt.Errorf("failed to create components-reporter: %w", err)
}

if opts.gsCreateOpts.Owner == "" {
opts.gsCreateOpts.Owner = opts.insCreateOpts.Owner
}

if opts.gsCreateOpts.Repo == "" {
opts.gsCreateOpts.Repo = opts.insCreateOpts.Repo + "-git-source"
}

if opts.gsCreateOpts.Token == "" {
opts.gsCreateOpts.Token = opts.insCreateOpts.Token
}
Expand Down Expand Up @@ -538,6 +546,13 @@ func createGitSource(ctx context.Context, insCloneOpts *git.CloneOptions, gsClon
Namespace: runtimeName,
Selectors: selectors,
},
"rollout": {
Group: "argoproj.io",
Version: "v1alpha1",
Resource: "rollouts",
Namespace: runtimeName,
Selectors: selectors,
},
},
})
if err := insFs.WriteYamls(insFs.Join(resPath, "event-source.yaml"), eventSource); err != nil {
Expand All @@ -551,14 +566,15 @@ func createGitSource(ctx context.Context, insCloneOpts *git.CloneOptions, gsClon
EventBusName: store.Get().EventBusName,
TriggerURL: cfConfig.GetCurrentContext().URL + store.Get().EventReportingEndpoint,
Triggers: []string{
"clusterWorkflowTemplate",
// "clusterWorkflowTemplate",
"workflowTemplate",
"workflow",
"appProject",
"application",
"eventBus",
"eventSource",
"sensor",
"rollout",
},
})
if err = insFs.WriteYamls(insFs.Join(resPath, "sensor.yaml"), sensor); err != nil {
Expand Down
2 changes: 1 addition & 1 deletion manifests/argo-cd/kustomization.yaml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
apiVersion: kustomize.config.k8s.io/v1beta1
kind: Kustomization
resources:
- https://raw.githubusercontent.com/argoproj/argo-cd/v2.0.3/manifests/install.yaml
- https://raw.githubusercontent.com/argoproj/argo-cd/v2.0.4/manifests/install.yaml
- https://raw.githubusercontent.com/argoproj-labs/applicationset/master/manifests/install.yaml # TODO: switch to the next release when available

0 comments on commit 95225cf

Please sign in to comment.