Commit Graph
18348 Commits
Author SHA1 Message Date
cae2c5eb62 Apply suggestions from code review
Co-authored-by: Lucas Bajolet <[email protected]>
Co-authored-by: Sylvia Moss <[email protected]>
2023-12-05 15:31:03 -05:00
Wilken Rivera ea92d8b1f3 Remove reference to deprecated single components 2023-12-05 15:19:41 -05:00
Wilken Rivera 5a96009ba1 Add example shell commands for copying integration files into plugin repository 2023-12-05 15:19:41 -05:00
Wilken Rivera 72385d6b8a Address review feedback 2023-12-05 15:19:41 -05:00
Wilken Rivera 97624ce26e Replace relative links 2023-12-05 15:19:41 -05:00
Wilken Rivera 72bc6c811a Document process for registering a plugin as a Packer Integration 2023-12-05 15:19:41 -05:00
Wilken Rivera 4d5f1a3607 Update CHANGELOG for 1.10.0 release 2023-12-05 10:11:27 -05:00
Lucas Bajolet da97f46958 plugin-getter: don't rely only on version for list
The plugins installed command list installed plugins, and prints out all
their paths and versions.

The results are listed in a list of unique versions, in ascending
order.

When listing plugins outside of a specific identifier however, because
of the insertion in the list works, we only consider the version number,
and ignore all subsequent insertions with the same version.

This causes a problem when we have multiple plugins installed with the
same version, as only the first one that is discovered (typically the
one with lexicographical precedence) gets inserted, and the others are
ignored.

To support such a use case, we change the insertion routine to not only
support versions, but also paths when finding a spot to insert the
installation into.
2023-12-05 09:55:18 -05:00
Wilken Rivera 91a16aa8e0 Remove migrated plugins from old plugin docs framework
This change removes the following plugins from the old docs framework, as
they have been fully migrated to the integrations framework.

* ethanmdavidson/packer-plugin-git
* linode/packer-plugin-linode
* parallels/packer-plugin-parallels
* ivoronin/packer-plugin-sshkey
* cirruslabs/packer-plugin-tart
2023-12-05 09:40:03 -05:00
Lucas Bajolet 97e2e9e637 docs: add exerpt on packer plugins install --path 2023-12-04 16:34:31 -05:00
Lucas Bajolet 8e2a22e583 command: simplify local binary installation
Read original binary into memory to fix case when installation
destination and source were the same, resulting in an empty binary.
2023-12-04 16:34:31 -05:00
Lucas Bajolet e293f2d890 command: plugins install reject non-releases
When installing a plugin with packer plugins install --path, we only
accept release versions of a plugin, as otherwise the loading can be
inconsistent if for example a user specifies a required_plugins block in
their template, in which case the plugins will be ignored.

Until we have a simpler loading scheme then, we will reject non-release
versions of plugins to avoid confusion.
2023-12-04 16:34:31 -05:00
Lucas Bajolet ae5b91864c command: reject version with --path for install
To avoid plugins being installed with a specific version when a path is
used for installing a plugin from a locally sourced plugin binary, we
explicitly reject the combination of both a path and a version for
plugins install.
2023-12-04 16:34:31 -05:00
Lucas Bajolet a2d9c9dce4 command: add --force option to init/install
The --force option for packer init and packer plugins install enforces
installation of a plugin, even if it is already locally installed.

This will become useful if for some reason a pre-existing plugin
binary/version is already installed, and we want to overwrite it.
2023-12-04 16:34:31 -05:00
Lucas Bajolet 6f43a82e02 command: add packer plugins install path flag
This new flag allows the `packer plugins install' command to install a
plugin from a local binary rather than from Github.

This command will only call `describe' on the plugin, and won't do any
further checks for functionality. The SHA256SUM will be directly
computed from the binary, so as with anything manual and potentially
sourced by the community, extra care should be applied when invoking
this.
2023-12-04 16:34:31 -05:00
Wilken Rivera 327d8a4f73 Update CHANGELOG for upcoming releases 2023-12-04 14:53:51 -05:00
Lucas Bajolet 24430e27be docs: reorganise plugin installation docs
The current documentation about installing plugins does not explain
(outside of the `packer init' section) how Packer discovers plugins,
what the expected file system hierarchy should be, and the quirk of how
this takes precedence over the rest when `required_plugins' is
specified.

This commit addresses that by reorganising the page to highlight general
usage questions on sources and plugins, and simplifies the tabs below to
only highlight installation methods.
2023-11-30 09:40:06 -05:00
Lucas Bajolet 35d20c25b9 docs: rm implicit github urls from install guide
This section is redundant with the explanations given above, and can
therefore be removed from the docs.
2023-11-30 09:40:06 -05:00
Lucas Bajolet aad03ba12b docs: reorg plugins installation tabs
In order to better document packer plugins installation methods, and
since `packer plugins install' is not really manual, we split in two
sections the "manual installation".

As this is legacy, we stop documenting how to install single-component
plugins, and reword the documentation for manually installing a plugin.
2023-11-30 09:40:06 -05:00
Wilken Rivera 083243c119 Bump github.com/go-jose/go-jose/v3 to address GO-2023-2334 2023-11-29 14:49:47 -05:00
Wilken Rivera 263821ac25 hcl2template/functions: Add Non-null refinements for various functions
cty's new "refinements" concept allows us to reduce the range of unknown
values from our functions. This initial changeset focuses only on
declaring which functions are guaranteed to return a non-null result,
which is a helpful baseline refinement because it allows "== null" and
"!= null" tests to produce known results even when the given value is
otherwise unknown.

This commit also includes some updates to test results that are now
refined based on cty's own built-in refinement behaviors, just as a
result of us having updated cty in the previous commit.
2023-11-29 12:28:16 -05:00
Wilken Rivera 2aad170440 Bumps github.com/hashicorp/packer-plugin-sdk from 0.4.0 to 0.5.2 2023-11-29 12:28:16 -05:00
Wilken Rivera ebaf831562 cmd/hcl2upgrade: Add VirtualBox as known plugin 2023-11-28 15:15:09 -05:00
Lucas Bajolet 8c7b97331b hcl2: don't show an empty source on var errors
If a variable is defined and overriden in the packer command-line, but
there's a problem during the evaluation of this override (type error
typically), we show an error message which details the problem.

This message points to a temporary in-memory HCL2 "file" that we use for
parsing and evaluating the expression for the variable, but since it's
virtual, there's no point in using this as the source for the error, as
it will always yield "line 0" and no contents.

So, in order to limit confusion here, we remove the source for this
error message.
2023-11-28 12:53:23 -05:00
hc-github-team-es-release-engineering 708653c843 Update LICENSE 2023-11-28 09:43:56 -05:00
hc-github-team-es-release-engineering c90ea91e05 Update LICENSE 2023-11-28 09:43:56 -05:00
Wilken Rivera 17ff50896e Update didyoumean to call provisioners.List() 2023-11-22 21:36:01 -05:00
Wilken Rivera 311ba90f7a Update Acceptance Test to include BuilderSet
This change initializes a MapOfBuilders with the test builder to fix a
panic with checking if the initialized BuilderSet has an entry for the
test builder.
2023-11-22 21:36:01 -05:00
Lucas Bajolet efe182b221 packer: link to docs if a component is missing
When a user invokes packer for a build or validation, the template being
processed needs components to be present for Packer to process it
without error.

If the component cannot be found from the plugins loaded (or from the
components bundled with Packer), Packer errors, and the command fails.

This is expected, but the error message does not suggest anything to fix
the error, potantially leaving users confused at the problem.

This commit suggests either a replacement (in case of a typo), or points
to the web documentation for Packer, specifically the integrations, so
they can look for the plugin they're missing, and install it, so
subsequent invocations of Packer work.
2023-11-22 16:10:15 -05:00
dependabot[bot] 9b2d9f4fb3 build(deps): bump github.com/hashicorp/hcp-sdk-go from 0.73.0 to 0.74.0
Bumps [github.com/hashicorp/hcp-sdk-go](https://github.com/hashicorp/hcp-sdk-go) from 0.73.0 to 0.74.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.73.0...v0.74.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]>
2023-11-22 15:54:45 -05:00
Sarah 7951607e5e Remove release-engineering as codeowners 2023-11-22 10:01:34 -05:00
Wilken Rivera c245b1fb7c deps: Bump github.com/hashicorp/hcp-sdk-go to v0.73.0
* Updates cloud-resource-management API to use sable
* Removes duplicate imports of the same SDK packages
2023-11-15 10:27:51 -05:00
Wilken Rivera c138ce533e Revert "Bumped product version to 1.12.0."
This reverts commit cc22e282ac.
The action successfully works now for the future release branch.
2023-11-10 16:32:19 -05:00
hc-github-team-packer cc22e282ac Bumped product version to 1.12.0. 2023-11-10 16:29:36 -05:00
Wilken Rivera c59edfa433 Remove dangling upgrade external plugins script 2023-11-10 14:20:35 -05:00
Wilken Rivera a118b5489e Bumped product version to 1.11.0 2023-11-10 11:42:44 -05:00
Wilken Rivera ebc1317307 Bumped product version to 1.11.0. 2023-11-10 11:39:23 -05:00
Wilken RiveraandLucas Bajolet 2b7bfaea57 Apply suggestions from code review
Co-authored-by: Lucas Bajolet <[email protected]>
2023-11-10 11:36:52 -05:00
Wilken Rivera 85e9e22bde Update CHANGELOG 2023-11-10 11:36:52 -05:00
Wilken Rivera 4b1553c7da Bump Go to 1.20.11 to mitigate against insecure Windows path parsing
This change address CVE-2023-45283. There have been no reported issues
with Packer but we are bumping given its usage of the path/filepath pkg.
2023-11-10 10:00:10 -05:00
Wilken Rivera 631ed14dc6 scripts/prepare_changelog:Update to output entries not in CHANGELOG.md 2023-11-10 09:34:33 -05:00
Wilken Rivera 360df8f257 scripts/prepare_changelog: Replace python for with gh and jq commands
This change uses the GitHub CLI to obtain all pull-requests merged after
the latest release to help with updating the Packer CHANGELOG.
2023-11-09 11:08:37 -05:00
Wilken Rivera b3280493e0 Update CHANGELOG 2023-11-08 18:51:07 -05:00
Wilken Rivera c703d2e73d Fix notes section in CHANGELOG 2023-11-08 15:07:02 -05:00
Wilken Rivera edaa10e0a0 Update CHANGELOG 2023-11-08 14:56:08 -05:00
hc-github-team-es-release-engineering 98176f5429 Update LICENSE text 2023-11-08 13:05:25 -05:00
ygXXII 19c14fd1e2 docs: fix aws_secretsmanager Title Name (#12678)
Just a simple doc title fix.
2023-11-02 05:36:36 -04:00
Lucas Bajolet f221a799d8 command: error on invalid plugins remove
If a user attempts to remove a plugin through the `packer plugins
remove' subcommand, and the specified plugin is not installed, the
command succeeds, but does nothing, and exits silently.

This is not clear what is happening, and arguably, calling a command
that does nothing, not even explain what went wrong, is not intuitive.

Because of that, this commit changes how the command behaves in this
case, stating what went wrong, and exiting with a non-zero status.
2023-10-31 11:28:50 -04:00
Lucas Bajolet c528681dde docs: amend HCL templates/functions docs
The HCL2 docs on built-in functions contains a link to a non-existent
section of the expressions page, so we update it to link to the general
page, and to the string interpolation section, since it is a common use
case.
2023-10-30 09:36:03 -04:00
Wilken Rivera 0ec424aa25 Fix broken link to Consul's environment variables page (#12673) 2023-10-30 07:50:53 -04:00