From 69e789b294ce0c5fe6519c5319639e576e162918 Mon Sep 17 00:00:00 2001 From: Aman Singh Date: Wed, 2 Nov 2022 12:23:26 +0530 Subject: [PATCH] removed prints statements --- cmd/kaniko-acr/main.go | 4 ---- pkg/artifact/artifact.go | 1 - 2 files changed, 5 deletions(-) diff --git a/cmd/kaniko-acr/main.go b/cmd/kaniko-acr/main.go index 913ff5e..c48a3b9 100644 --- a/cmd/kaniko-acr/main.go +++ b/cmd/kaniko-acr/main.go @@ -344,7 +344,6 @@ func getACRToken(subscriptionId, tenantId, clientId, clientSecret, cert, registr return "", "", errors.Wrap(err, "failed to fetch access token") } - fmt.Fprintf(os.Stderr, "aman %s\n", azToken.Token) publicUrl, err := getPublicUrl(azToken.Token, registry, subscriptionId) if err != nil { return "", "", errors.Wrap(err, "failed to fetch access token") @@ -402,7 +401,6 @@ func setupACRCert(cert string) error { func getPublicUrl(token, registryUrl, subscriptionId string) (string, error) { finalUrl := "https://portal.azure.com/#view/Microsoft_Azure_ContainerRegistries/TagMetadataBlade/registryId/subscriptions/%s/resourceGroups/%s/providers/Microsoft.ContainerRegistry/" registry := strings.Split(registryUrl, ".")[0] - fmt.Fprintf(os.Stderr, "aman %s %s %s\n", registry, registryUrl, subscriptionId) burl := "https://management.azure.com/subscriptions/" + subscriptionId + "/resources?$filter=resourceType%20eq%20'Microsoft.ContainerRegistry/registries'%20and%20name%20eq%20'" + registry + "'&api-version=2021-04-01&$select=id" @@ -424,8 +422,6 @@ func getPublicUrl(token, registryUrl, subscriptionId string) (string, error) { } defer res.Body.Close() - fmt.Fprintf(os.Stderr, "aman %d %s %s\n", res.StatusCode, strings.Split(subscriptionId, "b"), burl) - var response strct err = json.NewDecoder(res.Body).Decode(&response) if err != nil { diff --git a/pkg/artifact/artifact.go b/pkg/artifact/artifact.go index fd166fa..9f01286 100644 --- a/pkg/artifact/artifact.go +++ b/pkg/artifact/artifact.go @@ -52,7 +52,6 @@ func WritePluginArtifactFile(registryType RegistryTypeEnum, artifactFilePath, re RegistryUrl: registryUrl, Images: images, } - fmt.Fprintf(os.Stderr, "public Url is %s\n", registryUrl) dockerArtifact := DockerArtifact{ Kind: dockerArtifactV1,