From 6abdae275bc80c8dc08973dcc1724c7c06ef54e6 Mon Sep 17 00:00:00 2001 From: Elad Laor Date: Mon, 18 Apr 2022 16:26:42 +0300 Subject: [PATCH] CR-11030 (#286) * include and exclude flgas --- build/sanity.yml | 2 +- docs/commands/argocd-autopilot_application_create.md | 2 ++ pkg/application/application.go | 2 ++ 3 files changed, 5 insertions(+), 1 deletion(-) diff --git a/build/sanity.yml b/build/sanity.yml index b5ef985c..a64f0631 100644 --- a/build/sanity.yml +++ b/build/sanity.yml @@ -71,7 +71,7 @@ steps: - export GIT_REPO=https://github.com/${{GIT_REPO}} - argocd-autopilot repo bootstrap -n $NAMESPACE - argocd-autopilot project create e2e - - argocd-autopilot app create example --app github.com/argoproj-labs/argocd-autopilot/examples/demo-app -p e2e --wait-timeout 3m --dest-namespace $NAMESPACE + - argocd-autopilot app create example --app github.com/argoproj-labs/argocd-autopilot/examples/demo-app -p e2e --wait-timeout 10m --dest-namespace $NAMESPACE when: steps: - name: prep_cluster diff --git a/docs/commands/argocd-autopilot_application_create.md b/docs/commands/argocd-autopilot_application_create.md index fe7c6ed2..ecf2c9c4 100644 --- a/docs/commands/argocd-autopilot_application_create.md +++ b/docs/commands/argocd-autopilot_application_create.md @@ -55,9 +55,11 @@ argocd-autopilot application create [APP_NAME] [flags] --context string The name of the kubeconfig context to use --dest-namespace string K8s target namespace (overrides the namespace specified in the kustomization.yaml) --dest-server string K8s cluster URL (e.g. https://kubernetes.default.svc) (default "https://kubernetes.default.svc") + --exclude string Optional glob for files to exclude -t, --git-token string Your git provider api token [GIT_TOKEN] -u, --git-user string Your git provider user name [GIT_USER] (not required in GitHub) -h, --help help for create + --include string Optional glob for files to include --installation-mode string One of: normal|flat. If flat, will commit the application manifests (after running kustomize build), otherwise will commit the kustomization.yaml (default "normal") --kubeconfig string Path to the kubeconfig file to use for CLI requests. --labels stringToString Optional labels that will be set on the Application resource. (e.g. "{{ placeholder }}=my-org" (default []) diff --git a/pkg/application/application.go b/pkg/application/application.go index f9e42473..eba55d2f 100644 --- a/pkg/application/application.go +++ b/pkg/application/application.go @@ -115,6 +115,8 @@ func AddFlags(cmd *cobra.Command) *CreateOptions { cmd.Flags().StringVar(&opts.InstallationMode, "installation-mode", InstallationModeNormal, "One of: normal|flat. "+ "If flat, will commit the application manifests (after running kustomize build), otherwise will commit the kustomization.yaml") cmd.Flags().StringToStringVar(&opts.Labels, "labels", nil, "Optional labels that will be set on the Application resource. (e.g. \"{{ placeholder }}=my-org\"") + cmd.Flags().StringVar(&opts.Include, "include", "", "Optional glob for files to include") + cmd.Flags().StringVar(&opts.Exclude, "exclude", "", "Optional glob for files to exclude") return opts }