Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Removing 'ImageVersion' as an env var as we already use 'IMAGE_VERSION' #2509

Merged
merged 6 commits into from
Jan 27, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions images/win/scripts/Installers/Initialize-VM.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -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"

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
11 changes: 3 additions & 8 deletions images/win/windows2016.json
Original file line number Diff line number Diff line change
Expand Up @@ -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`}}"
],
Expand All @@ -134,13 +135,6 @@
"type": "windows-restart",
"restart_timeout": "30m"
},
{
"type": "powershell",
"inline": [
"setx ImageVersion {{user `image_version` }} /m",
jmos5156 marked this conversation as resolved.
Show resolved Hide resolved
"setx ImageOS {{user `image_os` }} /m"
]
},
{
"type": "powershell",
"environment_vars": [
Expand Down Expand Up @@ -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`}}"
]
},
Expand Down
11 changes: 3 additions & 8 deletions images/win/windows2019.json
Original file line number Diff line number Diff line change
Expand Up @@ -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`}}"
],
Expand All @@ -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"
Expand Down Expand Up @@ -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`}}"
]
},
Expand Down