-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Includes fixes to the feature-installer-utils that came up during development
- Loading branch information
Showing
7 changed files
with
41 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,2 @@ | ||
# Setup required environment for test | ||
export EXAMPLE_ENVIRONMENT=something | ||
EXAMPLE_ENVIRONMENT=something |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
icon: "⎔" | ||
|
||
title: "Tanzu CLI" | ||
|
||
description: "Installs the [Tanzu CLI](https://github.com/vmware-tanzu/tanzu-cli)" | ||
|
||
configuration: | ||
- | | ||
Environment TANZU_CLI_VERSION: Tanzu CLI version to install (required) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
TANZUCLI_VERSION=1.4.0 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
command: | ||
test: | ||
exec: "/home/cloudcontrol/bin/tanzu-cli version" | ||
stdout: | ||
- "version: v1.4.0" | ||
exit-status: 0 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
. /feature-installer-utils.sh | ||
|
||
if [ -n "${TANZUCLI_VERSION}" ] | ||
then | ||
prepare | ||
VERSION=$(checkAndCleanVersion "${TANZUCLI_VERSION}") | ||
SUFFIX=".tar.gz" | ||
if [ "$(getPlatform)" = "arm64" ] | ||
then | ||
SUFFIX="-unstable.tar.gz" | ||
fi | ||
downloadFromGithub vmware-tanzu tanzu-cli "v${VERSION}" tanzu-cli-linux- "${SUFFIX}" tanzu-cli-linux.tar.gz | ||
execHandle "Extracting tanzu cli" tar xzf tanzu-cli-linux.tar.gz | ||
execHandle "Installing tanzu cli" mv "${VERSION}"/tanzu-cli* "${BINPATH}/tanzu-cli" | ||
execHandle "Making tanzu cli executable" chmod +x "${BINPATH}/tanzu-cli" | ||
cleanup | ||
else | ||
echo "The tanzucli feature requires a version set using TANZUCLI_VERSION. See https://github.com/vmware-tanzu/tanzu-cli/releases for valid versions" | ||
exit 1 | ||
fi |