Commit Graph
18523 Commits
Author SHA1 Message Date
Steven Kalt bb5cdbee3c backport of commit db28daa33f 2024-05-31 14:59:09 +00:00
hc-github-team-packer fd40b14652 Merge pull request #13010 from hashicorp/backport/patch-1/slowly-suitable-aphid
This pull request was automerged via backport-assistant
2024-05-31 08:16:26 -07:00
Steven Kalt 4ec49bf8c5 backport of commit db28daa33f 2024-05-31 14:59:09 +00:00
hc-github-team-packer 097c3a4fba Merge pull request #13007 from hashicorp/backport/bump-1.11-release-date/accurately-usable-goose
This pull request was automerged via backport-assistant
v1.11.0
2024-05-31 06:18:42 -07:00
Lucas Bajolet 8bbfa7bae5 version: cut release 1.11.0 2024-05-31 06:10:21 -04:00
Wilken Rivera 17942cd610 backport of commit 2cd68ee99e 2024-05-31 10:09:13 +00:00
hc-github-team-packer d11a0e909c Merge pull request #13005 from hashicorp/backport/script_prep_changelog_rm_wait/sharply-dashing-mayfly
This pull request was automerged via backport-assistant
2024-05-31 02:49:39 -07:00
Lucas Bajolet 4b1e82f01d backport of commit f06612d846 2024-05-30 17:43:34 +00:00
hc-github-team-packer 556876c71e Merge pull request #13003 from hashicorp/backport/bump_changelog_1.11.0/actively-central-condor
This pull request was automerged via backport-assistant
2024-05-30 10:36:06 -07:00
Lucas Bajolet acb4219dd8 backport of commit 9079371765 2024-05-30 15:42:32 +00:00
Lucas Bajolet 2e427610f0 backport of commit 47b7813def 2024-05-30 13:56:52 +00:00
Lucas Bajolet b4a843c4e2 commands: reject constraints with pre-releases (#12999)
When remotely installing a plugin, constraints are used by Packer to
determine which version of a plugin to install.

These constraints can be arbitrarily complex, including operators and
ranges in which to look for valid versions.

However, the versions specified in those constraints should always be
final releases, and not a pre-release since we don't explicitly support
remotely installing pre-releases.

This commit therefore addds checks to make sure these are reported ASAP,
even before the source is contacted to list releases and picking one to
install.
2024-05-30 14:25:21 +02:00
Lucas Bajolet 8d4a9d66ab config: rm mono-component support from config file (#12998)
The global `PACKER_CONFIG` config file was already deprecated from
Packer core, but now with 1.11.0 since we remove support for
mono-component plugins, we are also removing the capability for that
config file to declare them.

Instead of silently not using those, Packer will now error with a
message pointing to the web docs on how to manage their plugins with the
updated workflows for Packer 1.11 and above.
2024-05-30 14:25:08 +02:00
Lucas Bajolet accbe97e1e hcl2template: add text(encode|decode)base64 funcs (#12997)
Compared to Terraform, Packer was lacking a capability to encode/decode
strings to/from base64-encoded text encoded with another encoding.

This could be problematic in some cases, mainly when working with
Windows, as most of the OS uses UTF-16LE as its standard encoding for
many operations.

Therefore, we take a page from Terraform here, and add those functions
to what Packer supports in an HCL2 context.
2024-05-30 14:24:46 +02:00
Wilken Rivera 92aabc7c2e Bump github.com/hashicorp/go-getter/v2 modules to v2.2.2 2024-05-22 09:25:43 -04:00
Lucas Bajolet 5d43239654 datasource/http: don't error on 2xx code
When a server returns a code that is not 200, we error in the current
state.

This is not conformant to the HTTP norm, as anything in the 2xx range is
considered a success, so the datasource should not error in this case.

Therefore, this commit fixes the condition in which we report an error,
so that anything in the 2xx range is now considered a success by the
datasource.
2024-05-21 14:26:26 -04:00
dependabot[bot] 493ddb1f2b build(deps): bump github.com/hashicorp/hcp-sdk-go from 0.95.0 to 0.96.0
Bumps [github.com/hashicorp/hcp-sdk-go](https://github.com/hashicorp/hcp-sdk-go) from 0.95.0 to 0.96.0.
- [Release notes](https://github.com/hashicorp/hcp-sdk-go/releases)
- [Changelog](https://github.com/hashicorp/hcp-sdk-go/blob/main/CHANGELOG.md)
- [Commits](https://github.com/hashicorp/hcp-sdk-go/compare/v0.95.0...v0.96.0)

---
updated-dependencies:
- dependency-name: github.com/hashicorp/hcp-sdk-go
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <[email protected]>
2024-05-20 12:39:47 -04:00
Lucas Bajolet a9ba14f505 website: fix myawesomecloud reference
When updating the docs in prevision for Packer 1.11.0, we changed the
templates that show how plugins are installed/discovered with commands
like packer init.

While doing so, a template had its component renamed to coolcloud, but
the following prose did not change, making the text inconsistent.

Since there are other mentions of myawesomecloud in the codebase, we
choose to settle on this one for that example too.
2024-05-20 12:39:14 -04:00
Wilken Rivera f1efdee2dd Bump Go version to 1.12.10 to address CVE-2024-24787
Packer does not rely on CGO and is not susceptible to CVE-2024-24787 vulnerabilities,
but we are upgrading as a safeguard.
2024-05-17 10:21:10 -04:00
Lucas Bajolet 97db9d82c4 packer: fix splitting error message on pathsep 2024-05-16 13:27:50 -04:00
Lucas Bajolet ec92d231bc packer: use filepath for getting plugin basename
When Discovering plugins installed through the `Discover` function, we
use the base name of the plugin binary we discovered preliminarly, then
we match its name against a regex to extract the prefix for the plugin's
components.

Extracting the base path used to be done with `path.Base`, which while
working perfectly on UNIX systems, does not on Windows as it uses `\\`
as their path separator.

To circumvent this problem, we use the `filepath` package to extract the
base name of the plugin instead, making the discovery logic work again
on Windows.
2024-05-16 13:27:50 -04:00
Lucas Bajolet a852434410 packer: fix listing on windows with .exe ext
Listing installed plugins on Windows requires the extension to be set in
the ListOptions, otherwise they are not discovered.

While working on the discovery code, and consolidating it in a single
location, we've forgotten to pass the argument to ListInstallations, so
that makes it impossible to automatically discover installed components
on Windows.

This commit fixes this issue for the plugins required, and the general
discovery process during build/validate.
2024-05-16 13:27:50 -04:00
Lucas Bajolet 682968d0df packer: don't load plugins with metadata in name
If a plugin is installed in the PACKER_PLUGIN_PATH, and its version
contains metadata, we reject it. This is because metadata is free-form
data, which could then make it possible to have multiple conflicting
versions of a plugin installed, so we don't support it and explicitely
reject plugins like those.

A valid plugin with metadata in its version information should be
installed without its metadata part, so there can only be one variant of
the plugin installed at a specific version.
2024-05-16 13:03:29 -04:00
Wilken Rivera e161367e28 Update CHANGELOG 2024-05-15 14:50:41 -04:00
Wilken Rivera a7591c950a Add details on the importance of using required_plugins 2024-05-15 14:50:24 -04:00
Wilken Rivera 27b5f27ec9 Add section for Non-GitHub source addresses 2024-05-15 14:50:24 -04:00
Wilken Rivera ce7205ed79 required_plugins:Add source addresses section
* Document the purpose of a source address
* Add a note about non-GitHub source addresses containing one of more sub-folder parts
2024-05-15 14:50:24 -04:00
Wilken Rivera 4015e4d7be init:Document force flag option for init command 2024-05-15 14:50:24 -04:00
Lucas Bajolet ec682afc4a addrs: require at least 3 parts to source URIs 2024-05-15 14:12:41 -04:00
Estelle PoulinandWilken Rivera 47d8df33e9 Update Example of Parsing a Manifest to Use Only jq (#12894)
* Update manifest.mdx

* Remove extra space in split function

---------

Co-authored-by: Wilken Rivera <[email protected]>
2024-05-15 11:27:30 -04:00