@@ -145,15 +145,15 @@ func RunRuntimeCreate(ctx context.Context, opts *RuntimeCreateOptions) error {
145
145
return err
146
146
}
147
147
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 {
149
149
return fmt .Errorf ("failed to create application events: %w" , err )
150
150
}
151
151
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 {
153
153
return fmt .Errorf ("failed to create application rollouts: %w" , err )
154
154
}
155
155
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 {
157
157
return fmt .Errorf ("failed to create application workflows: %w" , err )
158
158
}
159
159
@@ -175,7 +175,7 @@ func createCodefreshResources(ctx context.Context, cloneOpts *git.CloneOptions,
175
175
}
176
176
177
177
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 {
179
179
return err
180
180
}
181
181
@@ -205,13 +205,14 @@ func createCodefreshResources(ctx context.Context, cloneOpts *git.CloneOptions,
205
205
})
206
206
}
207
207
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 {
209
209
return apcmd .RunAppCreate (ctx , & apcmd.AppCreateOptions {
210
210
CloneOpts : cloneOpts ,
211
211
ProjectName : projectName ,
212
212
AppOpts : & application.CreateOptions {
213
213
AppName : appName ,
214
214
AppSpecifier : appURL ,
215
+ AppType : appType ,
215
216
DestNamespace : namespace ,
216
217
},
217
218
})
0 commit comments