From 1b3953f28c704561d01d7c955847297911b9c87f Mon Sep 17 00:00:00 2001 From: David vonThenen <12752197+dvonthenen@users.noreply.github.com> Date: Wed, 22 Sep 2021 19:05:53 -0700 Subject: [PATCH] Fix the upload to the correct 3 buckets for releases (#1892) Co-authored-by: github-actions --- .github/workflows/release-ga.yaml | 17 ++++++++++++----- .github/workflows/release-nonga.yaml | 17 ++++++++++++----- hack/build-tanzu.sh | 12 ++++++++---- hack/install-tanzu.sh | 6 ++++-- 4 files changed, 36 insertions(+), 16 deletions(-) diff --git a/.github/workflows/release-ga.yaml b/.github/workflows/release-ga.yaml index 534df1fa23..94035ed8cf 100644 --- a/.github/workflows/release-ga.yaml +++ b/.github/workflows/release-ga.yaml @@ -157,18 +157,25 @@ jobs: TCE_CI_BUILD: true shell: bash run: make cut-release - - name: Upload Artifacts to Release Bucket - id: upload-artifacts-release + - name: Upload TCE Artifacts to Release Bucket + id: upload-tce-artifacts-release uses: google-github-actions/upload-cloud-storage@main with: path: ./artifacts destination: tce-tanzu-cli-plugins credentials: ${{ secrets.GCP_BUCKET_SA }} - - name: Upload Artifacts-Admin to Release Bucket - id: upload-artifacts-admin-release + - name: Upload TF Artifacts to Release Bucket + id: upload-tf-artifacts-release uses: google-github-actions/upload-cloud-storage@main with: - path: ./artifacts + path: /tmp/tce-release/tanzu-framework/artifacts + destination: tce-tanzu-cli-framework + credentials: ${{ secrets.GCP_BUCKET_SA }} + - name: Upload TF Artifacts-Admin to Release Bucket + id: upload-tf-artifacts-admin-release + uses: google-github-actions/upload-cloud-storage@main + with: + path: /tmp/tce-release/tanzu-framework/artifacts-admin destination: tce-tanzu-cli-admin-plugins credentials: ${{ secrets.GCP_BUCKET_SA }} - name: Upload Cayman Trigger Asset diff --git a/.github/workflows/release-nonga.yaml b/.github/workflows/release-nonga.yaml index 020eed976a..3652234010 100644 --- a/.github/workflows/release-nonga.yaml +++ b/.github/workflows/release-nonga.yaml @@ -158,18 +158,25 @@ jobs: TCE_CI_BUILD: true shell: bash run: make cut-release - - name: Upload Artifacts to Release Bucket - id: upload-artifacts-release + - name: Upload TCE Artifacts to Release Bucket + id: upload-tce-artifacts-release uses: google-github-actions/upload-cloud-storage@main with: path: ./artifacts destination: tce-tanzu-cli-plugins credentials: ${{ secrets.GCP_BUCKET_SA }} - - name: Upload Artifacts-Admin to Release Bucket - id: upload-artifacts-admin-release + - name: Upload TF Artifacts to Release Bucket + id: upload-tf-artifacts-release uses: google-github-actions/upload-cloud-storage@main with: - path: ./artifacts + path: /tmp/tce-release/tanzu-framework/artifacts + destination: tce-tanzu-cli-framework + credentials: ${{ secrets.GCP_BUCKET_SA }} + - name: Upload TF Artifacts-Admin to Release Bucket + id: upload-tf-artifacts-admin-release + uses: google-github-actions/upload-cloud-storage@main + with: + path: /tmp/tce-release/tanzu-framework/artifacts-admin destination: tce-tanzu-cli-admin-plugins credentials: ${{ secrets.GCP_BUCKET_SA }} - name: Upload Cayman Trigger Asset diff --git a/hack/build-tanzu.sh b/hack/build-tanzu.sh index 208bf74b8d..8f3f178507 100755 --- a/hack/build-tanzu.sh +++ b/hack/build-tanzu.sh @@ -46,12 +46,16 @@ if [[ -n "${TANZU_FRAMEWORK_REPO_HASH}" ]]; then fi BUILD_SHA="$(git describe --match="$(git rev-parse --short HEAD)" --always)" sed -i.bak -e "s/ --dirty//g" ./Makefile && rm ./Makefile.bak -sed -i.bak -e "s/--artifacts artifacts\/\${OS}\/\${ARCH}\/cli/--artifacts artifacts/g" ./Makefile && rm ./Makefile.bak -sed -i.bak -e "s/--artifacts artifacts-admin\/\${GOHOSTOS}\/\${GOHOSTARCH}\/cli/--artifacts artifacts-admin/g" ./Makefile && rm ./Makefile.bak -sed -i.bak -e "s|\$(ARTIFACTS_DIR)/\$(GOHOSTOS)/\$(GOHOSTARCH)/cli|\$(ARTIFACTS_DIR)|g" ./Makefile && rm ./Makefile.bak -sed -i.bak -e "s|\$(ARTIFACTS_DIR)-admin/\$(GOHOSTOS)/\$(GOHOSTARCH)/cli|\$(ARTIFACTS_DIR)-admin|g" ./Makefile && rm ./Makefile.bak +sed -i.bak -e "s|--artifacts artifacts/\${OS}/\${ARCH}/cli|--artifacts artifacts|g" ./Makefile && rm ./Makefile.bak +sed -i.bak -e "s|--artifacts artifacts-admin/\${GOHOSTOS}/\${GOHOSTARCH}/cli|--artifacts artifacts-admin|g" ./Makefile && rm ./Makefile.bak +sed -i.bak -e "s|--local \$(ARTIFACTS_DIR)/\$(GOHOSTOS)/\$(GOHOSTARCH)/cli|--local \$(ARTIFACTS_DIR)|g" ./Makefile && rm ./Makefile.bak +sed -i.bak -e "s|--local \$(ARTIFACTS_DIR)-admin/\$(GOHOSTOS)/\$(GOHOSTARCH)/cli|--local \$(ARTIFACTS_DIR)-admin|g" ./Makefile && rm ./Makefile.bak sed -i.bak -e "s/\$(shell git describe --tags --abbrev=0 2>\$(NUL))/${FRAMEWORK_BUILD_VERSION}/g" ./Makefile && rm ./Makefile.bak +# do not delete this... removing this fails to get pinniped to functiona correctly +go mod download +go mod tidy + # allow unstable (non-GA) version plugins if [[ "${TCE_BUILD_VERSION}" == *"-"* ]]; then make controller-gen diff --git a/hack/install-tanzu.sh b/hack/install-tanzu.sh index 63d91486a3..1840ff1a2d 100755 --- a/hack/install-tanzu.sh +++ b/hack/install-tanzu.sh @@ -24,8 +24,10 @@ cd "${ROOT_REPO_DIR}/tanzu-framework" || exit 1 BUILD_SHA="$(git describe --match="$(git rev-parse --short HEAD)" --always)" sed -i.bak -e "s/ --dirty//g" ./Makefile && rm ./Makefile.bak -sed -i.bak -e "s/--artifacts artifacts\/\${OS}\/\${ARCH}\/cli/--artifacts artifacts/g" ./Makefile && rm ./Makefile.bak -sed -i.bak -e "s/--artifacts artifacts-admin\/\${GOHOSTOS}\/\${GOHOSTARCH}\/cli/--artifacts artifacts-admin/g" ./Makefile && rm ./Makefile.bak +sed -i.bak -e "s|--artifacts artifacts/\${OS}/\${ARCH}/cli|--artifacts artifacts|g" ./Makefile && rm ./Makefile.bak +sed -i.bak -e "s|--artifacts artifacts-admin/\${GOHOSTOS}/\${GOHOSTARCH}/cli|--artifacts artifacts-admin|g" ./Makefile && rm ./Makefile.bak +sed -i.bak -e "s|--local \$(ARTIFACTS_DIR)/\$(GOHOSTOS)/\$(GOHOSTARCH)/cli|--local \$(ARTIFACTS_DIR)|g" ./Makefile && rm ./Makefile.bak +sed -i.bak -e "s|--local \$(ARTIFACTS_DIR)-admin/\$(GOHOSTOS)/\$(GOHOSTARCH)/cli|--local \$(ARTIFACTS_DIR)-admin|g" ./Makefile && rm ./Makefile.bak sed -i.bak -e "s/\$(shell git describe --tags --abbrev=0 2>\$(NUL))/${FRAMEWORK_BUILD_VERSION}/g" ./Makefile && rm ./Makefile.bak #Only do an install if the environments to build contain the current host OS.