From 5d7d0fc8ac9d0e5322cc81ff830d939075754131 Mon Sep 17 00:00:00 2001 From: Wilken Rivera Date: Sat, 5 Aug 2023 00:38:10 +0000 Subject: [PATCH] backport of commit 25038907386c0d9a48e026ea7709a81c855428c8 --- .github/workflows/acceptance-test.yml | 10 ++--- .github/workflows/auto-close-stale-issues.yml | 2 +- .github/workflows/build.yml | 14 +++---- .../workflows/check-legacy-links-format.yml | 17 ++++++++ .github/workflows/check-plugin-docs.yml | 4 +- .github/workflows/create-release-branch.yml | 2 +- .github/workflows/go-test.yml | 14 +++---- .github/workflows/go-validate.yml | 18 ++++---- .github/workflows/issue-comment-created.yml | 3 +- .github/workflows/issue-migrator.yml | 2 +- .github/workflows/issues-opened.yml | 41 +++++++------------ .github/workflows/jira.yml | 28 ++++++------- .github/workflows/lock.yml | 2 +- .github/workflows/nightly-release.yml | 16 ++++---- CHANGELOG.md | 9 ---- acctest/plugin/bundled_plugin_test.go | 3 -- command/init.go | 2 +- internal/hcp/api/client_test.go | 3 -- version/VERSION | 2 +- version/version.go | 2 +- website/content/docs/commands/init.mdx | 20 --------- website/package-lock.json | 12 +++--- 22 files changed, 98 insertions(+), 128 deletions(-) create mode 100644 .github/workflows/check-legacy-links-format.yml diff --git a/.github/workflows/acceptance-test.yml b/.github/workflows/acceptance-test.yml index 783b6bdccde..98d012cb8d4 100644 --- a/.github/workflows/acceptance-test.yml +++ b/.github/workflows/acceptance-test.yml @@ -19,7 +19,7 @@ jobs: outputs: go-version: ${{ steps.get-go-version.outputs.go-version }} steps: - - uses: actions/checkout@c85c95e3d7251135ab7dc9ce3241c5835cc595a9 # v3.5.3 + - uses: actions/checkout@8e5e7e5ab8b370d6c329ec480221332ada57f0ab # v3.5.2 - name: 'Determine Go version' id: get-go-version # We use .go-version as our source of truth for current Go @@ -40,12 +40,12 @@ jobs: # Packer GH Token for API Rate Limiting PACKER_GITHUB_API_TOKEN: ${{ secrets.GITHUB_TOKEN }} steps: - - uses: actions/checkout@c85c95e3d7251135ab7dc9ce3241c5835cc595a9 # v3.5.3 - - uses: actions/setup-go@fac708d6674e30b6ba41289acaab6d4b75aa0753 # v4.0.1 + - uses: actions/checkout@8e5e7e5ab8b370d6c329ec480221332ada57f0ab # v3.5.2 + - uses: actions/setup-go@4d34df0c2316fe8122ab82dc22947d607c0c91f9 # v4.0.0 with: go-version: ${{ needs.get-go-version.outputs.go-version }} - name: IAM Assume Role - uses: aws-actions/configure-aws-credentials@5fd3084fc36e372ff1fff382a39b10d03659f355 # v2.2.0 + uses: aws-actions/configure-aws-credentials@e1e17a757e536f70e52b5a12b2e8d1d1c60e04ef # v2.0.0 with: role-to-assume: ${{ env.AWS_ROLE_ARN }} aws-region: ${{ env.AWS_REGION }} @@ -70,7 +70,7 @@ jobs: runs-on: ubuntu-latest steps: - name: Send slack notification on failure - uses: slackapi/slack-github-action@e28cf165c92ffef168d23c5c9000cffc8a25e117 # v1.24.0 + uses: slackapi/slack-github-action@007b2c3c751a190b6f0f040e47ed024deaa72844 # v1.23.0 with: payload: | { diff --git a/.github/workflows/auto-close-stale-issues.yml b/.github/workflows/auto-close-stale-issues.yml index af4a089df5d..40b04dec196 100644 --- a/.github/workflows/auto-close-stale-issues.yml +++ b/.github/workflows/auto-close-stale-issues.yml @@ -14,7 +14,7 @@ jobs: pull-requests: write # for actions/stale to close stale PRs runs-on: ubuntu-latest steps: - - uses: actions/stale@1160a2240286f5da8ec72b1c0816ce2481aabf84 # v8.0.0 + - uses: actions/stale@a20b814fb01b71def3bd6f56e7494d667ddf28da # v8.0.0 with: repo-token: ${{ secrets.GITHUB_TOKEN }} days-before-issue-stale: 23 diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index a756fc56013..0f13bedff1b 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -26,7 +26,7 @@ jobs: outputs: go-version: ${{ steps.get-go-version.outputs.go-version }} steps: - - uses: actions/checkout@c85c95e3d7251135ab7dc9ce3241c5835cc595a9 # v3.5.3 + - uses: actions/checkout@8e5e7e5ab8b370d6c329ec480221332ada57f0ab # v3.5.2 - name: 'Determine Go version' id: get-go-version # We use .go-version as our source of truth for current Go @@ -44,7 +44,7 @@ jobs: product-prerelease-version: ${{ steps.set-product-version.outputs.prerelease-product-version }} set-ld-flags: ${{ steps.set-ld-flags.outputs.set-ld-flags }} steps: - - uses: actions/checkout@c85c95e3d7251135ab7dc9ce3241c5835cc595a9 # v3.5.3 + - uses: actions/checkout@8e5e7e5ab8b370d6c329ec480221332ada57f0ab # v3.5.2 - name: set product version id: set-product-version uses: hashicorp/actions-set-product-version@v1 @@ -67,7 +67,7 @@ jobs: filepath: ${{ steps.generate-metadata-file.outputs.filepath }} steps: - name: 'Checkout directory' - uses: actions/checkout@c85c95e3d7251135ab7dc9ce3241c5835cc595a9 # v3.5.3 + uses: actions/checkout@8e5e7e5ab8b370d6c329ec480221332ada57f0ab # v3.5.2 - name: Generate metadata file id: generate-metadata-file uses: hashicorp/actions-generate-metadata@main @@ -105,7 +105,7 @@ jobs: GOPRIVATE: "github.com/hashicorp" GO111MODULE: on steps: - - uses: actions/checkout@c85c95e3d7251135ab7dc9ce3241c5835cc595a9 # v3.5.3 + - uses: actions/checkout@8e5e7e5ab8b370d6c329ec480221332ada57f0ab # v3.5.2 - name: Go Build env: PRODUCT_VERSION: ${{ needs.set-product-version.outputs.product-version }} @@ -142,7 +142,7 @@ jobs: GO111MODULE: on steps: - - uses: actions/checkout@c85c95e3d7251135ab7dc9ce3241c5835cc595a9 # v3.5.3 + - uses: actions/checkout@8e5e7e5ab8b370d6c329ec480221332ada57f0ab # v3.5.2 - name: Go Build env: PRODUCT_VERSION: ${{ needs.set-product-version.outputs.product-version }} @@ -204,7 +204,7 @@ jobs: GO111MODULE: on steps: - - uses: actions/checkout@c85c95e3d7251135ab7dc9ce3241c5835cc595a9 # v3.5.3 + - uses: actions/checkout@8e5e7e5ab8b370d6c329ec480221332ada57f0ab # v3.5.2 - name: Go Build env: PRODUCT_VERSION: ${{ needs.set-product-version.outputs.product-version }} @@ -234,7 +234,7 @@ jobs: env: version: ${{ needs.set-product-version.outputs.product-version }} steps: - - uses: actions/checkout@c85c95e3d7251135ab7dc9ce3241c5835cc595a9 # v3.5.3 + - uses: actions/checkout@8e5e7e5ab8b370d6c329ec480221332ada57f0ab # v3.5.2 - name: Docker Build (Action) uses: hashicorp/actions-docker-build@v1 with: diff --git a/.github/workflows/check-legacy-links-format.yml b/.github/workflows/check-legacy-links-format.yml new file mode 100644 index 00000000000..08c128a9f49 --- /dev/null +++ b/.github/workflows/check-legacy-links-format.yml @@ -0,0 +1,17 @@ +name: Legacy Link Format Checker + +on: + push: + paths: + - "website/content/**/*.mdx" + - "website/data/*-nav-data.json" + +jobs: + check-links: + uses: hashicorp/dev-portal/.github/workflows/docs-content-check-legacy-links-format.yml@475289345d312552b745224b46895f51cc5fc490 + with: + repo-owner: "hashicorp" + repo-name: "packer" + commit-sha: ${{ github.sha }} + mdx-directory: "website/content" + nav-data-directory: "website/data" diff --git a/.github/workflows/check-plugin-docs.yml b/.github/workflows/check-plugin-docs.yml index 00ba2851ef8..c43ae9cb33c 100644 --- a/.github/workflows/check-plugin-docs.yml +++ b/.github/workflows/check-plugin-docs.yml @@ -23,9 +23,9 @@ jobs: runs-on: ubuntu-latest steps: - name: Checkout - uses: actions/checkout@c85c95e3d7251135ab7dc9ce3241c5835cc595a9 # v3.5.3 + uses: actions/checkout@8e5e7e5ab8b370d6c329ec480221332ada57f0ab # v3.5.2 - name: Setup Node - uses: actions/setup-node@e33196f7422957bea03ed53f6fbb155025ffc7b8 # v3.7.0 + uses: actions/setup-node@64ed1c7eab4cce3362f8c340dee64e5eaeef8f7c # v3.6.0 with: node-version: '16.x' - name: Install Dependencies diff --git a/.github/workflows/create-release-branch.yml b/.github/workflows/create-release-branch.yml index 780087058b7..0d1f4f3953c 100644 --- a/.github/workflows/create-release-branch.yml +++ b/.github/workflows/create-release-branch.yml @@ -4,7 +4,7 @@ jobs: create-branch: runs-on: ubuntu-latest steps: - - uses: actions/checkout@c85c95e3d7251135ab7dc9ce3241c5835cc595a9 # v3.5.3 + - uses: actions/checkout@8e5e7e5ab8b370d6c329ec480221332ada57f0ab # v3.5.2 - uses: hashicorp/actions-create-release-branch@v1 with: token: ${{ secrets.ELEVATED_GITHUB_TOKEN }} diff --git a/.github/workflows/go-test.yml b/.github/workflows/go-test.yml index 2f426d16a03..93f8eeb1ae8 100644 --- a/.github/workflows/go-test.yml +++ b/.github/workflows/go-test.yml @@ -24,7 +24,7 @@ jobs: outputs: go-version: ${{ steps.get-go-version.outputs.go-version }} steps: - - uses: actions/checkout@c85c95e3d7251135ab7dc9ce3241c5835cc595a9 # v3.5.3 + - uses: actions/checkout@8f4b7f84864484a7bf31766abe9204da3cbe65b3 # v3.5.0 - name: 'Determine Go version' id: get-go-version run: | @@ -36,8 +36,8 @@ jobs: runs-on: ubuntu-latest name: Linux go tests steps: - - uses: actions/checkout@c85c95e3d7251135ab7dc9ce3241c5835cc595a9 # v3.5.3 - - uses: actions/setup-go@fac708d6674e30b6ba41289acaab6d4b75aa0753 # v4.0.1 + - uses: actions/checkout@8e5e7e5ab8b370d6c329ec480221332ada57f0ab # v3.5.2 + - uses: actions/setup-go@4d34df0c2316fe8122ab82dc22947d607c0c91f9 # v4.0.0 with: go-version: ${{ needs.get-go-version.outputs.go-version }} - run: TESTARGS="-coverprofile=coverage.txt -covermode=atomic" make ci @@ -47,8 +47,8 @@ jobs: runs-on: macos-latest name: Darwin go tests steps: - - uses: actions/checkout@c85c95e3d7251135ab7dc9ce3241c5835cc595a9 # v3.5.3 - - uses: actions/setup-go@fac708d6674e30b6ba41289acaab6d4b75aa0753 # v4.0.1 + - uses: actions/checkout@8e5e7e5ab8b370d6c329ec480221332ada57f0ab # v3.5.2 + - uses: actions/setup-go@4d34df0c2316fe8122ab82dc22947d607c0c91f9 # v4.0.0 with: go-version: ${{ needs.get-go-version.outputs.go-version }} - run: go test ./... -coverprofile=coverage.txt -covermode=atomic @@ -58,8 +58,8 @@ jobs: runs-on: windows-latest name: Windows go tests steps: - - uses: actions/checkout@c85c95e3d7251135ab7dc9ce3241c5835cc595a9 # v3.5.3 - - uses: actions/setup-go@fac708d6674e30b6ba41289acaab6d4b75aa0753 # v4.0.1 + - uses: actions/checkout@8e5e7e5ab8b370d6c329ec480221332ada57f0ab # v3.5.2 + - uses: actions/setup-go@4d34df0c2316fe8122ab82dc22947d607c0c91f9 # v4.0.0 with: go-version: ${{ needs.get-go-version.outputs.go-version }} - run: go test ./... -coverprofile=coverage.txt -covermode=atomic diff --git a/.github/workflows/go-validate.yml b/.github/workflows/go-validate.yml index a3c45f794ff..d67b3aa5151 100644 --- a/.github/workflows/go-validate.yml +++ b/.github/workflows/go-validate.yml @@ -20,7 +20,7 @@ jobs: outputs: go-version: ${{ steps.get-go-version.outputs.go-version }} steps: - - uses: actions/checkout@c85c95e3d7251135ab7dc9ce3241c5835cc595a9 # v3.5.3 + - uses: actions/checkout@8f4b7f84864484a7bf31766abe9204da3cbe65b3 # v3.5.0 - name: 'Determine Go version' id: get-go-version run: | @@ -32,8 +32,8 @@ jobs: runs-on: ubuntu-latest name: Go Mod Tidy steps: - - uses: actions/checkout@c85c95e3d7251135ab7dc9ce3241c5835cc595a9 # v3.5.3 - - uses: actions/setup-go@fac708d6674e30b6ba41289acaab6d4b75aa0753 # v4.0.1 + - uses: actions/checkout@8f4b7f84864484a7bf31766abe9204da3cbe65b3 # v3.5.0 + - uses: actions/setup-go@4d34df0c2316fe8122ab82dc22947d607c0c91f9 # v4.0.0 with: go-version: ${{ needs.get-go-version.outputs.go-version }} - run: go mod tidy @@ -43,10 +43,10 @@ jobs: runs-on: ubuntu-latest name: Lint steps: - - uses: actions/checkout@c85c95e3d7251135ab7dc9ce3241c5835cc595a9 # v3.5.3 + - uses: actions/checkout@8e5e7e5ab8b370d6c329ec480221332ada57f0ab # v3.5.2 with: fetch-depth: 0 - - uses: actions/setup-go@fac708d6674e30b6ba41289acaab6d4b75aa0753 # v4.0.1 + - uses: actions/setup-go@4d34df0c2316fe8122ab82dc22947d607c0c91f9 # v4.0.0 with: go-version: ${{ needs.get-go-version.outputs.go-version }} - run: echo "$GITHUB_SHA" @@ -59,8 +59,8 @@ jobs: runs-on: ubuntu-latest name: Fmt check steps: - - uses: actions/checkout@c85c95e3d7251135ab7dc9ce3241c5835cc595a9 # v3.5.3 - - uses: actions/setup-go@fac708d6674e30b6ba41289acaab6d4b75aa0753 # v4.0.1 + - uses: actions/checkout@8e5e7e5ab8b370d6c329ec480221332ada57f0ab # v3.5.2 + - uses: actions/setup-go@4d34df0c2316fe8122ab82dc22947d607c0c91f9 # v4.0.0 with: go-version: ${{ needs.get-go-version.outputs.go-version }} - run: make fmt-check @@ -70,8 +70,8 @@ jobs: runs-on: ubuntu-latest name: Generate check steps: - - uses: actions/checkout@c85c95e3d7251135ab7dc9ce3241c5835cc595a9 # v3.5.3 - - uses: actions/setup-go@fac708d6674e30b6ba41289acaab6d4b75aa0753 # v4.0.1 + - uses: actions/checkout@8e5e7e5ab8b370d6c329ec480221332ada57f0ab # v3.5.2 + - uses: actions/setup-go@4d34df0c2316fe8122ab82dc22947d607c0c91f9 # v4.0.0 with: go-version: ${{ needs.get-go-version.outputs.go-version }} - run: make generate-check diff --git a/.github/workflows/issue-comment-created.yml b/.github/workflows/issue-comment-created.yml index a5c112d2a15..f250dc1f101 100644 --- a/.github/workflows/issue-comment-created.yml +++ b/.github/workflows/issue-comment-created.yml @@ -12,10 +12,9 @@ jobs: permissions: contents: read # for actions/checkout to fetch code issues: write # for actions-ecosystem/action-remove-labels to remove issue labels - if: ${{contains(github.event.issue.labels.*.name, 'waiting-reply') || contains(github.event.issue.labels.*.name, 'stale')}} runs-on: ubuntu-latest steps: - - uses: actions/checkout@c85c95e3d7251135ab7dc9ce3241c5835cc595a9 # v3.5.3 + - uses: actions/checkout@8e5e7e5ab8b370d6c329ec480221332ada57f0ab # v3.5.2 - uses: actions-ecosystem/action-remove-labels@2ce5d41b4b6aa8503e285553f75ed56e0a40bae0 # v1.3.0 with: github_token: "${{ secrets.GITHUB_TOKEN }}" diff --git a/.github/workflows/issue-migrator.yml b/.github/workflows/issue-migrator.yml index 719cfa44f2f..9acc66ee6d4 100644 --- a/.github/workflows/issue-migrator.yml +++ b/.github/workflows/issue-migrator.yml @@ -12,7 +12,7 @@ jobs: if: startsWith(github.event.label.name, 'remote-plugin/') runs-on: ubuntu-latest steps: - - uses: bflad/action-migrate-issue@2e049d822b08e67d25b938343227051518f14d9a # v1.0.2 + - uses: bflad/action-migrate-issue@main # TSCCR: no entry for repository "bflad/action-migrate-issue" with: source-issue-comment: | This issue has been migrated to {target-issue-url} due to the [Packer Plugin split](https://github.com/hashicorp/packer/issues/8610#issuecomment-770034737). diff --git a/.github/workflows/issues-opened.yml b/.github/workflows/issues-opened.yml index 565b89af048..57a8cd0cb65 100644 --- a/.github/workflows/issues-opened.yml +++ b/.github/workflows/issues-opened.yml @@ -13,8 +13,8 @@ jobs: issues: write # for github/issue-labeler to create or remove labels runs-on: ubuntu-latest steps: - - uses: actions/checkout@c85c95e3d7251135ab7dc9ce3241c5835cc595a9 # v3.5.3 - - uses: github/issue-labeler@98b5412841f6c4b0b3d9c29d53c13fad16bd7de2 # v3.2 + - uses: actions/checkout@8e5e7e5ab8b370d6c329ec480221332ada57f0ab # v3.5.2 + - uses: github/issue-labeler@e24a3eb6b2e28c8904d086302a2b760647f5f45c # v3.1 with: repo-token: "${{ secrets.GITHUB_TOKEN }}" configuration-path: .github/labeler-issue-triage.yml @@ -23,35 +23,24 @@ jobs: name: Redirect to discuss permissions: contents: read - issues: write # for actions/github-script to create comments and add labels + issues: write # for actions-ecosystem/action-create-comment to create comments if: contains(github.event.issue.labels.*.name, 'question') runs-on: ubuntu-latest steps: - - uses: actions/github-script@d7906e4ad0b1822421a7e6a35d5ca353c962f410 # v6.4.1 + - uses: actions-ecosystem/action-create-comment@v1.0.2 # TSCCR: no entry for repository "actions-ecosystem/action-create-comment" with: - script: | - github.rest.issues.createComment({ - issue_number: context.issue.number, - owner: context.repo.owner, - repo: context.repo.repo, - body: ` - Hi 👋 thanks for reaching out. + github_token: ${{ secrets.GITHUB_TOKEN }} + body: | + Hi 👋 thanks for reaching out. - For general questions we recommend reaching out to the [community forum](https://discuss.hashicorp.com/c/packer) for greater visibility. - As the GitHub issue tracker is only watched by a small subset of maintainers and is really reserved for bugs and enhancements, you'll have a better chance of finding someone who can help you in the forum. - We'll mark this issue as needs-reply to help inform maintainers that this question is awaiting a response. - If no activity is taken on this question within 30 days it will be automatically closed. + For general questions we recommend reaching out to the [community forum](https://discuss.hashicorp.com/c/packer) for greater visibility. + As the GitHub issue tracker is only watched by a small subset of maintainers and is really reserved for bugs and enhancements, you'll have a better chance of finding someone who can help you in the forum. + We'll mark this issue as needs-reply to help inform maintainers that this question is awaiting a response. + If no activity is taken on this question within 30 days it will be automatically closed. - If you find the forum to be more helpful or if you've found the answer to your question elsewhere please feel free to post a response and close the issue.` - }) - - - uses: actions/github-script@d7906e4ad0b1822421a7e6a35d5ca353c962f410 # v6.4.1 + If you find the forum to be more helpful or if you've found the answer to your question elsewhere please feel free to post a response and close the issue. + - uses: actions-ecosystem/action-add-labels@v1.1.3 # TSCCR: no entry for repository "actions-ecosystem/action-add-labels" with: - script: | - github.rest.issues.addLabels({ - issue_number: context.issue.number, - owner: context.repo.owner, - repo: context.repo.repo, - labels: ['needs-reply'] - }) + github_token: ${{ secrets.GITHUB_TOKEN }} + labels: needs-reply diff --git a/.github/workflows/jira.yml b/.github/workflows/jira.yml index a3fa8cd7ea8..e0e82a97f01 100644 --- a/.github/workflows/jira.yml +++ b/.github/workflows/jira.yml @@ -11,11 +11,11 @@ jobs: sync: name: Sync to JIRA permissions: - issues: write # for actions/github-script to create comments + issues: write # for actions-ecosytem/action-create-comment runs-on: ubuntu-latest steps: - name: Login - uses: atlassian/gajira-login@ca13f8850ea309cf44a6e4e0c49d9aa48ac3ca4c # v3 + uses: atlassian/gajira-login@45fd029b9f1d6d8926c6f04175aa80c0e42c9026 # v3.0.1 env: JIRA_BASE_URL: ${{ secrets.JIRA_BASE_URL }} JIRA_USER_EMAIL: ${{ secrets.JIRA_USER_EMAIL }} @@ -61,26 +61,26 @@ jobs: - name: Create ticket id: create-ticket if: steps.search.outputs.issue == '' && github.event.label.name == 'sync to jira' && steps.set-ticket-type.outputs.type != 'Invalid' - uses: atlassian/gajira-create@1ff0b6bd115a780592b47bfbb63fc4629132e6ec # v3 + uses: atlassian/gajira-create@59e177c4f6451399df5b4911c2211104f171e669 # v3.0.1 with: project: HPR issuetype: "${{ steps.set-ticket-type.outputs.type }}" summary: "${{ github.event.repository.name }}: ${{ github.event.issue.title }}" description: "${{ github.event.issue.body }}\n\n_Created from GitHub by ${{ github.actor }}._" # The field customfield_10089 refers to the Issue Link field in JIRA. - fields: '{ "customfield_10089": "${{ github.event.issue.html_url }}", "components": [{ "name": "OSS" }], "labels": ${{ steps.set-ticket-labels.outputs.labels }} }' + fields: '{ "customfield_10089": "${{ github.event.issue.html_url }}", + "components": [{ "name": "OSS" }], + "labels": ${{ steps.set-ticket-labels.outputs.labels }} }' - name: Add tracking comment if: steps.create-ticket.outputs.issue != '' && steps.set-ticket-type.outputs.type != 'Invalid' - uses: actions/github-script@d7906e4ad0b1822421a7e6a35d5ca353c962f410 # v6.4.1 + uses: actions-ecosystem/action-create-comment@v1.0.0 # TSCCR: no entry for repository "actions-ecosystem/action-create-comment" with: - script: | - github.rest.issues.createComment({ - issue_number: context.issue.number, - owner: context.repo.owner, - repo: context.repo.repo, - body: ` - This issue has been synced to JIRA for planning. - JIRA ID: [${{ steps.create-ticket.outputs.issue }}](https://hashicorp.atlassian.net/browse/${{steps.create-ticket.outputs.issue}})` - }) + github_token: ${{ secrets.GITHUB_TOKEN }} + body: | + This issue has been synced to JIRA for planning. + + JIRA ID: [${{ steps.create-ticket.outputs.issue }}](https://hashicorp.atlassian.net/browse/${{steps.create-ticket.outputs.issue}}) + + diff --git a/.github/workflows/lock.yml b/.github/workflows/lock.yml index f1f17b35893..77f57ab0a7f 100644 --- a/.github/workflows/lock.yml +++ b/.github/workflows/lock.yml @@ -15,7 +15,7 @@ jobs: pull-requests: write # for dessant/lock-threads to lock PRs runs-on: ubuntu-latest steps: - - uses: dessant/lock-threads@be8aa5be94131386884a6da4189effda9b14aa21 # v4.0.1 + - uses: dessant/lock-threads@c1b35aecc5cdb1a34539d14196df55838bb2f836 # v4.0.0 with: github-token: ${{ github.token }} issue-comment: > diff --git a/.github/workflows/nightly-release.yml b/.github/workflows/nightly-release.yml index e63c05ea30d..ea388be057c 100644 --- a/.github/workflows/nightly-release.yml +++ b/.github/workflows/nightly-release.yml @@ -24,7 +24,7 @@ jobs: needs: build-artifacts runs-on: ubuntu-latest steps: - - uses: actions/checkout@c85c95e3d7251135ab7dc9ce3241c5835cc595a9 # v3.5.3 + - uses: actions/checkout@8e5e7e5ab8b370d6c329ec480221332ada57f0ab # v3.5.2 - name: Download built artifacts uses: actions/download-artifact@9bc31d5ccc31df68ecc42ccf4149144866c47d8a # v3.0.2 with: @@ -38,12 +38,12 @@ jobs: echo "BUILD_OUTPUT_LIST=$(cat tmp2.txt | tr '\n' ',' | perl -ple 'chop')" >> $GITHUB_ENV rm -rf tmp.txt && rm -rf tmp2.txt - name: Advance nightly tag - uses: actions/github-script@d7906e4ad0b1822421a7e6a35d5ca353c962f410 # v6.4.1 + uses: actions/github-script@ffc2c79a5b2490bd33e0a41c1de74b877714d736 # v3 with: github-token: ${{ secrets.GITHUB_TOKEN }} script: | try { - await github.rest.git.deleteRef({ + await github.git.deleteRef({ owner: context.repo.owner, repo: context.repo.repo, ref: "tags/nightly" @@ -51,7 +51,7 @@ jobs: } catch (e) { console.log("Warning: The nightly tag doesn't exist yet, so there's nothing to do. Trace: " + e) } - await github.rest.git.createRef({ + await github.git.createRef({ owner: context.repo.owner, repo: context.repo.repo, ref: "refs/tags/nightly", @@ -62,7 +62,7 @@ jobs: - name: Create a nightly GitHub prerelease id: create_prerelease continue-on-error: true - uses: ncipollo/release-action@a2e71bdd4e7dab70ca26a852f29600c98b33153e # v1.12.0 + uses: ncipollo/release-action@v1 # TSCCR: no entry for repository "ncipollo/release-action" with: name: nightly artifacts: "${{ env.BUILD_OUTPUT_LIST }}" @@ -85,7 +85,7 @@ jobs: - name: Retry failed nightly GitHub prerelease id: create_prerelease_retry if: steps.create_prerelease.outcome == 'failure' - uses: ncipollo/release-action@a2e71bdd4e7dab70ca26a852f29600c98b33153e # v1.12.0 + uses: ncipollo/release-action@v1 # TSCCR: no entry for repository "ncipollo/release-action" with: name: nightly artifacts: "${{ env.BUILD_OUTPUT_LIST }}" @@ -101,7 +101,7 @@ jobs: run: | echo "prerelease_id=${{ steps.create_prerelease_retry.outputs.id }}" >> $GITHUB_ENV - name: Publish nightly GitHub prerelease - uses: eregon/publish-release@46913fa2b3f7edc7345ae3c17f6d1b093a54916d # v1.0.5 + uses: eregon/publish-release@v1 # TSCCR: no entry for repository "eregon/publish-release" env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} with: @@ -117,7 +117,7 @@ jobs: runs-on: ubuntu-latest steps: - name: Send slack notification on failure - uses: slackapi/slack-github-action@e28cf165c92ffef168d23c5c9000cffc8a25e117 # v1.24.0 + uses: slackapi/slack-github-action@007b2c3c751a190b6f0f040e47ed024deaa72844 # v1.23.0 with: payload: | { diff --git a/CHANGELOG.md b/CHANGELOG.md index 9c693c7fd3e..f5334dfeb08 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -139,15 +139,6 @@ if using HCL2, a `required_plugins` block to define a list of plugins to use for * Bumped gopsutil to v3. This fixes a macOS intermittent crash reported by the community [GH-12430](https://github.com/hashicorp/packer/issues/12430) -### HCP Packer -- Multi project support advisory - -If using HCP Packer to store metadata on your builds, please be aware that Packer -does not support this feature yet, and as such, having multiple projects in your -organization will make it impossible to use HCP Packer in this release. - -We are actively working on supporting this feature, which will be available in a -subsequent release. - ## 1.8.7 (May 4, 2023) ### NOTES: diff --git a/acctest/plugin/bundled_plugin_test.go b/acctest/plugin/bundled_plugin_test.go index 9f21dfac626..e9308a59869 100644 --- a/acctest/plugin/bundled_plugin_test.go +++ b/acctest/plugin/bundled_plugin_test.go @@ -1,6 +1,3 @@ -// Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: MPL-2.0 - package plugin import ( diff --git a/command/init.go b/command/init.go index b95eb86992b..761627134d6 100644 --- a/command/init.go +++ b/command/init.go @@ -180,7 +180,7 @@ packer { func (*InitCommand) Help() string { helpText := ` -Usage: packer init [options] TEMPLATE +Usage: packer init [options] [config.pkr.hcl|folder/] Install all the missing plugins required in a Packer config. Note that Packer does not have a state. diff --git a/internal/hcp/api/client_test.go b/internal/hcp/api/client_test.go index 16d321beb77..85bf5df3da7 100644 --- a/internal/hcp/api/client_test.go +++ b/internal/hcp/api/client_test.go @@ -1,6 +1,3 @@ -// Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: MPL-2.0 - package api import ( diff --git a/version/VERSION b/version/VERSION index 81c871de46b..7b0231f53b7 100644 --- a/version/VERSION +++ b/version/VERSION @@ -1 +1 @@ -1.10.0 +1.9.3 \ No newline at end of file diff --git a/version/version.go b/version/version.go index c474c80d650..075b681973b 100644 --- a/version/version.go +++ b/version/version.go @@ -22,7 +22,7 @@ var ( // A pre-release marker for the version can also be specified (e.g -dev). If this is omitted // The main version number that is being run at the moment. - Version = "1.10.0" + Version = "1.9.3" // A pre-release marker for the version. If this is "" (empty string) // then it means that it is a final release. Otherwise, this is a pre-release diff --git a/website/content/docs/commands/init.mdx b/website/content/docs/commands/init.mdx index e6209d2c15e..52b72eb8151 100644 --- a/website/content/docs/commands/init.mdx +++ b/website/content/docs/commands/init.mdx @@ -19,26 +19,6 @@ the first command that should be executed when working with a new or existing template. This command is always safe to run multiple times. Though subsequent runs may give errors, this command will never delete anything. -You should invoke `packer init` on either an HCL2 template, or a directory that contains -at least a valid HCL2 template, and eventually other related dependencies like varfiles -for example. - -Example: - -```sh -$ ls . -template.pkr.hcl varfile.pkrvars.pkr.hcl - -$ packer init template.pkr.hcl # You can invoke packer init on a single template in this case - # This works if the template is self-contained, but may fail if - # the template is meant to be built as a bundle of partials. - -$ packer init . # Alternatively, you can invoke packer init on a directory instead, - # which behaves the same in a configuration like this one, but if - # the target is a collection ofHCL2 templates, this is the - # preferred way to invoke it. -``` - Packer does not currently have the notion of a state like Terraform has. In other words, currently `packer init` is only in charge of installing Packer plugins. diff --git a/website/package-lock.json b/website/package-lock.json index fa295779654..09bd084d46a 100644 --- a/website/package-lock.json +++ b/website/package-lock.json @@ -13726,9 +13726,9 @@ } }, "node_modules/word-wrap": { - "version": "1.2.4", - "resolved": "https://registry.npmjs.org/word-wrap/-/word-wrap-1.2.4.tgz", - "integrity": "sha512-2V81OA4ugVo5pRo46hAoD2ivUJx8jXmWXfUkY4KFNw0hEptvN0QfH3K4nHiwzGeKl5rFKedV48QVoqYavy4YpA==", + "version": "1.2.3", + "resolved": "https://registry.npmjs.org/word-wrap/-/word-wrap-1.2.3.tgz", + "integrity": "sha512-Hz/mrNwitNRh/HUAtM/VT/5VH+ygD6DV7mYKZAtHOrbs8U7lvPS6xf7EJKMF0uW1KJCl0H701g3ZGus+muE5vQ==", "dev": true, "engines": { "node": ">=0.10.0" @@ -24389,9 +24389,9 @@ } }, "word-wrap": { - "version": "1.2.4", - "resolved": "https://registry.npmjs.org/word-wrap/-/word-wrap-1.2.4.tgz", - "integrity": "sha512-2V81OA4ugVo5pRo46hAoD2ivUJx8jXmWXfUkY4KFNw0hEptvN0QfH3K4nHiwzGeKl5rFKedV48QVoqYavy4YpA==", + "version": "1.2.3", + "resolved": "https://registry.npmjs.org/word-wrap/-/word-wrap-1.2.3.tgz", + "integrity": "sha512-Hz/mrNwitNRh/HUAtM/VT/5VH+ygD6DV7mYKZAtHOrbs8U7lvPS6xf7EJKMF0uW1KJCl0H701g3ZGus+muE5vQ==", "dev": true }, "wrap-ansi": {