diff --git a/.vsts-ci/ltsReleaseStage.yml b/.vsts-ci/ltsReleaseStage.yml index 41c10e618..eaea6c56e 100644 --- a/.vsts-ci/ltsReleaseStage.yml +++ b/.vsts-ci/ltsReleaseStage.yml @@ -106,7 +106,6 @@ stages: imageName: nanoserver1809 artifactSuffix: nanoserver1809 poolOS: 'windows' - poolHostArchitecture: 'amd64' maxParallel: 3 channel: ${{ parameters.channel }} channelPath: ${{ parameters.channelPath }} @@ -116,7 +115,8 @@ stages: imageName: nanoserver2022 artifactSuffix: nanoserver2022 poolOS: 'windows' - poolHostArchitecture: 'amd64' + poolHostVersion: '1ESWindows2022' + windowsContainerImageValue: 'onebranch.azurecr.io/windows/ltsc2022/vse2022:latest' maxParallel: 3 channel: ${{ parameters.channel }} channelPath: ${{ parameters.channelPath }} @@ -126,7 +126,8 @@ stages: imageName: windowsserver2022 artifactSuffix: windowsserver2022 poolOS: 'windows' - poolHostArchitecture: 'amd64' + poolHostVersion: '1ESWindows2022' + windowsContainerImageValue: 'onebranch.azurecr.io/windows/ltsc2022/vse2022:latest' maxParallel: 3 channel: ${{ parameters.channel }} channelPath: ${{ parameters.channelPath }} @@ -136,7 +137,8 @@ stages: imageName: windowsservercore2022 artifactSuffix: windowsservercore2022 poolOS: 'windows' - poolHostArchitecture: 'amd64' + poolHostVersion: '1ESWindows2022' + windowsContainerImageValue: 'onebranch.azurecr.io/windows/ltsc2022/vse2022:latest' maxParallel: 3 channel: ${{ parameters.channel }} channelPath: ${{ parameters.channelPath }} @@ -170,16 +172,6 @@ stages: buildKitValue: 1 channel: ${{ parameters.channel }} channelPath: ${{ parameters.channelPath }} - - template: /.vsts-ci/releasePhase.yml@self - parameters: - archName: 'Build_linux_amd64' - imageName: mariner2\test-deps - artifactSuffix: mariner2_test_deps - poolOS: 'linux' - poolHostArchitecture: 'amd64' - buildKitValue: 1 - channel: ${{ parameters.channel }} - channelPath: ${{ parameters.channelPath }} - template: /.vsts-ci/releasePhase.yml@self parameters: archName: 'Build_linux_amd64' diff --git a/.vsts-ci/previewReleaseStage.yml b/.vsts-ci/previewReleaseStage.yml index 39c96e06b..e3669c09e 100644 --- a/.vsts-ci/previewReleaseStage.yml +++ b/.vsts-ci/previewReleaseStage.yml @@ -136,7 +136,8 @@ stages: imageName: windowsserver2022 artifactSuffix: windowsserver2022 poolOS: 'windows' - poolHostArchitecture: 'amd64' + poolHostVersion: '1ESWindows2022' + windowsContainerImageValue: 'onebranch.azurecr.io/windows/ltsc2022/vse2022:latest' maxParallel: 3 channel: ${{ parameters.channel }} channelPath: ${{ parameters.channelPath }} @@ -146,7 +147,8 @@ stages: imageName: windowsservercore2022 artifactSuffix: windowsservercore2022 poolOS: 'windows' - poolHostArchitecture: 'amd64' + poolHostVersion: '1ESWindows2022' + windowsContainerImageValue: 'onebranch.azurecr.io/windows/ltsc2022/vse2022:latest' maxParallel: 3 channel: ${{ parameters.channel }} channelPath: ${{ parameters.channelPath }} @@ -190,16 +192,6 @@ stages: buildKitValue: 1 channel: ${{ parameters.channel }} channelPath: ${{ parameters.channelPath }} - - template: /.vsts-ci/releasePhase.yml@self - parameters: - archName: 'Build_linux_amd64' - imageName: mariner2\test-deps - artifactSuffix: mariner2_test_deps - poolOS: 'linux' - poolHostArchitecture: 'amd64' - buildKitValue: 1 - channel: ${{ parameters.channel }} - channelPath: ${{ parameters.channelPath }} - template: /.vsts-ci/releasePhase.yml@self parameters: archName: 'Build_linux_amd64' diff --git a/.vsts-ci/stableReleaseStage.yml b/.vsts-ci/stableReleaseStage.yml index 7bc0619a6..c3e2e8791 100644 --- a/.vsts-ci/stableReleaseStage.yml +++ b/.vsts-ci/stableReleaseStage.yml @@ -136,7 +136,8 @@ stages: imageName: windowsserver2022 artifactSuffix: windowsserver2022 poolOS: 'windows' - poolHostArchitecture: 'amd64' + poolHostVersion: '1ESWindows2022' + windowsContainerImageValue: 'onebranch.azurecr.io/windows/ltsc2022/vse2022:latest' maxParallel: 3 channel: ${{ parameters.channel }} channelPath: ${{ parameters.channelPath }} @@ -146,7 +147,8 @@ stages: imageName: windowsservercore2022 artifactSuffix: windowsservercore2022 poolOS: 'windows' - poolHostArchitecture: 'amd64' + poolHostVersion: '1ESWindows2022' + windowsContainerImageValue: 'onebranch.azurecr.io/windows/ltsc2022/vse2022:latest' maxParallel: 3 channel: ${{ parameters.channel }} channelPath: ${{ parameters.channelPath }} @@ -190,16 +192,6 @@ stages: buildKitValue: 1 channel: ${{ parameters.channel }} channelPath: ${{ parameters.channelPath }} - - template: /.vsts-ci/releasePhase.yml@self - parameters: - archName: 'Build_linux_amd64' - imageName: mariner2\test-deps - artifactSuffix: mariner2_test_deps - poolOS: 'linux' - poolHostArchitecture: 'amd64' - buildKitValue: 1 - channel: ${{ parameters.channel }} - channelPath: ${{ parameters.channelPath }} - template: /.vsts-ci/releasePhase.yml@self parameters: archName: 'Build_linux_amd64' diff --git a/release/7-2/mariner2/meta.json b/release/7-2/mariner2/meta.json index 58d299216..e88ee86f4 100644 --- a/release/7-2/mariner2/meta.json +++ b/release/7-2/mariner2/meta.json @@ -7,7 +7,6 @@ {"Tag": "2.0"} ], "ShortDistroName": "mariner", - "SubImage": "test-deps", "TestProperties": { "size": 387 }, diff --git a/release/7-2/mariner2/test-deps/docker/Dockerfile b/release/7-2/mariner2/test-deps/docker/Dockerfile deleted file mode 100644 index b099b7844..000000000 --- a/release/7-2/mariner2/test-deps/docker/Dockerfile +++ /dev/null @@ -1,34 +0,0 @@ -# Docker image file that describes an Mariner image with PowerShell and test dependencies -ARG BaseImage=mcr.microsoft.com/powershell:mariner -FROM ${BaseImage} - -# To find which package provides a particular command, run: -# tdnf install dnf-utils -# dnf provides - -# Install dependencies and clean up -RUN --mount=type=cache,target=/var/cache/tdnf \ - # install dependencies - tdnf install -y \ - dnf-utils \ - sudo \ - curl \ - wget \ - # provides ping and trace path - iputils \ - # provides ps - procps-ng \ - unzip \ - git \ - mariner-repos-microsoft-preview \ - net-tools \ - tar \ - util-linux \ - # clean cached data - && tdnf clean all - -ENV POWERSHELL_DISTRIBUTION_CHANNEL=PSDocker-Mariner-2.0 - -# Use PowerShell as the default shell -# Use array to avoid Docker prepending /bin/sh -c -CMD [ "pwsh" ] diff --git a/release/7-2/mariner2/test-deps/meta.json b/release/7-2/mariner2/test-deps/meta.json deleted file mode 100644 index 222c298b0..000000000 --- a/release/7-2/mariner2/test-deps/meta.json +++ /dev/null @@ -1,17 +0,0 @@ -{ - "IsLinux" : true, - "UseLinuxVersion": false, - "SkipGssNtlmSspTests": true, - "osVersion": "Mariner 2.0", - "tagTemplates": [ - "mariner-#shorttag#" - ], - "SubRepository": "test-deps", - "OptionalTests": [ - "test-deps", - "test-deps-redhat" - ], - "TestProperties": { - "size": 760 - } -} diff --git a/release/7-3/mariner2/meta.json b/release/7-3/mariner2/meta.json index 83cce1b2d..8a9cb9b32 100644 --- a/release/7-3/mariner2/meta.json +++ b/release/7-3/mariner2/meta.json @@ -7,7 +7,6 @@ {"Tag": "2.0"} ], "ShortDistroName": "mariner", - "SubImage": "test-deps", "TestProperties": { "size": 332 }, diff --git a/release/7-3/mariner2/test-deps/docker/Dockerfile b/release/7-3/mariner2/test-deps/docker/Dockerfile deleted file mode 100644 index 8cdf20681..000000000 --- a/release/7-3/mariner2/test-deps/docker/Dockerfile +++ /dev/null @@ -1,35 +0,0 @@ -# Docker image file that describes an Mariner image with PowerShell and test dependencies -ARG BaseImage=mcr.microsoft.com/powershell:mariner -FROM ${BaseImage} - -# To find which package provides a particular command, run: -# tdnf install dnf-utils -# dnf provides - -# Install dependencies and clean up -RUN --mount=type=cache,target=/var/cache/tdnf \ - tdnf update -y \ - # install dependencies - && tdnf install -y \ - dnf-utils \ - sudo \ - curl \ - wget \ - # provides ping and trace path - iputils \ - # provides ps - procps-ng \ - unzip \ - git \ - mariner-repos-microsoft-preview \ - net-tools \ - tar \ - util-linux \ - # clean cached data - && tdnf clean all - -ENV POWERSHELL_DISTRIBUTION_CHANNEL=PSDocker-Mariner-2.0 - -# Use PowerShell as the default shell -# Use array to avoid Docker prepending /bin/sh -c -CMD [ "pwsh" ] diff --git a/release/7-3/mariner2/test-deps/meta.json b/release/7-3/mariner2/test-deps/meta.json deleted file mode 100644 index 222c298b0..000000000 --- a/release/7-3/mariner2/test-deps/meta.json +++ /dev/null @@ -1,17 +0,0 @@ -{ - "IsLinux" : true, - "UseLinuxVersion": false, - "SkipGssNtlmSspTests": true, - "osVersion": "Mariner 2.0", - "tagTemplates": [ - "mariner-#shorttag#" - ], - "SubRepository": "test-deps", - "OptionalTests": [ - "test-deps", - "test-deps-redhat" - ], - "TestProperties": { - "size": 760 - } -} diff --git a/release/7-4/mariner2/meta.json b/release/7-4/mariner2/meta.json index a8c48a05c..de4bd4be1 100644 --- a/release/7-4/mariner2/meta.json +++ b/release/7-4/mariner2/meta.json @@ -7,7 +7,6 @@ {"Tag": "2.0"} ], "ShortDistroName": "mariner", - "SubImage": "test-deps", "TestProperties": { "size": 335 }, diff --git a/release/7-4/mariner2/test-deps/docker/Dockerfile b/release/7-4/mariner2/test-deps/docker/Dockerfile deleted file mode 100644 index 396f62ec6..000000000 --- a/release/7-4/mariner2/test-deps/docker/Dockerfile +++ /dev/null @@ -1,35 +0,0 @@ -# Docker image file that describes an Mariner image with PowerShell and test dependencies -ARG BaseImage=mcr.microsoft.com/powershell:mariner -FROM ${BaseImage} - -# To find which package provides a particular command, run: -# tdnf install dnf-utils -# dnf provides - -# Install dependencies and clean up -RUN --mount=type=cache,target=/var/cache/tdnf \ - tdnf update -y --exclude=powershell-preview \ - # install dependencies - && tdnf install -y \ - dnf-utils \ - sudo \ - curl \ - wget \ - # provides ping and trace path - iputils \ - # provides ps - procps-ng \ - unzip \ - git \ - mariner-repos-microsoft-preview \ - net-tools \ - tar \ - util-linux \ - # clean cached data - && tdnf clean all - -ENV POWERSHELL_DISTRIBUTION_CHANNEL=PSDocker-Mariner-2.0 - -# Use PowerShell as the default shell -# Use array to avoid Docker prepending /bin/sh -c -CMD [ "pwsh" ] diff --git a/release/7-4/mariner2/test-deps/meta.json b/release/7-4/mariner2/test-deps/meta.json deleted file mode 100644 index 222c298b0..000000000 --- a/release/7-4/mariner2/test-deps/meta.json +++ /dev/null @@ -1,17 +0,0 @@ -{ - "IsLinux" : true, - "UseLinuxVersion": false, - "SkipGssNtlmSspTests": true, - "osVersion": "Mariner 2.0", - "tagTemplates": [ - "mariner-#shorttag#" - ], - "SubRepository": "test-deps", - "OptionalTests": [ - "test-deps", - "test-deps-redhat" - ], - "TestProperties": { - "size": 760 - } -} diff --git a/release/7-5/mariner2/meta.json b/release/7-5/mariner2/meta.json index a8c48a05c..de4bd4be1 100644 --- a/release/7-5/mariner2/meta.json +++ b/release/7-5/mariner2/meta.json @@ -7,7 +7,6 @@ {"Tag": "2.0"} ], "ShortDistroName": "mariner", - "SubImage": "test-deps", "TestProperties": { "size": 335 }, diff --git a/release/7-5/mariner2/test-deps/docker/Dockerfile b/release/7-5/mariner2/test-deps/docker/Dockerfile deleted file mode 100644 index 396f62ec6..000000000 --- a/release/7-5/mariner2/test-deps/docker/Dockerfile +++ /dev/null @@ -1,35 +0,0 @@ -# Docker image file that describes an Mariner image with PowerShell and test dependencies -ARG BaseImage=mcr.microsoft.com/powershell:mariner -FROM ${BaseImage} - -# To find which package provides a particular command, run: -# tdnf install dnf-utils -# dnf provides - -# Install dependencies and clean up -RUN --mount=type=cache,target=/var/cache/tdnf \ - tdnf update -y --exclude=powershell-preview \ - # install dependencies - && tdnf install -y \ - dnf-utils \ - sudo \ - curl \ - wget \ - # provides ping and trace path - iputils \ - # provides ps - procps-ng \ - unzip \ - git \ - mariner-repos-microsoft-preview \ - net-tools \ - tar \ - util-linux \ - # clean cached data - && tdnf clean all - -ENV POWERSHELL_DISTRIBUTION_CHANNEL=PSDocker-Mariner-2.0 - -# Use PowerShell as the default shell -# Use array to avoid Docker prepending /bin/sh -c -CMD [ "pwsh" ] diff --git a/release/7-5/mariner2/test-deps/meta.json b/release/7-5/mariner2/test-deps/meta.json deleted file mode 100644 index 222c298b0..000000000 --- a/release/7-5/mariner2/test-deps/meta.json +++ /dev/null @@ -1,17 +0,0 @@ -{ - "IsLinux" : true, - "UseLinuxVersion": false, - "SkipGssNtlmSspTests": true, - "osVersion": "Mariner 2.0", - "tagTemplates": [ - "mariner-#shorttag#" - ], - "SubRepository": "test-deps", - "OptionalTests": [ - "test-deps", - "test-deps-redhat" - ], - "TestProperties": { - "size": 760 - } -} diff --git a/tools/buildHelper/buildHelper.psm1 b/tools/buildHelper/buildHelper.psm1 index 92577635b..784cdc63b 100644 --- a/tools/buildHelper/buildHelper.psm1 +++ b/tools/buildHelper/buildHelper.psm1 @@ -1096,15 +1096,16 @@ function Get-TemplatePopulatedYaml { Add-Content -Path $YamlFilePath -Value "$($sixSpace)imageName: $imageName" # ie. imageName: alpine317\test-deps (since this differs from artifactSuffix for test-deps images only, we have a separate entry as the yaml param) Add-Content -Path $YamlFilePath -Value "$($sixSpace)artifactSuffix: $artifactSuffix" # i.e artifactSuffix: alpine317_test_deps Add-Content -Path $YamlFilePath -Value "$($sixSpace)poolOS: '$poolOS'" - Add-Content -Path $YamlFilePath -Value "$($sixSpace)poolHostArchitecture: '$architecture'" if ($poolOS -eq "linux") { + # only need to specify host architecture for the pool for linux + Add-Content -Path $YamlFilePath -Value "$($sixSpace)poolHostArchitecture: '$architecture'" # only need to specify buildKitValue=1 for linux Add-Content -Path $YamlFilePath -Value "$($sixSpace)buildKitValue: 1" } else { - if ($imageName -contains "2022") + if ($imageName.Contains("2022")) { Add-Content -Path $YamlFilePath -Value "$($sixSpace)poolHostVersion: '1ESWindows2022'" Add-Content -Path $YamlFilePath -Value "$($sixSpace)windowsContainerImageValue: 'onebranch.azurecr.io/windows/ltsc2022/vse2022:latest'"