diff --git a/CODEOWNERS b/CODEOWNERS index d107941cb..bd7775faa 100644 --- a/CODEOWNERS +++ b/CODEOWNERS @@ -1 +1 @@ -* roi.kramer@codefresh.io noam.gal@codefresh.io daniel.maizel@codefresh.io pavel@codefresh.io ziv@codefresh.io itai@codefresh.io +* roi.kramer@codefresh.io noam.gal@codefresh.io daniel.maizel@codefresh.io pavel@codefresh.io ziv@codefresh.io itai@codefresh.io daniel.soifer@codefresh.io diff --git a/Makefile b/Makefile index f51fa3c1c..2568cc10a 100644 --- a/Makefile +++ b/Makefile @@ -1,4 +1,4 @@ -VERSION=v0.1.0 +VERSION=v0.1.1 OUT_DIR=dist YEAR?=$(shell date +"%Y") diff --git a/cmd/commands/runtime_install.go b/cmd/commands/runtime_install.go index adc2926e5..e9b08d4d5 100644 --- a/cmd/commands/runtime_install.go +++ b/cmd/commands/runtime_install.go @@ -201,17 +201,6 @@ func NewRuntimeInstallCommand() *cobra.Command { return fmt.Errorf("invalid access-mode %s, must be one of: ingress|tunnel", accessMode) } - if installationOpts.AccessMode == platmodel.AccessModeTunnel { - installationOpts.featuresToInstall = append(installationOpts.featuresToInstall, runtime.InstallFeatureIngressless) - accountId, err := cfConfig.GetCurrentContext().GetAccountId(ctx) - if err != nil { - return fmt.Errorf("failed creating ingressHost for tunnel: %w", err) - } - - installationOpts.TunnelSubdomain = fmt.Sprintf("%s-%s", accountId, installationOpts.RuntimeName) - installationOpts.IngressHost = fmt.Sprintf("https://%s.%s", installationOpts.TunnelSubdomain, installationOpts.TunnelDomain) - } - err := runtimeInstallCommandPreRunHandler(cmd, installationOpts) handleCliStep(reporter.InstallPhasePreCheckFinish, "Finished pre installation checks", err, true, false) if err != nil { @@ -222,21 +211,22 @@ func NewRuntimeInstallCommand() *cobra.Command { return util.DecorateErrorWithDocsLink(fmt.Errorf("pre installation error: %w", err), store.Get().RequirementsLink) } - if installationOpts.runtimeDef == "" { - installationOpts.runtimeDef = runtime.GetRuntimeDefURL(installationOpts.versionStr) - } - finalParameters = map[string]string{ "Codefresh context": cfConfig.CurrentContext, "Kube context": installationOpts.kubeContext, "Runtime name": installationOpts.RuntimeName, "Repository URL": installationOpts.InsCloneOpts.Repo, - "Ingress host": installationOpts.IngressHost, "Ingress class": installationOpts.IngressClass, - "Internal ingress host": installationOpts.InternalIngressHost, "Installing demo resources": strconv.FormatBool(installationOpts.InstallDemoResources), } + if installationOpts.AccessMode == platmodel.AccessModeTunnel { + finalParameters["Tunnel URL"] = installationOpts.IngressHost + } else { + finalParameters["Ingress host"] = installationOpts.IngressHost + finalParameters["Internal ingress host"] = installationOpts.InternalIngressHost + } + if err := getApprovalFromUser(ctx, finalParameters, "runtime install"); err != nil { return err } @@ -339,6 +329,14 @@ func runtimeInstallCommandPreRunHandler(cmd *cobra.Command, opts *RuntimeInstall if opts.AccessMode == platmodel.AccessModeTunnel { handleCliStep(reporter.InstallStepPreCheckEnsureIngressClass, "-skipped (ingressless)-", err, true, false) handleCliStep(reporter.InstallStepPreCheckEnsureIngressHost, "-skipped (ingressless)-", err, true, false) + opts.featuresToInstall = append(opts.featuresToInstall, runtime.InstallFeatureIngressless) + accountId, err := cfConfig.GetCurrentContext().GetAccountId(ctx) + if err != nil { + return fmt.Errorf("failed creating ingressHost for tunnel: %w", err) + } + + opts.TunnelSubdomain = fmt.Sprintf("%s-%s", accountId, opts.RuntimeName) + opts.IngressHost = fmt.Sprintf("https://%s.%s", opts.TunnelSubdomain, opts.TunnelDomain) } else { err = ensureRoutingControllerSupported(ctx, opts) handleCliStep(reporter.InstallStepPreCheckEnsureIngressClass, "Getting ingress class", err, true, false) @@ -387,6 +385,10 @@ func runtimeInstallCommandPreRunHandler(cmd *cobra.Command, opts *RuntimeInstall log.G(ctx).Infof("using repo '%s' as shared config repo for this account", sharedConfigRepo) } + if opts.runtimeDef == "" { + opts.runtimeDef = runtime.GetRuntimeDefURL(opts.versionStr) + } + opts.Insecure = true // installs argo-cd in insecure mode, we need this so that the eventsource can talk to the argocd-server with http opts.CommonConfig = &runtime.CommonConfig{CodefreshBaseURL: cfConfig.GetCurrentContext().URL} diff --git a/docs/releases/release_notes.md b/docs/releases/release_notes.md index 8b2ad31de..2e04aeef0 100644 --- a/docs/releases/release_notes.md +++ b/docs/releases/release_notes.md @@ -23,7 +23,7 @@ cf version ```bash # download and extract the binary -curl -L --output - https://github.com/codefresh-io/cli-v2/releases/download/v0.1.0/cf-linux-amd64.tar.gz | tar zx +curl -L --output - https://github.com/codefresh-io/cli-v2/releases/download/v0.1.1/cf-linux-amd64.tar.gz | tar zx # move the binary to your $PATH mv ./cf-linux-amd64 /usr/local/bin/cf @@ -36,7 +36,7 @@ cf version ```bash # download and extract the binary -curl -L --output - https://github.com/codefresh-io/cli-v2/releases/download/v0.1.0/cf-darwin-amd64.tar.gz | tar zx +curl -L --output - https://github.com/codefresh-io/cli-v2/releases/download/v0.1.1/cf-darwin-amd64.tar.gz | tar zx # move the binary to your $PATH mv ./cf-darwin-amd64 /usr/local/bin/cf