Commit Graph
18343 Commits
Author SHA1 Message Date
Lucas Bajolet 75df3794a2 backport of commit aabf2581d2 2023-08-16 15:34:25 +00:00
Lucas Bajolet ace9449462 backport of commit 56527bce8e 2023-08-16 14:47:43 +00:00
Lucas Bajolet 1b57b1ee40 backport of commit 5e9516a1a4 2023-08-16 14:47:38 +00:00
hc-github-team-packer 529c9eabfa Merge pull request #12573 from hashicorp/backport/docs/update--community-terminology/weekly-fun-cricket
This pull request was automerged via backport-assistant
2023-08-11 15:21:12 -04:00
hc-github-team-packer 0bdd83dffe Merge pull request #12572 from hashicorp/backport/nywilken/update-copywrite-settings/hugely-content-marmoset
This pull request was automerged via backport-assistant
2023-08-11 15:19:29 -04:00
hashicorp-copywrite[bot] 6c9a416547 [COMPLIANCE] License changes (#12568)
* Updating the license from MPL to Business Source License

Going forward, this project will be licensed under the Business Source License v1.1. Please see our blog post for more details at https://hashi.co/bsl-blog, FAQ at https://hashi.co/license-faq, and details of the license at www.hashicorp.com/bsl.

* Update copyright file headers to BUSL-1.1

---------

Co-authored-by: hashicorp-copywrite[bot] <110428419+hashicorp-copywrite[bot]@users.noreply.github.com>
2023-08-11 19:16:22 +00:00
Wilken Rivera 694883b867 backport of commit b4744f7283 2023-08-11 19:07:44 +00:00
Wilken Rivera f2eb8e4e29 backport of commit c760757b26 2023-08-11 17:30:22 +00:00
hc-github-team-packer a0b33297c4 Merge pull request #12562 from hashicorp/backport/bump_net_cve/briefly-humble-mayfly
This pull request was automerged via backport-assistant
2023-08-08 11:19:42 -04:00
Lucas Bajolet 1eda475da1 backport of commit b412d24bd1 2023-08-08 13:28:48 +00:00
hc-github-team-packer 4c0ce90f0d Merge pull request #12560 from hashicorp/backport/fix-iterationid-logging/honestly-thorough-cockatoo
This pull request was automerged via backport-assistant
2023-08-07 20:54:38 -04:00
Wilken Rivera c3b0708799 backport of commit 9b6c1f208c 2023-08-07 15:40:07 +00:00
hc-github-team-packer cd2834411c Merge 2503890738 into backport/fix-iterationid-logging/honestly-thorough-cockatoo 2023-08-07 20:54:35 -04:00
Wilken Rivera 5d7d0fc8ac backport of commit 2503890738 2023-08-05 00:42:25 +00:00
Wilken Rivera 2503890738 Update log to include string version of iterationID
Before
```
2023/08/05 00:42:13 iterationID set: {{{{} 'S'}} "01H71JA47BZPT0HV3VW06CPEG4"}
2023/08/05 00:42:13 iterationID set: {{{{} 'S'}} "01H71JA47BZPT0HV3VW06CPEG4"}
2023/08/05 00:42:13 iterationID set: {{{{} 'S'}} "01H71JA47BZPT0HV3VW06CPEG4"}

```

After
```
2023/08/05 00:36:14 iterationID set: "01H71HZ5NPH8RZ1DC1AEYGSZJ7"
2023/08/05 00:36:14 iterationID set: "01H71HZ5NPH8RZ1DC1AEYGSZJ7"
2023/08/05 00:36:14 iterationID set: "01H71HZ5NPH8RZ1DC1AEYGSZJ7"
```
2023-08-05 00:42:25 +00:00
hc-github-team-packer 2998a6dfdc Merge pull request #12551 from hashicorp/backport/add_docker_full_image/closely-super-slug
This pull request was automerged via backport-assistant
2023-08-04 13:31:16 -04:00
Lucas Bajolet 168e464ee4 docker: add full image to docker README 2023-08-04 13:30:41 -04:00
Lucas Bajolet 376f0e9991 docker: remove trailing spaces for Docker README 2023-08-04 13:30:41 -04:00
Lucas Bajolet 55854f5537 Makefile: only build dev version of binary/docker
The Docker images release-light and release-full are not to be built
locally from a dev build, but from a release, and the commands to build
those images are only referenced in CI, so we don't need to ship them as
part of the makefile.
In addition, those images are not straightforward to build from the
Makefile, as they require quite a few things from the environment, as
well as the binary installed in a specific location, which is never
setup by the rest of the Makefile.

Therefore, we opted to simplify the Makefile so that it only builds
docker-dev for local use.
2023-08-04 13:30:41 -04:00
Lucas Bajolet c6da777715 workflows: add docker-full to build workflow 2023-08-04 13:30:41 -04:00
Lucas Bajolet 838736982c Dockerfile: add release-full target
In addition to the `release-light' target, we add a `release_full'
target to the Dockerfile, so that we can ship an image of Packer with
the official plugins pre-bundled in their latest version.
2023-08-04 13:30:41 -04:00
Lucas Bajolet ffe2776770 README: fix link to CONTRIBUTING
Since the main branch is not called master anymore, and the anchor was
renamed, we fix both these changes in the link to that page from the
README.
2023-08-04 13:30:41 -04:00
Lucas Bajolet b29abbcd8c Dockerfile: remove trailing whitespaces 2023-08-04 13:30:41 -04:00
Lucas Bajolet 884ca2bf89 backport of commit 04424f839f 2023-08-03 21:17:07 +00:00
Lucas Bajolet 67bf7e56e8 backport of commit 8810fce69f 2023-08-03 13:40:41 +00:00
Lucas Bajolet 25b76870bf backport of commit 2f72e196da 2023-08-03 13:40:21 +00:00
Lucas Bajolet 1a63c6b837 backport of commit 3f99e4a408 2023-08-03 13:40:21 +00:00
Lucas Bajolet 5946b81225 backport of commit 967169d8c4 2023-08-03 13:40:21 +00:00
Lucas Bajolet 5d95a66f33 backport of commit 0f92cc6df0 2023-08-03 13:40:21 +00:00
Lucas Bajolet c5b67ada00 backport of commit 6312947e79 2023-08-03 13:40:21 +00:00
hc-github-team-packer e317fee8db Merge pull request #12550 from hashicorp/backport/nywilken/update-plugin-tests-for-arm64/happily-set-zebra
This pull request was automerged via backport-assistant
2023-08-02 15:35:25 -04:00
Wilken Rivera 99c79ecbd6 Add build tags to skip amd64 tests on darwin/arm64 (#12549) 2023-08-02 15:34:06 -04:00
Wilken Rivera 1a0a856d99 backport of commit 5974f63729 2023-08-01 20:28:17 +00:00
Wilken Rivera 6227ede189 Update plugin discover testing
* Add test case for loading plugin in CWD
* Add test case to validate checksume files are ignored
* Update Discover to include CWD "." in PluginFolders if KnowPluginFolders is unset
2023-08-01 16:27:11 -04:00
Wilken Rivera 11559fee86 Update plugin discover logic
When copying a plugin's checksum file (packer-plugin-*_SHA256SUM) installed by `packer plugins install` or `packer init`
into a separate directory the file may be copied with the executable bit turned out. If unchanged after the copy, Packer would
discover the checksum file as a possible plugin match and error when trying to execute describe on the plugin look a like. This change
adds a checksum file test to the plugin matching logic. If the discovered plugin name is a checksum it is excluded from the discovered plugin list.
2023-08-01 16:26:58 -04:00
Wilken Rivera e2e1e9332f Update plugin loading for current directory
Starting with Go 1.19 the loading of binaries from the current working directory was
deemed as a possible security problem. Thus the use of exec.Command or exec.LookPath no longer resolves
an executable within the current working directory. This change updates the discover logic to return absolute
paths for any discovered plugin, which is called directly when passed to exec.Command or exec.LookPath. By doing
this Packer is able to load a custom plugin sitting in the current working directory as it did in version prior to v1.9.2.
2023-08-01 16:26:39 -04:00
Wilken Rivera 848039dcdb Update plugin discover testing
* Add test case for loading plugin in CWD
* Add test case to validate checksume files are ignored
* Update Discover to include CWD "." in PluginFolders if KnowPluginFolders is unset
2023-08-01 16:20:58 -04:00
Wilken Rivera a96584fb56 Update plugin discover logic
When copying a plugin's checksum file (packer-plugin-*_SHA256SUM) installed by `packer plugins install` or `packer init`
into a separate directory the file may be copied with the executable bit turned out. If unchanged after the copy, Packer would
discover the checksum file as a possible plugin match and error when trying to execute describe on the plugin look a like. This change
adds a checksum file test to the plugin matching logic. If the discovered plugin name is a checksum it is excluded from the discovered plugin list.
2023-08-01 16:20:58 -04:00
Wilken Rivera d3d33714e6 Update plugin loading for current directory
Starting with Go 1.19 the loading of binaries from the current working directory was
deemed as a possible security problem. Thus the use of exec.Command or exec.LookPath no longer resolves
an executable within the current working directory. This change updates the discover logic to return absolute
paths for any discovered plugin, which is called directly when passed to exec.Command or exec.LookPath. By doing
this Packer is able to load a custom plugin sitting in the current working directory as it did in version prior to v1.9.2.
2023-08-01 16:20:58 -04:00
Wilken Rivera d1aa103ebc workflows/jira: Fix syntax error for createComment 2023-07-27 17:12:17 -04:00
hashicorp-tsccr[bot] 5c9ab19d8f Result of tsccr-helper -log-level=info -pin-all-workflows . 2023-07-27 09:05:01 -04:00
Lucas Bajolet 392232933f website: add usage notice to init
The `packer init' command's wording was not clear, so it was changed in
a preceding commit, and this commit aims to add more details on how the
command is meant to be used, along with a simple example.
2023-07-25 16:45:32 -04:00
Lucas Bajolet 3512a175a6 command: change wording for init's postitional arg
`packer init' is meant to be invoked on a template file or a directory.
This was described in the command-line help message as
`[template.pkr.hcl|folder]'.

Because this is encapsulated between square brackets, this could be
taken as an option instead of a positional, mandatory argument.

This commit changes the wording to adopt a similar convention as `packer
build', so the two are consistent in how they are invoked, and to avoid
mistaking this argument as optional.
2023-07-25 16:45:32 -04:00
hc-github-team-packer 3cafac2126 Merge pull request #12538 from hashicorp/backport/track_bundled_plugins_usage/sincerely-frank-ray
This pull request was automerged via backport-assistant
2023-07-25 15:44:10 -04:00
Lucas Bajolet d0198c8a17 packer: track bundled plugins usage on telemetry 2023-07-25 15:43:47 -04:00
hc-github-team-packer bb46fd54e2 Merge pull request #12537 from hashicorp/backport/nywilken/add-hcp-plsp-support/shortly-popular-oarfish
This pull request was automerged via backport-assistant
2023-07-25 11:32:01 -04:00
Wilken Rivera 60c66fdf9f Add additional validation for manually set project ids
When setting a project id via the HCP_PROJECT_ID env the client will try to validate the project
by checking that it has an associated registry. If the project is invalid or not a valid UUID an error
will be displayed to the user

* Add comment to clarify usage of SDK loaded env. variables
2023-07-25 11:31:39 -04:00
Wilken Rivera 38101a64c9 hcp: Add support for project level service principals
HCP supports two types of service principals: Organization-level and project-level.
When a user tries to publish to an active HCP Packer registry using a plsp the client
fails when configuring the client due to a API permission error; namely plsp do not have
the permissions to query an org for a list of projects. Setting the HCP_PROJECT_ID does
not resolve the issue because the call to ListProjects is still executed.

This changes updates the client configuration params to obtain both the HCP Organization and
Project IDs that will be used for connecting to the HCP Packer registry. With this change
if a user provides a project Id via the HCP_PROJECT_ID environment variable no call to ListProjects will
be made. Instead the value will be take as is and used to create the connection. A user connecting with
a project level service principals must provide a valid HCP_PROJECT_ID in order to connect.
2023-07-25 11:31:39 -04:00
Lucas Bajolet 9c6ab2d811 backport of commit b894036d1c 2023-07-24 19:53:58 +00:00
Lucas Bajolet 55decee242 .github: fix issues-opened.yml workflow
This commit fixes a bug with the first script, as the object passed to
the REST API is not closed properly.
2023-07-24 14:21:03 -04:00