Commit graph

17579 commits

Author SHA1 Message Date
packer-ci
aec7ec4ea8 cut version 1.7.5 2021-09-14 21:02:50 +00:00
packer-ci
7b012849fd update changelog 2021-09-14 21:02:50 +00:00
Wilken Rivera
89bf55e364
Merge pull request #11270 from hashicorp/unregister-future-datasource
Unregister packer-image-iteration datasource
2021-09-14 16:44:55 -04:00
Wilken Rivera
0dbc900698 Update CHANGELOG 2021-09-14 16:33:39 -04:00
Wilken Rivera
5c38202b46
Merge pull request #11271 from hashicorp/hcp-packer-registry-doc-changes
hcp packer registry doc changes
2021-09-14 16:27:49 -04:00
Wilken Rivera
05d77c96cf Temporarily remove hcp_packer_registry docs until out of internal beta 2021-09-14 15:58:30 -04:00
Wilken Rivera
b2a15e51c7 Rename slug to bucket_name 2021-09-14 15:57:36 -04:00
Wilken Rivera
d6a5234412 Unregister packer-image-iteration datasource
This change temporarily renames the type of the packer-image-iteration
datasource to prevent it from being automatically registered by the
Packer plugin tooling. The datasource is fully functional, but not quite
ready for full usage. It will be updated in a future release.
2021-09-14 14:25:48 -04:00
Wilken Rivera
b10df3abb7
Update HCP Packer registry image extraction, validation, publishing logic for registry capable plugins (#11221)
* Update handling of registry artifacts

This change uses the github.com/hashicorp/packer-plgin-sdk/packer/registryimage for querying
Artifact State for HCP Registry Image metadata. To handle the conversion
of the RPC response, mapstructure was introduced to conversion state
data into an registryimage.Image before publishing to a image bucket.

* Update to use registry image from packersdk

* Rename internal registry service pkg

* Update vendored plugins to latest version

* The latest release of Amazon, GoogleCompute, and Azure have support
  for publishing images to the HCP Packer registry.
2021-09-13 21:07:54 -04:00
Megan Marsh
d9a768094a update changelog 2021-09-08 15:43:05 -07:00
Wilken Rivera
7aa6b699ab
Add environment variable precheck for datasource acceptance tests (#11254)
Before change
```
=== Failed
=== FAIL: datasource/hcp-packer-iteration TestAccDatasource_HCPPackerIteration (1.97s)
    pluginacc.go:143: Error running plugin acceptance tests: Bad exit code. Logfile: packer_log_hcp_packer_iteration_datasource_basic_test.txt
        Logs can be found at /Users/wilkenrivera/Development/packer/datasource/hcp-packer-iteration/packer_log_hcp_packer_iteration_datasource_basic_test.txt
        and the acceptance test template can be found at /Users/wilkenrivera/Development/packer/datasource/hcp-packer-iteration/hcp_packer_iteration_datasource_basic_test.pkr.hcl

DONE 690 tests, 5 skipped, 1 failure in 387.912s
```

After change
```
=== SKIP: datasource/hcp-packer-iteration TestAccDatasource_HCPPackerIteration (0.00s)
    data_acc_test.go:35: Acceptance tests skipped unless envs "HCP_CLIENT_ID" and "HCP_CLIENT_SECRET" are set
```
2021-09-08 12:16:33 +02:00
Wilken Rivera
6d0d5c89f3
Update plugin directory check for ci (#11253)
* Update plugin directory check for ci

On CIRCLECI the default plugin direction is under `$HOME/.config/packer`
this changes updates the acctest just a bit to check if we are running
in a CIRCLECI env.

* Apply same logic to cleanup step
2021-09-07 16:14:59 -04:00
Matthieu MOREL
079a680492
Update golangci to v1.42.0 (#11252)
* Update Makefile

* Update .golangci.yml

Remove comment as version pinning is no longer needed.

Co-authored-by: Wilken Rivera <dev@wilkenrivera.com>
2021-09-07 16:13:50 -04:00
Megan Marsh
9123c87027
Merge pull request #11246 from hashicorp/new_data_sources
New data sources
2021-09-07 10:35:12 -07:00
Megan Marsh
c25c27b6b6 add docs pages for new data sources 2021-09-07 10:27:25 -07:00
Megan Marsh
f7e568f919
Merge pull request #11248 from hashicorp/data_source_dependencies
allow datasources to use other datasources
2021-09-07 09:37:46 -07:00
Megan Marsh
6c7aadf08f return diags earlier 2021-09-07 09:26:53 -07:00
Megan Marsh
295bac0c5f remove unnecessary complexity 2021-09-07 09:21:00 -07:00
Megan Marsh
20a83dff4f remove unneeded check. 2021-09-07 07:47:39 -07:00
Megan Marsh
48de1fc7da allow datasources to use other datasources
create a null data source for testing. We can choose to document if we want to, but it's a convenience for us

add a test to catch cyclic datasource dependency, update tests to include out of order data sources, and update the code to clean up the returned diagnostics generated from the recursive evaluation

PR review comments
2021-09-03 16:10:39 -07:00
Megan Marsh
9cab184006 tidied modfile 2021-09-03 16:05:13 -07:00
Megan Marsh
fd80f8da8c Add two new data sources -- hcp-packer-iteration and hcp-packer-image. These data sources together will allow users to query hcp_packer for the image_ids they need to use as source images to their builds, with a simple UI and clear outputs.
add quick and dirty acceptance test for hcp packer image iteration and hcp packer image data sources
PR review
linting
2021-09-03 15:51:09 -07:00
Adrien Delorme
27d89ac8d4
update all plugins + pin go to go 1.17 (#11237)
* up plugins and get rid of a dependency loop from packer to packer
2021-09-02 12:15:13 +02:00
Kevin Wang
8e026209da
fix(website): start script reloads app on save (#11244) 2021-09-01 17:07:39 -04:00
Megan Marsh
d6792820f4
Merge pull request #11227 from hashicorp/hcp_data_source
Implement hcp packer data source.
2021-08-31 09:33:48 -07:00
Adrien Delorme
9bdeb84cda
Clarify what the labels of a source block do. (#11236)
Co-authored-by: Sylvia Moss <moss@hashicorp.com>
2021-08-31 16:13:47 +02:00
Adrien Delorme
c083b53c4f
packer fix: state that the command does not work for hcl files (#11238) 2021-08-31 16:12:47 +02:00
Adrien Delorme
d25373a8d6
move inspec provisioner out (#11230) 2021-08-31 12:07:26 +02:00
Adrien Delorme
acb01cb800
move salt-masterless provisioner out (#11229)
* move salt-masterless provisioner out
* go get github.com/hashicorp/packer-plugin-salt
2021-08-31 12:07:10 +02:00
Florian Sommerfeld
eb39a3120e
Fix typo in autounattend_windows.mdx (#11233) 2021-08-31 10:46:07 +02:00
xaxo05
8f158e02ad
Bump module packer-plugin-googlecompute version to v1.0.2. (#11235) 2021-08-31 10:28:49 +02:00
Megan Marsh
60b734733b reworked docs, and created docs page. Not adding to the website index because we don't want this doc page live until after the HCP Packer registry enters public beta 2021-08-30 16:27:08 -07:00
Megan Marsh
c0eb830c42 better docstrings and regenerate docs 2021-08-30 15:53:29 -07:00
Megan Marsh
980deeb684 Implement hcp packer data source. This is a rough copy of the terraform provider's data source, to make beta user experience consistent across both sources 2021-08-27 12:03:55 -07:00
Megan Marsh
2d16da10e7
Merge pull request #11219 from hashicorp/rename_slug_to_bucket
make user-facing name for slug be bucket_name
2021-08-27 09:36:30 -07:00
Pamela Bortnick
6efee459fb
Update social share image (#11226)
* Update social share image

* Remove unecessary files
2021-08-26 17:09:39 -04:00
Megan Marsh
7985b7cb23
bump ncloud dependency to fix dependency that got deleted from github (#11224) 2021-08-25 16:02:42 -04:00
Adrien Delorme
eb8e302941
hcl2_upgrade: special case: vsphere fix (#11216)
* fix typo

* hcl2_upgrade: special case linux_options and network_interface to block instead of maps

* Update hcl2_upgrade_test.go

* Update hcl2_upgrade_test.go

remove unused code

* hcl2_upgrade: support strftime too (#11220)

* hcl2_upgrade strftime function
* create legacy_strftime.mdx
2021-08-25 14:20:08 +02:00
Megan Marsh
4c22169c90 more test fix 2021-08-23 15:29:58 -07:00
Megan Marsh
2dd8c0dd26 fix tests 2021-08-23 14:18:27 -07:00
Megan Marsh
da301ab844 make user-facing name for slug be bucket_name 2021-08-23 14:00:21 -07:00
Adrien Delorme
1d915adad1
file provisioner: add possibility to set content + tests (#11209) 2021-08-17 11:24:29 +02:00
Adrien Delorme
57f37c99ea
avoid hcl2_upgrade panic when file does not exist (#11206) 2021-08-13 16:08:12 +02:00
Mike Wickett
3f8c8704e5
chore: update alert banner (#11195) 2021-08-13 08:05:10 -04:00
Zachary Shilton
adcd472873
website: upgrade content and global styles (#11151)
* website: upgrade global-styles packages

* website: upgrade community page

* website: hide alert-banner on mobile

* website: replace g-container with g-grid-container

* website: delete unused CSS

* website: backfill missing type styles

* website: fix style import path

* website: bump to latest patched dependencies
2021-08-13 08:04:19 -04:00
dependabot[bot]
54a4f59fc7
Bump path-parse from 1.0.6 to 1.0.7 in /website (#11202)
Bumps [path-parse](https://github.com/jbgutierrez/path-parse) from 1.0.6 to 1.0.7.
- [Release notes](https://github.com/jbgutierrez/path-parse/releases)
- [Commits](https://github.com/jbgutierrez/path-parse/commits/v1.0.7)

---
updated-dependencies:
- dependency-name: path-parse
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2021-08-12 10:56:36 +02:00
Wilken Rivera
e8b5b4b516
Fix {{packer_version}} interpolation regression (#11200)
* Add Packer version to main context at variable interpolation

Test Results Before Change
```
=== RUN   TestCoreBuild_packerVersion
    testing.go:30: err: template: root:1:2: executing "root" at <packer_version>: error calling packer_version: packer_version not available
--- FAIL: TestCoreBuild_packerVersion (0.00s)
```

Test Results After Change
```
=== RUN   TestCoreBuild_packerVersion
--- PASS: TestCoreBuild_packerVersion (0.00s)
```

* Add packer_core_version to interpolation context for HCL configs

Test Results Before Change
```
=== RUN   TestParse_build/provisioner_with_packer_version_interpolation
    common_test.go:109: Parser.getBuilds() unexpected diagnostics. testdata/build/provisioner_packer_version_interpolation.pkr.hcl:8,5-24: Failed preparing provisioner-block
 "shell" ""; render 'slice_string': template: root:1:2: executing "root" at <packer_version>: error calling packer_version: packer_version not available in:

        {{packer_version}}
--- FAIL: TestParse_build (0.01s)
```

Test Results After Change
```
--- PASS: TestParse_build (0.02s)
--- PASS: TestParse_build/provisioner_with_packer_version_interpolation (0.00s)
```
2021-08-12 10:55:32 +02:00
Adrien Delorme
689c7763d4
document the plugin-getter.Get interface (#11196) 2021-08-11 16:32:38 +02:00
Wilken Rivera
a534c743cf
HCP Packer registry enabled Packer client (#11154)
* Add working registry pkg

* Add custom error for handling the loading of PAR environment variables

* Working Publish to Build, with proper error handling for bucket names

* Update hcp-sdk-go to use branch instead of mod replace directive

* Update Packer build status configuration

* Add support for HCP_PACKER_BUILD_FINGERPRINT env

* Add support for publishing one or more PARtifacts from a single build

* add git shas to this branch

* Add ability to set provider name if available

* Add working RegistryBuilder type

* Add RegistryPostProcessor as wrapper post-processor

* When in PAR mode a empty RegistryPostProcessor is added to the end of
  the post-processor list to publish all final image data.

* Add support for updating a build from PAR that is not in a DONE state

* Fix a small issue with creation the initial builds for an empty
  iteration.

* Add PAR URL to post-processor display

* Implement hcp_packer_registry block (#11168)

* Update vendored Amazon plugin to v1.0.1-dev

* Fix panic when running a Packer registry build in a clean directory

* Remove the publishing of post-processor metadata from the registry
  post-processor.

* Remove metadata add from registry_builder

* Update registry builder to skip a build that was found to be DONE

Co-authored-by: Megan Marsh <megan@hashicorp.com>
Co-authored-by: Sylvia Moss <moss@hashicorp.com>
2021-08-05 09:25:19 -04:00
Mike Wickett
298ca5fd35
website: update consent manager (#11177) 2021-07-30 15:45:14 -04:00