Skip to content
This repository has been archived by the owner on Jun 28, 2023. It is now read-only.

Commit

Permalink
Fix the upload to the correct 3 buckets for releases (#1892)
Browse files Browse the repository at this point in the history
Co-authored-by: github-actions <github-actions@github.com>
  • Loading branch information
davidvonthenen and github-actions authored Sep 23, 2021
1 parent 5c54913 commit 1b3953f
Show file tree
Hide file tree
Showing 4 changed files with 36 additions and 16 deletions.
17 changes: 12 additions & 5 deletions .github/workflows/release-ga.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
17 changes: 12 additions & 5 deletions .github/workflows/release-nonga.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
12 changes: 8 additions & 4 deletions hack/build-tanzu.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
6 changes: 4 additions & 2 deletions hack/install-tanzu.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down

0 comments on commit 1b3953f

Please sign in to comment.