Add Ubuntu 20 image (#883)
* add ubuntu 20 yml * add ubuntu 20.04 * add toolcache * add config * install ansible from oficial canonical repo * remove azure-cli * remove azure-devops-cli * libcurl3 -> libcurl4 * libcurl4 * install python2 * install clang9 directly from apt-get * remove swift * fix libcurl in the right place * remove docker-moby * remove dotnetcore-sdk * remove haskell * remove azul jdk * remove leingen * remove php * remove sbt * fix lsb release * remove mongodb * remove >> for go installation * install only python3 * remove pip version * remove add-apt-repository -y ppa:apt-fast/stable * remove android * remove powershell * remove python from tests * add java back * change heroku installation * get back leingen * get back android * remove set -e from java installation * get back apt-fast * remove git-lfs install from packagecloud * add pip installation for python2 * get back set -e to java-tools.sh * change ansible installation * add pip to python * Revert "install clang9 directly from apt-get" This reverts commite7d965f5b4. * Revert "change heroku installation" This reverts commit4fb3c0c3eb. * Revert "remove php" This reverts commitd64ce162b8. * change CRLF to LF for php installation * get back heroku to template * get back haskell * get back dotnet * install pwsh via snap * remove netcore 3.0 & 2.2 * add azpowershell * Upgrade to Az 3.8 * Update Validate-AzureModules.ps1 * Fix formatting in doc-string for Rust for Windows-image. Ensure output in ` images/win/Windows2019-Readme.md` looks proper. [Live in master right now](https://github.com/actions/virtual-environments/blob/master/images/win/Windows2019-Readme.md#rust-64-bit), it looks kinda bad. * added workaround for default DNS * revert changes * Don\'t create backup sed file (#792) Co-authored-by: Sergey Dolin <v-sedoli@micorosoft.com> * Updated README with new rules of tool installation. (#793) * Update README with new rules of tool installation. * fixed typo * fix notes * another minor fix * fixed articles * fixed license line * Add Python toolcache installation from Github releases for Ubuntu (#704) Change logic to install Python to Ubuntu images to use GitHub releases from https://github.com/actions/python-versions * Software list: "do not change" label. (#796) * added_advises * change place for hided stirng. * changed to more direct message. * Fail fast in image generation if not enough disk space for customers (#767) * added checking free disk space Co-authored-by: Nikita Bykov <v-nibyko@microsoft.com> * Add FS-iSCSITarget-Server (#805) * Updating readme file for win19 version 20200426.1 * Add Python tools installation from Github releases for Windows (#705) * Add Toolset provision for Windows Co-authored-by: MaksimZhukov <v-mazhuk@microsoft.com> * Updating readme file for macOS version 20200425.1 (#801) * Updating readme file for win16 version 20200426.1 * change min free space to 18000Mb (#814) * Added java 13 package in VM (#795) * Added java 13 package in VM * Fixed var name * Make changes from 11 to 13 * added java 13 for validate-javatool * Fix documentation for containertools * pre-create .composer folder to preserve permission * Fix minor glitch in installer message echo "cmake is already installed" * added workaround for default DNS (#819) * workaround reverted * Improve Windows provisioners stability (#733) * Improve Install-CloudFoundryCli.ps1 * Improve Install-Go.ps1 * Improve Install-Kind.ps1 * Improve Install-MysqlCli.ps1 * Improve Install-Rust.ps1 * Improve Install-SQLPowerShellTools.ps1 * Improve Update-AndroidSDK.ps1 * Fix issue with resolve * Improve Windows Visual Studio provisioners (#758) * Add retries to DotnetSDK provisioner * Improve VS provisioners * Fixes in syntax * Fixes in syntax * Rename Install-VS function * Remove bootstrapperName parameter from Install-VisualStudio * Small fix * Improve Windows browsers provisioners stability (#725) * Improve Chrome provisioner * Improve Edge provisioner * Improve Firefox provisioner * Resolve conflicts in Install-Chrome.ps1 * Add retry logic for javatools (#802) * Add retry logic for javatools * Add retry logic for Selenium server download (#807) * Add retry logic for selenium * Refactoring * Add retries for Selenium release info * Minor fix * Fix kubectl installation (#799) * Fix kubectl installation * Fix kubectl installation * Add --client flag * Fix for ubuntu 16.04 * Move kubectl apt packages installation to basic.sh * Combined separated scripts for kubectl installation to one * Minor fix * Remove apt-transport-https package from basic.sh * Delete helm init * Disable crash reporting (#826) * disable jit debugger * override settings asfter vs installation * Fix maven environment variable (#831) * Updating readme file for macOS version 20200430.1 (#846) * Add nodejs toolcache for windows (#840) * add installation of nodejs Co-authored-by: Dmitry Shibanov <v-dmshib@microsoft.com> * Add nodejs tool cache for linux. (#839) * add nodejs * 4 node versions Co-authored-by: Dmitry Shibanov <v-dmshib@microsoft.com> * Hide packages that are no longer required (#854) * Updating readme file for macOS version 20200430.1 * hide AutomaticRemove info * added SSDT workload to VS 2019 (#844) * Install Go to hostedtoolcache directory on Ubuntu image (#848) * Move go location to the toolcache * Install Go to hostedtoolcache directory on Windows image (#849) * Move installed go versions to toolcache directory * Updating readme file for win19 version 20200430.2 * Updating readme file for ubuntu16 version 20200430.2 * Install Windows 10 SDK (10.0.14393.795) via standalone installer (#862) * add win10 sdk 10.0.14393 * markdown changes * Add msys2 installation and validation (#632) * SQL Server Data-Tier Application Framework latest upgrade. (#863) * DACFx_latest_version_install * Fix the cleanup script. (#856) * Fix the cleanup script.The result is not returned to the variable because of the output redirect * Added the cancel timeout. * Update Haskell tool Stack (#860) * Update Haskell tool Stack * Update haskell script to install stack from get.haskellstack.org * Updating readme file for win16 version 20200505.1 * Updating readme file for ubuntu18 version 20200430.1 * Switch Expand-Archive to 7zip on Windows image generation (#861) * switch expand-archive to 7zip on windows * [Ubuntu] Add Azcopy10 (#871) * Add azcopy10 * Add spaces after azcopy * add condition to ansible * deprecated software Ubuntu 20.04 * install powershell Ubuntu 20.04 * use function in ansible * move preparemetadata.sh to installers folder * update preimagedata.sh ubuntu20 * add confition for dotnetsdk * scripts/installers/2004/android.sh * python.sh ubuntu 20.04 * simplify conditions * remove toolcache.json * get back note in readme * remove workaround for git-lfs * Az 3.8.0 Ubuntu 20.04 * fix kubernetes-tools in template * add helpers script to os.sh * remove old android, old cabal * remove platform tools * remove java7 for ubuntu20 * stay only go 1.14 Ubuntu 20.04 * add helper to python.sh * add os.sh helper to azpwsh and java * remove apis from documented * remove addons google-api * Install Az latest module * get back swift * set java 11 as default * change offer and sku * Revert "change offer and sku" This reverts commitd5d92a553a. * Unite mercurial scripts * combine basic scripts for ubuntu 18 & 20 * add os.sh to basic.sh * Revert "set java 11 as default" This reverts commitaada5b12b0. * set Java11 by default, set Java8 for Androidsdk * rework php script * remove rid of php.sh files * move installation to for loop * add disk space validation Co-authored-by: Christoph Bergmeister [MVP] <c.bergmeister@gmail.com> Co-authored-by: Jostein Kjønigsen <jostein@kjonigsen.net> Co-authored-by: Darii Nurgaleev <Darleev@github.com> Co-authored-by: Sergey Dolin <v-sedoli@microsoft.com> Co-authored-by: Sergey Dolin <v-sedoli@micorosoft.com> Co-authored-by: Alena Sviridenko <alenasviridenko@github.com> Co-authored-by: Vladimir Safonkin <vsafonkin@gmail.com> Co-authored-by: Dariy Nurgaleev <50947177+Darleev@users.noreply.github.com> Co-authored-by: Nikita Bykov <49442273+nikita-bykov@users.noreply.github.com> Co-authored-by: Aleksandr Chebotov <47745270+al-cheb@users.noreply.github.com> Co-authored-by: Image generation service account <no-reply@microsoft.com> Co-authored-by: Maksim Petrov <47208721+vmapetr@users.noreply.github.com> Co-authored-by: Sima Zhu <48036328+sima-zhu@users.noreply.github.com> Co-authored-by: phozzy <arthur.fayzullin@gmail.com> Co-authored-by: Jorgen Thelin <jthelin@microsoft.com> Co-authored-by: Dmitry Shibanov <shibanov-1997@inbox.ru> Co-authored-by: Dmitry Shibanov <v-dmshib@microsoft.com> Co-authored-by: cage200 <patruadrian@yahoo.com> Co-authored-by: Junyoung Clare Jang <jjc9310@gmail.com> Co-authored-by: Dibir Magomedsaygitov <61747324+dibir-magomedsaygitov@users.noreply.github.com> Co-authored-by: Aleksandr Chebotov <v-aleche@microsoft.com>
This commit is contained in:
co-authored by
Christoph Bergmeister [MVP] <c.bergmeister@gmail.com>
Jostein Kjønigsen
Darii Nurgaleev
Sergey Dolin
Sergey Dolin
Alena Sviridenko
Vladimir Safonkin
Dariy Nurgaleev
Nikita Bykov
Aleksandr Chebotov
Image generation service account
Maksim Petrov
Sima Zhu
phozzy
Jorgen Thelin
Dmitry Shibanov
Dmitry Shibanov
cage200
Junyoung Clare Jang
Dibir Magomedsaygitov
Aleksandr Chebotov
parent
a56bf3f0ee
commit
021e7bc68b
@@ -0,0 +1,2 @@
|
||||
# Name of pool supported by this image
|
||||
POOL_NAME="Ubuntu 2004"
|
||||
@@ -6,15 +6,20 @@
|
||||
|
||||
function isUbuntu16
|
||||
{
|
||||
lsb_release -d|grep 'Ubuntu 16' > /dev/null
|
||||
lsb_release -d | grep -q 'Ubuntu 16'
|
||||
}
|
||||
|
||||
function isUbuntu18
|
||||
{
|
||||
lsb_release -d|grep 'Ubuntu 18' > /dev/null
|
||||
lsb_release -d | grep -q 'Ubuntu 18'
|
||||
}
|
||||
|
||||
function isUbuntu20
|
||||
{
|
||||
lsb_release -d | grep -q 'Ubuntu 20'
|
||||
}
|
||||
|
||||
function getOSVersionLabel
|
||||
{
|
||||
isUbuntu16 && echo xenial || echo bionic
|
||||
lsb_release -cs
|
||||
}
|
||||
@@ -1,313 +0,0 @@
|
||||
#!/bin/bash
|
||||
################################################################################
|
||||
## File: php.sh
|
||||
## Desc: Installs php
|
||||
################################################################################
|
||||
|
||||
# Source the helpers for use with the script
|
||||
source $HELPER_SCRIPTS/etc-environment.sh
|
||||
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') === file_get_contents('https://composer.github.io/installer.sig')) { 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');"
|
||||
|
||||
# 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
|
||||
|
||||
#Create composer folder for user to preserve folder permissions
|
||||
mkdir -p /etc/skel/.composer
|
||||
|
||||
# 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))"
|
||||
@@ -1,21 +0,0 @@
|
||||
#!/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
|
||||
|
||||
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,227 +0,0 @@
|
||||
#!/bin/bash
|
||||
################################################################################
|
||||
## File: php.sh
|
||||
## Desc: Installs php
|
||||
################################################################################
|
||||
|
||||
# Source the helpers for use with the script
|
||||
source $HELPER_SCRIPTS/etc-environment.sh
|
||||
source $HELPER_SCRIPTS/document.sh
|
||||
|
||||
LSB_RELEASE=$(lsb_release -rs)
|
||||
|
||||
set -e
|
||||
|
||||
apt-add-repository ppa:ondrej/php -y
|
||||
|
||||
# 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') === file_get_contents('https://composer.github.io/installer.sig')) { 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');"
|
||||
|
||||
# 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
|
||||
|
||||
#Create composer folder for user to preserve folder permissions
|
||||
mkdir -p /etc/skel/.composer
|
||||
|
||||
# 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 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 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))"
|
||||
@@ -1,13 +0,0 @@
|
||||
#!/bin/bash
|
||||
################################################################################
|
||||
## File: preparemetadata.sh
|
||||
## Desc: This script adds a image title information to the metadata
|
||||
## document
|
||||
################################################################################
|
||||
|
||||
source $HELPER_SCRIPTS/document.sh
|
||||
|
||||
WriteItem "<!--- DO NOT EDIT - This markdown file is autogenerated. -->"
|
||||
AddTitle "$(lsb_release -ds)"
|
||||
WriteItem "The following software is installed on machines with the $IMAGE_VERSION update."
|
||||
WriteItem "***"
|
||||
@@ -0,0 +1,94 @@
|
||||
#!/bin/bash
|
||||
################################################################################
|
||||
## File: android.sh
|
||||
## Desc: Installs Android SDK
|
||||
################################################################################
|
||||
|
||||
set -e
|
||||
|
||||
# Source the helpers for use with the script
|
||||
source $HELPER_SCRIPTS/document.sh
|
||||
source $HELPER_SCRIPTS/os.sh
|
||||
|
||||
# Set env variable for SDK Root (https://developer.android.com/studio/command-line/variables)
|
||||
ANDROID_ROOT=/usr/local/lib/android
|
||||
ANDROID_SDK_ROOT=${ANDROID_ROOT}/sdk
|
||||
echo "ANDROID_SDK_ROOT=${ANDROID_SDK_ROOT}" | tee -a /etc/environment
|
||||
|
||||
# ANDROID_HOME is deprecated, but older versions of Gradle rely on it
|
||||
echo "ANDROID_HOME=${ANDROID_SDK_ROOT}" | tee -a /etc/environment
|
||||
|
||||
# Create android sdk directory
|
||||
mkdir -p ${ANDROID_SDK_ROOT}
|
||||
|
||||
# Download the latest command line tools so that we can accept all of the licenses.
|
||||
# See https://developer.android.com/studio/#command-tools
|
||||
wget -O android-sdk.zip https://dl.google.com/android/repository/sdk-tools-linux-4333796.zip
|
||||
unzip android-sdk.zip -d ${ANDROID_SDK_ROOT}
|
||||
rm -f android-sdk.zip
|
||||
|
||||
# Add required permissions
|
||||
chmod -R a+X ${ANDROID_SDK_ROOT}
|
||||
|
||||
if isUbuntu20 ; then
|
||||
# Sdk manager doesn't work with Java > 8, set version 8 explicitly
|
||||
sed -i "2i export JAVA_HOME=${JAVA_HOME_8_X64}" /usr/local/lib/android/sdk/tools/bin/sdkmanager
|
||||
fi
|
||||
|
||||
# Check sdk manager installation
|
||||
/usr/local/lib/android/sdk/tools/bin/sdkmanager --list 1>/dev/null
|
||||
if [ $? -eq 0 ]
|
||||
then
|
||||
echo "Android SDK manager was installed"
|
||||
else
|
||||
echo "Android SDK manager was not installed"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
# Install the following SDKs and build tools, passing in "y" to accept licenses.
|
||||
echo "y" | ${ANDROID_SDK_ROOT}/tools/bin/sdkmanager \
|
||||
"ndk-bundle" \
|
||||
"platform-tools" \
|
||||
"platforms;android-29" \
|
||||
"platforms;android-28" \
|
||||
"platforms;android-27" \
|
||||
"build-tools;29.0.3" \
|
||||
"build-tools;29.0.2" \
|
||||
"build-tools;29.0.0" \
|
||||
"build-tools;28.0.3" \
|
||||
"build-tools;28.0.2" \
|
||||
"build-tools;28.0.1" \
|
||||
"build-tools;28.0.0" \
|
||||
"build-tools;27.0.3" \
|
||||
"build-tools;27.0.2" \
|
||||
"build-tools;27.0.1" \
|
||||
"build-tools;27.0.0" \
|
||||
"extras;android;m2repository" \
|
||||
"extras;google;m2repository" \
|
||||
"extras;google;google_play_services" \
|
||||
"cmake;3.10.2.4988404" \
|
||||
"patcher;v4"
|
||||
|
||||
# Document what was added to the image
|
||||
echo "Lastly, document what was added to the metadata file"
|
||||
DocumentInstalledItem "Google Repository $(cat ${ANDROID_SDK_ROOT}/extras/google/m2repository/source.properties 2>&1 | grep Pkg.Revision | cut -d '=' -f 2)"
|
||||
DocumentInstalledItem "Google Play services $(cat ${ANDROID_SDK_ROOT}/extras/google/google_play_services/source.properties 2>&1 | grep Pkg.Revision | cut -d '=' -f 2)"
|
||||
DocumentInstalledItem "CMake $(ls ${ANDROID_SDK_ROOT}/cmake 2>&1)"
|
||||
DocumentInstalledItem "Android Support Repository 47.0.0"
|
||||
DocumentInstalledItem "Android SDK Platform-Tools $(cat ${ANDROID_SDK_ROOT}/platform-tools/source.properties 2>&1 | grep Pkg.Revision | cut -d '=' -f 2)"
|
||||
DocumentInstalledItem "Android SDK Platform 29"
|
||||
DocumentInstalledItem "Android SDK Platform 28"
|
||||
DocumentInstalledItem "Android SDK Platform 27"
|
||||
DocumentInstalledItem "Android SDK Patch Applier v4"
|
||||
DocumentInstalledItem "Android SDK Build-Tools 29.0.3"
|
||||
DocumentInstalledItem "Android SDK Build-Tools 29.0.2"
|
||||
DocumentInstalledItem "Android SDK Build-Tools 29.0.0"
|
||||
DocumentInstalledItem "Android SDK Build-Tools 28.0.3"
|
||||
DocumentInstalledItem "Android SDK Build-Tools 28.0.2"
|
||||
DocumentInstalledItem "Android SDK Build-Tools 28.0.1"
|
||||
DocumentInstalledItem "Android SDK Build-Tools 28.0.0"
|
||||
DocumentInstalledItem "Android SDK Build-Tools 27.0.3"
|
||||
DocumentInstalledItem "Android SDK Build-Tools 27.0.2"
|
||||
DocumentInstalledItem "Android SDK Build-Tools 27.0.1"
|
||||
DocumentInstalledItem "Android SDK Build-Tools 27.0.0"
|
||||
DocumentInstalledItem "Android NDK $(cat ${ANDROID_SDK_ROOT}/ndk-bundle/source.properties 2>&1 | grep Pkg.Revision | cut -d ' ' -f 3)"
|
||||
@@ -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)"
|
||||
@@ -6,11 +6,15 @@
|
||||
|
||||
# Source the helpers for use with the script
|
||||
source $HELPER_SCRIPTS/document.sh
|
||||
source $HELPER_SCRIPTS/apt.sh
|
||||
source $HELPER_SCRIPTS/os.sh
|
||||
|
||||
# Install Ansible PPA and latest Ansible
|
||||
add-apt-repository ppa:ansible/ansible
|
||||
apt-get update
|
||||
# ppa:ansible/ansible doesn't contain packages for Ubuntu20.04
|
||||
if isUbuntu16 || isUbuntu18 ; then
|
||||
add-apt-repository ppa:ansible/ansible
|
||||
apt-get update
|
||||
fi
|
||||
|
||||
# Install latest Ansible
|
||||
apt-get install -y --no-install-recommends ansible
|
||||
|
||||
# Run tests to determine that the software installed as expected
|
||||
|
||||
@@ -6,6 +6,29 @@
|
||||
|
||||
# Source the helpers for use with the script
|
||||
source $HELPER_SCRIPTS/document.sh
|
||||
source $HELPER_SCRIPTS/os.sh
|
||||
|
||||
# Install Azure CLI (instructions taken from https://docs.microsoft.com/en-us/cli/azure/install-azure-cli)
|
||||
if isUbuntu20 ; then
|
||||
latestVersion=$(pwsh -Command '(Find-Module -Name Az).Version')
|
||||
modulePath="/usr/share/az_$latestVersion"
|
||||
echo "Save Az Module ($latestVersion) to $modulePath"
|
||||
pwsh -Command "Save-Module -Name Az -LiteralPath $modulePath -RequiredVersion $latestVersion -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"
|
||||
if ! pwsh -Command "\$env:PSModulePath = '${modulePath}:' + \$env:PSModulePath
|
||||
if ( -not (Get-Module -ListAvailable -Name Az.Accounts)) {
|
||||
Write-Host 'Az Module was not installed'
|
||||
exit 1
|
||||
}"; then
|
||||
exit 1
|
||||
fi
|
||||
|
||||
# Document what was added to the image
|
||||
DocumentInstalledItem "Az Module ($latestVersion)"
|
||||
exit 0
|
||||
fi
|
||||
|
||||
# Install Azure CLI (instructions taken from https://docs.microsoft.com/en-us/cli/azure/install-azure-cli)
|
||||
sudo pwsh -Command 'Save-Module -Name Az -LiteralPath /usr/share/az_1.0.0 -RequiredVersion 1.0.0 -Force'
|
||||
|
||||
+17
-3
@@ -7,9 +7,15 @@
|
||||
# Source the helpers for use with the script
|
||||
source $HELPER_SCRIPTS/document.sh
|
||||
source $HELPER_SCRIPTS/apt.sh
|
||||
source $HELPER_SCRIPTS/os.sh
|
||||
|
||||
set -e
|
||||
|
||||
if isUbuntu20 ; then
|
||||
echo "Install python2"
|
||||
apt-get install -y --no-install-recommends python-is-python2
|
||||
fi
|
||||
|
||||
echo "Install dnsutils"
|
||||
apt-get install -y --no-install-recommends dnsutils
|
||||
|
||||
@@ -28,8 +34,16 @@ apt-get install -y --no-install-recommends iputils-ping
|
||||
echo "Install jq"
|
||||
apt-get install -y --no-install-recommends jq
|
||||
|
||||
echo "Install libcurl3"
|
||||
apt-get install -y --no-install-recommends libcurl3
|
||||
echo "Install libcurl"
|
||||
if isUbuntu18 ; then
|
||||
libcurelVer="libcurl3"
|
||||
fi
|
||||
|
||||
if isUbuntu20 ; then
|
||||
libcurelVer="libcurl4"
|
||||
fi
|
||||
|
||||
apt-get install -y --no-install-recommends $libcurelVer
|
||||
|
||||
echo "Install libunwind8"
|
||||
apt-get install -y --no-install-recommends libunwind8
|
||||
@@ -162,7 +176,7 @@ DocumentInstalledItemIndent "ftp"
|
||||
DocumentInstalledItemIndent "iproute2"
|
||||
DocumentInstalledItemIndent "iputils-ping"
|
||||
DocumentInstalledItemIndent "jq"
|
||||
DocumentInstalledItemIndent "libcurl3"
|
||||
DocumentInstalledItemIndent "$libcurelVer"
|
||||
DocumentInstalledItemIndent "libgbm-dev"
|
||||
DocumentInstalledItemIndent "libicu55"
|
||||
DocumentInstalledItemIndent "libunwind8"
|
||||
@@ -6,10 +6,18 @@
|
||||
source $HELPER_SCRIPTS/etc-environment.sh
|
||||
source $HELPER_SCRIPTS/apt.sh
|
||||
source $HELPER_SCRIPTS/document.sh
|
||||
source $HELPER_SCRIPTS/os.sh
|
||||
|
||||
LATEST_DOTNET_PACKAGES=("dotnet-sdk-3.0" "dotnet-sdk-3.1")
|
||||
# Ubuntu 20 doesn't support EOL versions
|
||||
if isUbuntu20 ; then
|
||||
LATEST_DOTNET_PACKAGES=("dotnet-sdk-3.1")
|
||||
release_urls=("https://dotnetcli.blob.core.windows.net/dotnet/release-metadata/2.1/releases.json" "https://dotnetcli.blob.core.windows.net/dotnet/release-metadata/3.1/releases.json")
|
||||
fi
|
||||
|
||||
LSB_RELEASE=$(lsb_release -rs)
|
||||
if isUbuntu16 || isUbuntu18 ; then
|
||||
LATEST_DOTNET_PACKAGES=("dotnet-sdk-3.0" "dotnet-sdk-3.1")
|
||||
release_urls=("https://dotnetcli.blob.core.windows.net/dotnet/release-metadata/2.1/releases.json" "https://dotnetcli.blob.core.windows.net/dotnet/release-metadata/2.2/releases.json" "https://dotnetcli.blob.core.windows.net/dotnet/release-metadata/3.0/releases.json" "https://dotnetcli.blob.core.windows.net/dotnet/release-metadata/3.1/releases.json")
|
||||
fi
|
||||
|
||||
mksamples()
|
||||
{
|
||||
@@ -37,19 +45,13 @@ for latest_package in ${LATEST_DOTNET_PACKAGES[@]}; do
|
||||
echo "Determing if .NET Core ($latest_package) is installed"
|
||||
if ! IsInstalled $latest_package; then
|
||||
echo "Could not find .NET Core ($latest_package), installing..."
|
||||
#temporary avoid 3.1.102 installation due to https://github.com/dotnet/aspnetcore/issues/19133
|
||||
if [ $latest_package != "dotnet-sdk-3.1" ]; then
|
||||
apt-get install $latest_package -y
|
||||
else
|
||||
apt-get install dotnet-sdk-3.1=3.1.101-1 -y
|
||||
fi
|
||||
apt-get install $latest_package -y
|
||||
else
|
||||
echo ".NET Core ($latest_package) is already installed"
|
||||
fi
|
||||
done
|
||||
|
||||
# Get list of all released SDKs from channels which are not end-of-life or preview
|
||||
release_urls=("https://dotnetcli.blob.core.windows.net/dotnet/release-metadata/2.1/releases.json" "https://dotnetcli.blob.core.windows.net/dotnet/release-metadata/2.2/releases.json" "https://dotnetcli.blob.core.windows.net/dotnet/release-metadata/3.0/releases.json" "https://dotnetcli.blob.core.windows.net/dotnet/release-metadata/3.1/releases.json")
|
||||
sdks=()
|
||||
for release_url in ${release_urls[@]}; do
|
||||
echo "${release_url}"
|
||||
|
||||
@@ -46,7 +46,7 @@ function getFullGoVersion () {
|
||||
}
|
||||
|
||||
# load golang_tags.json file
|
||||
curl -s 'https://api.github.com/repos/golang/go/git/refs/tags' >> $golangTags
|
||||
curl -s 'https://api.github.com/repos/golang/go/git/refs/tags' > $golangTags
|
||||
# Install Go versions
|
||||
for go in ${GO_VERSIONS}; do
|
||||
echo "Installing Go ${go}"
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
|
||||
# Source the helpers for use with the script
|
||||
source $HELPER_SCRIPTS/document.sh
|
||||
source $HELPER_SCRIPTS/apt.sh
|
||||
source $HELPER_SCRIPTS/os.sh
|
||||
|
||||
# Install Herbert V. Riedel's PPA for managing multiple version of ghc on ubuntu.
|
||||
# https://launchpad.net/~hvr/+archive/ubuntu/ghc
|
||||
@@ -15,23 +15,24 @@ add-apt-repository -y ppa:hvr/ghc
|
||||
apt-get update
|
||||
|
||||
# Install various versions of ghc and cabal
|
||||
apt-get install -y \
|
||||
ghc-8.0.2 \
|
||||
ghc-8.2.2 \
|
||||
ghc-8.4.4 \
|
||||
ghc-8.6.2 \
|
||||
ghc-8.6.3 \
|
||||
ghc-8.6.4 \
|
||||
ghc-8.6.5 \
|
||||
ghc-8.8.1 \
|
||||
ghc-8.8.2 \
|
||||
ghc-8.8.3 \
|
||||
ghc-8.10.1 \
|
||||
cabal-install-2.0 \
|
||||
cabal-install-2.2 \
|
||||
cabal-install-2.4 \
|
||||
cabal-install-3.0 \
|
||||
cabal-install-3.2
|
||||
if isUbuntu20 ; then
|
||||
ghcVersions="8.6.5 8.8.3 8.10.1"
|
||||
cabalVersions="3.2"
|
||||
fi
|
||||
|
||||
if isUbuntu16 || isUbuntu18 ; then
|
||||
# Install various versions of ghc and cabal
|
||||
ghcVersions="8.0.2 8.2.2 8.4.4 8.6.2 8.6.3 8.6.4 8.6.5 8.8.1 8.8.2 8.8.3 8.10.1"
|
||||
cabalVersions="2.0 2.2 2.4 3.0 3.2"
|
||||
fi
|
||||
|
||||
for version in $ghcVersions; do
|
||||
apt-get install -y ghc-$version
|
||||
done
|
||||
|
||||
for version in $cabalVersions; do
|
||||
apt-get install -y cabal-install-$version
|
||||
done
|
||||
|
||||
# Install the latest stable release of haskell stack
|
||||
curl -sSL https://get.haskellstack.org/ | sh
|
||||
@@ -39,14 +40,14 @@ curl -sSL https://get.haskellstack.org/ | sh
|
||||
# Run tests to determine that the software installed as expected
|
||||
echo "Testing to make sure that script performed as expected, and basic scenarios work"
|
||||
# Check all ghc versions
|
||||
for version in 8.0.2 8.2.2 8.4.4 8.6.2 8.6.3 8.6.4 8.6.5 8.8.1 8.8.2 8.8.3 8.10.1; do
|
||||
for version in $ghcVersions; do
|
||||
if ! command -v /opt/ghc/$version/bin/ghc; then
|
||||
echo "ghc $version was not installed"
|
||||
exit 1
|
||||
fi
|
||||
done
|
||||
# Check all cabal versions
|
||||
for version in 2.0 2.2 2.4 3.0 3.2; do
|
||||
for version in $cabalVersions; do
|
||||
if ! command -v /opt/cabal/$version/bin/cabal; then
|
||||
echo "cabal $version was not installed"
|
||||
exit 1
|
||||
@@ -59,10 +60,10 @@ fi
|
||||
|
||||
# Document what was added to the image
|
||||
echo "Lastly, documenting what we added to the metadata file"
|
||||
for version in 2.0 2.2 2.4 3.0 3.2; do
|
||||
for version in $cabalVersions; do
|
||||
DocumentInstalledItem "Haskell Cabal ($(/opt/cabal/$version/bin/cabal --version))"
|
||||
done
|
||||
for version in 8.0.2 8.2.2 8.4.4 8.6.2 8.6.3 8.6.4 8.6.5 8.8.1 8.8.2 8.8.3 8.10.1; do
|
||||
for version in $ghcVersions; do
|
||||
DocumentInstalledItem "GHC ($(/opt/ghc/$version/bin/ghc --version))"
|
||||
done
|
||||
DocumentInstalledItem "Haskell Stack ($(stack --version))"
|
||||
|
||||
@@ -6,8 +6,7 @@
|
||||
|
||||
# Source the helpers for use with the script
|
||||
source $HELPER_SCRIPTS/document.sh
|
||||
|
||||
DEFAULT_JDK_VERSION=8
|
||||
source $HELPER_SCRIPTS/os.sh
|
||||
|
||||
set -e
|
||||
|
||||
@@ -16,12 +15,24 @@ set -e
|
||||
apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv-keys 0xB1998361219BD9C9
|
||||
apt-add-repository "deb http://repos.azul.com/azure-only/zulu/apt stable main"
|
||||
apt-get -q update
|
||||
apt-get -y install zulu-7-azure-jdk=\*
|
||||
|
||||
if isUbuntu16 || isUbuntu18 ; then
|
||||
apt-get -y install zulu-7-azure-jdk=\*
|
||||
echo "JAVA_HOME_7_X64=/usr/lib/jvm/zulu-7-azure-amd64" | tee -a /etc/environment
|
||||
DEFAULT_JDK_VERSION=8
|
||||
defaultLabel8="(default)"
|
||||
fi
|
||||
|
||||
if isUbuntu20 ; then
|
||||
DEFAULT_JDK_VERSION=11
|
||||
defaultLabel11="(default)"
|
||||
fi
|
||||
|
||||
apt-get -y install zulu-8-azure-jdk=\*
|
||||
apt-get -y install zulu-11-azure-jdk=\*
|
||||
apt-get -y install zulu-12-azure-jdk=\*
|
||||
update-java-alternatives -s /usr/lib/jvm/zulu-8-azure-amd64
|
||||
echo "JAVA_HOME_7_X64=/usr/lib/jvm/zulu-7-azure-amd64" | tee -a /etc/environment
|
||||
|
||||
echo "JAVA_HOME_8_X64=/usr/lib/jvm/zulu-8-azure-amd64" | tee -a /etc/environment
|
||||
echo "JAVA_HOME_11_X64=/usr/lib/jvm/zulu-11-azure-amd64" | tee -a /etc/environment
|
||||
echo "JAVA_HOME_12_X64=/usr/lib/jvm/zulu-12-azure-amd64" | tee -a /etc/environment
|
||||
@@ -69,9 +80,11 @@ done
|
||||
# Document what was added to the image
|
||||
echo "Lastly, documenting what we added to the metadata file"
|
||||
DocumentInstalledItem "Azul Zulu OpenJDK:"
|
||||
if isUbuntu16 || isUbuntu18 ; then
|
||||
DocumentInstalledItemIndent "7 ($(/usr/lib/jvm/zulu-7-azure-amd64/bin/java -showversion |& head -n 1))"
|
||||
DocumentInstalledItemIndent "8 ($(/usr/lib/jvm/zulu-8-azure-amd64/bin/java -showversion |& head -n 1)) (default)"
|
||||
DocumentInstalledItemIndent "11 ($(/usr/lib/jvm/zulu-11-azure-amd64/bin/java -showversion |& head -n 1))"
|
||||
fi
|
||||
DocumentInstalledItemIndent "8 ($(/usr/lib/jvm/zulu-8-azure-amd64/bin/java -showversion |& head -n 1)) $defaultLabel8"
|
||||
DocumentInstalledItemIndent "11 ($(/usr/lib/jvm/zulu-11-azure-amd64/bin/java -showversion |& head -n 1)) $defaultLabel11"
|
||||
DocumentInstalledItemIndent "12 ($(/usr/lib/jvm/zulu-12-azure-amd64/bin/java -showversion |& head -n 1))"
|
||||
DocumentInstalledItem "Ant ($(ant -version))"
|
||||
DocumentInstalledItem "Gradle ${gradleVersion}"
|
||||
|
||||
+8
-4
@@ -7,11 +7,15 @@
|
||||
# Source the helpers for use with the script
|
||||
source $HELPER_SCRIPTS/document.sh
|
||||
source $HELPER_SCRIPTS/apt.sh
|
||||
source $HELPER_SCRIPTS/os.sh
|
||||
|
||||
if isUbuntu16 ; then
|
||||
# Install Mercurial from the mercurial-ppa/releases repository for the latest version for Ubuntu16.
|
||||
# https://www.mercurial-scm.org/wiki/Download
|
||||
add-apt-repository ppa:mercurial-ppa/releases -y
|
||||
apt-get update
|
||||
fi
|
||||
|
||||
# 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
|
||||
@@ -0,0 +1,137 @@
|
||||
#!/bin/bash
|
||||
################################################################################
|
||||
## File: php.sh
|
||||
## Desc: Installs php
|
||||
################################################################################
|
||||
|
||||
# Source the helpers for use with the script
|
||||
source $HELPER_SCRIPTS/etc-environment.sh
|
||||
source $HELPER_SCRIPTS/document.sh
|
||||
|
||||
set -e
|
||||
|
||||
# add repository
|
||||
apt-add-repository ppa:ondrej/php -y
|
||||
apt-get update
|
||||
|
||||
# Install PHP
|
||||
if isUbuntu16 ; then
|
||||
php_versions="5.6 7.0 7.1 7.2 7.3 7.4"
|
||||
fi
|
||||
|
||||
if isUbuntu18 ; then
|
||||
php_versions="7.1 7.2 7.3 7.4"
|
||||
fi
|
||||
|
||||
if isUbuntu20 ; then
|
||||
php_versions="7.4"
|
||||
fi
|
||||
|
||||
for version in $php_versions; do
|
||||
echo "Installing PHP $version"
|
||||
apt-fast install -y --no-install-recommends \
|
||||
php$version \
|
||||
php$version-bcmath \
|
||||
php$version-bz2 \
|
||||
php$version-cgi \
|
||||
php$version-cli \
|
||||
php$version-common \
|
||||
php$version-curl \
|
||||
php$version-dba \
|
||||
php$version-dev \
|
||||
php$version-enchant \
|
||||
php$version-fpm \
|
||||
php$version-gd \
|
||||
php$version-gmp \
|
||||
php$version-imap \
|
||||
php$version-interbase \
|
||||
php$version-intl \
|
||||
php$version-json \
|
||||
php$version-ldap \
|
||||
php$version-mbstring \
|
||||
php$version-mysql \
|
||||
php$version-odbc \
|
||||
php$version-opcache \
|
||||
php$version-pgsql \
|
||||
php$version-phpdbg \
|
||||
php$version-pspell \
|
||||
php$version-readline \
|
||||
php$version-snmp \
|
||||
php$version-soap \
|
||||
php$version-sqlite3 \
|
||||
php$version-sybase \
|
||||
php$version-tidy \
|
||||
php$version-xml \
|
||||
php$version-xmlrpc \
|
||||
php$version-xsl \
|
||||
php$version-zip
|
||||
|
||||
if [[ $version == "5.6" || $version == "7.0" || $version == "7.1" ]]; then
|
||||
apt-fast install -y --no-install-recommends php$version-mcrypt php$version-recode
|
||||
apt-get remove --purge -yq php$version-dev
|
||||
fi
|
||||
|
||||
if [[ $version == "7.2" || $version == "7.3" ]]; then
|
||||
apt-fast install -y --no-install-recommends php$version-recode
|
||||
fi
|
||||
done
|
||||
|
||||
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') === file_get_contents('https://composer.github.io/installer.sig')) { 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');"
|
||||
|
||||
# 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
|
||||
|
||||
#Create composer folder for user to preserve folder permissions
|
||||
mkdir -p /etc/skel/.composer
|
||||
|
||||
# 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 $php_versions composer phpunit; do
|
||||
if [[ $cmd =~ ^[0-9] ]]; then
|
||||
cmd="php$cmd"
|
||||
fi
|
||||
|
||||
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"
|
||||
|
||||
for version in $php_versions; do
|
||||
DocumentInstalledItem "PHP $version ($(php$version --version | head -n 1))"
|
||||
done;
|
||||
|
||||
DocumentInstalledItem "Composer ($(composer --version))"
|
||||
DocumentInstalledItem "PHPUnit ($(phpunit --version))"
|
||||
@@ -6,9 +6,16 @@
|
||||
|
||||
# Source the helpers for use with the script
|
||||
source $HELPER_SCRIPTS/document.sh
|
||||
source $HELPER_SCRIPTS/os.sh
|
||||
|
||||
# Install Powershell
|
||||
apt-get install -y powershell
|
||||
if isUbuntu20 ; then
|
||||
snap install powershell --classic --channel=edge/useedge
|
||||
fi
|
||||
|
||||
if isUbuntu16 || isUbuntu18 ; then
|
||||
apt-get install -y powershell
|
||||
fi
|
||||
|
||||
# Run tests to determine that the software installed as expected
|
||||
echo "Testing to make sure that script performed as expected, and basic scenarios work"
|
||||
|
||||
@@ -6,6 +6,10 @@ os_name=$(lsb_release -ds | sed "s/ /\\\n/g")
|
||||
image_label="ubuntu-$(lsb_release -rs)"
|
||||
github_url="https://github.com/actions/virtual-environments/blob"
|
||||
|
||||
if [[ "$image_label" =~ "ubuntu-20" ]]; then
|
||||
software_url="${github_url}/ubuntu20/${image_version}/images/linux/Ubuntu2004-README.md"
|
||||
fi
|
||||
|
||||
if [[ "$image_label" =~ "ubuntu-18" ]]; then
|
||||
software_url="${github_url}/ubuntu18/${image_version}/images/linux/Ubuntu1804-README.md"
|
||||
fi
|
||||
|
||||
@@ -6,9 +6,19 @@
|
||||
|
||||
# Source the helpers for use with the script
|
||||
source $HELPER_SCRIPTS/document.sh
|
||||
source $HELPER_SCRIPTS/os.sh
|
||||
|
||||
# Install Python, Python 3, pip, pip3
|
||||
apt-get install -y --no-install-recommends python python-dev python-pip python3 python3-dev python3-pip
|
||||
if isUbuntu20 ; then
|
||||
apt-get install -y --no-install-recommends python3 python3-dev python3-pip
|
||||
|
||||
curl https://bootstrap.pypa.io/get-pip.py --output get-pip.py
|
||||
python2 get-pip.py
|
||||
fi
|
||||
|
||||
if isUbuntu16 || isUbuntu18 ; then
|
||||
apt-get install -y --no-install-recommends python python-dev python-pip python3 python3-dev python3-pip
|
||||
fi
|
||||
|
||||
# Run tests to determine that the software installed as expected
|
||||
echo "Testing to make sure that script performed as expected, and basic scenarios work"
|
||||
|
||||
@@ -102,7 +102,7 @@
|
||||
{
|
||||
"type": "shell",
|
||||
"scripts":[
|
||||
"{{template_dir}}/scripts/installers/1604/preparemetadata.sh"
|
||||
"{{template_dir}}/scripts/installers/preparemetadata.sh"
|
||||
],
|
||||
"environment_vars": [
|
||||
"IMAGE_VERSION={{user `image_version`}}",
|
||||
@@ -208,14 +208,14 @@
|
||||
"{{template_dir}}/scripts/installers/kind.sh",
|
||||
"{{template_dir}}/scripts/installers/kubernetes-tools.sh",
|
||||
"{{template_dir}}/scripts/installers/leiningen.sh",
|
||||
"{{template_dir}}/scripts/installers/1604/mercurial.sh",
|
||||
"{{template_dir}}/scripts/installers/mercurial.sh",
|
||||
"{{template_dir}}/scripts/installers/miniconda.sh",
|
||||
"{{template_dir}}/scripts/installers/mono.sh",
|
||||
"{{template_dir}}/scripts/installers/mysql.sh",
|
||||
"{{template_dir}}/scripts/installers/nodejs.sh",
|
||||
"{{template_dir}}/scripts/installers/bazel.sh",
|
||||
"{{template_dir}}/scripts/installers/phantomjs.sh",
|
||||
"{{template_dir}}/scripts/installers/1604/php.sh",
|
||||
"{{template_dir}}/scripts/installers/php.sh",
|
||||
"{{template_dir}}/scripts/installers/pollinate.sh",
|
||||
"{{template_dir}}/scripts/installers/postgresql.sh",
|
||||
"{{template_dir}}/scripts/installers/powershellcore.sh",
|
||||
|
||||
@@ -105,7 +105,7 @@
|
||||
{
|
||||
"type": "shell",
|
||||
"scripts":[
|
||||
"{{template_dir}}/scripts/installers/1804/preparemetadata.sh"
|
||||
"{{template_dir}}/scripts/installers/preparemetadata.sh"
|
||||
],
|
||||
"environment_vars": [
|
||||
"IMAGE_VERSION={{user `image_version`}}",
|
||||
@@ -184,7 +184,7 @@
|
||||
"{{template_dir}}/scripts/installers/azcopy.sh",
|
||||
"{{template_dir}}/scripts/installers/azure-cli.sh",
|
||||
"{{template_dir}}/scripts/installers/azure-devops-cli.sh",
|
||||
"{{template_dir}}/scripts/installers/1804/basic.sh",
|
||||
"{{template_dir}}/scripts/installers/basic.sh",
|
||||
"{{template_dir}}/scripts/installers/aliyun-cli.sh",
|
||||
"{{template_dir}}/scripts/installers/aws.sh",
|
||||
"{{template_dir}}/scripts/installers/build-essential.sh",
|
||||
@@ -211,7 +211,7 @@
|
||||
"{{template_dir}}/scripts/installers/kind.sh",
|
||||
"{{template_dir}}/scripts/installers/kubernetes-tools.sh",
|
||||
"{{template_dir}}/scripts/installers/leiningen.sh",
|
||||
"{{template_dir}}/scripts/installers/1804/mercurial.sh",
|
||||
"{{template_dir}}/scripts/installers/mercurial.sh",
|
||||
"{{template_dir}}/scripts/installers/miniconda.sh",
|
||||
"{{template_dir}}/scripts/installers/mono.sh",
|
||||
"{{template_dir}}/scripts/installers/mysql.sh",
|
||||
@@ -219,7 +219,7 @@
|
||||
"{{template_dir}}/scripts/installers/nodejs.sh",
|
||||
"{{template_dir}}/scripts/installers/bazel.sh",
|
||||
"{{template_dir}}/scripts/installers/phantomjs.sh",
|
||||
"{{template_dir}}/scripts/installers/1804/php.sh",
|
||||
"{{template_dir}}/scripts/installers/php.sh",
|
||||
"{{template_dir}}/scripts/installers/pollinate.sh",
|
||||
"{{template_dir}}/scripts/installers/postgresql.sh",
|
||||
"{{template_dir}}/scripts/installers/powershellcore.sh",
|
||||
|
||||
@@ -0,0 +1,335 @@
|
||||
{
|
||||
"variables": {
|
||||
"commit_url": "{{env `COMMIT_URL`}}",
|
||||
"client_id": "{{env `ARM_CLIENT_ID`}}",
|
||||
"client_secret": "{{env `ARM_CLIENT_SECRET`}}",
|
||||
"subscription_id": "{{env `ARM_SUBSCRIPTION_ID`}}",
|
||||
"tenant_id": "{{env `ARM_TENANT_ID`}}",
|
||||
"resource_group": "{{env `ARM_RESOURCE_GROUP`}}",
|
||||
"storage_account": "{{env `ARM_STORAGE_ACCOUNT`}}",
|
||||
"temp_resource_group_name": "{{env `TEMP_RESOURCE_GROUP_NAME`}}",
|
||||
"location": "{{env `ARM_RESOURCE_LOCATION`}}",
|
||||
"virtual_network_name": "{{env `VNET_NAME`}}",
|
||||
"virtual_network_resource_group_name": "{{env `VNET_RESOURCE_GROUP`}}",
|
||||
"virtual_network_subnet_name": "{{env `VNET_SUBNET`}}",
|
||||
"private_virtual_network_with_public_ip": "{{env `PRIVATE_VIRTUAL_NETWORK_WITH_PUBLIC_IP`}}",
|
||||
"image_folder": "/imagegeneration",
|
||||
"commit_file": "/imagegeneration/commit.txt",
|
||||
"imagedata_file": "/imagegeneration/imagedata.json",
|
||||
"metadata_file": "/imagegeneration/metadatafile",
|
||||
"installer_script_folder": "/imagegeneration/installers",
|
||||
"helper_script_folder": "/imagegeneration/helpers",
|
||||
"vm_size": "Standard_DS2_v2",
|
||||
"capture_name_prefix": "packer",
|
||||
"image_version": "dev",
|
||||
"image_os": "ubuntu20",
|
||||
"github_feed_token": null,
|
||||
"run_validation_diskspace": "false",
|
||||
"go_default": "1.14",
|
||||
"go_versions": "1.14"
|
||||
},
|
||||
"sensitive-variables": ["client_secret", "github_feed_token"],
|
||||
"builders": [
|
||||
{
|
||||
"type": "azure-arm",
|
||||
"client_id": "{{user `client_id`}}",
|
||||
"client_secret": "{{user `client_secret`}}",
|
||||
"subscription_id": "{{user `subscription_id`}}",
|
||||
"tenant_id": "{{user `tenant_id`}}",
|
||||
|
||||
"location": "{{user `location`}}",
|
||||
"vm_size": "{{user `vm_size`}}",
|
||||
"resource_group_name": "{{user `resource_group`}}",
|
||||
"storage_account": "{{user `storage_account`}}",
|
||||
"temp_resource_group_name": "{{user `temp_resource_group_name`}}",
|
||||
"capture_container_name": "images",
|
||||
"capture_name_prefix": "{{user `capture_name_prefix`}}",
|
||||
"virtual_network_name": "{{user `virtual_network_name`}}",
|
||||
"virtual_network_resource_group_name": "{{user `virtual_network_resource_group_name`}}",
|
||||
"virtual_network_subnet_name": "{{user `virtual_network_subnet_name`}}",
|
||||
"private_virtual_network_with_public_ip": "{{user `private_virtual_network_with_public_ip`}}",
|
||||
"os_type": "Linux",
|
||||
"image_publisher": "canonical",
|
||||
"image_offer": "0001-com-ubuntu-server-focal",
|
||||
"image_sku": "20_04-lts",
|
||||
"os_disk_size_gb": "86"
|
||||
}
|
||||
],
|
||||
"provisioners": [
|
||||
{
|
||||
"type": "shell",
|
||||
"inline": [
|
||||
"mkdir {{user `image_folder`}}",
|
||||
"chmod 777 {{user `image_folder`}}",
|
||||
"echo {{user `commit_url`}} > {{user `commit_file`}}",
|
||||
"chmod +r {{user `commit_file`}}"
|
||||
],
|
||||
"execute_command": "sudo sh -c '{{ .Vars }} {{ .Path }}'"
|
||||
},
|
||||
{
|
||||
"type": "shell",
|
||||
"scripts":[
|
||||
"{{template_dir}}/scripts/base/repos.sh"
|
||||
],
|
||||
"environment_vars": [
|
||||
"DEBIAN_FRONTEND=noninteractive"
|
||||
],
|
||||
"execute_command": "sudo sh -c '{{ .Vars }} {{ .Path }}'"
|
||||
},
|
||||
{
|
||||
"type": "shell",
|
||||
"inline": [
|
||||
"apt-get update",
|
||||
"apt-get dist-upgrade -y",
|
||||
"systemctl disable apt-daily.service",
|
||||
"systemctl disable apt-daily.timer",
|
||||
"systemctl disable apt-daily-upgrade.timer",
|
||||
"systemctl disable apt-daily-upgrade.service",
|
||||
"echo '* soft nofile 65536 \n* hard nofile 65536' >> /etc/security/limits.conf",
|
||||
"echo 'session required pam_limits.so' >> /etc/pam.d/common-session",
|
||||
"echo 'session required pam_limits.so' >> /etc/pam.d/common-session-noninteractive",
|
||||
"echo 'DefaultLimitNOFILE=65536' >> /etc/systemd/system.conf"
|
||||
],
|
||||
"execute_command": "sudo sh -c '{{ .Vars }} {{ .Path }}'"
|
||||
},
|
||||
{
|
||||
"type": "file",
|
||||
"source": "{{template_dir}}/scripts/helpers",
|
||||
"destination": "{{user `helper_script_folder`}}"
|
||||
},
|
||||
{
|
||||
"type": "file",
|
||||
"source": "{{template_dir}}/scripts/installers",
|
||||
"destination": "{{user `installer_script_folder`}}"
|
||||
},
|
||||
{
|
||||
"type": "shell",
|
||||
"scripts":[
|
||||
"{{template_dir}}/scripts/installers/preparemetadata.sh"
|
||||
],
|
||||
"environment_vars": [
|
||||
"IMAGE_VERSION={{user `image_version`}}",
|
||||
"METADATA_FILE={{user `metadata_file`}}",
|
||||
"HELPER_SCRIPTS={{user `helper_script_folder`}}"
|
||||
],
|
||||
"execute_command": "sudo sh -c '{{ .Vars }} {{ .Path }}'"
|
||||
},
|
||||
{
|
||||
"type": "shell",
|
||||
"scripts":[
|
||||
"{{template_dir}}/scripts/installers/preimagedata.sh"
|
||||
],
|
||||
"environment_vars": [
|
||||
"IMAGE_VERSION={{user `image_version`}}",
|
||||
"IMAGEDATA_FILE={{user `imagedata_file`}}"
|
||||
],
|
||||
"execute_command": "sudo sh -c '{{ .Vars }} {{ .Path }}'"
|
||||
},
|
||||
{
|
||||
"type": "shell",
|
||||
"scripts": [
|
||||
"{{template_dir}}/scripts/installers/configure-environment.sh"
|
||||
],
|
||||
"environment_vars": [
|
||||
"IMAGE_VERSION={{user `image_version`}}",
|
||||
"IMAGE_OS={{user `image_os`}}"
|
||||
],
|
||||
"execute_command": "sudo sh -c '{{ .Vars }} {{ .Path }}'"
|
||||
},
|
||||
{
|
||||
"type": "shell",
|
||||
"scripts": [
|
||||
"{{template_dir}}/scripts/installers/complete-snap-setup.sh"
|
||||
],
|
||||
"environment_vars": [
|
||||
"HELPER_SCRIPTS={{user `helper_script_folder`}}"
|
||||
],
|
||||
"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": [
|
||||
"{{template_dir}}/scripts/installers/7-zip.sh",
|
||||
"{{template_dir}}/scripts/installers/ansible.sh",
|
||||
"{{template_dir}}/scripts/installers/azcopy.sh",
|
||||
"{{template_dir}}/scripts/installers/basic.sh",
|
||||
"{{template_dir}}/scripts/installers/aliyun-cli.sh",
|
||||
"{{template_dir}}/scripts/installers/aws.sh",
|
||||
"{{template_dir}}/scripts/installers/build-essential.sh",
|
||||
"{{template_dir}}/scripts/installers/clang.sh",
|
||||
"{{template_dir}}/scripts/installers/swift.sh",
|
||||
"{{template_dir}}/scripts/installers/cmake.sh",
|
||||
"{{template_dir}}/scripts/installers/2004/containers.sh",
|
||||
"{{template_dir}}/scripts/installers/docker-compose.sh",
|
||||
"{{template_dir}}/scripts/installers/dotnetcore-sdk.sh",
|
||||
"{{template_dir}}/scripts/installers/erlang.sh",
|
||||
"{{template_dir}}/scripts/installers/firefox.sh",
|
||||
"{{template_dir}}/scripts/installers/gcc.sh",
|
||||
"{{template_dir}}/scripts/installers/gfortran.sh",
|
||||
"{{template_dir}}/scripts/installers/git.sh",
|
||||
"{{template_dir}}/scripts/installers/google-chrome.sh",
|
||||
"{{template_dir}}/scripts/installers/google-cloud-sdk.sh",
|
||||
"{{template_dir}}/scripts/installers/haskell.sh",
|
||||
"{{template_dir}}/scripts/installers/heroku.sh",
|
||||
"{{template_dir}}/scripts/installers/hhvm.sh",
|
||||
"{{template_dir}}/scripts/installers/image-magick.sh",
|
||||
"{{template_dir}}/scripts/installers/java-tools.sh",
|
||||
"{{template_dir}}/scripts/installers/kind.sh",
|
||||
"{{template_dir}}/scripts/installers/kubernetes-tools.sh",
|
||||
"{{template_dir}}/scripts/installers/leiningen.sh",
|
||||
"{{template_dir}}/scripts/installers/mercurial.sh",
|
||||
"{{template_dir}}/scripts/installers/miniconda.sh",
|
||||
"{{template_dir}}/scripts/installers/mono.sh",
|
||||
"{{template_dir}}/scripts/installers/mysql.sh",
|
||||
"{{template_dir}}/scripts/installers/nvm.sh",
|
||||
"{{template_dir}}/scripts/installers/nodejs.sh",
|
||||
"{{template_dir}}/scripts/installers/bazel.sh",
|
||||
"{{template_dir}}/scripts/installers/phantomjs.sh",
|
||||
"{{template_dir}}/scripts/installers/php.sh",
|
||||
"{{template_dir}}/scripts/installers/pollinate.sh",
|
||||
"{{template_dir}}/scripts/installers/postgresql.sh",
|
||||
"{{template_dir}}/scripts/installers/powershellcore.sh",
|
||||
"{{template_dir}}/scripts/installers/ruby.sh",
|
||||
"{{template_dir}}/scripts/installers/rust.sh",
|
||||
"{{template_dir}}/scripts/installers/julia.sh",
|
||||
"{{template_dir}}/scripts/installers/selenium.sh",
|
||||
"{{template_dir}}/scripts/installers/sphinx.sh",
|
||||
"{{template_dir}}/scripts/installers/subversion.sh",
|
||||
"{{template_dir}}/scripts/installers/terraform.sh",
|
||||
"{{template_dir}}/scripts/installers/packer.sh",
|
||||
"{{template_dir}}/scripts/installers/vcpkg.sh",
|
||||
"{{template_dir}}/scripts/installers/zeit-now.sh",
|
||||
"{{template_dir}}/scripts/installers/dpkg-config.sh",
|
||||
"{{template_dir}}/scripts/installers/rndgenerator.sh"
|
||||
],
|
||||
"environment_vars": [
|
||||
"METADATA_FILE={{user `metadata_file`}}",
|
||||
"HELPER_SCRIPTS={{user `helper_script_folder`}}",
|
||||
"DEBIAN_FRONTEND=noninteractive"
|
||||
],
|
||||
"execute_command": "sudo sh -c '{{ .Vars }} {{ .Path }}'"
|
||||
},
|
||||
{
|
||||
"type": "shell",
|
||||
"scripts": [
|
||||
"{{template_dir}}/scripts/installers/aws-sam-cli.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",
|
||||
"scripts": [
|
||||
"{{template_dir}}/scripts/installers/go.sh"
|
||||
],
|
||||
"environment_vars": [
|
||||
"METADATA_FILE={{user `metadata_file`}}",
|
||||
"HELPER_SCRIPTS={{user `helper_script_folder`}}",
|
||||
"GO_VERSIONS={{user `go_versions`}}",
|
||||
"GO_DEFAULT={{user `go_default`}}"
|
||||
],
|
||||
"execute_command": "chmod +x {{ .Path }}; sudo {{ .Vars }} {{ .Path }}"
|
||||
},
|
||||
{
|
||||
"type": "shell",
|
||||
"scripts":[
|
||||
"{{template_dir}}/scripts/installers/2004/android.sh",
|
||||
"{{template_dir}}/scripts/installers/azpowershell.sh",
|
||||
"{{template_dir}}/scripts/installers/python.sh"
|
||||
],
|
||||
"environment_vars": [
|
||||
"METADATA_FILE={{user `metadata_file`}}",
|
||||
"HELPER_SCRIPTS={{user `helper_script_folder`}}",
|
||||
"INSTALLER_SCRIPT_FOLDER={{user `installer_script_folder`}}",
|
||||
"GITHUB_FEED_TOKEN={{user `github_feed_token`}}"
|
||||
],
|
||||
"execute_command": "sudo sh -c '{{ .Vars }} {{ .Path }}'"
|
||||
},
|
||||
{
|
||||
"type": "shell",
|
||||
"scripts":[
|
||||
"{{template_dir}}/scripts/installers/cleanup.sh"
|
||||
],
|
||||
"execute_command": "sudo sh -c '{{ .Vars }} {{ .Path }}'"
|
||||
},
|
||||
{
|
||||
"type": "file",
|
||||
"source": "{{user `metadata_file`}}",
|
||||
"destination": "{{template_dir}}/Ubuntu2004-README.md",
|
||||
"direction": "download"
|
||||
},
|
||||
{
|
||||
"type": "shell",
|
||||
"scripts":[
|
||||
"{{template_dir}}/scripts/installers/validate-disk-space.sh"
|
||||
],
|
||||
"environment_vars": [
|
||||
"RUN_VALIDATION={{user `run_validation_diskspace`}}"
|
||||
]
|
||||
},
|
||||
{
|
||||
"type": "shell",
|
||||
"inline": [
|
||||
"rm -rf {{user `helper_script_folder`}}",
|
||||
"rm -rf {{user `installer_script_folder`}}",
|
||||
"chmod 755 {{user `image_folder`}}"
|
||||
],
|
||||
"execute_command": "sudo sh -c '{{ .Vars }} {{ .Path }}'"
|
||||
},
|
||||
{
|
||||
"type": "file",
|
||||
"source": "{{template_dir}}/config/ubuntu2004.conf",
|
||||
"destination": "/tmp/"
|
||||
},
|
||||
{
|
||||
"type": "shell",
|
||||
"inline": [
|
||||
"mkdir -p /etc/vsts",
|
||||
"cp /tmp/ubuntu2004.conf /etc/vsts/machine_instance.conf"
|
||||
],
|
||||
"execute_command": "sudo sh -c '{{ .Vars }} {{ .Path }}'"
|
||||
},
|
||||
{
|
||||
"type": "shell",
|
||||
"inline": [
|
||||
"sleep 30",
|
||||
"/usr/sbin/waagent -force -deprovision+user && export HISTSIZE=0 && sync"
|
||||
],
|
||||
"execute_command": "sudo sh -c '{{ .Vars }} {{ .Path }}'"
|
||||
}
|
||||
]
|
||||
}
|
||||
Reference in New Issue
Block a user