Add Pulumi to Ubuntu images (#1428)

* Add Pulumi to ubuntu images

* remove Pulumi from docs because it is auto-documented

* change Pulumi installation script

* removed legacy install, use /tmp, change auto-documentation, use download function instead of curl

* include install.sh to Pulumi's installation script

Co-authored-by: Leonid Lapshin <originalnoe-nazvanie@yandex.ru>
This commit is contained in:
Leonid Lapshin
2020-08-28 10:35:11 +03:00
committed by GitHub
parent dd8885cdc9
commit 7eed5ae558
4 changed files with 29 additions and 0 deletions

View File

@@ -0,0 +1,26 @@
#!/bin/bash
################################################################################
## File: pulumi.sh
## Desc: Installs Pulumi
################################################################################
# Source the helpers for use with the script
source $HELPER_SCRIPTS/document.sh
source $HELPER_SCRIPTS/install.sh
# Install Pulumi
VERSION=$(curl --fail --silent -L "https://www.pulumi.com/latest-version")
TARBALL_URL="https://get.pulumi.com/releases/sdk/pulumi-v${VERSION}-linux-x64.tar.gz"
download_with_retries ${TARBALL_URL} "/tmp" pulumi-v${VERSION}.tar.gz
tar --strip=1 -xvf /tmp/pulumi-v${VERSION}.tar.gz -C /usr/local/bin
# Run tests to determine that the software installed as expected
echo "Testing to make sure that script performed as expected, and basic scenarios work"
if ! command -v pulumi ; then
echo "Pulumi was not installed"
exit 1
fi
# Document what was added to the image
echo "Lastly, documenting what we added to the metadata file"
DocumentInstalledItem "Pulumi $(pulumi version)"