Karthik P
74cc342e44
Merge pull request #13539 from MBradbury/powershell-test-lastexitcode
...
Check LASTEXITCODE is set before checking its value
2026-01-28 09:59:46 +05:30
Matthew Bradbury
4da6b47a17
Fix test
2025-12-12 21:54:03 +00:00
hashicorp-copywrite[bot]
a79100518c
[COMPLIANCE] Update Copyright and License Headers (Batch 3 of 5)
2025-12-11 07:02:12 +00:00
Matthew Bradbury
f9abca0bd7
Check LASTEXITCODE is set before checking its value
2025-11-26 12:04:42 +00:00
Anurag Sharma
543123ac17
bump golang.org/x/crypto to 0.43.0 ( #13518 )
...
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
* bump golang.org/x/crypto to 0.43.0
CVE-2025-47913 GO-2025-4116
* fixed go.sum
* fixed multiple warnings that prevented test runs
* make generate
* fix lint errors, update linter version
* fix go vet issues
2025-11-18 15:49:03 +05:30
kp2099
4dd1fef558
removing $result from wrapper string ( #13451 )
...
* removing $result from wrapper
* test fixes
2025-08-19 16:57:54 +05:30
kp2099
7167626ca2
Merge pull request #13422 from hashicorp/karthik/seperate_default_commands
...
Seperating default execute commands for Inline and Scripts
2025-07-01 11:35:42 +05:30
Tanmay Jain
99b8f98a8b
Updating a log to prevent secret leaks
2025-06-24 21:36:50 +05:30
karthik P
19f04a2a93
fixing test cases
2025-06-24 19:54:58 +05:30
karthik P
43d7b468de
Separate out the default execute commands for Inline and Scripts
2025-06-24 18:32:43 +05:30
karthik P
85817176d4
adding comment for extractScript
2025-06-03 23:23:12 +05:30
karthik P
49c3512da8
fixing identation and test case
2025-06-03 23:03:02 +05:30
karthik P
cbee767cbc
adding new line character to each written command.
2025-06-03 22:09:49 +05:30
karthik P
4e62b58c88
powershell enviornment variables for script config fix
2025-06-03 17:39:32 +05:30
karthik P
d0a4108ba4
init commit
2025-06-03 12:46:25 +05:30
Karthik P
089df02532
Powershell Provisioner Error Handling ( #13334 )
...
* WIP Testing Approach
* WIP Testing Approach
* WIP Testing Approach Work
* WIP Testing Approach
* adding acceptance test for windows Amazon EBS.
* modify wrapper string to use Set-Variable
* fixing unit tests
* cleanup
* updated approach to use -file instead of inline powershell execution.
* adding more scenarios for acceptance test.
* using writeString for file directly.
* changing variable name
* updating test case. cleanup.
* updating test case
* updating test case
* updating test case - nested try catch
* adding unit test for None Execution Policy
* adding unit test for None Execution Policy
* fix test case
2025-04-25 11:23:32 +05:30
Lucas Bajolet
4a7f5f38a6
Makefile: replace enumer upstream with dmarkham's ( #13107 )
...
Since the enumer implementation we used hadn't been updated for 5+
years, this didn't work with recent linux/go versions, and enumer
crashed while attempting to parse/analyse the source files.
There's another alternative on Github, forked from the one we used,
which seems more maintained now, and does produce the expected files in
Packer.
2024-07-16 21:14:27 -04:00
IAMDAVID0920
d625694a88
refactor: remove deprecated InitializePluginVersion, replace with NewPluginVersion
2024-06-03 09:37:30 -04:00
guoguangwu
7eb6a45cd4
chore: remove refs to deprecated io/ioutil
...
Signed-off-by: guoguangwu <guoguangwu@magic-shield.com>
2023-09-26 11:13:31 -04:00
hashicorp-copywrite[bot]
19055df3ec
[COMPLIANCE] License changes ( #12568 )
...
* Updating the license from MPL to Business Source License
Going forward, this project will be licensed under the Business Source License v1.1. Please see our blog post for more details at https://hashi.co/bsl-blog , FAQ at https://hashi.co/license-faq , and details of the license at www.hashicorp.com/bsl.
* Update copyright file headers to BUSL-1.1
---------
Co-authored-by: hashicorp-copywrite[bot] <110428419+hashicorp-copywrite[bot]@users.noreply.github.com>
2023-08-10 15:53:29 -07:00
Wilken Rivera
eca75a6847
Run make fmt to fix checks
2023-04-27 15:17:31 -04:00
hashicorp-copywrite[bot]
b7df3ca36f
[COMPLIANCE] Add Copyright and License Headers ( #12254 )
...
Co-authored-by: hashicorp-copywrite[bot] <110428419+hashicorp-copywrite[bot]@users.noreply.github.com>
2023-03-02 15:37:05 -05:00
Lucas Bajolet
f4a2ac3b31
feat: support pwsh in powershell provisioner ( #11950 )
...
* set `pwsh` to true in config to run `pwsh.exe`, default is false.
* add docs
Co-authored-by: Ed Eustace <ed@smashcut.com>
2022-08-19 16:00:46 -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
Lucas Bajolet
cbc67b7636
Merge pull request #11792 from teddylear/feat-pause_after-powershell
...
feat: Add pause_after config to powershell provisioner like shell
2022-05-30 16:47:25 -04:00
teddylear
d00a41c6ae
fix: updates to have make fmt-check and ci-lint pass
2022-05-27 19:36:41 -04:00
Lucas Bajolet
71752c9e1e
powershell/provisioner: remove useless fmt.Sprintf
...
The fmt.Sprintf statement in Provisioner.Provision took a plain string
as parameter, without any arguments, making it futile to call.
2022-05-27 16:44:55 -04:00
Lucas Bajolet
673a97290a
provisioner/powershell: remove unused variable
...
The retryableSleep variable in the powershell provisioner was defined
but never used, so we can safely rename it.
2022-05-27 16:44:55 -04:00
teddylear
000ace61a3
feat: Add pause_after config to powershell provisioner like shell
...
provisioner
2022-05-18 17:35:48 -04:00
Adrien Delorme
0362a3ec10
all shells: Pass env vars through a key value store ( #11569 )
...
* allowing to set shell env vars from a key/value map.
* tests
This new map will work alongside the `environment_vars` but it allows using a
datasource value seamlessly. At validation, and because `environment_vars` was
an array of strings containing `KEY=value`, using datsources would not work,
because these values are not known yet and would evaluate to `<unknown>`. With
this, the value and the key can be unknown and will validate correctly for
datasources.
2022-02-16 12:05:44 +01:00
Adrien Delorme
a2124eb594
Tiny tweaks and fixes for the PowerShell provisioner ( #11410 )
...
* add docs
* fix potential bug
2021-11-23 12:34:26 +01:00
Adrien Delorme
87ba7258b3
Use packer-sdc in packer + remove mapstructure-to-hcl2 & struct-markdown ( #10913 )
...
* start using `go:generate packer-sdc struct-markdown`
* Update Makefile
remove @go install ./cmd/struct-markdown
* run go generate for struct-markdown
* use //go:generate packer-sdc mapstructure-to-hcl2
* run go generate for mapstructure-to-hcl2
* remove struct-markdown and mapstructure-to-hcl2
* vendor vendors
2021-04-16 11:52:03 +02:00
Megan Marsh
88b7b0e14a
remove sdk
2020-12-17 13:29:25 -08:00
Megan Marsh
5f34bbd56e
add extra line before package declaration so this line does not become the synopsis of a package for godoc
2020-12-16 15:14:43 -08:00
Megan Marsh
76177b50ce
Refactor provisioner acceptance tests to shell directly out to Packer rather than import the core. Modify test case formatting to more closely reflect the builder test cases.
2020-12-07 15:45:16 -08:00
Megan Marsh
8f51a8bfae
move provisioner acceptance tests into sdk alongside builder acceptance tests. Reorganize slightly to make sure no import cycles of doom get formed
2020-12-03 14:22:18 -08:00
Megan Marsh
5576bb5caa
move packer config constants next to the packer config
2020-12-03 10:17:35 -08:00
Megan Marsh
be5763ec41
move provisioner interface into sdk
2020-12-01 14:25:14 -08:00
Megan Marsh
d5971ca25e
fix tests by moving mock hooks and communicators, and BasicUi definition, into SDK
2020-11-30 14:30:30 -08:00
Megan Marsh
56a45b04ab
Move hook and communicator definitions to packer-plugin-sdk
2020-11-30 14:30:30 -08:00
Megan Marsh
c70870cb83
move multierror and multierrorappend into sdk
2020-11-30 14:29:06 -08:00
Megan Marsh
001886670d
move Ui definition into the packer plugin sdk.
2020-11-30 14:26:54 -08:00
Megan Marsh
f8f1ebf0c7
move version and useragent definitions into sdk
2020-11-18 11:42:02 -08:00
Megan Marsh
9e47696dff
move helper/config to bundle with the other template definitions
2020-11-18 10:34:59 -08:00
Megan Marsh
3f6deb8828
move multistep into the plugin sdk
2020-11-17 16:31:03 -08:00
Megan Marsh
7d658149ea
update tests and website and generated partials to reflect new package format
2020-11-17 10:36:01 -08:00
Megan Marsh
1ffc358ada
move tmp helper func into packer-plugin-sdk
2020-11-16 15:13:08 -08:00
Megan Marsh
c4d0c5505a
fix tests
...
regenerate code
regenerate code, revendor
fix website
2020-11-13 15:00:12 -08:00
Megan Marsh
e04eaa89e6
move steps and step configs from packer/common to packer/common/commonsteps
2020-11-13 11:15:04 -08:00
Megan Marsh
6402362018
create packer-plugin-sdk directory and begin moving the relevant folders into it.
2020-11-13 10:47:36 -08:00