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

Don't update latest tag when uploading artifacts #582

Merged
merged 1 commit into from
Mar 8, 2023
Merged
Changes from all commits
Commits
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
9 changes: 1 addition & 8 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,6 @@ UPLOAD ?= $(OUTPUT)/upload
GCS_LOCATION ?= gs://k8s-staging-provider-aws/releases/
GCS_URL = $(GCS_LOCATION:gs://%=https://storage.googleapis.com/%)
BINARY_GIT_VERSION := $(shell git describe --tags --match='v*')
LATEST_FILE ?= latest-tag.txt

.PHONY: aws-cloud-controller-manager
aws-cloud-controller-manager:
Expand Down Expand Up @@ -200,15 +199,9 @@ gcs-upload: gsutil copy-bins-for-upload
@echo "== Uploading provider-aws =="
gsutil -h "Cache-Control:private, max-age=0, no-transform" -m cp -n -r ${UPLOAD}/provider-aws/* ${GCS_LOCATION}

# gcs-upload-tag runs gcs-upload to upload, then uploads a version-marker to LATEST_FILE
.PHONY: gcs-upload-and-tag
gcs-upload-and-tag: gsutil gcs-upload
echo "${GCS_URL}-${BINARY_GIT_VERSION}" > ${UPLOAD}/${LATEST_FILE}
gsutil -h "Cache-Control:private, max-age=0, no-transform" cp ${UPLOAD}/${LATEST_FILE} ${GCS_LOCATION}/${LATEST_FILE}

# CloudBuild artifacts
# We hash some artifacts, so that we have can know that they were not modified after being built.
.PHONY: cloudbuild-artifacts
cloudbuild-artifacts: gcs-upload-and-tag
cloudbuild-artifacts:
cd ${UPLOAD}/provider-aws/${BINARY_GIT_VERSION}/; find . -type f | sort | xargs sha256sum > ${OUTPUT}/files.sha256
cd ${OUTPUT}/; find . -name *.sha256 | sort | xargs sha256sum > ${OUTPUT}/cloudbuild_output