Commit Graph
18377 Commits
Author SHA1 Message Date
Wilken Rivera fd0676ea29 Fix URL rewrite check error for DevDot portal
Refer to job https://github.com/hashicorp/packer/actions/runs/7709708630/job/21011464094
2024-01-30 06:40:06 -05:00
Wilken Rivera ca066f73bf Update CHANGELOG 2024-01-30 05:27:00 -05:00
Wilken Rivera 1e6041ab05 docs/plugins:Fix incorrect plugin directory path 2024-01-30 05:25:57 -05:00
Heat Hamilton ec403555dc Updated next, node, npm, nvmrc and Docker node versions; added husky pre-commit hook v9 2024-01-29 16:24:27 -05:00
Wilken Rivera da65323918 Remove all external plugin docs
This change removes all external plugin docs using the old remote docs framework
from the Packer core documentation in favor of the Packer integration framework.
Remove plugins will be enabled on the integration portal and contacted to merge their PRs to finalize the integration migration.
2024-01-29 15:06:08 -05:00
Devashish 682eca2877 Remove repeated code 2024-01-26 14:31:04 -05:00
Devashish 4b591d6937 Add PR suggestions 2024-01-26 14:31:04 -05:00
Devashish 14ce2a559c fix shell session in the docs 2024-01-26 14:31:04 -05:00
Devashish b77d581cda Add the deprecation warning and update docs 2024-01-26 14:31:04 -05:00
Devashish cbc16cfed5 Add versionFingerprint to EvalContext 2024-01-26 14:31:04 -05:00
Devashish 91ce35f439 Expose versionFingerprint instead of versionId from packer template 2024-01-26 14:31:04 -05:00
Wilken RiveraandLucas Bajolet 12b8c885a3 Update error messaging for HCP incompatible plugin builds (#12800)
* Update error messaging for HCP incompatible plugin builds

* Update command/build.go

Co-authored-by: Lucas Bajolet <[email protected]>

---------

Co-authored-by: Lucas Bajolet <[email protected]>
2024-01-25 11:32:18 -05:00
3fa637c608 Migrate HCP Packer to API V2 and new nomenclature changes (#12794)
* add hcp packer new nomenclature updates

* Update docs with nomenclature changes

* Update navigation bar links

* Bump github.com/hashicorp/hcp-sdk-go from 0.81.0 to 0.82.0

* fix acceptance test template

---------

Co-authored-by: sylviamoss <[email protected]>
Co-authored-by: Wilken Rivera <[email protected]>
2024-01-24 13:17:35 -05:00
dependabot[bot] 91ce018cf1 build(deps): bump github.com/hashicorp/hcp-sdk-go from 0.79.0 to 0.81.0
Bumps [github.com/hashicorp/hcp-sdk-go](https://github.com/hashicorp/hcp-sdk-go) from 0.79.0 to 0.81.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.79.0...v0.81.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-01-19 10:39:28 -05:00
Wilken Rivera 96755d2f7b Remove migrated integrations from plugin manifest
This change removes Scaleway and Mondoo from the external plugins manifest in favor
of the integration framework, which they have migrated to.
2024-01-17 10:23:37 -05:00
Lucas Bajolet 6c99f387a0 packer: remove single-component plugins
Single-component plugins are a relic from the past that has been
deprecated from version 1.7.0 and onwards.

Since we're revisiting how plugins are installed/loaded, and the changes
will be incompatible with those, we remove them in preparation of this
work.
2024-01-12 09:06:22 -05:00
Wilken Rivera beb5fcf470 Bump github.com/cloudflare/circl to address GHSA-9763-4f94-gfch (#12781) 2024-01-10 10:03:51 -05:00
dependabot[bot] a9000f3a70 build(deps): bump github.com/hashicorp/hcp-sdk-go from 0.74.0 to 0.79.0
Bumps [github.com/hashicorp/hcp-sdk-go](https://github.com/hashicorp/hcp-sdk-go) from 0.74.0 to 0.79.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.74.0...v0.79.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-01-09 14:59:39 -05:00
Wilken Rivera bfc3f8b564 Bump github.com/go-git/go-git/v5 to address CVE-2023-49568 2024-01-08 11:11:39 -05:00
Wilken Rivera 2515aa27a7 Bump golang.org/x/crypto to address CVE-2023-48795 2024-01-08 11:11:39 -05:00
Wilken Rivera 0a64a5fb90 Bump Go version to 1.20.12
Bumped to pull in security fixes to the go command, the net/http package,
and path/filepath package.
2024-01-08 11:11:39 -05:00
Aidan Mundy 0b06cb58a3 Fix Typo make check-generate -> make generate-check 2024-01-08 09:44:56 -05:00
Lucas Bajolet 311a3b1d6a website: remove UpCloud from manifest
Since the UpCloud plugin has moved to the integrations model, we don't
want to continue looking for a docs.zip in their repo, as it doesn't
exist anymore with this migration.
2024-01-08 09:37:45 -05:00
Brian McClain 76de1d3fc0 Merge pull request #12767 from hashicorp/bmm/upcloud-version-pin
Pin UpCloud plugin version
2024-01-03 15:52:22 -05:00
Brian McClain 9afafd962f Pin UpCloud plugin version 2024-01-03 13:36:05 -05:00
hc-github-team-es-release-engineering 4825c65234 Merge pull request #12752 from hashicorp/RELPLAT-955-EOY-license-updates
[DO NOT MERGE UNTIL EOY] EOY license updates
2024-01-02 13:37:55 -08:00
Wilken Rivera 699c0f814c Update plugin_integration.md
Fix todo list markdown formatting
2023-12-13 14:47:39 -05:00
hc-github-team-es-release-engineering fd7fc49f17 update year in license files 2023-12-06 12:43:42 -08:00
Wilken Rivera 2241b1fba7 Update spacing for flags within Help text
Before Change
```

Options:
  - path <path>: install the plugin from a locally-sourced plugin binary. This
                 installs the plugin where a normal invocation would, but will
                 not try to download it from a remote location, and instead
                 install the binary in the Packer plugins path.
                 This option cannot be specified with a version constraint.
  - force:       forces reinstallation of plugins, even if already installed.

```

After Change
```
Options:
  -path <path>                  Install the plugin from a locally-sourced plugin binary.
                                This installs the plugin where a normal invocation would, but will
                                not try to download it from a remote location, and instead
                                install the binary in the Packer plugins path. This option cannot
                                be specified with a version constraint.
  -force                        Forces reinstallation of plugins, even if already installed.
```
2023-12-06 07:29:10 -05:00
9d46c90c03 Apply suggestions from code review
Co-authored-by: Lucas Bajolet <[email protected]>
Co-authored-by: Sylvia Moss <[email protected]>
2023-12-05 16:15:12 -05:00
Wilken Rivera 9565eca354 Remove reference to deprecated single components 2023-12-05 16:15:12 -05:00
Wilken Rivera e2a2a08f56 Add example shell commands for copying integration files into plugin repository 2023-12-05 16:15:12 -05:00
Wilken Rivera 149a8095e1 Address review feedback 2023-12-05 16:15:12 -05:00
Wilken Rivera 6d7d266bb6 Replace relative links 2023-12-05 16:15:12 -05:00
Wilken Rivera c0de07c32e Document process for registering a plugin as a Packer Integration 2023-12-05 16:15:12 -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