Unverified Commit 8002118a authored by David vonThenen's avatar David vonThenen Committed by GitHub
Browse files

Generically allow plugins from external repos (#3998)

Showing with 19 additions and 31 deletions
+19 -31
......@@ -297,6 +297,7 @@ prep-gcp-tce-bucket:
# Please see above
.PHONY: prune-buckets
prune-buckets:
FAKE_RELEASE=$(shell expr $(BUILD_VERSION) | grep test) \
TCE_SCRATCH_DIR=${TCE_SCRATCH_DIR} hack/release/prune-buckets.sh
# The main target for GCP buckets. Please see above
......
......@@ -28,26 +28,12 @@ rmdir /Q /S %TANZU_CACHE_DIR% 2>nul
:: For 0.11.2
:: setup
xcopy /Y /E /H /C /I default-local "%USERPROFILE%\.config\tanzu-plugins"
:: install plugins
tanzu plugin install builder
tanzu plugin install codegen
tanzu plugin install cluster
tanzu plugin install kubernetes-release
tanzu plugin install login
tanzu plugin install management-cluster
tanzu plugin install package
tanzu plugin install pinniped-auth
tanzu plugin install secret
tanzu plugin install conformance
tanzu plugin install diagnostics
tanzu plugin install unmanaged-cluster
:: copy uninstall.bat
copy /B /Y uninstall.bat %TCE_DIR%
:: explicit init of tanzu cli and add tce repo
:: For TF 0.17.0 or higher
:: tanzu init
tanzu init
tanzu plugin repo add --name tce --gcp-bucket-name tce-tanzu-cli-plugins --gcp-root-path artifacts
tanzu plugin repo add --name core-admin --gcp-bucket-name tce-tanzu-cli-framework-admin --gcp-root-path artifacts-admin
......
......@@ -107,23 +107,8 @@ platformdir=$(find "${MY_DIR}" -maxdepth 1 -type d -name "*default*" -exec basen
mkdir -p "${XDG_CONFIG_HOME}/tanzu-plugins"
cp -r "${MY_DIR}/${platformdir}/." "${XDG_CONFIG_HOME}/tanzu-plugins"
# install plugins
tanzu plugin install builder
tanzu plugin install codegen
tanzu plugin install cluster
tanzu plugin install kubernetes-release
tanzu plugin install login
tanzu plugin install management-cluster
tanzu plugin install package
tanzu plugin install pinniped-auth
tanzu plugin install secret
tanzu plugin install conformance
tanzu plugin install diagnostics
tanzu plugin install unmanaged-cluster
# explicit init of tanzu cli and add tce repo
# For TF 0.17.0 or higher
# tanzu init
tanzu init
TCE_REPO="$(tanzu plugin repo list | grep tce)"
if [[ -z "${TCE_REPO}" ]]; then
tanzu plugin repo add --name tce --gcp-bucket-name tce-tanzu-cli-plugins --gcp-root-path artifacts
......
......@@ -10,6 +10,7 @@ set -o xtrace
TCE_CI_BUILD="${TCE_CI_BUILD:-""}"
TCE_SCRATCH_DIR="${TCE_SCRATCH_DIR:-""}"
TEST_RELEASE="${TEST_RELEASE:-""}"
# required input
if [[ -z "${TCE_SCRATCH_DIR}" ]]; then
......@@ -24,6 +25,11 @@ fi
# do this on TCE
pushd "./artifacts" || exit 1
# we dont want to update the plugin.yaml if this is a test release. failing to do so,
# would indicate to tanzu cli that you could update to this "test" release
if [[ "${TEST_RELEASE}" != "" ]]; then
find ./ -type f | grep "plugin.yaml" | xargs rm
fi
find ./ -type f | grep -v "yaml" | xargs rm
find ./ -type d | grep "test" | xargs rm -rf
for i in $(find ./ -type d | grep "v"); do echo "empty" >> "${i}/.empty"; done
......@@ -33,6 +39,11 @@ popd || exit 1
# do this on tanzu framework
pushd "${TCE_SCRATCH_DIR}/tanzu-framework/artifacts" || exit 1
# we dont want to update the plugin.yaml if this is a test release. failing to do so,
# would indicate to tanzu cli that you could update to this "test" release
if [[ "${TEST_RELEASE}" != "" ]]; then
find ./ -type f | grep "plugin.yaml" | xargs rm
fi
find ./ -type f | grep -v "yaml" | xargs rm
find ./ -type d | grep "test" | xargs rm -rf
for i in $(find ./ -type d | grep "v"); do echo "empty" >> "${i}/.empty"; done
......@@ -41,6 +52,11 @@ popd || exit 1
pushd "${TCE_SCRATCH_DIR}/tanzu-framework/artifacts-admin/" || exit 1
# we dont want to update the plugin.yaml if this is a test release. failing to do so,
# would indicate to tanzu cli that you could update to this "test" release
if [[ "${TEST_RELEASE}" != "" ]]; then
find ./ -type f | grep "plugin.yaml" | xargs rm
fi
find ./ -type f | grep -v "yaml" | xargs rm
find ./ -type d | grep "test" | xargs rm -rf
for i in $(find ./ -type d | grep "v"); do echo "empty" >> "${i}/.empty"; done
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment