Merge remote-tracking branch 'upstream/main' into v-vlsafo/macos-remove-announcements-from-generation

This commit is contained in:
Vladimir Safonkin
2020-11-17 15:31:00 +03:00
14 changed files with 60 additions and 57 deletions

View File

@@ -18,18 +18,33 @@ function Get-MySQLVersion {
return "MySQL $mySQLVersion"
}
function Get-SQLCmdVersion {
$sqlcmdVersion = sqlcmd -? | Select-String -Pattern "Version" | Take-OutputPart -Part 1
return "sqlcmd $sqlcmdVersion"
}
function Build-MySQLSection {
$output = ""
$output += New-MDHeader "MySQL" -Level 4
$output += New-MDList -Style Unordered -Lines @(
(Get-MySQLVersion ),
"MySQL Server (user:root password:root)",
"MS SQL Server Client Tools"
"MySQL Server (user:root password:root)"
)
$output += New-MDCode -Lines @(
"MySQL service is disabled by default. Use the following command as a part of your job to start the service: 'sudo systemctl start mysql.service'"
)
return $output
}
function Build-MSSQLToolsSection {
$output = ""
$output += New-MDHeader "MS SQL Server Client Tools" -Level 4
$output += New-MDList -Style Unordered -Lines @(
(Get-SQLCmdVersion)
)
return $output
}

View File

@@ -21,13 +21,6 @@ Restore-UserOwner
$markdown = ""
if ($env:ANNOUNCEMENTS) {
$markdown += $env:ANNOUNCEMENTS
$markdown += New-MDNewLine
$markdown += "***"
$markdown += New-MDNewLine
}
$OSName = Get-OSName
$markdown += New-MDHeader "$OSName" -Level 1
@@ -215,6 +208,7 @@ $markdown += New-MDList -Style Unordered -Lines @(
)
$markdown += Build-MySQLSection
$markdown += Build-MSSQLToolsSection
$markdown += New-MDHeader "Cached Tools" -Level 3
$markdown += Build-CachedToolsSection

View File

@@ -23,7 +23,16 @@ apt-get remove unattended-upgrades
# Install aria2 and jq
apt-get install aria2
apt-get install jq
# Use apt-fast for parallel downloads
add-apt-repository -y ppa:apt-fast/stable
# Need to limit arch for default apt repos due to
# https://github.com/actions/virtual-environments/issues/1961
sed -i'' -E 's/^deb http:\/\/(azure.archive|security).ubuntu.com/deb [arch=amd64,i386] http:\/\/\1.ubuntu.com/' /etc/apt/sources.list
echo 'APT sources limited to the actual architectures'
cat /etc/apt/sources.list
apt-get update
apt-get install apt-fast

View File

@@ -0,0 +1,18 @@
#!/bin/bash -e
################################################################################
## File: mssql-cmd-tools.sh
## Desc: Install MS SQL Server client tools (https://docs.microsoft.com/en-us/sql/linux/sql-server-linux-setup-tools?view=sql-server-2017)
################################################################################
export ACCEPT_EULA=Y
apt-get update
apt-get install -y mssql-tools unixodbc-dev
apt-get -f install
ln -s /opt/mssql-tools/bin/* /usr/local/bin/
echo "Testing to make sure that script performed as expected, and basic scenarios work"
if ! command -v sqlcmd; then
echo "sqlcmd was not installed"
exit 1
fi

View File

@@ -31,11 +31,6 @@ apt-get install -y mysql-server
#Install MySQL Dev tools
apt install libmysqlclient-dev -y
# Install MS SQL Server client tools (https://docs.microsoft.com/en-us/sql/linux/sql-server-linux-setup-tools?view=sql-server-2017)
apt-get install -y mssql-tools unixodbc-dev
apt-get -f install
ln -s /opt/mssql-tools/bin/* /usr/local/bin/
# Run tests to determine that the software installed as expected
echo "Testing to make sure that script performed as expected, and basic scenarios work"
if ! command -v mysql; then

View File

@@ -73,6 +73,7 @@
{
"name": "az",
"versions": [
"3.8.0",
"4.8.0"
]
}

View File

@@ -21,8 +21,7 @@
"image_version": "dev",
"image_os": "ubuntu16",
"github_feed_token": null,
"run_validation_diskspace": "false",
"announcements": "{{env `ANNOUNCEMENTS`}}"
"run_validation_diskspace": "false"
},
"sensitive-variables": [
"client_secret",
@@ -190,6 +189,7 @@
"{{template_dir}}/scripts/installers/miniconda.sh",
"{{template_dir}}/scripts/installers/mono.sh",
"{{template_dir}}/scripts/installers/mysql.sh",
"{{template_dir}}/scripts/installers/mssql-cmd-tools.sh",
"{{template_dir}}/scripts/installers/nodejs.sh",
"{{template_dir}}/scripts/installers/bazel.sh",
"{{template_dir}}/scripts/installers/oras-cli.sh",
@@ -312,8 +312,7 @@
],
"environment_vars": [
"IMAGE_VERSION={{user `image_version`}}",
"INSTALLER_SCRIPT_FOLDER={{user `installer_script_folder`}}",
"ANNOUNCEMENTS={{user `announcements`}}"
"INSTALLER_SCRIPT_FOLDER={{user `installer_script_folder`}}"
]
},
{

View File

@@ -21,8 +21,7 @@
"image_version": "dev",
"image_os": "ubuntu18",
"github_feed_token": null,
"run_validation_diskspace": "false",
"announcements": "{{env `ANNOUNCEMENTS`}}"
"run_validation_diskspace": "false"
},
"sensitive-variables": [
"client_secret",
@@ -193,6 +192,7 @@
"{{template_dir}}/scripts/installers/miniconda.sh",
"{{template_dir}}/scripts/installers/mono.sh",
"{{template_dir}}/scripts/installers/mysql.sh",
"{{template_dir}}/scripts/installers/mssql-cmd-tools.sh",
"{{template_dir}}/scripts/installers/nvm.sh",
"{{template_dir}}/scripts/installers/nodejs.sh",
"{{template_dir}}/scripts/installers/bazel.sh",
@@ -316,8 +316,7 @@
],
"environment_vars": [
"IMAGE_VERSION={{user `image_version`}}",
"INSTALLER_SCRIPT_FOLDER={{user `installer_script_folder`}}",
"ANNOUNCEMENTS={{user `announcements`}}"
"INSTALLER_SCRIPT_FOLDER={{user `installer_script_folder`}}"
]
},
{

View File

@@ -23,8 +23,7 @@
"github_feed_token": null,
"run_validation_diskspace": "false",
"go_default": "1.14",
"go_versions": "1.14",
"announcements": "{{env `ANNOUNCEMENTS`}}"
"go_versions": "1.14"
},
"sensitive-variables": [
"client_secret",
@@ -203,6 +202,7 @@
"{{template_dir}}/scripts/installers/miniconda.sh",
"{{template_dir}}/scripts/installers/mono.sh",
"{{template_dir}}/scripts/installers/mysql.sh",
"{{template_dir}}/scripts/installers/mssql-cmd-tools.sh",
"{{template_dir}}/scripts/installers/nvm.sh",
"{{template_dir}}/scripts/installers/nodejs.sh",
"{{template_dir}}/scripts/installers/bazel.sh",
@@ -326,8 +326,7 @@
],
"environment_vars": [
"IMAGE_VERSION={{user `image_version`}}",
"INSTALLER_SCRIPT_FOLDER={{user `installer_script_folder`}}",
"ANNOUNCEMENTS={{user `announcements`}}"
"INSTALLER_SCRIPT_FOLDER={{user `installer_script_folder`}}"
]
},
{

View File

@@ -4,16 +4,4 @@ echo "Installing GCC@8 using homebrew..."
brew install gcc@8
echo "Installing GCC@9 using homebrew..."
brew install gcc@9
# Known issue with brew that prevent installation of multiple formulas
# https://github.com/Homebrew/brew/issues/9100
echo "Applying workaround for the GCC"
cellarPath=$(brew --cellar gcc@8)
gccVersion=$(ls $cellarPath | head -n1)
fullCellarPath=$cellarPath/$gccVersion
ln -s $fullCellarPath/bin/c++-8 /usr/local/bin/c++-8
ln -s $fullCellarPath/bin/cpp-8 /usr/local/bin/cpp-8
ln -s $fullCellarPath/bin/g++-8 /usr/local/bin/g++-8
ln -s $fullCellarPath/bin/gcc-8 /usr/local/bin/gcc-8
ln -s $fullCellarPath/bin/gfortran-8 /usr/local/bin/gfortran-8
brew install gcc@9

View File

@@ -1,3 +0,0 @@
| Announcements |
|:-:|
| [Replace SVN (1.8.17) by TortoiseSVN (1.14.x) on Windows images](https://github.com/actions/virtual-environments/issues/1318) |

View File

@@ -10,13 +10,6 @@ Import-Module (Join-Path $PSScriptRoot "SoftwareReport.VisualStudio.psm1") -Disa
$markdown = ""
if ($env:ANNOUNCEMENTS) {
$markdown += $env:ANNOUNCEMENTS
$markdown += New-MDNewLine
$markdown += "***"
$markdown += New-MDNewLine
}
$OSName = Get-OSName
$markdown += New-MDHeader "$OSName" -Level 1

View File

@@ -26,8 +26,7 @@
"capture_name_prefix": "packer",
"image_version": "dev",
"image_os": "win16",
"github_feed_token": "{{env `GITHUB_FEED_TOKEN`}}",
"announcements": "{{env `ANNOUNCEMENTS`}}"
"github_feed_token": "{{env `GITHUB_FEED_TOKEN`}}"
},
"sensitive-variables": [
"install_password",
@@ -362,8 +361,7 @@
"pwsh -File '{{user `image_folder`}}\\SoftwareReport\\SoftwareReport.Generator.ps1'"
],
"environment_vars": [
"TOOLSET_JSON_PATH={{user `toolset_json_path`}}",
"ANNOUNCEMENTS={{user `announcements`}}"
"TOOLSET_JSON_PATH={{user `toolset_json_path`}}"
]
},
{

View File

@@ -26,8 +26,7 @@
"capture_name_prefix": "packer",
"image_version": "dev",
"image_os": "win19",
"github_feed_token": "{{env `GITHUB_FEED_TOKEN`}}",
"announcements": "{{env `ANNOUNCEMENTS`}}"
"github_feed_token": "{{env `GITHUB_FEED_TOKEN`}}"
},
"sensitive-variables": [
"install_password",
@@ -360,8 +359,7 @@
"pwsh -File '{{user `image_folder`}}\\SoftwareReport\\SoftwareReport.Generator.ps1'"
],
"environment_vars": [
"TOOLSET_JSON_PATH={{user `toolset_json_path`}}",
"ANNOUNCEMENTS={{user `announcements`}}"
"TOOLSET_JSON_PATH={{user `toolset_json_path`}}"
]
},
{