From 38cfc230b19e79b65a5e48ddc57f3d85c554deff Mon Sep 17 00:00:00 2001 From: anshulSharma Date: Wed, 4 Jun 2025 08:15:16 +0530 Subject: [PATCH] docs: add upgrade/release notes for 1.13.0 (#13394) * docs: add upgrade/release notes for 1.13.0 * docs: add upgrade/release notes for 1.13.0 --- website/content/docs/release-notes/v1_13.mdx | 57 ++++++++++++++++++++ website/content/docs/upgrade/v1_13.mdx | 48 +++++++++++++++++ website/data/docs-nav-data.json | 8 +++ 3 files changed, 113 insertions(+) create mode 100644 website/content/docs/release-notes/v1_13.mdx create mode 100644 website/content/docs/upgrade/v1_13.mdx diff --git a/website/content/docs/release-notes/v1_13.mdx b/website/content/docs/release-notes/v1_13.mdx new file mode 100644 index 000000000..83a4ba2ce --- /dev/null +++ b/website/content/docs/release-notes/v1_13.mdx @@ -0,0 +1,57 @@ +--- +page_title: Packer v1.13 release notes +description: Learn about the changes in Packer v 1.13 +--- + +# Packer v1.13 release notes + +This page describes changes to Packer in v1.13. Refer to the [Packer repository](https://github.com/hashicorp/packer/releases) for information about all releases. + +## New features + +This release includes the following updates. + +### Shell Provisioner Enhancement + +The shell provisioner’s inline field now supports executing scripts directly, including those with their own shebang (#!) lines. +This enhancement allows you to provide a full script as an inline command, enabling dynamic scripts via tools like templatefile. + +### New functions + +As part of Packer 1.13, we have introduced below functions. + +* `sum`: takes a list or set of numbers and returns the sum of those numbers.. +* `startswith`: takes two values: a string to check and a prefix string. The function returns true if the string begins with that exact prefix. +* `endswith`: takes two values: a string to check and a suffix string. The function returns true if the first string ends with that exact suffix. + +### Packer fmt command to format multiple HCL files + +Added the ability for the packer fmt command to format multiple HCL files at once. +This enhancement allows users to format several files in a single command invocation. + +### Top-Level hcp_packer_registry Block Support + +Added support for defining the hcp_packer_registry block at the top level of the Packer configuration. Enables improved management and referencing of HCP Packer registries directly in the root schema. +Also added validation around the multiple hcp_packer_registry blocks at top level. + +## Bug fixes + +### Documentation Update + +Updated the documentation to explicitly state that a trailing slash is required when uploading directories, regardless of the guest OS. +This clarification is intended to ensure consistent behavior and prevent confusion, especially for Windows users. + +### --use-sequential-evaluation Flag Now Works in Packer Console + +Fixed an issue where using the --use-sequential-evaluation flag with packer console resulted in an error. +The flag is now properly included in the supported options for packer console and works as intended. +Removed this flag from the fix subcommand, where it was not used or required. + +### Inline PowerShell Command + +Added a wrapper around inline PowerShell commands executed by the provisioner to catch errors and ensure the Packer build fails if any command results in an error. + +### Preserve the user-defined order of variable files + +Ensures that Packer now preserves the user-defined order of variable files as input by the user. +This change maintains the intended precedence of variables, honoring the order specified on the command line. diff --git a/website/content/docs/upgrade/v1_13.mdx b/website/content/docs/upgrade/v1_13.mdx new file mode 100644 index 000000000..abf07f144 --- /dev/null +++ b/website/content/docs/upgrade/v1_13.mdx @@ -0,0 +1,48 @@ +--- +page_title: Upgrade to v1.13 +description: Learn how to upgrade your Packer installation to v1.13 +--- + +# Upgrade to v1.13 + +The topic describes upgrade considerations for Packer v1.13. Refer to the [v1.13 release notes](/packer/docs/release-notes/v1_13) for details about changes in v1.13. + +## Overview + +You can use the upgrade command for the package manager you installed Packer with or download and replace the existing binary to upgrade Packer. Refer to [Install Packer](https://developer.hashicorp.com/packer/install) for instructions. + +## Upgrade from 1.12 + +Packer 1.13's notable changes can be summarised by the following points: + +1. Provisioner Enhancement +2. New functions Support +3. Packer fmt command to format multiple HCL files +4. Top-Level hcp_packer_registry Block Support + +**Note**: The Powershell provisioner changes are breaking changes. + +## Provisioner Enhancement + +The `shell` provisioner’s inline field now supports executing scripts directly, including those with their own shebang (#!) lines. +This enhancement allows you to provide a full script as an inline command, enabling dynamic scripts via tools like templatefile. + +Added a wrapper around inline `PowerShell` commands executed by the provisioner to catch errors and ensure the Packer build fails if any command results in an error. + +## New functions Support + +As part of Packer 1.13, we have introduced more functions. + +* `sum`: takes a list or set of numbers and returns the sum of those numbers.. +* `startswith`: takes two values: a string to check and a prefix string. The function returns true if the string begins with that exact prefix. +* `endswith`: takes two values: a string to check and a suffix string. The function returns true if the first string ends with that exact suffix. + +## Packer fmt command to format multiple HCL files + +Added the ability for the packer fmt command to format multiple HCL files at once. + +## Top-Level hcp_packer_registry Block Support + +Added support for defining the `hcp_packer_registry` block at the top level of the Packer configuration. Enables improved management and referencing of HCP Packer registries directly in the root schema. + + diff --git a/website/data/docs-nav-data.json b/website/data/docs-nav-data.json index d878ec5e3..d396544b5 100644 --- a/website/data/docs-nav-data.json +++ b/website/data/docs-nav-data.json @@ -906,6 +906,10 @@ { "title": "v1.12", "path": "release-notes/v1_12" + }, + { + "title": "v1.13", + "path": "release-notes/v1_13" } ] }, @@ -919,6 +923,10 @@ { "title": "Upgrade to v1.12", "path": "upgrade/v1_12" + }, + { + "title": "Upgrade to v1.13", + "path": "upgrade/v1_13" } ] },