mirror of
https://github.com/actions/runner-images.git
synced 2025-12-20 06:35:47 +00:00
Merge branch 'master' into master
This commit is contained in:
@@ -13,6 +13,7 @@ sudo pwsh -Command 'Save-Module -Name Az -LiteralPath /usr/share/az_1.6.0 -Requi
|
||||
sudo pwsh -Command 'Save-Module -Name Az -LiteralPath /usr/share/az_2.3.2 -RequiredVersion 2.3.2 -Force'
|
||||
sudo pwsh -Command 'Save-Module -Name Az -LiteralPath /usr/share/az_2.6.0 -RequiredVersion 2.6.0 -Force'
|
||||
sudo pwsh -Command 'Save-Module -Name Az -LiteralPath /usr/share/az_2.8.0 -RequiredVersion 2.8.0 -Force'
|
||||
sudo pwsh -Command 'Save-Module -Name Az -LiteralPath /usr/share/az_3.1.0 -RequiredVersion 3.1.0 -Force'
|
||||
|
||||
# Run tests to determine that the software installed as expected
|
||||
echo "Testing to make sure that script performed as expected, and basic scenarios work"
|
||||
@@ -40,6 +41,11 @@ if ! pwsh -Command '$actualPSModulePath = $env:PSModulePath ; $env:PSModulePath
|
||||
if (!(get-module -listavailable -name Az.accounts)) {
|
||||
Write-Host "Az Module was not installed"; $env:PSModulePath = $actualPSModulePath; exit 1
|
||||
}
|
||||
$env:PSModulePath = $actualPSModulePath
|
||||
$actualPSModulePath = $env:PSModulePath ; $env:PSModulePath = "/usr/share/az_3.1.0:" + $env:PSModulePath;
|
||||
if (!(get-module -listavailable -name Az.accounts)) {
|
||||
Write-Host "Az Module was not installed"; $env:PSModulePath = $actualPSModulePath; exit 1
|
||||
}
|
||||
$env:PSModulePath = $actualPSModulePath'; then
|
||||
exit 1
|
||||
fi
|
||||
@@ -50,4 +56,5 @@ DocumentInstalledItem "Az Module (1.0.0)"
|
||||
DocumentInstalledItem "Az Module (1.6.0)"
|
||||
DocumentInstalledItem "Az Module (2.3.2)"
|
||||
DocumentInstalledItem "Az Module (2.6.0)"
|
||||
DocumentInstalledItem "Az Module (2.8.0)"
|
||||
DocumentInstalledItem "Az Module (2.8.0)"
|
||||
DocumentInstalledItem "Az Module (3.1.0)"
|
||||
|
||||
@@ -85,4 +85,4 @@ DocumentInstalledItemIndent "time"
|
||||
DocumentInstalledItemIndent "unzip"
|
||||
DocumentInstalledItemIndent "wget"
|
||||
DocumentInstalledItemIndent "zip"
|
||||
DocumentInstalledItemIndent "tzdata"
|
||||
DocumentInstalledItemIndent "tzdata"
|
||||
|
||||
@@ -1,36 +1,36 @@
|
||||
#!/bin/bash
|
||||
################################################################################
|
||||
## File: go.sh
|
||||
## Desc: Installs go, configures GOROOT, and adds go to the path
|
||||
################################################################################
|
||||
|
||||
# Source the helpers for use with the script
|
||||
source $HELPER_SCRIPTS/document.sh
|
||||
|
||||
# This function installs Go using the specified arguments:
|
||||
# $1=MajorVersion (1.11)
|
||||
# $2=MajorAndMinorVersion (1.11.1)
|
||||
# $3=IsDefaultVersion (true or false)
|
||||
function InstallGo () {
|
||||
curl -sL https://dl.google.com/go/go$2.linux-amd64.tar.gz -o go$2.linux-amd64.tar.gz
|
||||
mkdir -p /usr/local/go$1
|
||||
tar -C /usr/local/go$1 -xzf go$2.linux-amd64.tar.gz --strip-components=1 go
|
||||
rm go$2.linux-amd64.tar.gz
|
||||
echo "GOROOT_${1//./_}_X64=/usr/local/go$1" | tee -a /etc/environment
|
||||
DocumentInstalledItem "Go $1 ($(/usr/local/go$1/bin/go version))"
|
||||
|
||||
# If this version of Go is to be the default version,
|
||||
# symlink it into the path and point GOROOT to it.
|
||||
if [ $3 = true ]
|
||||
then
|
||||
ln -s /usr/local/go$1/bin/* /usr/bin/
|
||||
echo "GOROOT=/usr/local/go$1" | tee -a /etc/environment
|
||||
fi
|
||||
}
|
||||
|
||||
# Install Go versions
|
||||
InstallGo 1.9 1.9.7 false
|
||||
InstallGo 1.10 1.10.8 false
|
||||
InstallGo 1.11 1.11.12 false
|
||||
InstallGo 1.12 1.12.7 true
|
||||
InstallGo 1.13 1.13 false
|
||||
#!/bin/bash
|
||||
################################################################################
|
||||
## File: go.sh
|
||||
## Desc: Installs go, configures GOROOT, and adds go to the path
|
||||
################################################################################
|
||||
|
||||
# Source the helpers for use with the script
|
||||
source $HELPER_SCRIPTS/document.sh
|
||||
|
||||
# This function installs Go using the specified arguments:
|
||||
# $1=MajorVersion (1.11)
|
||||
# $2=MajorAndMinorVersion (1.11.1)
|
||||
# $3=IsDefaultVersion (true or false)
|
||||
function InstallGo () {
|
||||
curl -sL https://dl.google.com/go/go$2.linux-amd64.tar.gz -o go$2.linux-amd64.tar.gz
|
||||
mkdir -p /usr/local/go$1
|
||||
tar -C /usr/local/go$1 -xzf go$2.linux-amd64.tar.gz --strip-components=1 go
|
||||
rm go$2.linux-amd64.tar.gz
|
||||
echo "GOROOT_${1//./_}_X64=/usr/local/go$1" | tee -a /etc/environment
|
||||
DocumentInstalledItem "Go $1 ($(/usr/local/go$1/bin/go version))"
|
||||
|
||||
# If this version of Go is to be the default version,
|
||||
# symlink it into the path and point GOROOT to it.
|
||||
if [ $3 = true ]
|
||||
then
|
||||
ln -s /usr/local/go$1/bin/* /usr/bin/
|
||||
echo "GOROOT=/usr/local/go$1" | tee -a /etc/environment
|
||||
fi
|
||||
}
|
||||
|
||||
# Install Go versions
|
||||
InstallGo 1.9 1.9.7 false
|
||||
InstallGo 1.10 1.10.8 false
|
||||
InstallGo 1.11 1.11.12 false
|
||||
InstallGo 1.12 1.12.7 true
|
||||
InstallGo 1.13 1.13 false
|
||||
|
||||
@@ -27,7 +27,7 @@ for setup in $setups; do
|
||||
cd $original_directory;
|
||||
done;
|
||||
|
||||
DocumentInstalledItem "Python (available through the [setup-python](https://github.com/actions/setup-python/blob/master/README.md) action)"
|
||||
DocumentInstalledItem "Python (available through the [Use Python Version](https://go.microsoft.com/fwlink/?linkid=871498) task)"
|
||||
pythons=$(ls $AGENT_TOOLSDIRECTORY/Python)
|
||||
for python in $pythons; do
|
||||
DocumentInstalledItemIndent "Python $python"
|
||||
@@ -39,8 +39,8 @@ for pypy in $pypys; do
|
||||
DocumentInstalledItemIndent "PyPy $pypy"
|
||||
done;
|
||||
|
||||
DocumentInstalledItem "Ruby (available through the [setup-ruby](https://github.com/actions/setup-ruby/blob/master/README.md) action)"
|
||||
DocumentInstalledItem "Ruby (available through the [Use Ruby Version](https://go.microsoft.com/fwlink/?linkid=2005989) task)"
|
||||
rubys=$(ls $AGENT_TOOLSDIRECTORY/Ruby)
|
||||
for ruby in $rubys; do
|
||||
DocumentInstalledItemIndent "Ruby $ruby"
|
||||
done;
|
||||
done;
|
||||
@@ -1,40 +1,40 @@
|
||||
#!/bin/bash
|
||||
################################################################################
|
||||
## File: kubernetes-tools.sh
|
||||
## Desc: Installs kubectl, helm
|
||||
################################################################################
|
||||
|
||||
# Source the helpers for use with the script
|
||||
source $HELPER_SCRIPTS/document.sh
|
||||
source $HELPER_SCRIPTS/apt.sh
|
||||
|
||||
## Install kubectl
|
||||
apt-get install -y apt-transport-https
|
||||
curl -s https://packages.cloud.google.com/apt/doc/apt-key.gpg | apt-key add -
|
||||
touch /etc/apt/sources.list.d/kubernetes.list
|
||||
echo "deb http://apt.kubernetes.io/ kubernetes-$(lsb_release -cs) main" | tee -a /etc/apt/sources.list.d/kubernetes.list
|
||||
apt-get update
|
||||
apt-get install -y kubectl
|
||||
|
||||
# Install Helm
|
||||
curl -L https://git.io/get_helm.sh | bash
|
||||
|
||||
# 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 kubectl; then
|
||||
echo "kubectl was not installed"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
if ! command -v helm; then
|
||||
echo "helm was not installed"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
echo "Initializing helm"
|
||||
helm init --client-only
|
||||
|
||||
# Document what was added to the image
|
||||
echo "Lastly, documenting what we added to the metadata file"
|
||||
DocumentInstalledItem "kubectl ($(kubectl version --short |& head -n 1))"
|
||||
DocumentInstalledItem "helm ($(helm version --short |& head -n 1))"
|
||||
#!/bin/bash
|
||||
################################################################################
|
||||
## File: kubernetes-tools.sh
|
||||
## Desc: Installs kubectl, helm
|
||||
################################################################################
|
||||
|
||||
# Source the helpers for use with the script
|
||||
source $HELPER_SCRIPTS/document.sh
|
||||
source $HELPER_SCRIPTS/apt.sh
|
||||
|
||||
## Install kubectl
|
||||
apt-get install -y apt-transport-https
|
||||
curl -s https://packages.cloud.google.com/apt/doc/apt-key.gpg | apt-key add -
|
||||
touch /etc/apt/sources.list.d/kubernetes.list
|
||||
echo "deb http://apt.kubernetes.io/ kubernetes-$(lsb_release -cs) main" | tee -a /etc/apt/sources.list.d/kubernetes.list
|
||||
apt-get update
|
||||
apt-get install -y kubectl
|
||||
|
||||
# Install Helm
|
||||
curl -L https://git.io/get_helm.sh | bash
|
||||
|
||||
# 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 kubectl; then
|
||||
echo "kubectl was not installed"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
if ! command -v helm; then
|
||||
echo "helm was not installed"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
echo "Initializing helm"
|
||||
helm init --client-only
|
||||
|
||||
# Document what was added to the image
|
||||
echo "Lastly, documenting what we added to the metadata file"
|
||||
DocumentInstalledItem "kubectl ($(kubectl version --short |& head -n 1))"
|
||||
DocumentInstalledItem "helm ($(helm version --short |& head -n 1))"
|
||||
|
||||
@@ -1,25 +1,25 @@
|
||||
#!/bin/bash
|
||||
################################################################################
|
||||
## File: mercurial.sh
|
||||
## Desc: Installs Mercurial
|
||||
################################################################################
|
||||
|
||||
# Source the helpers for use with the script
|
||||
source $HELPER_SCRIPTS/document.sh
|
||||
source $HELPER_SCRIPTS/apt.sh
|
||||
|
||||
# Install Mercurial from the mercurial-ppa/releases repository for the latest version.
|
||||
# https://www.mercurial-scm.org/wiki/Download
|
||||
add-apt-repository ppa:mercurial-ppa/releases -y
|
||||
apt-get update
|
||||
apt-get install -y --no-install-recommends mercurial
|
||||
|
||||
# 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 hg; then
|
||||
exit 1
|
||||
fi
|
||||
|
||||
# Document what was added to the image
|
||||
echo "Lastly, documenting what we added to the metadata file"
|
||||
DocumentInstalledItem "Mercurial ($(hg --version | head -n 1))"
|
||||
#!/bin/bash
|
||||
################################################################################
|
||||
## File: mercurial.sh
|
||||
## Desc: Installs Mercurial
|
||||
################################################################################
|
||||
|
||||
# Source the helpers for use with the script
|
||||
source $HELPER_SCRIPTS/document.sh
|
||||
source $HELPER_SCRIPTS/apt.sh
|
||||
|
||||
# Install Mercurial from the mercurial-ppa/releases repository for the latest version.
|
||||
# https://www.mercurial-scm.org/wiki/Download
|
||||
add-apt-repository ppa:mercurial-ppa/releases -y
|
||||
apt-get update
|
||||
apt-get install -y --no-install-recommends mercurial
|
||||
|
||||
# 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 hg; then
|
||||
exit 1
|
||||
fi
|
||||
|
||||
# Document what was added to the image
|
||||
echo "Lastly, documenting what we added to the metadata file"
|
||||
DocumentInstalledItem "Mercurial ($(hg --version | head -n 1))"
|
||||
|
||||
@@ -1,302 +1,268 @@
|
||||
#!/bin/bash
|
||||
################################################################################
|
||||
## File: php.sh
|
||||
## Desc: Installs php
|
||||
################################################################################
|
||||
|
||||
# Source the helpers for use with the script
|
||||
source $HELPER_SCRIPTS/document.sh
|
||||
|
||||
LSB_RELEASE=$(lsb_release -rs)
|
||||
|
||||
set -e
|
||||
|
||||
apt-add-repository ppa:ondrej/php -y
|
||||
|
||||
# Install php5.6
|
||||
apt-get update
|
||||
apt-fast install -y --no-install-recommends \
|
||||
php5.6 \
|
||||
php5.6-bcmath \
|
||||
php5.6-bz2 \
|
||||
php5.6-cgi \
|
||||
php5.6-cli \
|
||||
php5.6-common \
|
||||
php5.6-curl \
|
||||
php5.6-dba \
|
||||
php5.6-dev \
|
||||
php5.6-enchant \
|
||||
php5.6-fpm \
|
||||
php5.6-gd \
|
||||
php5.6-gmp \
|
||||
php5.6-imap \
|
||||
php5.6-interbase \
|
||||
php5.6-intl \
|
||||
php5.6-json \
|
||||
php5.6-ldap \
|
||||
php5.6-mbstring \
|
||||
php5.6-mcrypt \
|
||||
php5.6-mysql \
|
||||
php5.6-odbc \
|
||||
php5.6-opcache \
|
||||
php5.6-pgsql \
|
||||
php5.6-phpdbg \
|
||||
php5.6-pspell \
|
||||
php5.6-readline \
|
||||
php5.6-recode \
|
||||
php5.6-snmp \
|
||||
php5.6-soap \
|
||||
php5.6-sqlite3 \
|
||||
php5.6-sybase \
|
||||
php5.6-tidy \
|
||||
php5.6-xml \
|
||||
php5.6-xmlrpc \
|
||||
php5.6-xsl \
|
||||
php5.6-zip
|
||||
apt-get remove --purge -yq php5.6-dev
|
||||
|
||||
# Install php7.0
|
||||
apt-fast install -y --no-install-recommends \
|
||||
php7.0 \
|
||||
php7.0-bcmath \
|
||||
php7.0-bz2 \
|
||||
php7.0-cgi \
|
||||
php7.0-cli \
|
||||
php7.0-common \
|
||||
php7.0-curl \
|
||||
php7.0-dba \
|
||||
php7.0-dev \
|
||||
php7.0-enchant \
|
||||
php7.0-fpm \
|
||||
php7.0-gd \
|
||||
php7.0-gmp \
|
||||
php7.0-imap \
|
||||
php7.0-interbase \
|
||||
php7.0-intl \
|
||||
php7.0-json \
|
||||
php7.0-ldap \
|
||||
php7.0-mbstring \
|
||||
php7.0-mcrypt \
|
||||
php7.0-mysql \
|
||||
php7.0-odbc \
|
||||
php7.0-opcache \
|
||||
php7.0-pgsql \
|
||||
php7.0-phpdbg \
|
||||
php7.0-pspell \
|
||||
php7.0-readline \
|
||||
php7.0-recode \
|
||||
php7.0-snmp \
|
||||
php7.0-soap \
|
||||
php7.0-sqlite3 \
|
||||
php7.0-sybase \
|
||||
php7.0-tidy \
|
||||
php7.0-xml \
|
||||
php7.0-xmlrpc \
|
||||
php7.0-xsl \
|
||||
php7.0-zip
|
||||
apt-get remove --purge -yq php7.0-dev
|
||||
|
||||
# Install php7.1
|
||||
apt-fast install -y --no-install-recommends \
|
||||
php7.1 \
|
||||
php7.1-bcmath \
|
||||
php7.1-bz2 \
|
||||
php7.1-cgi \
|
||||
php7.1-cli \
|
||||
php7.1-common \
|
||||
php7.1-curl \
|
||||
php7.1-dba \
|
||||
php7.1-dev \
|
||||
php7.1-enchant \
|
||||
php7.1-fpm \
|
||||
php7.1-gd \
|
||||
php7.1-gmp \
|
||||
php7.1-imap \
|
||||
php7.1-interbase \
|
||||
php7.1-intl \
|
||||
php7.1-json \
|
||||
php7.1-ldap \
|
||||
php7.1-mbstring \
|
||||
php7.1-mcrypt \
|
||||
php7.1-mysql \
|
||||
php7.1-odbc \
|
||||
php7.1-opcache \
|
||||
php7.1-pgsql \
|
||||
php7.1-phpdbg \
|
||||
php7.1-pspell \
|
||||
php7.1-readline \
|
||||
php7.1-recode \
|
||||
php7.1-snmp \
|
||||
php7.1-soap \
|
||||
php7.1-sqlite3 \
|
||||
php7.1-sybase \
|
||||
php7.1-tidy \
|
||||
php7.1-xml \
|
||||
php7.1-xmlrpc \
|
||||
php7.1-xsl \
|
||||
php7.1-zip
|
||||
apt-get remove --purge -yq php7.1-dev
|
||||
|
||||
# Install php7.2
|
||||
apt-fast install -y --no-install-recommends \
|
||||
php7.2 \
|
||||
php7.2-bcmath \
|
||||
php7.2-bz2 \
|
||||
php7.2-cgi \
|
||||
php7.2-cli \
|
||||
php7.2-common \
|
||||
php7.2-curl \
|
||||
php7.2-dba \
|
||||
php7.2-dev \
|
||||
php7.2-enchant \
|
||||
php7.2-fpm \
|
||||
php7.2-gd \
|
||||
php7.2-gmp \
|
||||
php7.2-imap \
|
||||
php7.2-interbase \
|
||||
php7.2-intl \
|
||||
php7.2-json \
|
||||
php7.2-ldap \
|
||||
php7.2-mbstring \
|
||||
php7.2-mysql \
|
||||
php7.2-odbc \
|
||||
php7.2-opcache \
|
||||
php7.2-pgsql \
|
||||
php7.2-phpdbg \
|
||||
php7.2-pspell \
|
||||
php7.2-readline \
|
||||
php7.2-recode \
|
||||
php7.2-snmp \
|
||||
php7.2-soap \
|
||||
php7.2-sqlite3 \
|
||||
php7.2-sybase \
|
||||
php7.2-tidy \
|
||||
php7.2-xml \
|
||||
php7.2-xmlrpc \
|
||||
php7.2-xsl \
|
||||
php7.2-zip
|
||||
|
||||
# Install php7.3
|
||||
apt-fast install -y --no-install-recommends \
|
||||
php7.3 \
|
||||
php7.3-bcmath \
|
||||
php7.3-bz2 \
|
||||
php7.3-cgi \
|
||||
php7.3-cli \
|
||||
php7.3-common \
|
||||
php7.3-curl \
|
||||
php7.3-dba \
|
||||
php7.3-dev \
|
||||
php7.3-enchant \
|
||||
php7.3-fpm \
|
||||
php7.3-gd \
|
||||
php7.3-gmp \
|
||||
php7.3-imap \
|
||||
php7.3-interbase \
|
||||
php7.3-intl \
|
||||
php7.3-json \
|
||||
php7.3-ldap \
|
||||
php7.3-mbstring \
|
||||
php7.3-mysql \
|
||||
php7.3-odbc \
|
||||
php7.3-opcache \
|
||||
php7.3-pgsql \
|
||||
php7.3-phpdbg \
|
||||
php7.3-pspell \
|
||||
php7.3-readline \
|
||||
php7.3-recode \
|
||||
php7.3-snmp \
|
||||
php7.3-soap \
|
||||
php7.3-sqlite3 \
|
||||
php7.3-sybase \
|
||||
php7.3-tidy \
|
||||
php7.3-xml \
|
||||
php7.3-xmlrpc \
|
||||
php7.3-xsl \
|
||||
php7.3-zip
|
||||
|
||||
# Install php7.4
|
||||
apt-fast install -y --no-install-recommends \
|
||||
php7.4 \
|
||||
php7.4-bcmath \
|
||||
php7.4-bz2 \
|
||||
php7.4-cgi \
|
||||
php7.4-cli \
|
||||
php7.4-common \
|
||||
php7.4-curl \
|
||||
php7.4-dba \
|
||||
php7.4-dev \
|
||||
php7.4-enchant \
|
||||
php7.4-fpm \
|
||||
php7.4-gd \
|
||||
php7.4-gmp \
|
||||
php7.4-imap \
|
||||
php7.4-interbase \
|
||||
php7.4-intl \
|
||||
php7.4-json \
|
||||
php7.4-ldap \
|
||||
php7.4-mbstring \
|
||||
php7.4-mysql \
|
||||
php7.4-odbc \
|
||||
php7.4-opcache \
|
||||
php7.4-pgsql \
|
||||
php7.4-phpdbg \
|
||||
php7.4-pspell \
|
||||
php7.4-readline \
|
||||
php7.4-snmp \
|
||||
php7.4-soap \
|
||||
php7.4-sqlite3 \
|
||||
php7.4-sybase \
|
||||
php7.4-tidy \
|
||||
php7.4-xml \
|
||||
php7.4-xmlrpc \
|
||||
php7.4-xsl \
|
||||
php7.4-zip
|
||||
|
||||
apt-fast install -y --no-install-recommends \
|
||||
php-amqp \
|
||||
php-apcu \
|
||||
php-igbinary \
|
||||
php-memcache \
|
||||
php-memcached \
|
||||
php-mongodb \
|
||||
php-redis \
|
||||
php-xdebug \
|
||||
php-yaml \
|
||||
php-zmq
|
||||
|
||||
apt-get remove --purge -yq php7.2-dev
|
||||
|
||||
apt-fast install -y --no-install-recommends snmp
|
||||
|
||||
# Install composer
|
||||
php -r "copy('https://getcomposer.org/installer', 'composer-setup.php');"
|
||||
php -r "if (hash_file('sha384', 'composer-setup.php') === 'a5c698ffe4b8e849a443b120cd5ba38043260d5c4023dbf93e1558871f1f07f58274fc6f4c93bcfd858c6bd0775cd8d1') { echo 'Installer verified'; } else { echo 'Installer corrupt'; unlink('composer-setup.php'); } echo PHP_EOL;"
|
||||
php composer-setup.php
|
||||
sudo mv composer.phar /usr/bin/composer
|
||||
php -r "unlink('composer-setup.php');"
|
||||
|
||||
# Install phpunit (for PHP)
|
||||
wget -q -O phpunit https://phar.phpunit.de/phpunit-7.phar
|
||||
chmod +x phpunit
|
||||
mv phpunit /usr/local/bin/phpunit
|
||||
|
||||
# Run tests to determine that the software installed as expected
|
||||
echo "Testing to make sure that script performed as expected, and basic scenarios work"
|
||||
for cmd in php php5.6 php7.0 php7.1 php7.2 php7.3 php7.4 composer phpunit; do
|
||||
if ! command -v $cmd; then
|
||||
echo "$cmd was not installed"
|
||||
exit 1
|
||||
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))"
|
||||
DocumentInstalledItem "PHP 7.0 ($(php7.0 --version | head -n 1))"
|
||||
DocumentInstalledItem "PHP 7.1 ($(php7.1 --version | head -n 1))"
|
||||
DocumentInstalledItem "PHP 7.2 ($(php7.2 --version | head -n 1))"
|
||||
DocumentInstalledItem "PHP 7.3 ($(php7.3 --version | head -n 1))"
|
||||
DocumentInstalledItem "PHP 7.4 ($(php7.4 --version | head -n 1))"
|
||||
DocumentInstalledItem "Composer ($(composer --version))"
|
||||
DocumentInstalledItem "PHPUnit ($(phpunit --version))"
|
||||
#!/bin/bash
|
||||
################################################################################
|
||||
## File: php.sh
|
||||
## Desc: Installs php
|
||||
################################################################################
|
||||
|
||||
# Source the helpers for use with the script
|
||||
source $HELPER_SCRIPTS/document.sh
|
||||
|
||||
LSB_RELEASE=$(lsb_release -rs)
|
||||
|
||||
set -e
|
||||
|
||||
apt-add-repository ppa:ondrej/php -y
|
||||
|
||||
# Install php5.6
|
||||
apt-get update
|
||||
apt-fast install -y --no-install-recommends \
|
||||
php5.6 \
|
||||
php5.6-amqp \
|
||||
php5.6-bcmath \
|
||||
php5.6-bz2 \
|
||||
php5.6-cgi \
|
||||
php5.6-cli \
|
||||
php5.6-common \
|
||||
php5.6-curl \
|
||||
php5.6-dba \
|
||||
php5.6-dev \
|
||||
php5.6-enchant \
|
||||
php5.6-fpm \
|
||||
php5.6-gd \
|
||||
php5.6-gmp \
|
||||
php5.6-imap \
|
||||
php5.6-interbase \
|
||||
php5.6-intl \
|
||||
php5.6-json \
|
||||
php5.6-ldap \
|
||||
php5.6-mbstring \
|
||||
php5.6-mcrypt \
|
||||
php5.6-mysql \
|
||||
php5.6-odbc \
|
||||
php5.6-opcache \
|
||||
php5.6-pgsql \
|
||||
php5.6-phpdbg \
|
||||
php5.6-pspell \
|
||||
php5.6-readline \
|
||||
php5.6-recode \
|
||||
php5.6-snmp \
|
||||
php5.6-soap \
|
||||
php5.6-sqlite3 \
|
||||
php5.6-sybase \
|
||||
php5.6-tidy \
|
||||
php5.6-xml \
|
||||
php5.6-xmlrpc \
|
||||
php5.6-xsl \
|
||||
php5.6-zip
|
||||
apt-get remove --purge -yq php5.6-dev
|
||||
|
||||
# Install php7.0
|
||||
apt-fast install -y --no-install-recommends \
|
||||
php7.0 \
|
||||
php7.0-amqp \
|
||||
php7.0-bcmath \
|
||||
php7.0-bz2 \
|
||||
php7.0-cgi \
|
||||
php7.0-cli \
|
||||
php7.0-common \
|
||||
php7.0-curl \
|
||||
php7.0-dba \
|
||||
php7.0-dev \
|
||||
php7.0-enchant \
|
||||
php7.0-fpm \
|
||||
php7.0-gd \
|
||||
php7.0-gmp \
|
||||
php7.0-imap \
|
||||
php7.0-interbase \
|
||||
php7.0-intl \
|
||||
php7.0-json \
|
||||
php7.0-ldap \
|
||||
php7.0-mbstring \
|
||||
php7.0-mcrypt \
|
||||
php7.0-mysql \
|
||||
php7.0-odbc \
|
||||
php7.0-opcache \
|
||||
php7.0-pgsql \
|
||||
php7.0-phpdbg \
|
||||
php7.0-pspell \
|
||||
php7.0-readline \
|
||||
php7.0-recode \
|
||||
php7.0-snmp \
|
||||
php7.0-soap \
|
||||
php7.0-sqlite3 \
|
||||
php7.0-sybase \
|
||||
php7.0-tidy \
|
||||
php7.0-xml \
|
||||
php7.0-xmlrpc \
|
||||
php7.0-xsl \
|
||||
php7.0-zip
|
||||
apt-get remove --purge -yq php7.0-dev
|
||||
|
||||
# Install php7.1
|
||||
apt-fast install -y --no-install-recommends \
|
||||
php7.1 \
|
||||
php7.1-amqp \
|
||||
php7.1-bcmath \
|
||||
php7.1-bz2 \
|
||||
php7.1-cgi \
|
||||
php7.1-cli \
|
||||
php7.1-common \
|
||||
php7.1-curl \
|
||||
php7.1-dba \
|
||||
php7.1-dev \
|
||||
php7.1-enchant \
|
||||
php7.1-fpm \
|
||||
php7.1-gd \
|
||||
php7.1-gmp \
|
||||
php7.1-imap \
|
||||
php7.1-interbase \
|
||||
php7.1-intl \
|
||||
php7.1-json \
|
||||
php7.1-ldap \
|
||||
php7.1-mbstring \
|
||||
php7.1-mcrypt \
|
||||
php7.1-mysql \
|
||||
php7.1-odbc \
|
||||
php7.1-opcache \
|
||||
php7.1-pgsql \
|
||||
php7.1-phpdbg \
|
||||
php7.1-pspell \
|
||||
php7.1-readline \
|
||||
php7.1-recode \
|
||||
php7.1-snmp \
|
||||
php7.1-soap \
|
||||
php7.1-sqlite3 \
|
||||
php7.1-sybase \
|
||||
php7.1-tidy \
|
||||
php7.1-xml \
|
||||
php7.1-xmlrpc \
|
||||
php7.1-xsl \
|
||||
php7.1-zip
|
||||
apt-get remove --purge -yq php7.1-dev
|
||||
|
||||
# Install php7.2
|
||||
apt-fast install -y --no-install-recommends \
|
||||
php7.2 \
|
||||
php7.2-apcu \
|
||||
php7.2-amqp \
|
||||
php7.2-bcmath \
|
||||
php7.2-bz2 \
|
||||
php7.2-cgi \
|
||||
php7.2-cli \
|
||||
php7.2-common \
|
||||
php7.2-curl \
|
||||
php7.2-dba \
|
||||
php7.2-dev \
|
||||
php7.2-enchant \
|
||||
php7.2-fpm \
|
||||
php7.2-gd \
|
||||
php7.2-gmp \
|
||||
php7.2-imap \
|
||||
php7.2-interbase \
|
||||
php7.2-intl \
|
||||
php7.2-json \
|
||||
php7.2-ldap \
|
||||
php7.2-mbstring \
|
||||
php7.2-mysql \
|
||||
php7.2-odbc \
|
||||
php7.2-opcache \
|
||||
php7.2-pgsql \
|
||||
php7.2-phpdbg \
|
||||
php7.2-pspell \
|
||||
php7.2-readline \
|
||||
php7.2-recode \
|
||||
php7.2-snmp \
|
||||
php7.2-soap \
|
||||
php7.2-sqlite3 \
|
||||
php7.2-sybase \
|
||||
php7.2-tidy \
|
||||
php7.2-xml \
|
||||
php7.2-xmlrpc \
|
||||
php7.2-xsl \
|
||||
php7.2-zip
|
||||
|
||||
# Install php7.3
|
||||
apt-fast install -y --no-install-recommends \
|
||||
php7.3 \
|
||||
php7.3-apcu \
|
||||
php7.3-amqp \
|
||||
php7.3-bcmath \
|
||||
php7.3-bz2 \
|
||||
php7.3-cgi \
|
||||
php7.3-cli \
|
||||
php7.3-common \
|
||||
php7.3-curl \
|
||||
php7.3-dba \
|
||||
php7.3-dev \
|
||||
php7.3-enchant \
|
||||
php7.3-fpm \
|
||||
php7.3-gd \
|
||||
php7.3-gmp \
|
||||
php7.3-imap \
|
||||
php7.3-interbase \
|
||||
php7.3-intl \
|
||||
php7.3-json \
|
||||
php7.3-ldap \
|
||||
php7.3-mbstring \
|
||||
php7.3-mysql \
|
||||
php7.3-odbc \
|
||||
php7.3-opcache \
|
||||
php7.3-pgsql \
|
||||
php7.3-phpdbg \
|
||||
php7.3-pspell \
|
||||
php7.3-readline \
|
||||
php7.3-recode \
|
||||
php7.3-snmp \
|
||||
php7.3-soap \
|
||||
php7.3-sqlite3 \
|
||||
php7.3-sybase \
|
||||
php7.3-tidy \
|
||||
php7.3-xml \
|
||||
php7.3-xmlrpc \
|
||||
php7.3-xsl \
|
||||
php7.3-zip
|
||||
|
||||
apt-fast install -y --no-install-recommends \
|
||||
php-igbinary \
|
||||
php-memcache \
|
||||
php-memcached \
|
||||
php-mongodb \
|
||||
php-redis \
|
||||
php-xdebug \
|
||||
php-yaml \
|
||||
php-zmq
|
||||
|
||||
apt-get remove --purge -yq php7.2-dev
|
||||
|
||||
apt-fast install -y --no-install-recommends snmp
|
||||
|
||||
# Install composer
|
||||
php -r "copy('https://getcomposer.org/installer', 'composer-setup.php');"
|
||||
php -r "if (hash_file('sha384', 'composer-setup.php') === 'a5c698ffe4b8e849a443b120cd5ba38043260d5c4023dbf93e1558871f1f07f58274fc6f4c93bcfd858c6bd0775cd8d1') { echo 'Installer verified'; } else { echo 'Installer corrupt'; unlink('composer-setup.php'); } echo PHP_EOL;"
|
||||
php composer-setup.php
|
||||
sudo mv composer.phar /usr/bin/composer
|
||||
php -r "unlink('composer-setup.php');"
|
||||
|
||||
# Install phpunit (for PHP)
|
||||
wget -q -O phpunit https://phar.phpunit.de/phpunit-7.phar
|
||||
chmod +x phpunit
|
||||
mv phpunit /usr/local/bin/phpunit
|
||||
|
||||
# Run tests to determine that the software installed as expected
|
||||
echo "Testing to make sure that script performed as expected, and basic scenarios work"
|
||||
for cmd in php php5.6 php7.0 php7.1 php7.2 php7.3 composer phpunit; do
|
||||
if ! command -v $cmd; then
|
||||
echo "$cmd was not installed"
|
||||
exit 1
|
||||
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))"
|
||||
DocumentInstalledItem "PHP 7.0 ($(php7.0 --version | head -n 1))"
|
||||
DocumentInstalledItem "PHP 7.1 ($(php7.1 --version | head -n 1))"
|
||||
DocumentInstalledItem "PHP 7.2 ($(php7.2 --version | head -n 1))"
|
||||
DocumentInstalledItem "PHP 7.3 ($(php7.3 --version | head -n 1))"
|
||||
DocumentInstalledItem "Composer ($(composer --version))"
|
||||
DocumentInstalledItem "PHPUnit ($(phpunit --version))"
|
||||
|
||||
@@ -1,28 +1,28 @@
|
||||
#!/bin/bash
|
||||
################################################################################
|
||||
## File: powershellcore.sh
|
||||
## Desc: Installs powershellcore
|
||||
################################################################################
|
||||
|
||||
# Source the helpers for use with the script
|
||||
source $HELPER_SCRIPTS/document.sh
|
||||
|
||||
LSB_RELEASE=$(lsb_release -rs)
|
||||
|
||||
# Install Powershell
|
||||
apt-get install -y powershell
|
||||
|
||||
# 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 pwsh; then
|
||||
echo "pwsh was not installed"
|
||||
exit 1
|
||||
fi
|
||||
if ! pwsh -c 'Write-Host Hello world'; then
|
||||
echo "pwsh failed to run"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
# Document what was added to the image
|
||||
echo "Lastly, documenting what we added to the metadata file"
|
||||
DocumentInstalledItem "Powershell ($(pwsh --version))"
|
||||
#!/bin/bash
|
||||
################################################################################
|
||||
## File: powershellcore.sh
|
||||
## Desc: Installs powershellcore
|
||||
################################################################################
|
||||
|
||||
# Source the helpers for use with the script
|
||||
source $HELPER_SCRIPTS/document.sh
|
||||
|
||||
LSB_RELEASE=$(lsb_release -rs)
|
||||
|
||||
# Install Powershell
|
||||
apt-get install -y powershell
|
||||
|
||||
# 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 pwsh; then
|
||||
echo "pwsh was not installed"
|
||||
exit 1
|
||||
fi
|
||||
if ! pwsh -c 'Write-Host Hello world'; then
|
||||
echo "pwsh failed to run"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
# Document what was added to the image
|
||||
echo "Lastly, documenting what we added to the metadata file"
|
||||
DocumentInstalledItem "Powershell ($(pwsh --version))"
|
||||
|
||||
@@ -1,12 +1,12 @@
|
||||
#!/bin/bash
|
||||
################################################################################
|
||||
## File: preparemetadata.sh
|
||||
## Desc: This script adds a image title information to the metadata
|
||||
## document
|
||||
################################################################################
|
||||
|
||||
source $HELPER_SCRIPTS/document.sh
|
||||
|
||||
AddTitle "Hosted Ubuntu 1604 Image ($(lsb_release -ds))"
|
||||
WriteItem "The following software is installed on machines in the Hosted Ubuntu 1604 ($IMAGE_VERSION) pool"
|
||||
WriteItem "***"
|
||||
#!/bin/bash
|
||||
################################################################################
|
||||
## File: preparemetadata.sh
|
||||
## Desc: This script adds a image title information to the metadata
|
||||
## document
|
||||
################################################################################
|
||||
|
||||
source $HELPER_SCRIPTS/document.sh
|
||||
|
||||
AddTitle "Hosted Ubuntu 1604 Image ($(lsb_release -ds))"
|
||||
WriteItem "The following software is installed on machines in the Hosted Ubuntu 1604 ($IMAGE_VERSION) pool"
|
||||
WriteItem "***"
|
||||
|
||||
Reference in New Issue
Block a user