Skip to content

Commit

Permalink
Merge pull request #3 from actions/master
Browse files Browse the repository at this point in the history
Getting the last changes
  • Loading branch information
andy-mishechkin authored Apr 17, 2020
2 parents aa631bb + b1cf25f commit 87e7104
Show file tree
Hide file tree
Showing 56 changed files with 341 additions and 103 deletions.
51 changes: 29 additions & 22 deletions images/linux/Ubuntu1604-README.md
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
# Ubuntu 16.04.6 LTS
The following software is installed on machines with the 20200330.1 update.
The following software is installed on machines with the 20200406.2 update.
***
- 7-Zip 9.20
- Ansible (ansible 2.9.6)
- AzCopy (azcopy 7.3.0-netcore)
- Azure CLI (azure-cli 2.2.0)
- Azure CLI (azure-devops 0.17.0)
- Azure CLI (azure-cli 2.3.1)
- Azure CLI (azure-devops 0.18.0)
- Basic CLI:
- curl
- dnsutils
Expand Down Expand Up @@ -34,12 +34,13 @@ The following software is installed on machines with the 20200330.1 update.
- wget
- zip
- zstd
- AWS CLI (aws-cli/1.18.31 Python/2.7.12 Linux/4.15.0-1071-azure botocore/1.15.31)
- AWS CLI (aws-cli/1.18.37 Python/2.7.12 Linux/4.15.0-1075-azure botocore/1.15.37)
- build-essential
- nvm (0.35.3)
- Clang 6.0 (6.0.0)
- Clang 8 (8.0.0)
- Clang 9 (9.0.1)
- Swift version 5.2 (swift-5.2-RELEASE)
- Swift version 5.2.1 (swift-5.2.1-RELEASE)
Target: x86_64-unknown-linux-gnu
- CMake (cmake version 3.16.2)
- Docker Compose (docker-compose version 1.25.4, build 8d51620a)
Expand Down Expand Up @@ -111,7 +112,7 @@ Target: x86_64-unknown-linux-gnu
- 2.1.301
- 2.1.300
- Erlang (Erlang (SMP,ASYNC_THREADS,HIPE) (BEAM) emulator version 10.7)
- Firefox (Mozilla Firefox 74.0)
- Firefox (Mozilla Firefox 74.0.1)
- Geckodriver (0.26.0); Gecko Driver is available via GECKOWEBDRIVER environment variable
- GNU C++ 7.4.0
- GNU C++ 8.3.0
Expand All @@ -121,9 +122,9 @@ Target: x86_64-unknown-linux-gnu
- Git (2.26.0)
- Git Large File Storage (LFS) (2.10.0)
- Hub CLI (2.14.2)
- Google Chrome (Google Chrome 80.0.3987.149 )
- Google Chrome (Google Chrome 80.0.3987.163 )
- ChromeDriver 80.0.3987.106 (f68069574609230cf9b635cd784cfb1bf81bb53a-refs/branch-heads/3987@{#882}); Chrome Driver is available via CHROMEWEBDRIVER environment variable
- Google Cloud SDK (286.0.0)
- Google Cloud SDK (287.0.0)
- Haskell Cabal (cabal-install version 2.0.0.1
compiled using version 2.0.1.1 of the Cabal library )
- Haskell Cabal (cabal-install version 2.2.0.0
Expand All @@ -132,6 +133,8 @@ compiled using version 2.2.0.1 of the Cabal library )
compiled using version 2.4.1.0 of the Cabal library )
- Haskell Cabal (cabal-install version 3.0.1.0
compiled using version 3.0.2.0 of the Cabal library )
- Haskell Cabal (cabal-install version 3.2.0.0
compiled using version 3.2.0.0 of the Cabal library )
- GHC (The Glorious Glasgow Haskell Compilation System, version 8.0.2)
- GHC (The Glorious Glasgow Haskell Compilation System, version 8.2.2)
- GHC (The Glorious Glasgow Haskell Compilation System, version 8.4.4)
Expand All @@ -142,9 +145,10 @@ compiled using version 3.0.2.0 of the Cabal library )
- GHC (The Glorious Glasgow Haskell Compilation System, version 8.8.1)
- GHC (The Glorious Glasgow Haskell Compilation System, version 8.8.2)
- GHC (The Glorious Glasgow Haskell Compilation System, version 8.8.3)
- GHC (The Glorious Glasgow Haskell Compilation System, version 8.10.1)
- Haskell Stack (Version 2.1.3, Git revision 636e3a759d51127df2b62f90772def126cdf6d1f (7735 commits) x86_64 hpack-0.31.2)
- Heroku (heroku/7.39.1 linux-x64 node-v12.13.0)
- HHVM (HipHop VM 4.50.0 (rel))
- Heroku (heroku/7.39.2 linux-x64 node-v12.13.0)
- HHVM (HipHop VM 4.52.0 (rel))
- ImageMagick
- Azul Zulu OpenJDK:
- 7 (openjdk version "1.7.0_252")
Expand Down Expand Up @@ -174,7 +178,7 @@ Local version: Unknown)
- Webpack (4.42.1)
- Webpack CLI (3.3.11)
- Yarn (1.22.4)
- Bazel (bazel 2.2.0)
- Bazel (bazel 3.0.0)
- Bazelisk (1.3.0)
- PhantomJS (2.1.1)
- PHP 5.6 (PHP 5.6.40-26+ubuntu16.04.1+deb.sury.org+1 (cli) )
Expand All @@ -197,16 +201,19 @@ Local version: Unknown)
- clippy (0.0.212)
- rustdoc (1.42.0)
- bindgen (0.53.2)
- cbindgen (0.13.2)
- cbindgen (0.14.0)
- Julia (julia version 1.4.0)
- sbt (1.3.8)
- sbt (1.3.9)
- Selenium server standalone (available via SELENIUM_JAR_PATH environment variable)
- Sphinx Open Source Search Server
- Subversion (svn, version 1.9.3 (r1718519))
- Terraform (Terraform v0.12.24)
- Packer (1.5.5)
- Vcpkg 2020.02.04-unknownhash
- Zeit Now CLI (17.1.1)
- MongoDB on Linux (2020-04-07T01:29:52.795+0000 I CONTROL [initandlisten] db version v4.2.5
2020-04-07T01:29:52.795+0000 I CONTROL [initandlisten] git version: 2261279b51ea13df08ae708ff278f0679c59dc32
2020-04-07T01:29:52.795+0000 I CONTROL [initandlisten] OpenSSL version: OpenSSL 1.0.2g 1 Mar 2016)
- Go 1.11 (go version go1.11.13 linux/amd64)
- Go 1.12 (go version go1.12.17 linux/amd64)
- Go 1.13 (go version go1.13.9 linux/amd64)
Expand Down Expand Up @@ -279,13 +286,13 @@ Local version: Unknown)
- Az Module (3.1.0)
- Az Module (3.5.0)
- Cached container images
- node:10 (Digest: sha256:816cfaee24dc2cea534e21d7f9c55f3b22c8bc6af61d8445f8d0178168ef3b28)
- node:12 (Digest: sha256:46f4c17e1edbde36d60a9f6362db7912cfe301bac89afef7cc92421ab3e7ca18)
- buildpack-deps:stretch (Digest: sha256:a711a64b26285b42cd02618a191ec6c99650449f698858e0e2cc0535ab85e4dd)
- debian:9 (Digest: sha256:344470192d10cf7cf0bedcb183effbe99065829a8dbe68e65e703faf46fc10c1)
- debian:8 (Digest: sha256:a77aa078ad4769799286bba5fc198deda5bfd4d0144a24e6aa0c8dddf0a22833)
- node:10-alpine (Digest: sha256:9a88e3bc3f845b74d2fd8adcbc64608736a8be4a3e9dc7aa34fa743e3677a552)
- node:12-alpine (Digest: sha256:6b5b783c9cfe229af0bd5b0b677dd32005bb22d58465f3d0fe7fbd1c60ce068c)
- node:10 (Digest: sha256:df200903ff34c07c1b9112b4fd9d1342c11eb7d99525f2b366c487f91dda8131)
- node:12 (Digest: sha256:facc1cbde6e5aa3255092b1a1417451953c80bd31ab5a4403f8bcd90b90a8407)
- buildpack-deps:stretch (Digest: sha256:dc901bbf4b34e4ca8771c0d0773e557221452f97bcf0c732de7ecda3782bdf97)
- debian:9 (Digest: sha256:ddb131307ad9c70ebf8c7962ba73c20101f68c7a511915aea3ad3b7ad47b9d20)
- debian:8 (Digest: sha256:2c9b2323299846c5298c12db373da310f8114f2941ae3f496e95270cc8ca5ebd)
- alpine:3.8 (Digest: sha256:2bb501e6173d9d006e56de5bce2720eb06396803300fe1687b58a7ff32bf4c14)
- alpine:3.9 (Digest: sha256:115731bab0862031b44766733890091c17924f9b7781b79997f5f163be262178)
- alpine:3.10 (Digest: sha256:7c3773f7bcc969f03f8f653910001d99a9d324b4b9caa008846ad2c3089f5a5f)
Expand All @@ -299,10 +306,10 @@ Local version: Unknown)
- Python 3.7.6
- Python 3.8.2
- Ruby:
- Ruby 2.4.9
- Ruby 2.5.7
- Ruby 2.6.5
- Ruby 2.7.0
- Ruby 2.4.10
- Ruby 2.5.8
- Ruby 2.6.6
- Ruby 2.7.1
- PyPy:
- PyPy 2.7.17
- PyPy 3.6.9
Expand Down
61 changes: 38 additions & 23 deletions images/linux/scripts/helpers/etc-environment.sh
Original file line number Diff line number Diff line change
Expand Up @@ -8,42 +8,57 @@
# values containg slashes (i.e. directory path)
# The values containing '%' will break the functions

function getEtcEnvironmentVar {
var_name="$1"
# remove `var_name=` and possible quotes from the line
grep "^${var_name}=" /etc/environment |sed -E "s%^${var_name}=\"?([^\"]+)\"?.*$%\1%"
function getEtcEnvironmentVariable {
variable_name="$1"
# remove `variable_name=` and possible quotes from the line
grep "^${variable_name}=" /etc/environment |sed -E "s%^${variable_name}=\"?([^\"]+)\"?.*$%\1%"
}

function addEtcEnvironmentVar {
var_name="$1"
var_value="$2"
function addEtcEnvironmentVariable {
variable_name="$1"
variable_value="$2"

echo "$var_name=\"$var_value\"" | sudo tee -a /etc/environment
echo "$variable_name=\"$variable_value\"" | sudo tee -a /etc/environment
}

function replaceEtcEnvironmentVar {
var_name="$1"
var_value="$2"
function replaceEtcEnvironmentVariable {
variable_name="$1"
variable_value="$2"

# modify /etc/environemnt in place by replacing a string that begins with var_name
sudo sed -ie "s%^${var_name}=.*$%${var_name}=\"${var_value}\"%" /etc/environment
# modify /etc/environemnt in place by replacing a string that begins with variable_name
sudo sed -ie "s%^${variable_name}=.*$%${variable_name}=\"${variable_value}\"%" /etc/environment
}

function setEtcEnvironmentVar {
var_name="$1"
var_value="$2"
function setEtcEnvironmentVariable {
variable_name="$1"
variable_value="$2"

if grep "$var_name" /etc/environment > /dev/null; then
replaceEtcEnvironmentVar $var_name $var_value
if grep "$variable_name" /etc/environment > /dev/null; then
replaceEtcEnvironmentVariable $variable_name $variable_value
else
addEtcEnvironmentVar $var_name $var_value
addEtcEnvironmentVariable $variable_name $variable_value
fi
}

function addEtcEnvironmentPathElement {
function prependEtcEnvironmentVariable {
variable_name="$1"
element="$2"
# TODO: handle the case if the variable does not exist
existing_value=$(getEtcEnvironmentVariable "${variable_name}")
setEtcEnvironmentVariable "${variable_name}" "${element}:${existing_value}"
}

function appendEtcEnvironmentVariable {
variable_name="$1"
element="$2"
# TODO: handle the case if the variable does not exist
existing_value=$(getEtcEnvironmentVariable "${variable_name}")
setEtcEnvironmentVariable "${variable_name}" "${existing_value}:${element}"
}

function prependEtcEnvironmentPath {
element="$1"
etc_path=$(getEtcEnvironmentVar PATH)
setEtcEnvironmentVar PATH "${element}:${etc_path}"
prependEtcEnvironmentVariable PATH "${element}"
}

# Process /etc/environment as if it were shell script with `export VAR=...` expressions
Expand All @@ -59,7 +74,7 @@ function reloadEtcEnvironment {
# add `export ` to every variable of /etc/environemnt except PATH and eval the result shell script
eval $(grep -v '^PATH=' /etc/environment | sed -e 's%^%export %')
# handle PATH specially
etc_path=$(getEtcEnvironmentVar PATH)
etc_path=$(getEtcEnvironmentVariable PATH)
export PATH="$PATH:$etc_path"
}

2 changes: 2 additions & 0 deletions images/linux/scripts/installers/1604/android.sh
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,7 @@ fi
# Install the following SDKs and build tools, passing in "y" to accept licenses.
echo "y" | ${ANDROID_SDK_ROOT}/tools/bin/sdkmanager \
"ndk-bundle" \
"ndk;20.0.5594570" \
"platform-tools" \
"platforms;android-29" \
"platforms;android-28" \
Expand Down Expand Up @@ -160,5 +161,6 @@ DocumentInstalledItem "Android SDK Build-Tools 20.0.0"
DocumentInstalledItem "Android SDK Build-Tools 19.1.0"
DocumentInstalledItem "Android SDK Build-Tools 17.0.0"
DocumentInstalledItem "Android NDK $(cat ${ANDROID_SDK_ROOT}/ndk-bundle/source.properties 2>&1 | grep Pkg.Revision | cut -d ' ' -f 3)"
DocumentInstalledItem "Android NDK 20.0.5594570"
DocumentInstalledItem "Android ConstraintLayout 1.0.2"
DocumentInstalledItem "Android ConstraintLayout 1.0.1"
2 changes: 2 additions & 0 deletions images/linux/scripts/installers/1604/basic.sh
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,7 @@ apt-fast install -y --no-install-recommends \
libgconf-2-4 \
dbus \
xvfb \
libgbm-dev \
libgtk-3-0 \
tk \
fakeroot \
Expand Down Expand Up @@ -80,6 +81,7 @@ DocumentInstalledItemIndent "jq"
DocumentInstalledItemIndent "libc++-dev"
DocumentInstalledItemIndent "libc++abi-dev"
DocumentInstalledItemIndent "libcurl3"
DocumentInstalledItemIndent "libgbm-dev"
DocumentInstalledItemIndent "libicu55"
DocumentInstalledItemIndent "libunwind8"
DocumentInstalledItemIndent "locales"
Expand Down
5 changes: 5 additions & 0 deletions images/linux/scripts/installers/1604/php.sh
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
################################################################################

# Source the helpers for use with the script
source $HELPER_SCRIPTS/etc-environment.sh
source $HELPER_SCRIPTS/document.sh

LSB_RELEASE=$(lsb_release -rs)
Expand Down Expand Up @@ -276,6 +277,9 @@ php composer-setup.php
sudo mv composer.phar /usr/bin/composer
php -r "unlink('composer-setup.php');"

# Update /etc/environment
prependEtcEnvironmentPath /home/runner/.config/composer/vendor/bin

# Add composer bin folder to path
echo 'export PATH="$PATH:$HOME/.config/composer/vendor/bin"' >> /etc/skel/.bashrc

Expand All @@ -293,6 +297,7 @@ for cmd in php php5.6 php7.0 php7.1 php7.2 php7.3 php7.4 composer phpunit; do
fi
done


# Document what was added to the image
echo "Lastly, documenting what we added to the metadata file"
DocumentInstalledItem "PHP 5.6 ($(php5.6 --version | head -n 1))"
Expand Down
2 changes: 2 additions & 0 deletions images/linux/scripts/installers/1804/android.sh
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@ fi
# Install the following SDKs and build tools, passing in "y" to accept licenses.
echo "y" | ${ANDROID_SDK_ROOT}/tools/bin/sdkmanager \
"ndk-bundle" \
"ndk;20.0.5594570" \
"platform-tools" \
"platforms;android-29" \
"platforms;android-28" \
Expand Down Expand Up @@ -149,3 +150,4 @@ DocumentInstalledItem "Android SDK Build-Tools 20.0.0"
DocumentInstalledItem "Android SDK Build-Tools 19.1.0"
DocumentInstalledItem "Android SDK Build-Tools 17.0.0"
DocumentInstalledItem "Android NDK $(cat ${ANDROID_SDK_ROOT}/ndk-bundle/source.properties 2>&1 | grep Pkg.Revision | cut -d ' ' -f 3)"
DocumentInstalledItem "Android NDK 20.0.5594570"
4 changes: 4 additions & 0 deletions images/linux/scripts/installers/1804/basic.sh
Original file line number Diff line number Diff line change
Expand Up @@ -97,6 +97,9 @@ apt-get install -y --no-install-recommends dbus
echo "Install xvfb"
apt-get install -y --no-install-recommends xvfb

echo "Install libgbm-dev"
apt-get install -y --no-install-recommends libgbm-dev

echo "Install libgtk"
apt-get install -y --no-install-recommends libgtk-3-0

Expand Down Expand Up @@ -147,6 +150,7 @@ DocumentInstalledItemIndent "iproute2"
DocumentInstalledItemIndent "iputils-ping"
DocumentInstalledItemIndent "jq"
DocumentInstalledItemIndent "libcurl3"
DocumentInstalledItemIndent "libgbm-dev"
DocumentInstalledItemIndent "libicu55"
DocumentInstalledItemIndent "libunwind8"
DocumentInstalledItemIndent "locales"
Expand Down
4 changes: 4 additions & 0 deletions images/linux/scripts/installers/1804/php.sh
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
################################################################################

# Source the helpers for use with the script
source $HELPER_SCRIPTS/etc-environment.sh
source $HELPER_SCRIPTS/document.sh

LSB_RELEASE=$(lsb_release -rs)
Expand Down Expand Up @@ -193,6 +194,9 @@ php composer-setup.php
sudo mv composer.phar /usr/bin/composer
php -r "unlink('composer-setup.php');"

# Update /etc/environment
prependEtcEnvironmentPath /home/runner/.config/composer/vendor/bin

# Add composer bin folder to path
echo 'export PATH="$PATH:$HOME/.config/composer/vendor/bin"' >> /etc/skel/.bashrc

Expand Down
27 changes: 27 additions & 0 deletions images/linux/scripts/installers/aliyun-cli.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
#!/bin/bash
################################################################################
## File: aliyun-cli.sh
## Desc: Installs Alibaba Cloud CLI
################################################################################

# Source the helpers for use with the script
source $HELPER_SCRIPTS/document.sh
source $HELPER_SCRIPTS/apt.sh

# Install Alibaba Cloud CLI
URL=$(curl -s https://api.github.com/repos/aliyun/aliyun-cli/releases/latest | jq -r '.assets[].browser_download_url | select(contains("aliyun-cli-linux"))')
wget -P /tmp $URL
tar xzvf /tmp/aliyun-cli-linux-*-amd64.tgz
mv aliyun /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 aliyun ; then
echo "aliyun was not installed"
exit 1
fi

# Document what was added to the image
aliyun_version="$(aliyun --version | grep "Alibaba Cloud Command Line Interface Version" | cut -d " " -f 7)"
echo "Lastly, documenting what we added to the metadata file"
DocumentInstalledItem "Alibaba Cloud CLI ($aliyun_version)"
24 changes: 24 additions & 0 deletions images/linux/scripts/installers/aws-sam-cli.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
#!/bin/bash
################################################################################
## File: aws-sam-cli.sh
## Desc: Installs AWS SAM CLI
## Must be run as non-root user after homebrew and clang
################################################################################

# Source the helpers for use with the script
source $HELPER_SCRIPTS/document.sh

# Install aws sam cli
brew tap aws/tap
brew install aws-sam-cli

# 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 ! sam --version; then
echo "AWS SAM CLI was not installed"
exit 1
fi

# Document what was added to the image
echo "Lastly, documenting what we added to the metadata file"
DocumentInstalledItem "AWS $(sam --version)"
1 change: 1 addition & 0 deletions images/linux/scripts/installers/docker-moby.sh
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,7 @@ docker pull alpine:3.7
docker pull alpine:3.8
docker pull alpine:3.9
docker pull alpine:3.10
docker pull ubuntu:14.04

## Add version information to the metadata file
echo "Documenting Docker version"
Expand Down
Loading

0 comments on commit 87e7104

Please sign in to comment.