diff --git a/images/linux/scripts/installers/pulumi.sh b/images/linux/scripts/installers/pulumi.sh new file mode 100644 index 000000000..e041c2b7c --- /dev/null +++ b/images/linux/scripts/installers/pulumi.sh @@ -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)" diff --git a/images/linux/ubuntu1604.json b/images/linux/ubuntu1604.json index 4a5c5be13..3625b7ed2 100644 --- a/images/linux/ubuntu1604.json +++ b/images/linux/ubuntu1604.json @@ -181,6 +181,7 @@ "{{template_dir}}/scripts/installers/pollinate.sh", "{{template_dir}}/scripts/installers/postgresql.sh", "{{template_dir}}/scripts/installers/powershellcore.sh", + "{{template_dir}}/scripts/installers/pulumi.sh", "{{template_dir}}/scripts/installers/ruby.sh", "{{template_dir}}/scripts/installers/r.sh", "{{template_dir}}/scripts/installers/rust.sh", diff --git a/images/linux/ubuntu1804.json b/images/linux/ubuntu1804.json index 91f468f36..b5037520d 100644 --- a/images/linux/ubuntu1804.json +++ b/images/linux/ubuntu1804.json @@ -185,6 +185,7 @@ "{{template_dir}}/scripts/installers/pollinate.sh", "{{template_dir}}/scripts/installers/postgresql.sh", "{{template_dir}}/scripts/installers/powershellcore.sh", + "{{template_dir}}/scripts/installers/pulumi.sh", "{{template_dir}}/scripts/installers/ruby.sh", "{{template_dir}}/scripts/installers/r.sh", "{{template_dir}}/scripts/installers/rust.sh", diff --git a/images/linux/ubuntu2004.json b/images/linux/ubuntu2004.json index f3b7a68ac..48d309b1e 100644 --- a/images/linux/ubuntu2004.json +++ b/images/linux/ubuntu2004.json @@ -187,6 +187,7 @@ "{{template_dir}}/scripts/installers/pollinate.sh", "{{template_dir}}/scripts/installers/postgresql.sh", "{{template_dir}}/scripts/installers/powershellcore.sh", + "{{template_dir}}/scripts/installers/pulumi.sh", "{{template_dir}}/scripts/installers/ruby.sh", "{{template_dir}}/scripts/installers/r.sh", "{{template_dir}}/scripts/installers/rust.sh",