Commit graph

18045 commits

Author SHA1 Message Date
Paulo Dias
8ce3aae2f7 Add packages for iso builds 2022-10-28 13:12:17 -04:00
Wilken Rivera
c6f530d6d5
Update CHANGELOG.md 2022-10-28 12:49:21 -04:00
Lucas Bajolet
83ca7c203c prepare 1.8.5 2022-10-28 12:13:31 -04:00
Lucas Bajolet
83cc093d50 cut release 1.8.4 2022-10-28 10:43:05 -04:00
Wilken Rivera
ef1fb675f7
Update CHANGELOG for 1.8.4 (#12083)
* Update CHANGELOG for 1.8.4

* Update HCP Packer environment variable notes

* Add CHANGELOG entry for 12068
2022-10-28 10:33:53 -04:00
Wilken Rivera
10c7b999ea
Update bundled plugins to latest available version (#12085) 2022-10-27 18:24:13 -04:00
Lucas Bajolet
68ddb2f89d
hcl2_upgrade: add share_image_gallery workaround (#12087)
In azure templates, the shared_image_gallery was mistakenly considered
an attribute while this is supposed to be a block.

This is due to a heuristic we use for deciding whether a JSON object is
to be translated to an attribute or a block that fell short as the
shared_image_gallery does not contain complex types.

This cannot be fixed trivially for the general case, so we add this
entity to the list of workarounds until we can implement something more
robust.
2022-10-27 18:09:40 -04:00
Jenna Goldstrich
0bac9b6f63
Remove a skip for darwin arm64 (m1/m2 macs) for exec tests. (#12088) 2022-10-27 17:52:26 -04:00
Lucas Bajolet
296562614f hcl2_upgrade: fix liniting issues with fmt.Sprintf
Some literal strings without format-string directives nor arguments were
littered around the hcl2_upgrade command's code, which is pointed out by
the linters.

Since they serve no purpose, we remove them.
2022-10-26 15:35:02 -04:00
Lucas Bajolet
3c249c0d42 hcl2_upgrade: replace passthroughs by pre-visit
In previous versions of hcl2_upgrade, we referenced a list of
passthrough statements from the original JSON template to be replaced by
their equivalent Go-template in HCL2.

This works but requires us to explicitely accept every possible
templated variable in order to not ever encounter <no value> in our
generated HCL2 templates.

This is suboptimal, hence this commit changes approach by pre-visting
the AST from the original Go Template, escaping every sequence that is
not covered by the list of functions we can migrate. Pipes are also
excluded from this function.
2022-10-26 15:35:02 -04:00
Wilken Rivera
bc55d6d2d6
[HPR-763] Update HCL variable documentation (#12058)
* Update HCL variable documentation

* Add supported arguments section for variables
* Add inpage links to key variable arguments
* Reorder content to cluster assignment documentation together
* Split variable definitions into two sub-sections

Co-authored-by: Lucas Bajolet <105649352+lbajolet-hashicorp@users.noreply.github.com>
2022-10-24 20:58:32 -04:00
Zach Shilton
7f533a0a63
website: fix intro link (#12076) 2022-10-24 15:24:42 -04:00
Zach Shilton
82062f05e9
website: reset redirects file (#12066)
* website: reset redirects file

* docs: add note on product prefix, with example

* docs: fix example redirect
2022-10-24 14:48:02 -04:00
HashiBot
ed859dccb3
chore: Update Digital Team Files (#12069)
* Update generated scripts (website-start.sh)

* Update generated website Makefile

* Update generated scripts (website-build.sh)

* Update generated scripts (should-build.sh)
2022-10-24 14:46:25 -04:00
Wilken Rivera
1296cbfc92
Update links to packer-template-configuration (#12072) 2022-10-24 12:59:32 -04:00
Wilken Rivera
414b576def
[HPR-574] Add documentation for configuring Packer for HCP Packer (#12022)
* Add documentation for configuring Packer for HCP Packer

This change works to document the two configuration options for setting
up Packer to publish build artifacts to an active HCP Packer registry.
Currently the HashiCorp Cloud Platform documents the process for
configuring Packer via a HCL template, which is the preferred route.
This documentation focuses more on the use of environment variables for
configuring Packer for HCP Packer, which is necessary for legacy JSON
template users looking to publish to HCP Packer.

In light of the new HCP Packer documentation page we've opted for a shorter
version of the HCP Packer introduction section.

* Applying the first round of suggestions to tighten up the documentation.
* Move HCP Packer side bar to top
* Move intro into docs
* Add redirects for intro pages

Co-authored-by: Laura Pacilio <83350965+laurapacilio@users.noreply.github.com>
2022-10-24 12:51:14 -04:00
Wilken Rivera
7cb0c98925
Merge pull request #12033 from hashicorp/error_messages_rework
[HPR-575] command/build: rework HCP-related error messages
2022-10-21 11:25:15 -04:00
Zach Shilton
879fd9035c
fix: update redirected and broken links (#12060)
* website: fix broken links on /docs/templates

* fix: redirected install-plugins link

* fix: debugging link

* fix: secrets manager link in docs

* fix: secrets manager link in source

* fix: amazon ami plugin link in docs

* fix: amazon ami plugin link in source

* fix: extending plugins link

* fix: plugins/builders/amazon links

* fix: various builders links

* fix: various amazon builder links

* fix: redirected terminology link

* fix: custom-provisioners link

* fix: docker-push redirected plugin link

* fix: googlecompute plugin links

* fix: hyperv iso plugin links

* website: update link to hcl upgrade guide

Co-authored-by: Wilken Rivera <wilken@hashicorp.com>

Co-authored-by: Wilken Rivera <wilken@hashicorp.com>
2022-10-21 11:00:58 -04:00
Lucas Bajolet
61c810e720 command: rework HCP-related error messages
The HCP error messages were sometimes a bit terse in terms of the
information it bubbles up to the user.
This made them useful for people who already knew what to look for, but
newcomers would almost certainly be lost because of the lack of
information in those.

To improve on this situation, we reword most of those error messages in
this commit.
2022-10-21 10:32:45 -04:00
Wilken Rivera
78c2aac4bb
Merge pull request #12057 from hashicorp/mktg-tf-6712e33a71cea60092a300cbfcf59096
chore: Update Digital Team Files
2022-10-21 10:29:40 -04:00
Wilken Rivera
81eb1caca5
Merge pull request #12061 from hashicorp/json_template_engine_doc_fix
docs: move legacy JSON warning under title
2022-10-21 09:55:56 -04:00
Lucas Bajolet
84dc228a68 docs: move legacy JSON warning under title
With the move to Hashidocs, the version picker is within the text area
for the documentation being displayed. This negatively interacts with
the Note on top, as it obstructs part of the text.

To circumvent this problem, we move the Note after the title/intro.
2022-10-21 09:20:34 -04:00
Lucas Bajolet
35496e533d packer: include builder type in HCP name for JSON
JSON templates used only to report the builder's type in HCP builds,
even if the name was specified.

This commit changes this behaviour to include both if they're available,
in a similar fashion as what is done on the HCL2 templates.
2022-10-20 17:12:33 -04:00
HashiBot
ce0831dcfd Update generated scripts (website-build.sh) 2022-10-19 08:53:17 -05:00
HashiBot
478258943a Update generated scripts (website-start.sh) 2022-10-19 08:53:16 -05:00
HashiBot
0c0e1f587c Update generated website Makefile 2022-10-19 08:53:14 -05:00
HashiBot
cb5c0a5bc7 Update generated scripts (should-build.sh) 2022-10-19 08:53:12 -05:00
Wilken Rivera
971340d481
Merge pull request #12051 from hashicorp/mktg-tf-21f31f4b058995a77ae6b19a62636241
chore: Update Digital Team Files
2022-10-18 13:25:05 -05:00
HashiBot
31829b40d7 Update generated scripts (should-build.sh) 2022-10-14 17:31:03 -05:00
HashiBot
27f6de3a61 Update generated scripts (website-start.sh) 2022-10-14 17:31:02 -05:00
HashiBot
b748490513 Update generated scripts (website-build.sh) 2022-10-14 17:31:00 -05:00
HashiBot
c373acc43c Update generated website Makefile 2022-10-14 17:30:59 -05:00
Wilken Rivera
0eb25b5775 Update CHANGELOG 2022-10-14 11:44:42 -04:00
Laura Pacilio
72d9c07374 Remove sidebar entries that no longer exist 2022-10-14 08:37:11 -04:00
Lucas Bajolet
c2dc140896 hcp: read fingerprint from env during initialize
Previously, we'd get the fingerprint for an iteration when creating the
bucket.
Since we moved the remainder of the logic for getting the iteration to a
separate Initialize method, we also move the logic that reads the
fingerprint from the environment to this function.
2022-10-13 15:13:29 -04:00
Wilken Rivera
6693128d73 Read loading over bucket name from env var 2022-10-13 15:13:29 -04:00
Wilken Rivera
12e9316f94 Add documenation for HCPConfigMode type 2022-10-13 15:13:29 -04:00
Wilken Rivera
148d5e3a2d Add initialize method to Iteration
Fingerprint initialize was previously occurring during the creation of a
bucket. We want to be able to initialize a bucket and defer the setting
of a fingerprint to a later point.

* Update test to reflect new function signatures for Bucket and Iteration
2022-10-13 15:13:29 -04:00
Wilken Rivera
7f7f397124 Rename withHCLBucketConfiguration function 2022-10-13 15:13:29 -04:00
Wilken Rivera
a4a97d5c05 Move datasource data into its own bucketConfiguratioOpts func 2022-10-13 15:13:29 -04:00
Wilken Rivera
cf9304266e Consolidate bucket configuration logic 2022-10-13 15:13:29 -04:00
Wilken Rivera
0efd064d29 Update IsHCPExplicitelyEnabled logic 2022-10-13 15:13:29 -04:00
Wilken Rivera
a427094426 Add env for HCP_PACKER_BUILD_FINGERPRINT 2022-10-13 15:13:29 -04:00
Lucas Bajolet
b3188637bf registry: load bucket slug in command/registry
Loadgin the slug from the environment within the Bucket implied that the
Bucket was successfully created, which may fail outside of a Git
directory when the iteration fingerprint is not set through environment
variables.

To make it possible to print as much information regarding the
environment to the users at once rather than stopping immediately when
this step fails, we move the logic to read the default value from the
environment to the HCP setup code.
2022-10-13 15:13:29 -04:00
Lucas Bajolet
9267d933bc command: report multiple errors in bad HCP config
When HCP is detected to be enabled, but some configuration is missing,
we returned immediately on the first error.

This commit changes this behaviour by reporting every error at once, so
users will know immediately if something is wrong when they invoke
Packer with HCP support, and one or more environment variables is not
defined as we'd expect them.
2022-10-13 15:13:29 -04:00
Lucas Bajolet
ae15ed339c registry: add function to detect explicit HCP
The HCP_PACKER_REGISTRY environment variable had its behaviour changed
recently, as prior versions of Packer expected the attribute to be
forcefully set to a value that is neither "off" nor "0" in order to
get HCP integration to work, or that a "hcp_packer_registry" block was
defined in an HCL template. Now, this environment variable defaults to
not explicitely enable, but instead to explicitely disable HCP
integration, and the feature switch fall upon HCP_PACKER_BUCKET_NAME.

As an extra feature, we keep the prior behaviour alive when it is
explicitely defined as a value to enable it. That way we can report
errors if the rest is not defined, rather than silently ignore it.

This function we add to env is the first stone to enable this behaviour.
2022-10-13 15:13:29 -04:00
Wilken Rivera
3395d84fbc
Merge pull request #12047 from hashicorp/nywilken/go-2022-1059
chore: Bump golang.org/x/text to v0.3.8
2022-10-12 15:35:58 -05:00
Wilken Rivera
6eba1f598e chore: Bump golang.org/x/text to v0.3.8
Address reported vulnerability GO-2022-1059 in golang.org/x/text@v0.3.7
2022-10-12 15:59:17 -04:00
Wilken Rivera
326dd58c59
Merge pull request #12044 from hashicorp/compliance/add-license
[COMPLIANCE] Update MPL 2.0 LICENSE
2022-10-12 14:50:04 -05:00
Wilken Rivera
35eb6875c1
Merge pull request #12046 from hashicorp/dependabot/github_actions/slackapi/slack-github-action-1.23.0
Bump slackapi/slack-github-action from 1.22.0 to 1.23.0
2022-10-12 14:48:48 -05:00