Skip to content

Update packer templates with new features #12208

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

Merged
merged 1 commit into from
May 20, 2025

Conversation

Alexey-Ayupov
Copy link
Contributor

Description

This PR prepare Packer templates that will allow a new image version to be published to an existing shared image gallery.
Also new authentication methods are added.

Related issue:

https://github.com/github/hosted-runners-images/issues/92

Check list

  • Related issue / work item is attached
  • Tests are written (if applicable)
  • Documentation is updated (if applicable)
  • Changes are tested and related VM images are successfully generated

@Alexey-Ayupov Alexey-Ayupov marked this pull request as ready for review May 19, 2025 11:37
@Copilot Copilot AI review requested due to automatic review settings May 19, 2025 11:37
Copy link
Contributor

@Copilot Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR updates several Packer templates to support new features including the publishing of new image versions to a shared image gallery and the addition of alternative authentication methods using Azure CLI.

  • Added new variables to specify image details and shared image gallery parameters.
  • Updated the azure-arm source blocks to utilize the new variables and enable Azure CLI authentication.
  • Added a winrm_expiration_time setting (in Windows templates) and new key vault configuration variables.

Reviewed Changes

Copilot reviewed 5 out of 5 changed files in this pull request and generated 1 comment.

Show a summary per file
File Description
images/windows/templates/windows-2025.pkr.hcl Added new image and gallery variables, winrm expiration time, and Azure CLI authentication support.
images/windows/templates/windows-2022.pkr.hcl Similar updates as windows-2025 with appropriate image SKU version changes.
images/windows/templates/windows-2019.pkr.hcl Similar updates as above with version-specific image SKU.
images/ubuntu/templates/ubuntu-24.04.pkr.hcl Added new image and gallery variables and updated the azure-arm block to support Azure CLI authentication and shared gallery configurations.
images/ubuntu/templates/ubuntu-22.04.pkr.hcl Similar updates to ubuntu-24.04 with version-specific image SKU and offer values.
Comments suppressed due to low confidence (1)

images/windows/templates/windows-2025.pkr.hcl:164

  • [nitpick] Verify that the environment variable interpolation syntax used here is compatible with the current Packer version; if necessary, add a comment or update the syntax per the latest documentation.
default = "${env("GALLERY_NAME")}"

@@ -172,6 +228,18 @@ source "azure-arm" "image" {
winrm_insecure = "true"
winrm_use_ssl = "true"
winrm_username = "packer"
winrm_expiration_time = "1440h"
Copy link
Preview

Copilot AI May 19, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[nitpick] Consider adding an inline comment explaining the rationale behind the 1440h winrm_expiration_time value to improve clarity for future maintainers.

Copilot uses AI. Check for mistakes.

@Alexey-Ayupov Alexey-Ayupov merged commit be36d1d into actions:main May 20, 2025
3 checks passed
sangeeths03 pushed a commit to github-maccloud/runner-images that referenced this pull request May 21, 2025
@rafsul
Copy link

rafsul commented May 22, 2025

Were can I find information how to pass this new parameters? and where can I find ADO yaml pipeline definitions for build and deploy new images especially using new parameters?

@Alexey-Ayupov Alexey-Ayupov deleted the update-packer-templates branch July 3, 2025 11:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants