Skip to content

Create a dictionary of hashes in map.jinja for packer#13

Open
allyunion wants to merge 2 commits intosaltstack-formulas:masterfrom
allyunion:master
Open

Create a dictionary of hashes in map.jinja for packer#13
allyunion wants to merge 2 commits intosaltstack-formulas:masterfrom
allyunion:master

Conversation

@allyunion
Copy link
Copy Markdown

Notes:

  1. Create a dictionary of the sha256 hashes in map.jinja so that someone can select a specific version of packer without needing to look it up
  2. Removed the hash from the required parameters, leaving the version number only required.
  3. Bumped up default version to 1.6.6

PR progress checklist (to be filled in by reviewers)

  • Changes to documentation are appropriate (or tick if not required)
  • Changes to tests are appropriate (or tick if not required)
  • Reviews completed

What type of PR is this?

Primary type

  • [build] Changes related to the build system
  • [chore] Changes to the build process or auxiliary tools and libraries such as documentation generation
  • [ci] Changes to the continuous integration configuration
  • [feat] A new feature
  • [fix] A bug fix
  • [perf] A code change that improves performance
  • [refactor] A code change that neither fixes a bug nor adds a feature
  • [revert] A change used to revert a previous commit
  • [style] Changes that do not affect the meaning of the code (white-space, formatting, missing semi-colons, etc.)

Secondary type

  • [docs] Documentation changes
  • [test] Adding missing or correcting existing tests

Does this PR introduce a BREAKING CHANGE?

No.

Related issues and/or pull requests

Describe the changes you're proposing

Pillar / config required to test the proposed changes

Debug log showing how the proposed changes work

Documentation checklist

  • Updated the README (e.g. Available states).
  • Updated pillar.example.

Testing checklist

  • Included in Kitchen (i.e. under state_top).
  • Covered by new/existing tests (e.g. InSpec, Serverspec, etc.).
  • Updated the relevant test pillar.

Additional context

Copy link
Copy Markdown

@baby-gnu baby-gnu left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hello @allyunion, what do you think of putting that hash in defaults.yml instead of the map.jinja?

For example:

# -*- coding: utf-8 -*-
# vim: ft=yaml
default:
  sha256_checksums:
    1.6.6: sha256=721d119fd70e38d6f2b4ccd8a39daf6b4d36bf5f7640036acafcaaa967b00c3b
    1.6.5: sha256=a49f6408a50c220fe3f1a6192ea21134e2e8f31092c507614cd27ad4f913234b
    1.6.4: sha256=a20ec68e9eb6e1d6016481003f705babbecc28e234f8434f3a35f675cb200ea8
    1.6.3: sha256=294ae56dccec9da24120b92c22e4c4d0453f1a9d077799611ead2adacceade3e

This way, you will use packer.default.sha256_checksums.

This will keep the map.jinja trivial which will ease any migration to new developpment around map.jinja.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants