mirror of
https://github.com/actions/runner-images.git
synced 2025-12-13 20:56:47 +00:00
Removing 'ImageVersion' as an env var as we already use 'IMAGE_VERSION' (#2509)
* Removing 'ImageVersion' as an env var as we already use 'IMAGE_VERSION'. The env var is only used SoftwareReport.Generator script. * Adding IMAGE_VERISON to SoftwareReport.Generator * Adding IMAGE_VERISON to SoftwareReport.Generator * Chnaging the way the env vars are used to floow the same pattern throughout Co-authored-by: Jose Mosquera <jose.mosquera@dotdigital.com>
This commit is contained in:
@@ -33,6 +33,10 @@ function Disable-UserAccessControl {
|
||||
# Enable $ErrorActionPreference='Stop' for AllUsersAllHosts
|
||||
Add-Content -Path $profile.AllUsersAllHosts -Value '$ErrorActionPreference="Stop"'
|
||||
|
||||
# Set static env vars
|
||||
setx ImageVersion $env:IMAGE_VERSION /m
|
||||
setx ImageOS $env:IMAGE_OS /m
|
||||
|
||||
# Set TLS1.2
|
||||
[Net.ServicePointManager]::SecurityProtocol = [Net.ServicePointManager]::SecurityProtocol -bor "Tls12"
|
||||
|
||||
|
||||
@@ -17,7 +17,7 @@ $markdown += New-MDHeader "$OSName" -Level 1
|
||||
$OSVersion = Get-OSVersion
|
||||
$markdown += New-MDList -Style Unordered -Lines @(
|
||||
"$OSVersion"
|
||||
"Image Version: $env:ImageVersion"
|
||||
"Image Version: $env:IMAGE_VERSION"
|
||||
)
|
||||
|
||||
if (Test-IsWin19)
|
||||
|
||||
@@ -112,7 +112,8 @@
|
||||
{
|
||||
"type": "powershell",
|
||||
"environment_vars": [
|
||||
"ImageVersion={{user `image_version`}}",
|
||||
"IMAGE_VERSION={{user `image_version`}}",
|
||||
"IMAGE_OS={{user `image_os`}}",
|
||||
"TOOLSET_JSON_PATH={{user `toolset_json_path`}}",
|
||||
"PSMODULES_ROOT_FOLDER={{user `psmodules_root_folder`}}"
|
||||
],
|
||||
@@ -134,13 +135,6 @@
|
||||
"type": "windows-restart",
|
||||
"restart_timeout": "30m"
|
||||
},
|
||||
{
|
||||
"type": "powershell",
|
||||
"inline": [
|
||||
"setx ImageVersion {{user `image_version` }} /m",
|
||||
"setx ImageOS {{user `image_os` }} /m"
|
||||
]
|
||||
},
|
||||
{
|
||||
"type": "powershell",
|
||||
"environment_vars": [
|
||||
@@ -357,6 +351,7 @@
|
||||
"pwsh -File '{{user `image_folder`}}\\SoftwareReport\\SoftwareReport.Generator.ps1'"
|
||||
],
|
||||
"environment_vars": [
|
||||
"IMAGE_VERSION={{user `image_version`}}",
|
||||
"TOOLSET_JSON_PATH={{user `toolset_json_path`}}"
|
||||
]
|
||||
},
|
||||
|
||||
@@ -112,7 +112,8 @@
|
||||
{
|
||||
"type": "powershell",
|
||||
"environment_vars": [
|
||||
"ImageVersion={{user `image_version`}}",
|
||||
"IMAGE_VERSION={{user `image_version`}}",
|
||||
"IMAGE_OS={{user `image_os`}}",
|
||||
"TOOLSET_JSON_PATH={{user `toolset_json_path`}}",
|
||||
"PSMODULES_ROOT_FOLDER={{user `psmodules_root_folder`}}"
|
||||
],
|
||||
@@ -138,13 +139,6 @@
|
||||
"{{ template_dir }}/scripts/Installers/Install-ContainersFeature.ps1"
|
||||
]
|
||||
},
|
||||
{
|
||||
"type": "powershell",
|
||||
"inline": [
|
||||
"setx ImageVersion {{user `image_version` }} /m",
|
||||
"setx ImageOS {{user `image_os` }} /m"
|
||||
]
|
||||
},
|
||||
{
|
||||
"type": "windows-restart",
|
||||
"restart_timeout": "10m"
|
||||
@@ -350,6 +344,7 @@
|
||||
"pwsh -File '{{user `image_folder`}}\\SoftwareReport\\SoftwareReport.Generator.ps1'"
|
||||
],
|
||||
"environment_vars": [
|
||||
"IMAGE_VERSION={{user `image_version`}}",
|
||||
"TOOLSET_JSON_PATH={{user `toolset_json_path`}}"
|
||||
]
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user