Skip to content

Commit

Permalink
backport of commit 41b2215
Browse files Browse the repository at this point in the history
  • Loading branch information
pavedroad committed Mar 12, 2024
1 parent a463abd commit 4020f95
Show file tree
Hide file tree
Showing 32 changed files with 1,306 additions and 660 deletions.
2 changes: 1 addition & 1 deletion .github/CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -274,7 +274,7 @@ does not attempt to track the latest version for each dependency.
Packer relies on `go generate` to generate a [peg parser for boot
commands](https://github.com/hashicorp/packer/blob/master/packer-plugin-sdk/bootcommand/boot_command.go),
[docs](https://github.com/hashicorp/packer/blob/master/website/pages/partials/builder/amazon/chroot/_Config-not-required.mdx)
and HCL2's bridging code. Packer's testing suite will run `make generate-check`
and HCL2's bridging code. Packer's testing suite will run `make check-generate`
to check that all the generated files Packer needs are what they should be.
`make generate` re-generates all these file and can take a while depending on
your machine's performances. To make it faster it is recommended to run
Expand Down
10 changes: 5 additions & 5 deletions .github/ISSUE_TEMPLATE/plugin_integration.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,9 @@ A written description of your plugin along with a link to the plugin repository.
HashiCorp Technology partners https://www.hashicorp.com/partners/find-a-partner will be registered as a partner once verified. --->

#### Checklist
- [ ] Has valid [`metadata.hcl`](https://github.com/hashicorp/integration-template) file in plugin repository.
- [ ] Has added integration scripts [packer-plugin-scaffolding](https://github.com/hashicorp/packer-plugin-scoffolding) to plugin repository.
- [ ] Has added top-level integration README.md file to plugin `docs` directory.
- [ ] All plugins components have one README.md describing their usage.
- [ ] Has a fully synced `.web-docs` directory ready for publishing to the integrations portal.
- [] Has valid [`metadata.hcl`](https://github.com/hashicorp/integration-template) file in plugin repository.
- [] Has added integration scripts [packer-plugin-scaffolding](https://github.com/hashicorp/packer-plugin-scoffolding) to plugin repository.
- [] Has added top-level integration README.md file to plugin `docs` directory.
- [] All plugins components have one README.md describing their usage.
- [] Has a fully synced `.web-docs` directory ready for publishing to the integrations portal.

2 changes: 1 addition & 1 deletion .go-version
Original file line number Diff line number Diff line change
@@ -1 +1 @@
1.21.8
1.20.12
7 changes: 0 additions & 7 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -70,13 +70,6 @@ If, however, a 1.1.1 release version of the plugin is available, it will have pr
└── packer-plugin-amazon_v1.1.1_x5.0_darwin_arm64_SHA256SUM
```

## 1.10.3 (Upcoming)

### IMPROVEMENTS:
* cmd/fmt: Display actual parsing errors when the `packer fmt` fails to read a
template containing invalid HCL2 syntax.
[GH-12870](https://github.com/hashicorp/packer/pull/12870)

## 1.10.2 (March 6, 2024)

### NOTES:
Expand Down
2 changes: 2 additions & 0 deletions CODEOWNERS
Original file line number Diff line number Diff line change
Expand Up @@ -2,3 +2,5 @@

# release configuration

/.release/ @hashicorp/release-engineering
/.github/workflows/build.yml @hashicorp/release-engineering
5 changes: 0 additions & 5 deletions command/build.go
Original file line number Diff line number Diff line change
Expand Up @@ -86,11 +86,6 @@ func writeDiags(ui packersdk.Ui, files map[string]*hcl.File, diags hcl.Diagnosti
}

func (c *BuildCommand) RunContext(buildCtx context.Context, cla *BuildArgs) int {
// Set the release only flag if specified as argument
//
// This deactivates the capacity for Packer to load development binaries.
c.CoreConfig.Components.PluginConfig.ReleasesOnly = cla.ReleaseOnly

packerStarter, ret := c.GetConfig(&cla.MetaArgs)
if ret != 0 {
return ret
Expand Down
6 changes: 0 additions & 6 deletions command/cli.go
Original file line number Diff line number Diff line change
Expand Up @@ -90,9 +90,6 @@ func (ba *BuildArgs) AddFlagSets(flags *flag.FlagSet) {
flags.Var(flagOnError, "on-error", "")

flags.BoolVar(&ba.MetaArgs.WarnOnUndeclaredVar, "warn-on-undeclared-var", false, "Show warnings for variable files containing undeclared variables.")

flags.BoolVar(&ba.ReleaseOnly, "ignore-prerelease-plugins", false, "Disable the loading of prerelease plugin binaries (x.y.z-<prerelease-name>.")

ba.MetaArgs.AddFlagSets(flags)
}

Expand All @@ -103,7 +100,6 @@ type BuildArgs struct {
Color, TimestampUi, MachineReadable bool
ParallelBuilds int64
OnError string
ReleaseOnly bool
}

func (ia *InitArgs) AddFlagSets(flags *flag.FlagSet) {
Expand Down Expand Up @@ -146,7 +142,6 @@ func (va *ValidateArgs) AddFlagSets(flags *flag.FlagSet) {
flags.BoolVar(&va.SyntaxOnly, "syntax-only", false, "check syntax only")
flags.BoolVar(&va.NoWarnUndeclaredVar, "no-warn-undeclared-var", false, "Ignore warnings for variable files containing undeclared variables.")
flags.BoolVar(&va.EvaluateDatasources, "evaluate-datasources", false, "evaluate datasources for validation (HCL2 only, may incur costs)")
flags.BoolVar(&va.ReleaseOnly, "ignore-prerelease-plugins", false, "Disable the loading of prerelease plugin binaries (x.y.z-<prerelease-name>.")

va.MetaArgs.AddFlagSets(flags)
}
Expand All @@ -156,7 +151,6 @@ type ValidateArgs struct {
MetaArgs
SyntaxOnly, NoWarnUndeclaredVar bool
EvaluateDatasources bool
ReleaseOnly bool
}

func (va *InspectArgs) AddFlagSets(flags *flag.FlagSet) {
Expand Down
4 changes: 2 additions & 2 deletions command/init.go
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ for more info.`)
}

opts := plugingetter.ListInstallationsOptions{
PluginDirectory: c.Meta.CoreConfig.Components.PluginConfig.PluginDirectory,
FromFolders: c.Meta.CoreConfig.Components.PluginConfig.KnownPluginFolders,
BinaryInstallationOptions: plugingetter.BinaryInstallationOptions{
OS: runtime.GOOS,
ARCH: runtime.GOARCH,
Expand Down Expand Up @@ -132,7 +132,7 @@ for more info.`)
}

newInstall, err := pluginRequirement.InstallLatest(plugingetter.InstallOptions{
PluginDirectory: opts.PluginDirectory,
InFolders: opts.FromFolders,
BinaryInstallationOptions: opts.BinaryInstallationOptions,
Getters: getters,
Force: cla.Force,
Expand Down
Loading

0 comments on commit 4020f95

Please sign in to comment.