Skip to content

Commit 700640b

Browse files
authored
Fix Manifests (#6)
* don't infer appTypes * updated to autopilot 0.2.4 * updated to applicationset@master
1 parent ad4efaf commit 700640b

File tree

5 files changed

+80
-16
lines changed

5 files changed

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

cmd/commands/runtime.go

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -145,15 +145,15 @@ func RunRuntimeCreate(ctx context.Context, opts *RuntimeCreateOptions) error {
145145
return err
146146
}
147147

148-
if err = createApp(ctx, installOpts, opts.RuntimeName, "events", store.Get().ArgoEventsManifestsURL, opts.RuntimeName); err != nil {
148+
if err = createApp(ctx, installOpts, opts.RuntimeName, "events", store.Get().ArgoEventsManifestsURL, application.AppTypeKustomize, opts.RuntimeName); err != nil {
149149
return fmt.Errorf("failed to create application events: %w", err)
150150
}
151151

152-
if err = createApp(ctx, installOpts, opts.RuntimeName, "rollouts", store.Get().ArgoRolloutsManifestsURL, opts.RuntimeName); err != nil {
152+
if err = createApp(ctx, installOpts, opts.RuntimeName, "rollouts", store.Get().ArgoRolloutsManifestsURL, application.AppTypeKustomize, opts.RuntimeName); err != nil {
153153
return fmt.Errorf("failed to create application rollouts: %w", err)
154154
}
155155

156-
if err = createApp(ctx, installOpts, opts.RuntimeName, "workflows", store.Get().ArgoWorkflowsManifestsURL, opts.RuntimeName); err != nil {
156+
if err = createApp(ctx, installOpts, opts.RuntimeName, "workflows", store.Get().ArgoWorkflowsManifestsURL, application.AppTypeKustomize, opts.RuntimeName); err != nil {
157157
return fmt.Errorf("failed to create application workflows: %w", err)
158158
}
159159

@@ -175,7 +175,7 @@ func createCodefreshResources(ctx context.Context, cloneOpts *git.CloneOptions,
175175
}
176176

177177
resPath := cloneOpts.FS.Join(apstore.Default.AppsDir, store.Get().ComponentsReporterName, opts.RuntimeName, "resources")
178-
if err := createApp(ctx, cloneOpts, opts.RuntimeName, store.Get().ComponentsReporterName, cloneOpts.URL()+"/"+resPath, opts.RuntimeName); err != nil {
178+
if err := createApp(ctx, cloneOpts, opts.RuntimeName, store.Get().ComponentsReporterName, cloneOpts.URL()+"/"+resPath, application.AppTypeDirectory, opts.RuntimeName); err != nil {
179179
return err
180180
}
181181

@@ -205,13 +205,14 @@ func createCodefreshResources(ctx context.Context, cloneOpts *git.CloneOptions,
205205
})
206206
}
207207

208-
func createApp(ctx context.Context, cloneOpts *git.CloneOptions, projectName, appName, appURL, namespace string) error {
208+
func createApp(ctx context.Context, cloneOpts *git.CloneOptions, projectName, appName, appURL, appType, namespace string) error {
209209
return apcmd.RunAppCreate(ctx, &apcmd.AppCreateOptions{
210210
CloneOpts: cloneOpts,
211211
ProjectName: projectName,
212212
AppOpts: &application.CreateOptions{
213213
AppName: appName,
214214
AppSpecifier: appURL,
215+
AppType: appType,
215216
DestNamespace: namespace,
216217
},
217218
})

go.mod

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ go 1.16
44

55
require (
66
github.com/argoproj-labs/applicationset v0.1.0
7-
github.com/argoproj-labs/argocd-autopilot v0.2.1
7+
github.com/argoproj-labs/argocd-autopilot v0.2.4
88
github.com/argoproj/argo-cd/v2 v2.0.3
99
github.com/argoproj/argo-events v0.17.1-0.20210527154554-3f05846796c2
1010
github.com/briandowns/spinner v1.13.0
@@ -19,11 +19,13 @@ require (
1919
github.com/spf13/pflag v1.0.5
2020
github.com/spf13/viper v1.7.1
2121
github.com/stretchr/testify v1.7.0
22+
gopkg.in/yaml.v3 v3.0.0-20210107192922-496545a6307b // indirect
2223
k8s.io/api v0.21.1
2324
k8s.io/apimachinery v0.21.1
2425
)
2526

2627
replace (
28+
github.com/argoproj-labs/applicationset => github.com/argoproj-labs/applicationset v0.0.0-20210614145856-2c62537a8e5a
2729
k8s.io/api => k8s.io/api v0.21.1
2830
k8s.io/apiextensions-apiserver => k8s.io/apiextensions-apiserver v0.21.1
2931
k8s.io/apimachinery => k8s.io/apimachinery v0.21.1

0 commit comments

Comments
 (0)