diff --git a/.github/CONTRIBUTING.md b/.github/CONTRIBUTING.md index 2696178f8..6cc3e2832 100644 --- a/.github/CONTRIBUTING.md +++ b/.github/CONTRIBUTING.md @@ -282,6 +282,52 @@ localized code generation. Say you are working on the Amazon builder: running `go generate ./builder/amazon/...` will do that for you. Make sure that the latest code generation tool is installed by running `make install-gen-deps`. +#### Updating Documentation + +**IMPORTANT:** Packer's product documentation has moved to the [`hashicorp/web-unified-docs`](https://github.com/hashicorp/web-unified-docs) repository. All documentation contributions must be made directly to that repository. + +##### Making Documentation Changes + +1. **Clone the web-unified-docs repository:** + ```bash + git clone https://github.com/hashicorp/web-unified-docs.git + cd web-unified-docs + ``` + +2. **Make your documentation changes:** + - **For auto-generated partials** (e.g., configuration options): Edit the source code in your local Packer repository, then run `make generate` in `web-unified-docs` to regenerate the documentation + - **For all other documentation files**: Edit them directly in the `web-unified-docs` repository + +3. **Generate documentation** (if you've made changes to Packer code that affect auto-generated docs): + ```bash + make generate + ``` + +##### Testing Documentation Changes Locally + +To test your documentation changes against your local Packer code: + +Set the following environment variables before running `make generate`: + +- `PACKER_REPO`: Path to your local Packer repository + ```bash + export PACKER_REPO=/path/to/your/local/packer + ``` + +- `PACKER_BRANCH`: Branch name (only needed for remote repos, not local paths) + ```bash + export PACKER_BRANCH=your-feature-branch + ``` + +Then run: +```bash +make generate +``` + +This will use your local Packer code to generate the documentation, allowing you to preview how your code changes will appear in the docs. + +For more information about the documentation structure and contribution process, refer to the README in the `web-unified-docs` repository. + #### Code linting Packer relies on [golangci-lint](https://github.com/golangci/golangci-lint) for linting its Go code base, excluding any generated code created by `go generate`. Linting is executed on new files during Travis builds via `make ci`; the linting of existing code base is only executed when running `make lint`. Linting a large project like Packer is an iterative process so existing code base will have issues that are actively being fixed; pull-requests that fix existing linting issues are always welcomed :smile:. diff --git a/.github/dependabot.yml b/.github/dependabot.yml index bbf1c27f6..eebcbe87a 100644 --- a/.github/dependabot.yml +++ b/.github/dependabot.yml @@ -1,5 +1,21 @@ version: 2 updates: +- package-ecosystem: "github-actions" + directory: "/" + schedule: + interval: "monthly" + labels: + - "dependencies" + + ignore: + - dependency-name: "*" + update-types: + - "version-update:semver-major" + groups: + # Group all GitHub Actions updates into a single PR + actions: + patterns: + - "*" - package-ecosystem: gomod directory: / schedule: diff --git a/.go-version b/.go-version index 53cc1a6f9..e6a6e7cd3 100644 --- a/.go-version +++ b/.go-version @@ -1 +1 @@ -1.24.0 +1.25.8 diff --git a/.golangci.yml b/.golangci.yml index b20723c46..1e731c826 100644 --- a/.golangci.yml +++ b/.golangci.yml @@ -1,6 +1,8 @@ # Copyright IBM Corp. 2013, 2025 # SPDX-License-Identifier: BUSL-1.1 +version: 2 + issues: # List of regexps of issue texts to exclude, empty list by default. # But independently from this option we use default exclude patterns, @@ -34,8 +36,6 @@ linters: disable-all: true enable: - errcheck - - goimports - - gosimple - govet - ineffassign - staticcheck @@ -43,6 +43,10 @@ linters: - unused fast: true +formatters: + enable: + - goimports + # options for analysis running run: # default concurrency is a available CPU number @@ -94,7 +98,9 @@ run: # output configuration options output: # colored-line-number|line-number|json|tab|checkstyle|code-climate, default is "colored-line-number" - format: colored-line-number + formats: + colored-line-number: + path: stdout # print lines of code with issue, default is true print-issued-lines: true diff --git a/CHANGELOG.md b/CHANGELOG.md index aae00b2f4..f07e0778f 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,41 @@ # 📦 Changelog +## 1.15.1 (March 26, 2026) + +### FEATURES: + +* hcp: native sbom generation for hcp + [GH-13566](https://github.com/hashicorp/packer/pull/13566) + +### BUG FIXES: + +* core: Scrub multiline sensitive values from build output (including OS-specific multiline sensitive-value fixtures) + [GH-13582](https://github.com/hashicorp/packer/pull/13582) + +### SECURITY: + +* deps: bump syft to v1.42.3 (fixes GO-2026-4809) + [GH-13581](https://github.com/hashicorp/packer/pull/13581) +* deps: bump github.com/hashicorp/packer-plugin-sdk to v0.6.7 + [GH-13581](https://github.com/hashicorp/packer/pull/13581) +* deps: bump github.com/hashicorp/hcp-sdk-go from 0.136.0 to 0.167.0 + [GH-13560](https://github.com/hashicorp/packer/pull/13560) +* deps: Updates OpenTelemetry dependencies to v1.41.0 + [GH-13572](https://github.com/hashicorp/packer/pull/13572) +* deps: Upgrade go-git to v5.17.0 and grpc to 1.79.3 + [GH-13570](https://github.com/hashicorp/packer/pull/13570) +* deps: Updates circl dependency to v1.6.3 + [GH-13564](https://github.com/hashicorp/packer/pull/13564) + +### INTERNAL: + +* ci: Adds grouped and scheduled updates for GitHub Actions (monthly, grouped PRs, ignore major bumps) + [GH-13575](https://github.com/hashicorp/packer/pull/13575) +* docs: remove docs validation from packer (docs changes move to web-unified-docs) + [GH-13577](https://github.com/hashicorp/packer/pull/13577) +* legal: Update LICENSE + [GH-13563](https://github.com/hashicorp/packer/pull/13563) + ## 1.15.0 (February 4, 2026) ### IMPROVEMENTS: diff --git a/Makefile b/Makefile index 07039e96f..4139b5c1f 100644 --- a/Makefile +++ b/Makefile @@ -55,7 +55,7 @@ install-gen-deps: ## Install dependencies for code generation install-lint-deps: ## Install linter dependencies @echo "==> Updating linter dependencies..." - @curl -sSfL -q https://raw.githubusercontent.com/golangci/golangci-lint/master/install.sh | sh -s -- -b $(GOPATH)/bin v1.64.8 + @curl -sSfL -q https://raw.githubusercontent.com/golangci/golangci-lint/master/install.sh | sh -s -- -b $(GOPATH)/bin v2.11.3 dev: ## Build and install a development build @grep 'const VersionPrerelease = ""' version/version.go > /dev/null ; if [ $$? -eq 0 ]; then \ @@ -122,8 +122,6 @@ fmt-examples: # generate runs `go generate` to build the dynamically generated # source files. generate: install-gen-deps ## Generate dynamically generated code - @echo "==> removing autogenerated markdown..." # but don't remove partials generated in the SDK and copied over. - @find website/pages -path website/pages/partials/packer-plugin-sdk -prune -o -type f | xargs grep -l '^