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
@@ -18,18 +18,33 @@ function Get-MySQLVersion {
return "MySQL $mySQLVersion" return "MySQL $mySQLVersion"
} }
function Get-SQLCmdVersion {
$sqlcmdVersion = sqlcmd -? | Select-String -Pattern "Version" | Take-OutputPart -Part 1
return "sqlcmd $sqlcmdVersion"
}
function Build-MySQLSection { function Build-MySQLSection {
$output = "" $output = ""
$output += New-MDHeader "MySQL" -Level 4 $output += New-MDHeader "MySQL" -Level 4
$output += New-MDList -Style Unordered -Lines @( $output += New-MDList -Style Unordered -Lines @(
(Get-MySQLVersion ), (Get-MySQLVersion ),
"MySQL Server (user:root password:root)", "MySQL Server (user:root password:root)"
"MS SQL Server Client Tools"
) )
$output += New-MDCode -Lines @( $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'" "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 return $output
} }
@@ -21,13 +21,6 @@ Restore-UserOwner
$markdown = "" $markdown = ""
if ($env:ANNOUNCEMENTS) {
$markdown += $env:ANNOUNCEMENTS
$markdown += New-MDNewLine
$markdown += "***"
$markdown += New-MDNewLine
}
$OSName = Get-OSName $OSName = Get-OSName
$markdown += New-MDHeader "$OSName" -Level 1 $markdown += New-MDHeader "$OSName" -Level 1
@@ -215,6 +208,7 @@ $markdown += New-MDList -Style Unordered -Lines @(
) )
$markdown += Build-MySQLSection $markdown += Build-MySQLSection
$markdown += Build-MSSQLToolsSection
$markdown += New-MDHeader "Cached Tools" -Level 3 $markdown += New-MDHeader "Cached Tools" -Level 3
$markdown += Build-CachedToolsSection $markdown += Build-CachedToolsSection
+9
View File
@@ -23,7 +23,16 @@ apt-get remove unattended-upgrades
# Install aria2 and jq # Install aria2 and jq
apt-get install aria2 apt-get install aria2
apt-get install jq apt-get install jq
# Use apt-fast for parallel downloads # Use apt-fast for parallel downloads
add-apt-repository -y ppa:apt-fast/stable 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 update
apt-get install apt-fast apt-get install apt-fast
@@ -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
-5
View File
@@ -31,11 +31,6 @@ apt-get install -y mysql-server
#Install MySQL Dev tools #Install MySQL Dev tools
apt install libmysqlclient-dev -y 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 # Run tests to determine that the software installed as expected
echo "Testing to make sure that script performed as expected, and basic scenarios work" echo "Testing to make sure that script performed as expected, and basic scenarios work"
if ! command -v mysql; then if ! command -v mysql; then
+1
View File
@@ -73,6 +73,7 @@
{ {
"name": "az", "name": "az",
"versions": [ "versions": [
"3.8.0",
"4.8.0" "4.8.0"
] ]
} }
+3 -4
View File
@@ -21,8 +21,7 @@
"image_version": "dev", "image_version": "dev",
"image_os": "ubuntu16", "image_os": "ubuntu16",
"github_feed_token": null, "github_feed_token": null,
"run_validation_diskspace": "false", "run_validation_diskspace": "false"
"announcements": "{{env `ANNOUNCEMENTS`}}"
}, },
"sensitive-variables": [ "sensitive-variables": [
"client_secret", "client_secret",
@@ -190,6 +189,7 @@
"{{template_dir}}/scripts/installers/miniconda.sh", "{{template_dir}}/scripts/installers/miniconda.sh",
"{{template_dir}}/scripts/installers/mono.sh", "{{template_dir}}/scripts/installers/mono.sh",
"{{template_dir}}/scripts/installers/mysql.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/nodejs.sh",
"{{template_dir}}/scripts/installers/bazel.sh", "{{template_dir}}/scripts/installers/bazel.sh",
"{{template_dir}}/scripts/installers/oras-cli.sh", "{{template_dir}}/scripts/installers/oras-cli.sh",
@@ -312,8 +312,7 @@
], ],
"environment_vars": [ "environment_vars": [
"IMAGE_VERSION={{user `image_version`}}", "IMAGE_VERSION={{user `image_version`}}",
"INSTALLER_SCRIPT_FOLDER={{user `installer_script_folder`}}", "INSTALLER_SCRIPT_FOLDER={{user `installer_script_folder`}}"
"ANNOUNCEMENTS={{user `announcements`}}"
] ]
}, },
{ {
+3 -4
View File
@@ -21,8 +21,7 @@
"image_version": "dev", "image_version": "dev",
"image_os": "ubuntu18", "image_os": "ubuntu18",
"github_feed_token": null, "github_feed_token": null,
"run_validation_diskspace": "false", "run_validation_diskspace": "false"
"announcements": "{{env `ANNOUNCEMENTS`}}"
}, },
"sensitive-variables": [ "sensitive-variables": [
"client_secret", "client_secret",
@@ -193,6 +192,7 @@
"{{template_dir}}/scripts/installers/miniconda.sh", "{{template_dir}}/scripts/installers/miniconda.sh",
"{{template_dir}}/scripts/installers/mono.sh", "{{template_dir}}/scripts/installers/mono.sh",
"{{template_dir}}/scripts/installers/mysql.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/nvm.sh",
"{{template_dir}}/scripts/installers/nodejs.sh", "{{template_dir}}/scripts/installers/nodejs.sh",
"{{template_dir}}/scripts/installers/bazel.sh", "{{template_dir}}/scripts/installers/bazel.sh",
@@ -316,8 +316,7 @@
], ],
"environment_vars": [ "environment_vars": [
"IMAGE_VERSION={{user `image_version`}}", "IMAGE_VERSION={{user `image_version`}}",
"INSTALLER_SCRIPT_FOLDER={{user `installer_script_folder`}}", "INSTALLER_SCRIPT_FOLDER={{user `installer_script_folder`}}"
"ANNOUNCEMENTS={{user `announcements`}}"
] ]
}, },
{ {
+3 -4
View File
@@ -23,8 +23,7 @@
"github_feed_token": null, "github_feed_token": null,
"run_validation_diskspace": "false", "run_validation_diskspace": "false",
"go_default": "1.14", "go_default": "1.14",
"go_versions": "1.14", "go_versions": "1.14"
"announcements": "{{env `ANNOUNCEMENTS`}}"
}, },
"sensitive-variables": [ "sensitive-variables": [
"client_secret", "client_secret",
@@ -203,6 +202,7 @@
"{{template_dir}}/scripts/installers/miniconda.sh", "{{template_dir}}/scripts/installers/miniconda.sh",
"{{template_dir}}/scripts/installers/mono.sh", "{{template_dir}}/scripts/installers/mono.sh",
"{{template_dir}}/scripts/installers/mysql.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/nvm.sh",
"{{template_dir}}/scripts/installers/nodejs.sh", "{{template_dir}}/scripts/installers/nodejs.sh",
"{{template_dir}}/scripts/installers/bazel.sh", "{{template_dir}}/scripts/installers/bazel.sh",
@@ -326,8 +326,7 @@
], ],
"environment_vars": [ "environment_vars": [
"IMAGE_VERSION={{user `image_version`}}", "IMAGE_VERSION={{user `image_version`}}",
"INSTALLER_SCRIPT_FOLDER={{user `installer_script_folder`}}", "INSTALLER_SCRIPT_FOLDER={{user `installer_script_folder`}}"
"ANNOUNCEMENTS={{user `announcements`}}"
] ]
}, },
{ {
+1 -13
View File
@@ -4,16 +4,4 @@ echo "Installing GCC@8 using homebrew..."
brew install gcc@8 brew install gcc@8
echo "Installing GCC@9 using homebrew..." echo "Installing GCC@9 using homebrew..."
brew install gcc@9 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
-3
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) |
@@ -10,13 +10,6 @@ Import-Module (Join-Path $PSScriptRoot "SoftwareReport.VisualStudio.psm1") -Disa
$markdown = "" $markdown = ""
if ($env:ANNOUNCEMENTS) {
$markdown += $env:ANNOUNCEMENTS
$markdown += New-MDNewLine
$markdown += "***"
$markdown += New-MDNewLine
}
$OSName = Get-OSName $OSName = Get-OSName
$markdown += New-MDHeader "$OSName" -Level 1 $markdown += New-MDHeader "$OSName" -Level 1
+2 -4
View File
@@ -26,8 +26,7 @@
"capture_name_prefix": "packer", "capture_name_prefix": "packer",
"image_version": "dev", "image_version": "dev",
"image_os": "win16", "image_os": "win16",
"github_feed_token": "{{env `GITHUB_FEED_TOKEN`}}", "github_feed_token": "{{env `GITHUB_FEED_TOKEN`}}"
"announcements": "{{env `ANNOUNCEMENTS`}}"
}, },
"sensitive-variables": [ "sensitive-variables": [
"install_password", "install_password",
@@ -362,8 +361,7 @@
"pwsh -File '{{user `image_folder`}}\\SoftwareReport\\SoftwareReport.Generator.ps1'" "pwsh -File '{{user `image_folder`}}\\SoftwareReport\\SoftwareReport.Generator.ps1'"
], ],
"environment_vars": [ "environment_vars": [
"TOOLSET_JSON_PATH={{user `toolset_json_path`}}", "TOOLSET_JSON_PATH={{user `toolset_json_path`}}"
"ANNOUNCEMENTS={{user `announcements`}}"
] ]
}, },
{ {
+2 -4
View File
@@ -26,8 +26,7 @@
"capture_name_prefix": "packer", "capture_name_prefix": "packer",
"image_version": "dev", "image_version": "dev",
"image_os": "win19", "image_os": "win19",
"github_feed_token": "{{env `GITHUB_FEED_TOKEN`}}", "github_feed_token": "{{env `GITHUB_FEED_TOKEN`}}"
"announcements": "{{env `ANNOUNCEMENTS`}}"
}, },
"sensitive-variables": [ "sensitive-variables": [
"install_password", "install_password",
@@ -360,8 +359,7 @@
"pwsh -File '{{user `image_folder`}}\\SoftwareReport\\SoftwareReport.Generator.ps1'" "pwsh -File '{{user `image_folder`}}\\SoftwareReport\\SoftwareReport.Generator.ps1'"
], ],
"environment_vars": [ "environment_vars": [
"TOOLSET_JSON_PATH={{user `toolset_json_path`}}", "TOOLSET_JSON_PATH={{user `toolset_json_path`}}"
"ANNOUNCEMENTS={{user `announcements`}}"
] ]
}, },
{ {