From 5282793d8b9fa6a52ca4acbc995f86f6a39634a8 Mon Sep 17 00:00:00 2001 From: Hutson Betts Date: Wed, 7 Oct 2020 23:11:54 -0500 Subject: [PATCH] refactor(windows): consistent file naming Use the same file naming scheme for Windows as is used for Ubuntu, where the file name includes the Operating System name and release, but not the target platform. This also encourages downstream consumers to re-use the same files with alternative targets by extending the `builders` section and using the `-only` command line option with Packer to specify the build target. Closes #1636 --- helpers/GenerateResourcesAndImage.ps1 | 4 ++-- images.CI/linux-and-win/azure-pipelines/windows2016.yml | 2 +- images.CI/linux-and-win/azure-pipelines/windows2019.yml | 2 +- images/win/{Windows2016-Azure.json => windows2016.json} | 0 images/win/{Windows2019-Azure.json => windows2019.json} | 0 5 files changed, 4 insertions(+), 4 deletions(-) rename images/win/{Windows2016-Azure.json => windows2016.json} (100%) rename images/win/{Windows2019-Azure.json => windows2019.json} (100%) diff --git a/helpers/GenerateResourcesAndImage.ps1 b/helpers/GenerateResourcesAndImage.ps1 index 9718bc35a..57c4675d2 100644 --- a/helpers/GenerateResourcesAndImage.ps1 +++ b/helpers/GenerateResourcesAndImage.ps1 @@ -20,10 +20,10 @@ Function Get-PackerTemplatePath { switch ($ImageType) { ([ImageType]::Windows2016) { - $relativePath = "\images\win\Windows2016-Azure.json" + $relativePath = "\images\win\windows2016.json" } ([ImageType]::Windows2019) { - $relativePath = "\images\win\Windows2019-Azure.json" + $relativePath = "\images\win\windows2019.json" } ([ImageType]::Ubuntu1604) { $relativePath = "\images\linux\ubuntu1604.json" diff --git a/images.CI/linux-and-win/azure-pipelines/windows2016.yml b/images.CI/linux-and-win/azure-pipelines/windows2016.yml index 39d013f99..0220a38f2 100644 --- a/images.CI/linux-and-win/azure-pipelines/windows2016.yml +++ b/images.CI/linux-and-win/azure-pipelines/windows2016.yml @@ -16,5 +16,5 @@ pr: jobs: - template: image-generation.yml parameters: - image_type: Windows2016-Azure + image_type: windows2016 image_readme_name: Windows2016-Readme.md \ No newline at end of file diff --git a/images.CI/linux-and-win/azure-pipelines/windows2019.yml b/images.CI/linux-and-win/azure-pipelines/windows2019.yml index 01f65c0ec..ccad8f882 100644 --- a/images.CI/linux-and-win/azure-pipelines/windows2019.yml +++ b/images.CI/linux-and-win/azure-pipelines/windows2019.yml @@ -16,5 +16,5 @@ pr: jobs: - template: image-generation.yml parameters: - image_type: Windows2019-Azure + image_type: windows2019 image_readme_name: Windows2019-Readme.md \ No newline at end of file diff --git a/images/win/Windows2016-Azure.json b/images/win/windows2016.json similarity index 100% rename from images/win/Windows2016-Azure.json rename to images/win/windows2016.json diff --git a/images/win/Windows2019-Azure.json b/images/win/windows2019.json similarity index 100% rename from images/win/Windows2019-Azure.json rename to images/win/windows2019.json