Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove-ap #757

Open
wants to merge 27 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
27 commits
Select commit Hold shift + click to select a range
e8d4466
tmp
ATGardner Nov 7, 2024
f21d9ff
tmp
ATGardner Nov 7, 2024
36a4808
tmp
ATGardner Nov 7, 2024
9e76a84
compiles
ATGardner Nov 7, 2024
3bf8093
upgraded github.com/argoproj/argo-cd/v2 v2.11.4 => v2.11.7
ATGardner Nov 7, 2024
2fe195f
upgraded github.com/codefresh-io/go-sdk v1.3.1 => v1.3.4
ATGardner Nov 7, 2024
f5dcc2f
reset k8s dependencies to match argo-cd
ATGardner Nov 7, 2024
925dd71
replaced github.com/ghodss/yaml with sigs.k8s.io/yaml
ATGardner Nov 7, 2024
cb8b27d
cleanup
ATGardner Nov 7, 2024
e9934b9
organize imports
ATGardner Nov 7, 2024
ee8e4f3
fixed tests
ATGardner Nov 7, 2024
87144db
more cleanup
ATGardner Nov 7, 2024
645802e
update version to `v0.2.0`
ATGardner Nov 7, 2024
a4e0c4c
bump golang to `1.22.6`
ATGardner Nov 7, 2024
63c9f93
updated github.com/argoproj/argo-cd/v2 v2.11.7 => v2.12.0
ATGardner Nov 7, 2024
0dbf190
bump golang to `1.23.0`
ATGardner Nov 7, 2024
f6f37e1
bump golang to `1.23.1`
ATGardner Nov 7, 2024
4d73b7e
upgraded github.com/Masterminds/semver/v3 v3.2.1 => v3.3.0
ATGardner Nov 7, 2024
55659aa
upgraded github.com/argoproj/argo-cd/v2 v2.12.0 => v2.12.3
ATGardner Nov 7, 2024
7f56311
upgraded github.com/fatih/color v1.16.0 => v1.17.0
ATGardner Nov 7, 2024
9d6e9d4
bump golang to `1.23.2`
ATGardner Nov 7, 2024
8983202
bump golang to `1.23.3`
ATGardner Nov 7, 2024
2337a53
fixed import
ATGardner Nov 7, 2024
2a737fe
upgraded github.com/argoproj/argo-cd/v2 v2.12.3 => v2.13.0
ATGardner Nov 7, 2024
19e68df
upgraded github.com/codefresh-io/go-sdk v1.3.4 => v1.4.0
ATGardner Nov 7, 2024
abbe326
upgrade github.com/fatih/color v1.17.0 => v1.18.0
ATGardner Nov 7, 2024
55b6503
upgrade sigs.k8s.io/kustomize/api v0.17.3 => v0.18.0
ATGardner Nov 7, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM golang:1.22.5-alpine3.20 as base
FROM golang:1.23.3-alpine3.20 as base

WORKDIR /go/src/github.com/codefresh-io/cli-v2

Expand Down Expand Up @@ -27,7 +27,7 @@ RUN go mod verify

############################### CLI ###############################
### Compile
FROM golang:1.22.5-alpine3.20 as codefresh-build
FROM golang:1.23.3-alpine3.20 as codefresh-build

WORKDIR /go/src/github.com/codefresh-io/cli-v2

Expand Down
4 changes: 2 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
VERSION=v0.1.67
VERSION=v0.2.0

OUT_DIR=dist
YEAR?=$(shell date +"%Y")
Expand Down Expand Up @@ -176,4 +176,4 @@ $(GOBIN)/mockgen:
$(GOBIN)/golangci-lint:
@mkdir dist || true
@echo installing: golangci-lint
@curl -sSfL https://raw.githubusercontent.com/golangci/golangci-lint/master/install.sh | sh -s -- -b $(GOBIN) v1.55.2
@curl -sSfL https://raw.githubusercontent.com/golangci/golangci-lint/master/install.sh | sh -s -- -b $(GOBIN) v1.59.1
9 changes: 5 additions & 4 deletions build/Dockerfile.helper
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
# docker buildx build --platform linux/amd64,linux/arm64 -t quay.io/codefresh/golang-ci-helper:1.21.12 -f Dockerfile.helper .
FROM golang:1.22.5-alpine3.20
# export GO_VERSION=1.23.3 && docker buildx build --platform linux/amd64,linux/arm64 --build-arg GO_VERSION -t quay.io/codefresh/golang-ci-helper:${GO_VERSION} -f Dockerfile.helper .
ARG GO_VERSION=1.23.3
FROM golang:${GO_VERSION}-alpine3.20

RUN apk -U add --no-cache \
bash \
Expand All @@ -13,14 +14,14 @@ RUN apk -U add --no-cache \
openssl \
&& update-ca-certificates

ARG GH_VERSION=2.52.0
ARG GH_VERSION=2.60.1
RUN curl -L https://github.com/cli/cli/releases/download/v${GH_VERSION}/gh_${GH_VERSION}_linux_amd64.tar.gz --output gh.tar.gz \
&& tar -xzf gh.tar.gz \
&& mv gh_${GH_VERSION}_linux_amd64/bin/gh /usr/local/bin \
&& rm gh.tar.gz \
&& rm -rf gh_${GH_VERSION}_linux_amd64

ARG KUSTOMIZE_VERSION=5.4.2
ARG KUSTOMIZE_VERSION=5.5.0
RUN curl -Ls https://github.com/kubernetes-sigs/kustomize/releases/download/kustomize%2Fv${KUSTOMIZE_VERSION}/kustomize_v${KUSTOMIZE_VERSION}_linux_amd64.tar.gz --output kustomize.tar.gz \
&& tar -xzf kustomize.tar.gz \
&& mv ./kustomize /usr/bin \
Expand Down
12 changes: 0 additions & 12 deletions cmd/commands/assets/workflows-route-patch.json

This file was deleted.

23 changes: 10 additions & 13 deletions cmd/commands/cluster.go
Original file line number Diff line number Diff line change
Expand Up @@ -23,20 +23,20 @@ import (
"strings"
"time"

"github.com/codefresh-io/cli-v2/pkg/log"
"github.com/codefresh-io/cli-v2/pkg/store"
"github.com/codefresh-io/cli-v2/pkg/util"
kubeutil "github.com/codefresh-io/cli-v2/pkg/util/kube"
kustutil "github.com/codefresh-io/cli-v2/pkg/util/kust"
"github.com/codefresh-io/cli-v2/internal/kube"
"github.com/codefresh-io/cli-v2/internal/log"
"github.com/codefresh-io/cli-v2/internal/store"
"github.com/codefresh-io/cli-v2/internal/util"
kubeutil "github.com/codefresh-io/cli-v2/internal/util/kube"
kustutil "github.com/codefresh-io/cli-v2/internal/util/kust"

"github.com/Masterminds/semver/v3"
apkube "github.com/argoproj-labs/argocd-autopilot/pkg/kube"
platmodel "github.com/codefresh-io/go-sdk/pkg/model/platform"
"github.com/ghodss/yaml"
"github.com/juju/ansiterm"
"github.com/spf13/cobra"
kusttypes "sigs.k8s.io/kustomize/api/types"
"sigs.k8s.io/kustomize/kyaml/resid"
"sigs.k8s.io/yaml"
)

type (
Expand All @@ -51,7 +51,7 @@ type (
tag string
dryRun bool
skipTLSValidation bool
kubeFactory apkube.Factory
kubeFactory kube.Factory
}

ClusterRemoveOptions struct {
Expand Down Expand Up @@ -86,7 +86,7 @@ var (
}
)

func NewClusterCommand() *cobra.Command {
func newClusterCommand() *cobra.Command {
cmd := &cobra.Command{
Use: "cluster",
Short: "Manage clusters of Codefresh runtimes",
Expand Down Expand Up @@ -147,7 +147,7 @@ func newClusterAddCommand() *cobra.Command {
cmd.Flags().StringVar(&opts.tag, "tag", "", "[dev only] - use a specific tag of the csdp-add-cluster image")

util.Die(cmd.Flags().MarkHidden("tag"))
opts.kubeFactory = apkube.AddFlags(cmd.Flags())
opts.kubeFactory = kube.AddFlags(cmd.Flags())

return cmd
}
Expand Down Expand Up @@ -422,9 +422,6 @@ func createAddClusterManifests(opts *ClusterAddOptions, ingressUrl, server, csdp
}
}

k.FixKustomizationPostUnmarshalling()
util.Die(k.FixKustomizationPreMarshalling())

manifests, err := kustutil.BuildKustomization(k)
if err != nil {
return nil, "", fmt.Errorf("failed to build kustomization: %w", err)
Expand Down
Loading