From 3dc2b9a4b9b44841a6944791dc9acbbeb78b744f Mon Sep 17 00:00:00 2001 From: Caitlin Schaefer Date: Tue, 29 Apr 2025 11:29:54 -0700 Subject: [PATCH 1/3] Convert Patcher spec.json usage to temp file usage --- docs/2.0/docs/patcher/concepts/grouping.md | 3 --- .../patcher/guides/promotion-workflows.md | 24 ++++++++++++------- 2 files changed, 15 insertions(+), 12 deletions(-) diff --git a/docs/2.0/docs/patcher/concepts/grouping.md b/docs/2.0/docs/patcher/concepts/grouping.md index 194dcf13c..217fb0acf 100644 --- a/docs/2.0/docs/patcher/concepts/grouping.md +++ b/docs/2.0/docs/patcher/concepts/grouping.md @@ -113,6 +113,3 @@ for each $environment e.g., glob patterns like dev-* or prod-*) for each $target output run patcher update --target=$target ``` - - -**Pseudocode:** diff --git a/docs/2.0/docs/patcher/guides/promotion-workflows.md b/docs/2.0/docs/patcher/guides/promotion-workflows.md index 3bfe4e14d..b05d7a303 100644 --- a/docs/2.0/docs/patcher/guides/promotion-workflows.md +++ b/docs/2.0/docs/patcher/guides/promotion-workflows.md @@ -55,6 +55,12 @@ The initial GitHub Actions workflow file, `update-dev.yml` in this example, high * The `patcher update` command reads the `spec` file, checks out the repository code, commits the changes, and pushes a pull request. * For the pull request workflow to function correctly, the `pull_request_branch` must follow the format `$PREFIX$DEPENDENCYID`. This format allows the workflow to track and process updates accurately. The `trigger-next-env` job strips out the prefix. +:::info +As of `v0.14.x` (`patcher-action` `v2.10.x`), Patcher has deprecated support of checking in the spec output file from a `patcher report` run into your codebase. +This output is intended as a temporary reference between `report` and `update` runs, and is treated as a temp file, going forward. +If you have this file in your codebase, it is recommended that you delete it and/or include it in the `.gitignore` file. +::: + ```yml name: Update Dev Dependencies @@ -113,7 +119,7 @@ jobs: github_token: ${{ secrets.PIPELINES_READ_TOKEN }} include_dirs: "{*dev*}/**" working_dir: ./ - spec_file: patcher-spec.json + spec_file: /tmp/patcher-spec.json update-env: needs: [patcher-report] @@ -128,7 +134,7 @@ jobs: - name: Create the spec file shell: bash run: | - echo '${{ needs.patcher-report.outputs.spec }}' > patcher-spec.json + echo '${{ needs.patcher-report.outputs.spec }}' > /tmp/patcher-spec.json - uses: gruntwork-io/patcher-action@main with: @@ -136,7 +142,7 @@ jobs: github_token: ${{ secrets.PIPELINES_READ_TOKEN }} working_dir: ${{ env.ENV_FOLDER_NAME }} dependency: ${{ matrix.dependency.ID }} - spec_file: patcher-spec.json + spec_file: /tmp/patcher-spec.json pull_request_title: "[Patcher] [dev] Update ${{ matrix.dependency.ID }}" pull_request_branch: "${{ env.PR_BRANCH_PREFIX }}${{ matrix.dependency.ID }}" ``` @@ -203,7 +209,7 @@ jobs: github_token: ${{ secrets.PIPELINES_READ_TOKEN }} patcher_command: report working_dir: ./ - spec_file: patcher-spec.json + spec_file: /tmp/patcher-spec.json include_dirs: "{*stage*}/**" update-env: @@ -219,14 +225,14 @@ jobs: - name: Create the spec file shell: bash run: | - echo '${{ needs.patcher-report.outputs.spec }}' > patcher-spec.json + echo '${{ needs.patcher-report.outputs.spec }}' > /tmp/patcher-spec.json - uses: gruntwork-io/patcher-action@main with: github_token: ${{ secrets.PIPELINES_READ_TOKEN }} dependency: ${{ matrix.dependency.ID }} patcher_command: update - spec_file: patcher-spec.json + spec_file: /tmp/patcher-spec.json pull_request_title: "[Patcher] [stage] Update ${{ matrix.dependency.ID }}" pull_request_branch: "${{ env.PR_BRANCH_PREFIX }}${{ matrix.dependency.ID }}" ``` @@ -271,7 +277,7 @@ jobs: patcher_command: report working_dir: ./ dependency: ${{ github.event.client_payload.dependency }} - spec_file: patcher-spec.json + spec_file: /tmp/patcher-spec.json include_dirs: "{*prod*}/**" update-env: @@ -287,14 +293,14 @@ jobs: - name: Create the spec file shell: bash run: | - echo '${{ needs.patcher-report.outputs.spec }}' > patcher-spec.json + echo '${{ needs.patcher-report.outputs.spec }}' > /tmp/patcher-spec.json - uses: gruntwork-io/patcher-action@main with: github_token: ${{ secrets.PIPELINES_READ_TOKEN }} dependency: ${{ matrix.dependency.ID }} patcher_command: update - spec_file: patcher-spec.json + spec_file: /tmp/patcher-spec.json pull_request_title: "[Patcher] [prod] Update ${{ matrix.dependency.ID }}" pull_request_branch: "${{ env.PR_BRANCH_PREFIX }}${{ matrix.dependency.ID }}" ``` From 7422705d60a0ee99caebe107b6da4c074ada84e4 Mon Sep 17 00:00:00 2001 From: Zach Goldberg Date: Wed, 30 Apr 2025 16:30:22 -0700 Subject: [PATCH 2/3] Update docs/2.0/docs/patcher/guides/promotion-workflows.md --- docs/2.0/docs/patcher/guides/promotion-workflows.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/2.0/docs/patcher/guides/promotion-workflows.md b/docs/2.0/docs/patcher/guides/promotion-workflows.md index b05d7a303..e14257470 100644 --- a/docs/2.0/docs/patcher/guides/promotion-workflows.md +++ b/docs/2.0/docs/patcher/guides/promotion-workflows.md @@ -57,7 +57,7 @@ The initial GitHub Actions workflow file, `update-dev.yml` in this example, high :::info As of `v0.14.x` (`patcher-action` `v2.10.x`), Patcher has deprecated support of checking in the spec output file from a `patcher report` run into your codebase. -This output is intended as a temporary reference between `report` and `update` runs, and is treated as a temp file, going forward. +This file, similar to an OpenTofu plan file, is intended to be a temporary artifact to capture run details between `report` and `update`. If you have this file in your codebase, it is recommended that you delete it and/or include it in the `.gitignore` file. ::: From 08efd4f529e60f1ffa122a77cb5fe49878176ce4 Mon Sep 17 00:00:00 2001 From: Zach Goldberg Date: Wed, 30 Apr 2025 16:30:37 -0700 Subject: [PATCH 3/3] Update docs/2.0/docs/patcher/guides/promotion-workflows.md --- docs/2.0/docs/patcher/guides/promotion-workflows.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/2.0/docs/patcher/guides/promotion-workflows.md b/docs/2.0/docs/patcher/guides/promotion-workflows.md index e14257470..a2f18d488 100644 --- a/docs/2.0/docs/patcher/guides/promotion-workflows.md +++ b/docs/2.0/docs/patcher/guides/promotion-workflows.md @@ -58,7 +58,7 @@ The initial GitHub Actions workflow file, `update-dev.yml` in this example, high :::info As of `v0.14.x` (`patcher-action` `v2.10.x`), Patcher has deprecated support of checking in the spec output file from a `patcher report` run into your codebase. This file, similar to an OpenTofu plan file, is intended to be a temporary artifact to capture run details between `report` and `update`. -If you have this file in your codebase, it is recommended that you delete it and/or include it in the `.gitignore` file. +We recommend that you delete and `.gitignore` any spec files in your codebase. :::