Commit Graph
17941 Commits
Author SHA1 Message Date
sylviamoss 832d4ebc94 add source_image_id to null builder 2022-08-03 18:18:56 +02:00
Wilken Rivera 0c9c3fe48c Put in dev mode 1.8.4 2022-08-02 21:05:48 -04:00
Wilken Rivera 083ab4f4cb Update CHANGELOG
This change fixes a few typos and inconsistencies within the changelog
entries for the 1.8.3 release.
2022-08-02 16:03:34 -04:00
Wilken Rivera 38b47d8211 Cut release 1.8.3
* Fix spacing in CHANGELOG
* Add release date to CHANGELOG
v1.8.3
2022-08-02 05:55:28 -04:00
Wilken Rivera 46e24b129c Update CHANGELOG 2022-08-01 15:42:46 -04:00
Wilken Rivera 392c4774da Bump bundled plugins to latest available version (#11917) 2022-08-01 09:37:33 -04:00
Wilken Rivera c09f98686d Add HCP Packer Ready badge to UpCloud (#11914) 2022-07-29 15:41:27 -04:00
Wilken Rivera e3ad29d2aa Update third-party plugin imports (#11912)
* packer-plugin-digitalocean: Update module import path

* packer-plugin-outscale: Remove bundled plugin

* packer-plugin-scaleway: Remove bundled plugin
2022-07-29 11:45:30 -04:00
Sylvia Moss 5c3d5c1295 Send channel id to HCP Packer (#11861) 2022-07-29 15:15:29 +02:00
dependabot[bot] d8e0ccc965 Bump actions/stale from 5.1.0 to 5.1.1 (#11910)
Bumps [actions/stale](https://github.com/actions/stale) from 5.1.0 to 5.1.1.
- [Release notes](https://github.com/actions/stale/releases)
- [Changelog](https://github.com/actions/stale/blob/v5.1.1/CHANGELOG.md)
- [Commits](https://github.com/actions/stale/compare/v5.1.0...v5.1.1)

---
updated-dependencies:
- dependency-name: actions/stale
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <[email protected]>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-07-28 15:28:42 -04:00
dependabot[bot] a8c60e5117 Bump slackapi/slack-github-action from 1.20.0 to 1.21.0 (#11911)
Bumps [slackapi/slack-github-action](https://github.com/slackapi/slack-github-action) from 1.20.0 to 1.21.0.
- [Release notes](https://github.com/slackapi/slack-github-action/releases)
- [Commits](https://github.com/slackapi/slack-github-action/compare/v1.20.0...v1.21.0)

---
updated-dependencies:
- dependency-name: slackapi/slack-github-action
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <[email protected]>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-07-28 15:28:18 -04:00
Lucas Bajolet 0da7cf781e go.mod: bump SDK to v0.3.1 2022-07-28 14:50:57 -04:00
dependabot[bot] a362afe785 Bump slackapi/slack-github-action from 1.19.0 to 1.20.0 (#11906)
Bumps [slackapi/slack-github-action](https://github.com/slackapi/slack-github-action) from 1.19.0 to 1.20.0.
- [Release notes](https://github.com/slackapi/slack-github-action/releases)
- [Commits](https://github.com/slackapi/slack-github-action/compare/v1.19.0...v1.20.0)

---
updated-dependencies:
- dependency-name: slackapi/slack-github-action
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <[email protected]>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-07-28 11:10:14 -04:00
dependabot[bot] cd75c20390 Bump actions/stale from 5.0.0 to 5.1.0 (#11880)
Bumps [actions/stale](https://github.com/actions/stale) from 5.0.0 to 5.1.0.
- [Release notes](https://github.com/actions/stale/releases)
- [Changelog](https://github.com/actions/stale/blob/main/CHANGELOG.md)
- [Commits](https://github.com/actions/stale/compare/v5.0.0...v5.1.0)

---
updated-dependencies:
- dependency-name: actions/stale
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <[email protected]>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-07-27 15:56:58 -04:00
krzys_h f28d36c888 Fix typo in the pipelining-builds docs (#11900)
Somebody forgot to finish their last sentence...
2022-07-23 09:16:50 -04:00
Wilken Rivera a4a497bd80 Delete pull-requests-opened.yml (#11890)
This action doesn't work as expected given that public forks don't have access to the token.
2022-07-22 13:02:50 -04:00
Wilken Rivera e12bbf3fb9 Update DigitalOcean plugin docs path (#11886) 2022-07-22 13:02:30 -04:00
Bryce Kalow 954285632d fix: use newer node for check-plugin-docs (#11893) 2022-07-21 11:23:29 -04:00
Chris Griggs 30a263ec7f Removing Huawei from plugin docs (#11888) 2022-07-21 07:42:29 -04:00
Lucas Bajolet 6ab16561b5 hcl2: fix crash on malformed overrides (#11881)
When an override block is either not an object, or if one of its
contents are not an object, Packer would crash trying to forcefully
cast the cty.Value to a cty.Collection.

To avoid this behaviour, we add extra checks that return hcl.Diagnostics
when they fail.
2022-07-20 14:30:49 -04:00
Lucas Bajolet 6794c6053a hcl2template: only iterate on known HCP datasource (#11883)
When we try to validate a build that contains references to
hcp_packer_image, the data is not fetched, and the value is therefore
unknown.

However, during the decoding phase for the build blocks, we attempt to
fetch the ancestry information for the current build, from the
information previously fetched from HCP.

Since we're validating, there's no way this is set, and attempting to
cast without checking causes Packer to crash on the conversion.

To avoid this, we only attempt this conversion if the value is known.

Closes #11870
2022-07-20 10:46:50 -04:00
Shohei Maeda 9f28ced11c Add component_type optional field (#11872)
* Add `component_type` optional field

to support specifying the exact build image when multiple images exist in the same provider and region for a given iteration

* update docs

* update docs
2022-07-14 10:33:10 -07:00
Lucas Bajolet 819cc50f31 datasource: change phrasing for iteration_id
The comment was mentioning the name of an iteration Id, which is
conflicting.
This commit rephrases the comment to directly specify the ID of the
iteration.
2022-07-13 17:10:38 -04:00
Lucas Bajolet fabfc8f015 hcp-packer-image: add support for channel
In addition to the current way of specifying an image based on an
iteration on HCP Packer, which requires first declaring an iteration,
and then referencing it from the image to build, we add the capacity of
specifying a channel.

This alternative will get the iteration linked to the channel, and is
essentially a more convenient way to get an image's metadata from HCP
Packer.

This commit is essentially a backport from the Terraform HCP provider,
for consistency between the two tools.
2022-07-13 17:10:38 -04:00
Wilken Rivera 9f64b99073 Add Packer Plugin Gridscale to plugins page (#11862)
* Add Packer Plugin Gridscale to plugins page

* Add verified tier badge
2022-07-07 14:06:28 -04:00
Wilken Rivera 6b03734b2f Document known limitation of locals being used within a data source (#11864)
* Document known limitation of locals being used within a data source

* Update website/content/partials/datasources/local-dependency-limitation.mdx
2022-07-07 12:48:23 -04:00
dependabot[bot] 65611c1577 Bump github.com/hashicorp/hcl/v2 from 2.12.0 to 2.13.0 (#11856)
Bumps [github.com/hashicorp/hcl/v2](https://github.com/hashicorp/hcl) from 2.12.0 to 2.13.0.
- [Release notes](https://github.com/hashicorp/hcl/releases)
- [Changelog](https://github.com/hashicorp/hcl/blob/main/CHANGELOG.md)
- [Commits](https://github.com/hashicorp/hcl/compare/v2.12.0...v2.13.0)

---
updated-dependencies:
- dependency-name: github.com/hashicorp/hcl/v2
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <[email protected]>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-07-06 15:58:21 -04:00
Lucas Bajolet 0a41694ee5 registry: add heartbeat call for running builds (#11846)
* registry: add heartbeat call for running builds

When a build is running, we send periodic heartbeats to HCP Packer's
API.

This will be used on the service side to detect if a build is stalled on
the core side because of a crash or any other malfunction that caused
Packer not to send an update on the status of a build.

* registry: only update status on status update

Prior to this commit, we'd send updates to both the labels and the
cloud-provider whenever an update to the status of a build would be
sent.

This would cause a bug in which once a build reached the post-processing
state, and its cloud-provider was set, the status could not be updated
anymore, as the cloud-provider would be set and further updates are
rejected by the platform.

To avoid this problem, we only transmit the status when doing a status
update, and no other fields along with it.

* internal: publicise CompleteBuild function

The markBuildComplete private function used to be called from a final
status update to DONE, through the UpdateBuildStatus function.

The problem being that the (now) CompleteBuild function not only updates
the status of the build, but also all its metadata.

For consistency, we remove the indirection, and explicitely call
CompleteBuild when we want to finish a build.

* internal: block status updates on DONE builds
2022-07-05 14:37:39 -04:00
Wilken Rivera f752f8dd63 Put in dev mode 2022-06-21 17:51:54 -04:00
Wilken Rivera c4823d1174 Update CHANGELOG.md
Fix a few formatting issues.
2022-06-21 17:41:12 -04:00
Wilken Rivera f0e24a249b Cut release v1.8.2 v1.8.2 2022-06-21 13:01:18 -04:00
Wilken Rivera 172724e466 Bump to go1.17.11 2022-06-21 13:01:18 -04:00
Wilken Rivera 8d3d4e9b54 Update CHANGELOG for 1.8.2
* Add gh-11854 to changelog
2022-06-21 13:01:18 -04:00
Sylvia Moss b849ace27b Fail HCP datasources for revoked iteration (#11854) 2022-06-21 17:24:41 +02:00
Wilken Rivera 64ee27cb49 Fix typo in release yaml 2022-06-14 21:31:27 -04:00
Wilken Rivera d34c6fee03 Update permission to allow publishing release 2022-06-14 21:26:56 -04:00
Wilken Rivera 10306d4187 Fix permissions for nightly-release.yml 2022-06-14 20:36:48 -04:00
Wilken Riveraandneilnaveen cc5898022a update action permissions (#11837)
* chore: Set permissions for GitHub actions

 Restrict the GitHub token permissions only to the required ones; this way, even if the attackers will succeed in compromising your workflow, they won’t be able to do much.

- Included permissions for the action. https://github.com/ossf/scorecard/blob/main/docs/checks.md#token-permissions

https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#permissions

https://docs.github.com/en/actions/using-jobs/assigning-permissions-to-jobs

[Keeping your GitHub Actions and workflows secure Part 1: Preventing pwn requests](https://securitylab.github.com/research/github-actions-preventing-pwn-requests/)

Signed-off-by: neilnaveen <[email protected]>

* Update permissions for newly added actions

* Remove deleted actions

Co-authored-by: neilnaveen <[email protected]>
2022-06-14 12:08:39 -04:00
Wilken Rivera 0e5ddcb133 Update plugins that use StepDownload to latest version (#11844) 2022-06-13 10:39:21 -04:00
Wilken Rivera 0324e0883a Bump packer-plugin-sdk to latest version v0.3.0 (#11843)
This change brings in updates to Packer's usage of the go-getter plugin
used within the SDK for downloading ISO files. This can be a potentially
breaking change for some plugins as the update go-getter settings in the
SDK prevent reading/writing to suddir that require upload path
traversal (e.g /tmp/.../etc/hosts).

This change also includes 30 minute maximum timeouts for file
downloading to prevent resource exhaustion. This can be an issue for
very large or slow downloads if they exceed more then 30 minutes to
complete.
2022-06-13 09:22:58 -04:00
Jenna Goldstrich 1e316c9076 Remove HCP Packer acceptance tests (#11842)
* remove acceptance tests that have been moved to private repo

* Remove HCP env vars from Acceptance Test nightly run
2022-06-10 11:58:44 -04:00
Wilken Rivera 846e4e6443 Associate Packer build to HCP Packer parent iteration (#11832)
* Add support for  data source lookup

* Update failing test

* Fix typo for HCP_PACKER_BUILD_FINGERPRINT env in test
* Add test Fingerprint where needed; failing tests were not showing
  because they are properly set for acctest

* Update to use BuildContext
2022-06-10 11:39:56 -04:00
dependabot[bot] 5bf26b21d2 Bump semver-regex from 3.1.3 to 3.1.4 in /website (#11836)
Bumps [semver-regex](https://github.com/sindresorhus/semver-regex) from 3.1.3 to 3.1.4.
- [Release notes](https://github.com/sindresorhus/semver-regex/releases)
- [Commits](https://github.com/sindresorhus/semver-regex/commits/v3.1.4)

---
updated-dependencies:
- dependency-name: semver-regex
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <[email protected]>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-06-06 21:11:03 -04:00
Mahyar Saffari Moqaddam 3c9fb89a9f Update engine.mdx (#11833)
Corrected "indended" typo
2022-06-03 18:41:29 -04:00
dependabot[bot] a2d64720d7 Bump actions-ecosystem/action-create-comment from 1.0.0 to 1.0.2 (#11830)
Bumps [actions-ecosystem/action-create-comment](https://github.com/actions-ecosystem/action-create-comment) from 1.0.0 to 1.0.2.
- [Release notes](https://github.com/actions-ecosystem/action-create-comment/releases)
- [Commits](https://github.com/actions-ecosystem/action-create-comment/compare/v1.0.0...v1.0.2)

---
updated-dependencies:
- dependency-name: actions-ecosystem/action-create-comment
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <[email protected]>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-06-02 20:01:59 -04:00
dependabot[bot] 8e788a5f73 Bump actions-ecosystem/action-add-labels from 1.1.0 to 1.1.3 (#11829)
Bumps [actions-ecosystem/action-add-labels](https://github.com/actions-ecosystem/action-add-labels) from 1.1.0 to 1.1.3.
- [Release notes](https://github.com/actions-ecosystem/action-add-labels/releases)
- [Commits](https://github.com/actions-ecosystem/action-add-labels/compare/v1.1.0...v1.1.3)

---
updated-dependencies:
- dependency-name: actions-ecosystem/action-add-labels
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <[email protected]>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-06-02 20:01:40 -04:00
Wilken Rivera 805f8a4a86 Remove Linux package service configs and pre/post install scripts (#11831)
Packer does not require the installation of a Packer user or a service for Packer.
This change removes the preinst and postrm user scripts, and the config_dir directive for Packer rpm installations.

Closes #11828
2022-06-01 16:07:22 -04:00
Lucas BajoletandWilken Rivera 08157fbdce Add workflow to link to discuss on new question (#11825)
* workflows: + automatic label/response on question

When a user asks a question through an issue on this repository, we
automatically add a comment, pointing to the forums, and add a label to
the issue so we can spot more easily which issues need to be acted on.

* .github: + link to packer community for questions

As extra to the github action, this commit adds an extra button to the
new issue template, leading directly to the discuss forums for Packer

* .github: add auto-stale-close issue action

As follow-up to the labelling of question type issues as needs-reply, we
add another action that will automatically mark an issue as stale if it
has not been updated for 3 weeks, and close the issue one week after
marking it as stale.

* Update .github/workflows/issues-opened.yml

Co-authored-by: Wilken Rivera <[email protected]>
2022-05-31 15:47:44 -04:00
Vasili b9c28c7a8f Clarify documentation for template file function (#11798) 2022-05-31 10:10:24 -04:00
Lucas Bajolet c99b300e3a Add support for Env in remote shell provisioners (#11819)
* provisioner/shell: add support for Env variables

As mentioned in issue #11670, the Shell provider did not support Env
variable declarations in the HCL templates.
This commit adds the capability to the code.

* provisioner/powershell: add support for Env vars

* provisioner/windows-shell: support Env variables
2022-05-31 09:49:38 -04:00