Merge branch 'main' of https://github.com/actions/virtual-environments into v-malob/xcode

This commit is contained in:
Maxim Lobanov
2020-11-17 11:59:19 +03:00
14 changed files with 67 additions and 52 deletions
@@ -41,6 +41,14 @@ jobs:
-VirtualNetworkSubnet $(BUILD_AGENT_SUBNET_NAME) ` -VirtualNetworkSubnet $(BUILD_AGENT_SUBNET_NAME) `
-GitHubFeedToken $(GITHUB_TOKEN) -GitHubFeedToken $(GITHUB_TOKEN)
- task: PowerShell@2
displayName: 'Output Readme file content'
inputs:
targetType: 'inline'
script: |
$docsPath = Get-ChildItem -Path "images" -Include ${{ parameters.image_readme_name }} -Recurse -Depth 1 | Select-Object -First 1
Get-Content -Path $docsPath
- task: PowerShell@2 - task: PowerShell@2
displayName: 'Create release for VM deployment' displayName: 'Create release for VM deployment'
inputs: inputs:
@@ -53,14 +61,6 @@ jobs:
-ImageName ${{ parameters.image_type }} ` -ImageName ${{ parameters.image_type }} `
-AccessToken $(RELEASE_TARGET_TOKEN) -AccessToken $(RELEASE_TARGET_TOKEN)
- task: PowerShell@2
displayName: 'Output Readme file content'
inputs:
targetType: 'inline'
script: |
$docsPath = Get-ChildItem -Path "images" -Include ${{ parameters.image_readme_name }} -Recurse -Depth 1 | Select-Object -First 1
Get-Content -Path $docsPath
- task: PowerShell@2 - task: PowerShell@2
displayName: 'Clean up resources' displayName: 'Clean up resources'
condition: always() condition: always()
@@ -18,14 +18,18 @@ 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'"
@@ -33,3 +37,14 @@ function Build-MySQLSection {
return $output 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
}
@@ -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`}}"
] ]
}, },
{ {
-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`}}"
] ]
}, },
{ {