From 7cb709c0c90c26c6c67c37cb3a2382b4fdff54c9 Mon Sep 17 00:00:00 2001 From: Pedro Tashima Date: Tue, 24 Oct 2023 13:16:24 -0300 Subject: [PATCH 1/2] remove docker check --- cmd/rancher_release/check_rancher_image.go | 11 ----------- release/rancher/rancher.go | 5 ----- 2 files changed, 16 deletions(-) diff --git a/cmd/rancher_release/check_rancher_image.go b/cmd/rancher_release/check_rancher_image.go index 05d02b24..a04d9e54 100644 --- a/cmd/rancher_release/check_rancher_image.go +++ b/cmd/rancher_release/check_rancher_image.go @@ -1,18 +1,11 @@ package main import ( - "context" - "github.com/rancher/ecm-distro-tools/release/rancher" "github.com/sirupsen/logrus" "github.com/urfave/cli/v2" ) -const ( - rancherOrg = "rancher" - rancherRepo = rancherOrg -) - func checkRancherImageCommand() *cli.Command { return &cli.Command{ Name: "check-rancher-image", @@ -32,9 +25,5 @@ func checkRancherImageCommand() *cli.Command { func checkRancherImage(c *cli.Context) error { tag := c.String("tag") logrus.Debug("tag: " + tag) - rancherArchs := []string{"amd64", "arm64", "s390x"} - if err := rancher.CheckRancherDockerImage(context.Background(), rancherOrg, rancherRepo, tag, rancherArchs); err != nil { - return err - } return rancher.CheckHelmChartVersion(tag) } diff --git a/release/rancher/rancher.go b/release/rancher/rancher.go index 26a28509..8b9c5a4f 100644 --- a/release/rancher/rancher.go +++ b/release/rancher/rancher.go @@ -11,7 +11,6 @@ import ( "time" "github.com/google/go-github/v39/github" - "github.com/rancher/ecm-distro-tools/docker" "github.com/rancher/ecm-distro-tools/exec" ecmHTTP "github.com/rancher/ecm-distro-tools/http" "github.com/rancher/ecm-distro-tools/repository" @@ -163,10 +162,6 @@ func rancherImages(imagesURL string) (string, error) { return string(images), nil } -func CheckRancherDockerImage(ctx context.Context, org, repo, tag string, archs []string) error { - return docker.CheckImageArchs(ctx, org, repo, tag, archs) -} - func CheckHelmChartVersion(tag string) error { versions, err := rancherHelmChartVersions(rancherHelmRepositoryURL) if err != nil { From 8f8a7648ae0ea3e24dd00d9957188d881374ea72 Mon Sep 17 00:00:00 2001 From: Pedro Tashima Date: Tue, 24 Oct 2023 13:43:07 -0300 Subject: [PATCH 2/2] add logs --- release/rancher/rancher.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/release/rancher/rancher.go b/release/rancher/rancher.go index 8b9c5a4f..4ffdd57e 100644 --- a/release/rancher/rancher.go +++ b/release/rancher/rancher.go @@ -169,7 +169,7 @@ func CheckHelmChartVersion(tag string) error { } var foundVersion bool for _, version := range versions { - logrus.Debug("checking version " + version) + logrus.Info("checking version " + version) if tag == version { logrus.Info("found chart for version " + version) foundVersion = true @@ -184,7 +184,7 @@ func CheckHelmChartVersion(tag string) error { func rancherHelmChartVersions(repoURL string) ([]string, error) { httpClient := ecmHTTP.NewClient(time.Second * 15) - logrus.Debug("downloading: " + repoURL) + logrus.Info("downloading: " + repoURL) resp, err := httpClient.Get(repoURL) if err != nil { return nil, err