Skip to content

Commit

Permalink
docs: add a paragraph on fingerprint generation (#12464)
Browse files Browse the repository at this point in the history
* docs: add a paragraph on fingerprint generation

Since version 1.9.0+ changed the way Packer generates fingerprints for
HCP Packer, we add a small paragraph to explain how it used to be
generated before, and how it changed in this version.

* Apply suggestions from code review

---------

Co-authored-by: Wilken Rivera <wilken@hashicorp.com>
  • Loading branch information
lbajolet-hashicorp and nywilken committed Jun 15, 2023
1 parent d563a3c commit aeffaa7
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions website/content/docs/hcp/index.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,9 @@ Refer to [`hcp_packer_registry`](/packer/docs/templates/hcl_templates/blocks/bui

Packer uses a unique fingerprint for tracking the completion of builds associated to an iteration. By default a fingerprint is automatically generated by Packer during each invocation of `packer build`, unless a fingerprint is manually provided via the `HCP_PACKER_BUILD_FINGERPRINT` environment variable.

In versions before 1.9.0, this fingerprint was computed from the Git SHA of the current HEAD in which your template is stored. If you were running builds using a non Git managed template, you had to set the `HCP_PACKER_BUILD_FINGERPRINT` environment variable prior to invoking `packer build`.
Starting with Packer 1.9.0, fingerprint generation does not rely on Git at all, and instead Packer now generates a Unique Lexicographically sortable Identifier (ULID) as the fingerprint for every `packer build` invocation.

#### Fingerprints and Incomplete Iterations

When you build a template with Packer, there's always a chance that it does not succeed because of a network issue, a provisioning failure, or some upstream error. When that happens, Packer will output the generated fingerprint associated with the incomplete iteration so that you can resume building that iteration using the `HCP_PACKER_BUILD_FINGERPRINT` environment variable; an iteration can be resumed until it is marked as complete. This environment variable is necessary for resuming an incomplete iteration, otherwise Packer will create a new iteration for the build.
Expand Down

0 comments on commit aeffaa7

Please sign in to comment.