Merge pull request #2 from actions/master

Get the last changes to fork
This commit is contained in:
Andy Mishechkin
2020-04-13 13:50:56 +04:00
committed by GitHub
13 changed files with 243 additions and 56 deletions

View File

@@ -1,11 +1,11 @@
# Ubuntu 18.04.4 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 16.02
- 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
@@ -32,12 +32,12 @@ 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.17 Linux/5.0.0-1032-azure botocore/1.15.31)
- AWS CLI (aws-cli/1.18.37 Python/2.7.17 Linux/5.0.0-1035-azure botocore/1.15.37)
- build-essential
- Clang 6.0 (6.0.0)
- Clang 8 (8.0.0)
- Clang 9 (9.0.0)
- 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)
@@ -109,19 +109,19 @@ 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.5.0
- GNU C++ 8.3.0
- GNU C++ 8.4.0
- GNU C++ 9.2.1
- GNU Fortran 8.3.0
- GNU Fortran 8.4.0
- GNU Fortran 9.2.1
- 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
@@ -130,6 +130,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)
@@ -140,9 +142,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")
@@ -162,6 +165,7 @@ compiled using version 3.0.2.0 of the Cabal library )
- MySQL (mysql Ver 14.14 Distrib 5.7.29, for Linux (x86_64) using EditLine wrapper)
- MySQL Server (user:root password:root)
- MS SQL Server Client Tools
- nvm (0.35.3)
- Node.js (v12.16.1)
- Grunt (grunt-cli v1.2.0)
- Gulp (CLI version: 2.2.0
@@ -172,7 +176,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 7.1 (PHP 7.1.33-14+ubuntu18.04.1+deb.sury.org+1 (cli) (built: Mar 20 2020 13:57:43) ( NTS ))
@@ -193,9 +197,9 @@ 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.7 (r1800392))
@@ -203,6 +207,9 @@ Local version: Unknown)
- Packer (1.5.5)
- Vcpkg 2020.02.04-unknownhash
- Zeit Now CLI (17.1.1)
- MongoDB on Linux (2020-04-07T01:27:09.357+0000 I CONTROL [initandlisten] db version v4.2.5
2020-04-07T01:27:09.357+0000 I CONTROL [initandlisten] git version: 2261279b51ea13df08ae708ff278f0679c59dc32
2020-04-07T01:27:09.357+0000 I CONTROL [initandlisten] OpenSSL version: OpenSSL 1.1.1d 10 Sep 2019)
- 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)
@@ -269,13 +276,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)
@@ -289,10 +296,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

View File

@@ -0,0 +1,8 @@
#!/bin/bash
################################################################################
## File: reboot.sh
## Desc: Reboot VM
################################################################################
echo "Reboot VM"
sudo reboot

View File

@@ -9,7 +9,7 @@ function WriteItem {
echo "METADATA_FILE environment variable must be set to output to Metadata Document!"
return 1;
else
echo -e "$1" >> "$METADATA_FILE"
echo -e "$1" | sudo tee -a "$METADATA_FILE"
fi
}

View File

@@ -0,0 +1,65 @@
#!/bin/bash
################################################################################
## File: etc-environment.sh
## Desc: Helper functions for source and modify /etc/environment
################################################################################
# NB: sed expression use '%' as a delimiter in order to simplify handling
# 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 addEtcEnvironmentVar {
var_name="$1"
var_value="$2"
echo "$var_name=\"$var_value\"" | sudo tee -a /etc/environment
}
function replaceEtcEnvironmentVar {
var_name="$1"
var_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
}
function setEtcEnvironmentVar {
var_name="$1"
var_value="$2"
if grep "$var_name" /etc/environment > /dev/null; then
replaceEtcEnvironmentVar $var_name $var_value
else
addEtcEnvironmentVar $var_name $var_value
fi
}
function addEtcEnvironmentPathElement {
element="$1"
etc_path=$(getEtcEnvironmentVar PATH)
setEtcEnvironmentVar PATH "${element}:${etc_path}"
}
# Process /etc/environment as if it were shell script with `export VAR=...` expressions
# The PATH variable is handled specially in order to do not override the existing PATH
# variable. The value of PATH variable read from /etc/environment is added to the end
# of value of the exiting PATH variable exactly as it would happen with real PAM app read
# /etc/environment
#
# TODO: there might be the others variables to be processed in the same way as "PATH" variable
# ie MANPATH, INFOPATH, LD_*, etc. In the current implementation the values from /etc/evironments
# replace the values of the current environment
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)
export PATH="$PATH:$etc_path"
}

View File

@@ -0,0 +1,24 @@
#!/bin/bash
################################################################################
## File: containers.sh
## Desc: Installs container tools: podman, buildah and skopeo onto the image
################################################################################
source $HELPER_SCRIPTS/apt.sh
source $HELPER_SCRIPTS/document.sh
source /etc/os-release
sh -c "echo 'deb http://download.opensuse.org/repositories/devel:/kubic:/libcontainers:/stable/x${NAME}_${VERSION_ID}/ /' > /etc/apt/sources.list.d/devel:kubic:libcontainers:stable.list"
wget -nv https://download.opensuse.org/repositories/devel:kubic:libcontainers:stable/x${NAME}_${VERSION_ID}/Release.key -O Release.key
apt-key add - < Release.key
apt-get update -qq
apt-get -qq -y install podman buildah skopeo
mkdir -p /etc/containers
echo -e "[registries.search]\nregistries = ['docker.io', 'quay.io']" | tee /etc/containers/registries.conf
## Add version information to the metadata file
echo "Documenting container tools version"
PODMAN_VERSION='podman --version'
BUILDAH_VERSION='buildah --version'
SKOPEO_VERSION='skopeo --version'
DocumentInstalledItem "Podman ($PODMAN_VERSION)\nBuildah ($BUILDAH_VERSION)\nSkopeo ($SKOPEO_VERSION)"

View File

@@ -12,7 +12,7 @@ echo "Checking to see if the installer script has already been run"
if command -v cmake; then
echo "Example variable already set to $EXAMPLE_VAR"
else
curl -sL https://cmake.org/files/v3.16/cmake-3.16.2-Linux-x86_64.sh -o cmakeinstall.sh \
curl -sL https://cmake.org/files/v3.17/cmake-3.17.0-Linux-x86_64.sh -o cmakeinstall.sh \
&& chmod +x cmakeinstall.sh \
&& ./cmakeinstall.sh --prefix=/usr/local --exclude-subdir \
&& rm cmakeinstall.sh

View File

@@ -0,0 +1,14 @@
#!/bin/bash
################################################################################
## File: homebrew-validate.sh
## Desc: Validate the Homebrew can run after reboot without extra configuring
################################################################################
# Validate the installation
echo "Validate the Homebrew can run after reboot"
if ! command -v brew; then
echo "brew cat not run after reboot"
exit 1
fi

View File

@@ -0,0 +1,36 @@
#!/bin/bash
################################################################################
## File: homebrew.sh
## Desc: Installs the Homebrew on Linux
################################################################################
# Source the helpers
source $HELPER_SCRIPTS/document.sh
source $HELPER_SCRIPTS/etc-environment.sh
# Install the Homebrew on Linux
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install.sh)"
eval $(/home/linuxbrew/.linuxbrew/bin/brew shellenv)
# Make brew files and directories writable by any user
sudo chmod -R o+w $HOMEBREW_PREFIX
# Update /etc/environemnt
## Put HOMEBREW_* variables
brew shellenv|grep 'export HOMEBREW'|sed -E 's/^export (.*);$/\1/' | sudo tee -a /etc/environment
# add brew executables locations to PATH
brew_path=$(brew shellenv|grep '^export PATH' |sed -E 's/^export PATH="([^$]+)\$.*/\1/')
addEtcEnvironmentPathElement "$brew_path"
# Validate the installation ad hoc
echo "Validate the installation reloading /etc/environment"
reloadEtcEnvironment
if ! command -v brew; then
echo "brew was not installed"
exit 1
fi
# Document the installed version
echo "Document the installed version"
DocumentInstalledItem "Homebrew on Linux ($(brew -v 2>&1))"

View File

@@ -3,4 +3,5 @@
CARGO_HOME=/usr/share/rust/.cargo
DOTNET_TOOLS_HOME=/home/runner/.dotnet/tools
PHP_COMPOSER_HOME=/home/runner/.config/composer/vendor/bin
echo "PATH=${CARGO_HOME}/bin:${PATH}:${DOTNET_TOOLS_HOME}:${PHP_COMPOSER_HOME}" | tee -a /etc/environment
BREW_PATH=/home/linuxbrew/.linuxbrew/bin:/home/linuxbrew/.linuxbrew/sbin
echo "PATH=${BREW_PATH}:${CARGO_HOME}/bin:${PATH}:${DOTNET_TOOLS_HOME}:${PHP_COMPOSER_HOME}" | tee -a /etc/environment

View File

@@ -132,6 +132,36 @@
],
"execute_command": "sudo sh -c '{{ .Vars }} {{ .Path }}'"
},
{
"type": "shell",
"scripts": [
"{{template_dir}}/scripts/installers/homebrew.sh"
],
"environment_vars": [
"METADATA_FILE={{user `metadata_file`}}",
"HELPER_SCRIPTS={{user `helper_script_folder`}}",
"DEBIAN_FRONTEND=noninteractive"
],
"execute_command": "/bin/sh -c '{{ .Vars }} {{ .Path }}'"
},
{
"type": "shell",
"expect_disconnect": true,
"scripts": [
"{{template_dir}}/scripts/base/reboot.sh"
],
"execute_command": "/bin/sh -c '{{ .Vars }} {{ .Path }}'"
},
{
"type": "shell",
"pause_before": "30s",
"timeout": "10m",
"start_retry_timeout": "10s",
"scripts": [
"{{template_dir}}/scripts/installers/homebrew-validate.sh"
],
"execute_command": "/bin/sh -c '{{ .Vars }} {{ .Path }}'"
},
{
"type": "shell",
"scripts": [
@@ -191,7 +221,6 @@
"{{template_dir}}/scripts/installers/dpkg-config.sh",
"{{template_dir}}/scripts/installers/mongodb.sh",
"{{template_dir}}/scripts/installers/rndgenerator.sh"
],
"environment_vars": [
"METADATA_FILE={{user `metadata_file`}}",

View File

@@ -135,6 +135,36 @@
],
"execute_command": "sudo sh -c '{{ .Vars }} {{ .Path }}'"
},
{
"type": "shell",
"scripts": [
"{{template_dir}}/scripts/installers/homebrew.sh"
],
"environment_vars": [
"METADATA_FILE={{user `metadata_file`}}",
"HELPER_SCRIPTS={{user `helper_script_folder`}}",
"DEBIAN_FRONTEND=noninteractive"
],
"execute_command": "/bin/sh -c '{{ .Vars }} {{ .Path }}'"
},
{
"type": "shell",
"expect_disconnect": true,
"scripts": [
"{{template_dir}}/scripts/base/reboot.sh"
],
"execute_command": "/bin/sh -c '{{ .Vars }} {{ .Path }}'"
},
{
"type": "shell",
"pause_before": "30s",
"timeout": "10m",
"start_retry_timeout": "10s",
"scripts": [
"{{template_dir}}/scripts/installers/homebrew-validate.sh"
],
"execute_command": "/bin/sh -c '{{ .Vars }} {{ .Path }}'"
},
{
"type": "shell",
"scripts": [
@@ -149,6 +179,7 @@
"{{template_dir}}/scripts/installers/clang.sh",
"{{template_dir}}/scripts/installers/swift.sh",
"{{template_dir}}/scripts/installers/cmake.sh",
"{{template_dir}}/scripts/installers/1804/containers.sh",
"{{template_dir}}/scripts/installers/docker-compose.sh",
"{{template_dir}}/scripts/installers/docker-moby.sh",
"{{template_dir}}/scripts/installers/dotnetcore-sdk.sh",

View File

@@ -470,14 +470,6 @@
"{{ template_dir }}/scripts/Installers/Install-MysqlCli.ps1"
]
},
{
"type": "powershell",
"elevated_user": "SYSTEM",
"elevated_password": "",
"scripts":[
"{{ template_dir }}/scripts/Installers/Install-SQLExpress.ps1"
]
},
{
"type": "powershell",
"scripts":[
@@ -739,12 +731,6 @@
"{{ template_dir }}/scripts/Installers/Validate-Bazel.ps1"
]
},
{
"type": "powershell",
"scripts":[
"{{ template_dir }}/scripts/Installers/Validate-SQLExpress.ps1"
]
},
{
"type": "powershell",
"scripts":[

View File

@@ -451,14 +451,6 @@
"{{ template_dir }}/scripts/Installers/Install-MysqlCli.ps1"
]
},
{
"type": "powershell",
"elevated_user": "SYSTEM",
"elevated_password": "",
"scripts":[
"{{ template_dir }}/scripts/Installers/Install-SQLExpress.ps1"
]
},
{
"type": "powershell",
"scripts":[
@@ -756,12 +748,6 @@
"{{ template_dir }}/scripts/Installers/Validate-MysqlCli.ps1"
]
},
{
"type": "powershell",
"scripts":[
"{{ template_dir }}/scripts/Installers/Validate-SQLExpress.ps1"
]
},
{
"type": "powershell",
"scripts":[