diff --git a/hack/get-krel b/hack/get-krel index 5a53081a239..461a0d597e2 100755 --- a/hack/get-krel +++ b/hack/get-krel @@ -33,18 +33,18 @@ KREL_OUTPUT_PATH=${KREL_OUTPUT_PATH:-bin/krel} echo "Using output path: $KREL_OUTPUT_PATH" mkdir -p "$(dirname "$KREL_OUTPUT_PATH")" -if [[ "$TOOL_ORG" == "$DEFAULT_TOOL_ORG" && "$TOOL_REPO" == "$DEFAULT_TOOL_REPO" && "$TOOL_REF" == "$DEFAULT_TOOL_REF" ]]; then - LATEST_RELEASE=$(curl_retry https://api.github.com/repos/kubernetes/release/releases/latest | jq -r .tag_name) - echo "Using krel release: $LATEST_RELEASE" - - echo "Downloading krel from GCB bucket…" - GCB_URL="https://storage.googleapis.com/k8s-artifacts-sig-release/kubernetes/release/$LATEST_RELEASE/krel-amd64-linux" - curl_retry "$GCB_URL" -o "$KREL_OUTPUT_PATH" - chmod +x "$KREL_OUTPUT_PATH" -else - echo "Building krel from sources" - go build -o "$KREL_OUTPUT_PATH" ./cmd/krel -fi +#if [[ "$TOOL_ORG" == "$DEFAULT_TOOL_ORG" && "$TOOL_REPO" == "$DEFAULT_TOOL_REPO" && "$TOOL_REF" == "$DEFAULT_TOOL_REF" ]]; then +# LATEST_RELEASE=$(curl_retry https://api.github.com/repos/kubernetes/release/releases/latest | jq -r .tag_name) +# echo "Using krel release: $LATEST_RELEASE" +# +# echo "Downloading krel from GCB bucket…" +# GCB_URL="https://storage.googleapis.com/k8s-artifacts-sig-release/kubernetes/release/$LATEST_RELEASE/krel-amd64-linux" +# curl_retry "$GCB_URL" -o "$KREL_OUTPUT_PATH" +# chmod +x "$KREL_OUTPUT_PATH" +#else +echo "Building krel from sources" +go build -o "$KREL_OUTPUT_PATH" ./cmd/krel +#fi echo "Done, output of 'krel version':" "$KREL_OUTPUT_PATH" version diff --git a/pkg/release/publish.go b/pkg/release/publish.go index 3a7b001d4af..1ae552ebbd6 100644 --- a/pkg/release/publish.go +++ b/pkg/release/publish.go @@ -341,10 +341,12 @@ func (p *Publisher) PublishToGcs( return fmt.Errorf("get marker file destination: %w", publishFileDstErr) } + logrus.Infof("Using marker path: %s", markerPath) publicLink := fmt.Sprintf("%s/%s", URLPrefixForBucket(markerPath), publishFile) - if strings.HasPrefix(markerPath, ProductionBucket) { - publicLink = fmt.Sprintf("%s/%s", ProductionBucketURL, publishFile) + if strings.HasSuffix(markerPath, ProductionBucket+"/release") { + publicLink = fmt.Sprintf("%s/release/%s", ProductionBucketURL, publishFile) } + logrus.Infof("Using public link: %s", publicLink) uploadDir := filepath.Join(releaseStage, "upload") if err := os.MkdirAll(uploadDir, os.FileMode(0o755)); err != nil {