packer/packer
Hari eee3805c06
Some checks are pending
build / get-go-version (push) Waiting to run
build / set-product-version (push) Waiting to run
build / generate-metadata-file (push) Blocked by required conditions
build / Go ${{ needs.get-go-version.outputs.go-version }} freebsd 386 build (push) Blocked by required conditions
build / Go ${{ needs.get-go-version.outputs.go-version }} netbsd 386 build (push) Blocked by required conditions
build / Go ${{ needs.get-go-version.outputs.go-version }} openbsd 386 build (push) Blocked by required conditions
build / Go ${{ needs.get-go-version.outputs.go-version }} solaris 386 build (push) Blocked by required conditions
build / Go ${{ needs.get-go-version.outputs.go-version }} windows 386 build (push) Blocked by required conditions
build / Go ${{ needs.get-go-version.outputs.go-version }} freebsd amd64 build (push) Blocked by required conditions
build / Go ${{ needs.get-go-version.outputs.go-version }} netbsd amd64 build (push) Blocked by required conditions
build / Go ${{ needs.get-go-version.outputs.go-version }} openbsd amd64 build (push) Blocked by required conditions
build / Go ${{ needs.get-go-version.outputs.go-version }} solaris amd64 build (push) Blocked by required conditions
build / Go ${{ needs.get-go-version.outputs.go-version }} windows amd64 build (push) Blocked by required conditions
build / Go ${{ needs.get-go-version.outputs.go-version }} freebsd arm build (push) Blocked by required conditions
build / Go ${{ needs.get-go-version.outputs.go-version }} netbsd arm build (push) Blocked by required conditions
build / Go ${{ needs.get-go-version.outputs.go-version }} openbsd arm build (push) Blocked by required conditions
build / Go ${{ needs.get-go-version.outputs.go-version }} linux 386 build (push) Blocked by required conditions
build / Go ${{ needs.get-go-version.outputs.go-version }} linux amd64 build (push) Blocked by required conditions
build / Go ${{ needs.get-go-version.outputs.go-version }} linux arm build (push) Blocked by required conditions
build / Go ${{ needs.get-go-version.outputs.go-version }} linux arm64 build (push) Blocked by required conditions
build / Go ${{ needs.get-go-version.outputs.go-version }} linux ppc64le build (push) Blocked by required conditions
build / Go ${{ needs.get-go-version.outputs.go-version }} darwin amd64 build (push) Blocked by required conditions
build / Go ${{ needs.get-go-version.outputs.go-version }} darwin arm64 build (push) Blocked by required conditions
build / Docker light 386 build (push) Blocked by required conditions
build / Docker light amd64 build (push) Blocked by required conditions
build / Docker light arm build (push) Blocked by required conditions
build / Docker light arm64 build (push) Blocked by required conditions
build / Docker full 386 build (push) Blocked by required conditions
build / Docker full amd64 build (push) Blocked by required conditions
build / Docker full arm build (push) Blocked by required conditions
build / Docker full arm64 build (push) Blocked by required conditions
Go Test / get-go-version (push) Waiting to run
Go Test / Linux go tests (push) Blocked by required conditions
Go Test / Darwin go tests (push) Blocked by required conditions
Go Test / Windows go tests (push) Blocked by required conditions
Go Validate / get-go-version (push) Waiting to run
Go Validate / Go Mod Tidy (push) Blocked by required conditions
Go Validate / Lint (push) Blocked by required conditions
Go Validate / Fmt check (push) Blocked by required conditions
Go Validate / Generate check (push) Blocked by required conditions
Feature/enforced provisioner (#13591)
* added the parser for the enforced block

* Enhance enforced provisioner parsing to support HCL and JSON formats

- Updated ParseProvisionerBlocks to handle both HCL and JSON syntax, including legacy JSON format.

- Added comprehensive test cases for JSON provisioner parsing.

- Improved ExtractBuildProvisionerHCL to merge inline commands from shell provisioners.

- Enhanced logging for enforced block operations in HCP Packer.

* Remove PublishEnforcedBlocks function from Bucket struct

* Remove ExtractBuildProvisionerHCL function and unused imports

* Reverted the version upgrade

* Added the internal-sdk for the enforcedProvsioner api changes

* Enhance enforced provisioner handling and error reporting

- Update error handling in FetchEnforcedBlocks to return detailed errors instead of warnings.
- Modify GetCoreBuildProvisionerFromBlock to accept build name for overrides.
- Add tests for FetchEnforcedBlocks to ensure correct behavior and error handling.
- Implement diagnostics for unsupported legacy JSON templates.

* Implement enforced provisioner parsing and handling

- Introduced a new package `enforcedparser` to handle parsing of enforced provisioner blocks from HCL and JSON formats.

- Refactored existing code to utilize the new `ParseProvisionerBlocks` function from the `enforcedparser` package.

- Updated `GetCoreBuildProvisionerFromEnforcedBlock` method to convert enforced provisioner blocks into core build provisioners.

- Enhanced error handling and logging during the parsing process.

- Added tests for the new parsing functionality and ensured existing tests were updated to reflect changes.

- Modified `InjectEnforcedProvisioners` method in JSON registry to utilize the new parsing logic.

* Add test case for -skip-enforcement flag in BuildArgs

* Refactor sensitive variable handling in provisioners and add related tests

* Refactor enforced provisioner handling: remove internal parser, update tests, and streamline API interactions

* Enhance provisioner block parsing: add error handling for invalid combinations and expand test coverage

* Remove internal SDK replacement for enforced block types in go.mod

* Update dependencies in go.mod and go.sum: bump hcp-sdk-go and packer-plugin-sdk versions, adjust syft version, and update OpenTelemetry packages

* Update hcp-sdk-go dependency to v0.172.0 in go.mod and go.sum

* Fix formatting in TestBuildCommand_ParseArgs and add newline at end of json_enforced_test.go

* Refactor testJSONRegistryWithBuilds: remove environment variable setup and streamline registry initialization

* Rename injected variable for clarity in InjectEnforcedProvisioners function

---------

Co-authored-by: Hari Om <58305594+Madhav008@users.noreply.github.com>
2026-04-17 14:17:28 +05:30
..
plugin-getter [COMPLIANCE] Update Copyright and License Headers (Batch 2 of 5) 2025-12-11 07:02:15 +00:00
test-fixtures Update JSON template does not return substitute values in 1.8.6 version (#12290) 2023-03-01 15:19:44 -05:00
build.go Feature/enforced provisioner (#13591) 2026-04-17 14:17:28 +05:30
build_test.go Feature/enforced provisioner (#13591) 2026-04-17 14:17:28 +05:30
builder_test.go [COMPLIANCE] Update Copyright and License Headers (Batch 2 of 5) 2025-12-11 07:02:15 +00:00
client_test.go [COMPLIANCE] Update Copyright and License Headers (Batch 2 of 5) 2025-12-11 07:02:15 +00:00
cmd_builder.go [COMPLIANCE] Update Copyright and License Headers (Batch 2 of 5) 2025-12-11 07:02:15 +00:00
cmd_builder_test.go [COMPLIANCE] Update Copyright and License Headers (Batch 2 of 5) 2025-12-11 07:02:15 +00:00
cmd_datasource.go [COMPLIANCE] Update Copyright and License Headers (Batch 2 of 5) 2025-12-11 07:02:15 +00:00
cmd_datasource_test.go [COMPLIANCE] Update Copyright and License Headers (Batch 2 of 5) 2025-12-11 07:02:15 +00:00
cmd_hook.go [COMPLIANCE] Update Copyright and License Headers (Batch 2 of 5) 2025-12-11 07:02:15 +00:00
cmd_hook_test.go [COMPLIANCE] Update Copyright and License Headers (Batch 2 of 5) 2025-12-11 07:02:15 +00:00
cmd_post_processor.go [COMPLIANCE] Update Copyright and License Headers (Batch 2 of 5) 2025-12-11 07:02:15 +00:00
cmd_post_processor_test.go [COMPLIANCE] Update Copyright and License Headers (Batch 2 of 5) 2025-12-11 07:02:15 +00:00
cmd_provisioner.go [COMPLIANCE] Update Copyright and License Headers (Batch 2 of 5) 2025-12-11 07:02:15 +00:00
cmd_provisioner_test.go [COMPLIANCE] Update Copyright and License Headers (Batch 2 of 5) 2025-12-11 07:02:15 +00:00
core.go Feature/enforced provisioner (#13591) 2026-04-17 14:17:28 +05:30
core_test.go [COMPLIANCE] Update Copyright and License Headers (Batch 2 of 5) 2025-12-11 07:02:15 +00:00
fixconfigmode_enumer.go Makefile: replace enumer upstream with dmarkham's (#13107) 2024-07-16 21:14:27 -04:00
maps.go [COMPLIANCE] Update Copyright and License Headers (Batch 2 of 5) 2025-12-11 07:02:15 +00:00
packer_test.go [COMPLIANCE] Update Copyright and License Headers (Batch 2 of 5) 2025-12-11 07:02:15 +00:00
plugin.go [COMPLIANCE] Update Copyright and License Headers (Batch 3 of 5) 2025-12-11 07:02:12 +00:00
plugin_client.go [COMPLIANCE] Update Copyright and License Headers (Batch 3 of 5) 2025-12-11 07:02:12 +00:00
plugin_discover_test.go [COMPLIANCE] Update Copyright and License Headers (Batch 3 of 5) 2025-12-11 07:02:12 +00:00
plugin_folders.go [COMPLIANCE] Update Copyright and License Headers (Batch 3 of 5) 2025-12-11 07:02:12 +00:00
plugin_test.go [COMPLIANCE] Update Copyright and License Headers (Batch 3 of 5) 2025-12-11 07:02:12 +00:00
post_processor_mock.go [COMPLIANCE] Update Copyright and License Headers (Batch 3 of 5) 2025-12-11 07:02:12 +00:00
post_processor_mock.hcl2spec.go Use packer-sdc in packer + remove mapstructure-to-hcl2 & struct-markdown (#10913) 2021-04-16 11:52:03 +02:00
progressbar.go [COMPLIANCE] Update Copyright and License Headers (Batch 3 of 5) 2025-12-11 07:02:12 +00:00
progressbar_solaris.go [COMPLIANCE] Update Copyright and License Headers (Batch 3 of 5) 2025-12-11 07:02:12 +00:00
progressbar_test.go [COMPLIANCE] Update Copyright and License Headers (Batch 3 of 5) 2025-12-11 07:02:12 +00:00
provisioner.go Feature/enforced provisioner (#13591) 2026-04-17 14:17:28 +05:30
provisioner_test.go [COMPLIANCE] Update Copyright and License Headers (Batch 3 of 5) 2025-12-11 07:02:12 +00:00
provisioner_timeout.go [COMPLIANCE] Update Copyright and License Headers (Batch 3 of 5) 2025-12-11 07:02:12 +00:00
run_interfaces.go [COMPLIANCE] Update Copyright and License Headers (Batch 3 of 5) 2025-12-11 07:02:12 +00:00
secrets.go BUG: Scrub multiline sensitive values from build output 2026-03-26 12:04:48 +05:30
telemetry.go [COMPLIANCE] Update Copyright and License Headers (Batch 3 of 5) 2025-12-11 07:02:12 +00:00
telemetry_test.go [COMPLIANCE] Update Copyright and License Headers (Batch 3 of 5) 2025-12-11 07:02:12 +00:00
testing.go [COMPLIANCE] Update Copyright and License Headers (Batch 3 of 5) 2025-12-11 07:02:12 +00:00
ui.go Refactors sensitive multiline test to use OS-specific fixtures 2026-03-26 12:25:55 +05:30
ui_test.go BUG: Scrub multiline sensitive values from build output 2026-03-26 12:04:48 +05:30