From 0264aad99efb3e7ba0049a4c2063d24e697e6ed3 Mon Sep 17 00:00:00 2001 From: i4ki Date: Thu, 17 Oct 2024 12:26:33 +0100 Subject: [PATCH 1/7] chore: improve CI to deploy also backporting branches. Signed-off-by: i4ki --- .github/workflows/ci-sync-deployment.yml | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/.github/workflows/ci-sync-deployment.yml b/.github/workflows/ci-sync-deployment.yml index 40927e1a8..74f2a22c5 100644 --- a/.github/workflows/ci-sync-deployment.yml +++ b/.github/workflows/ci-sync-deployment.yml @@ -7,9 +7,7 @@ on: push: branches: - main - - v0.4.x - - v0.6.x - - v0.9.x + - v*.x # backporting branches. jobs: build_test: From 35fdf20c6801e0af533181f619aed70eb681538f Mon Sep 17 00:00:00 2001 From: i4ki Date: Thu, 17 Oct 2024 12:44:14 +0100 Subject: [PATCH 2/7] ci: fix change detection in backport branches. Signed-off-by: i4ki Signed-off-by: i4k --- .github/workflows/ci-sync-deployment.yml | 15 +++++++++------ .github/workflows/ci-sync-preview.yml | 11 +++++++---- 2 files changed, 16 insertions(+), 10 deletions(-) diff --git a/.github/workflows/ci-sync-deployment.yml b/.github/workflows/ci-sync-deployment.yml index 74f2a22c5..76611de37 100644 --- a/.github/workflows/ci-sync-deployment.yml +++ b/.github/workflows/ci-sync-deployment.yml @@ -62,15 +62,18 @@ jobs: - name: make generate run: make generate + - name: fetch base ref (${{ github.base_ref }}) + run: git fetch origin ${{ github.base_ref }} + ### Check for changed stacks - name: List changed Go packages id: list_go_packages - run: terramate list --tags golang --changed + run: terramate list --tags golang --changed --git-change-base origin/${{ github.base_ref }} - name: List changed e2e tests packages id: list_e2e_packages - run: terramate list --tags e2etests --changed + run: terramate list --tags e2etests --changed --git-change-base origin/${{ github.base_ref }} ### Linting @@ -96,14 +99,14 @@ jobs: ### Run the Terramate tests and create a Cloud deployment - name: Run Terraform deployment on changed packages - if: ${{ steps.list_go_packages.outputs.stdout || steps.list_e2e_packages }} + if: ${{ steps.list_go_packages.outputs.stdout }} timeout-minutes: 30 - run: terramate script run --changed --tags golang --continue-on-error --target ${{ matrix.os.name }}-go-packages --parallel 12 deploy + run: terramate script run --changed --git-change-base origin/${{ github.base_ref }} --tags golang --continue-on-error --target ${{ matrix.os.name }}-go-packages --parallel 12 deploy env: GITHUB_TOKEN: ${{ github.token }} TM_TEST_TERRAFORM_REQUIRED_VERSION: "1.7.5" - - name: Run all e2e tests Preview if any Go packages changed + - name: Run all e2e tests if any Go packages changed if: ${{ steps.list_go_packages.outputs.stdout }} timeout-minutes: 30 run: terramate script run --tags e2etests --target ${{ matrix.os.name }}-e2e --parallel 12 deploy @@ -114,7 +117,7 @@ jobs: - name: Else only run the changed e2e packages if: ${{ !steps.list_e2e_packages.outputs.stdout && steps.list_e2e_packages.outputs.stdout }} timeout-minutes: 30 - run: terramate script run --tags e2etests --changed --target "${{ matrix.os.name }}-e2e" --parallel 12 deploy + run: terramate script run --tags e2etests --changed --git-change-base origin/${{ github.base_ref }} --target "${{ matrix.os.name }}-e2e" --parallel 12 deploy env: GITHUB_TOKEN: ${{ github.token }} TM_TEST_TERRAFORM_REQUIRED_VERSION: "1.7.5" diff --git a/.github/workflows/ci-sync-preview.yml b/.github/workflows/ci-sync-preview.yml index 61c9491bc..90edb4294 100644 --- a/.github/workflows/ci-sync-preview.yml +++ b/.github/workflows/ci-sync-preview.yml @@ -62,15 +62,18 @@ jobs: - name: make generate run: make generate + - name: fetch base ref (${{ github.base_ref }}) + run: git fetch origin ${{ github.base_ref }} + ### Check for changed stacks - name: List changed Go packages id: list_go_packages - run: terramate list --tags golang --changed + run: terramate list --tags golang --changed --git-change-base origin/${{ github.base_ref }} - name: List changed e2e tests packages id: list_e2e_packages - run: terramate list --tags e2etests --changed + run: terramate list --tags e2etests --changed --git-change-base origin/${{ github.base_ref }} ### Linting @@ -101,7 +104,7 @@ jobs: - name: Run Preview on changed Go packages if: ${{ steps.list_go_packages.outputs.stdout }} timeout-minutes: 30 - run: terramate script run --changed --tags golang --target "${{ matrix.os.name }}-go-packages" --parallel 12 preview + run: terramate script run --changed --git-change-base origin/${{ github.base_ref }} --tags golang --target "${{ matrix.os.name }}-go-packages" --parallel 12 preview env: GITHUB_TOKEN: ${{ github.token }} TM_TEST_TERRAFORM_REQUIRED_VERSION: "1.7.5" @@ -117,7 +120,7 @@ jobs: - name: Else only run the changed e2e packages if: ${{ !steps.list_e2e_packages.outputs.stdout && steps.list_e2e_packages.outputs.stdout }} timeout-minutes: 30 - run: terramate script run --tags e2etests --changed --target "${{ matrix.os.name }}-e2e" --parallel 12 preview + run: terramate script run --tags e2etests --changed --git-change-base origin/${{ github.base_ref }} --target "${{ matrix.os.name }}-e2e" --parallel 12 preview env: GITHUB_TOKEN: ${{ github.token }} TM_TEST_TERRAFORM_REQUIRED_VERSION: "1.7.5" From 8e64775d9165c5ffa9ea80a08b669840f990610f Mon Sep 17 00:00:00 2001 From: i4k Date: Tue, 22 Oct 2024 17:35:39 +0100 Subject: [PATCH 3/7] ci: fix change detection in push event. Signed-off-by: i4k --- .github/workflows/ci-sync-deployment.yml | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/.github/workflows/ci-sync-deployment.yml b/.github/workflows/ci-sync-deployment.yml index 76611de37..cbd5c9720 100644 --- a/.github/workflows/ci-sync-deployment.yml +++ b/.github/workflows/ci-sync-deployment.yml @@ -62,18 +62,15 @@ jobs: - name: make generate run: make generate - - name: fetch base ref (${{ github.base_ref }}) - run: git fetch origin ${{ github.base_ref }} - ### Check for changed stacks - name: List changed Go packages id: list_go_packages - run: terramate list --tags golang --changed --git-change-base origin/${{ github.base_ref }} + run: terramate list --tags golang --changed --git-change-base HEAD^ - name: List changed e2e tests packages id: list_e2e_packages - run: terramate list --tags e2etests --changed --git-change-base origin/${{ github.base_ref }} + run: terramate list --tags e2etests --changed --git-change-base HEAD^ ### Linting @@ -117,7 +114,7 @@ jobs: - name: Else only run the changed e2e packages if: ${{ !steps.list_e2e_packages.outputs.stdout && steps.list_e2e_packages.outputs.stdout }} timeout-minutes: 30 - run: terramate script run --tags e2etests --changed --git-change-base origin/${{ github.base_ref }} --target "${{ matrix.os.name }}-e2e" --parallel 12 deploy + run: terramate script run --tags e2etests --changed --git-change-base HEAD^ --target "${{ matrix.os.name }}-e2e" --parallel 12 deploy env: GITHUB_TOKEN: ${{ github.token }} TM_TEST_TERRAFORM_REQUIRED_VERSION: "1.7.5" From d0e8d3fdf4b270de88ffe5fc5a6e4e7c0738fa52 Mon Sep 17 00:00:00 2001 From: i4k Date: Tue, 22 Oct 2024 18:00:07 +0100 Subject: [PATCH 4/7] chore: release v0.11.0. Signed-off-by: i4k --- CHANGELOG.md | 2 +- VERSION | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 042f7bd00..bd6e27bd8 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -20,7 +20,7 @@ Given a version number `MAJOR.MINOR.PATCH`, we increment the: - Backward compatibility in versions `0.0.z` is **not guaranteed** when `z` is increased. - Backward compatibility in versions `0.y.z` is **not guaranteed** when `y` is increased. -## Unreleased +## v0.11.0 ### Added diff --git a/VERSION b/VERSION index 4378f3a9f..d9df1bbc0 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -0.11.0-rc2 +0.11.0 From aaa69ba637ffed337cc5f6c821fdd354b6b32d98 Mon Sep 17 00:00:00 2001 From: i4k Date: Tue, 22 Oct 2024 18:10:28 +0100 Subject: [PATCH 5/7] chore: adjust CHANGELOG. Signed-off-by: i4k --- CHANGELOG.md | 3 --- 1 file changed, 3 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index bd6e27bd8..8d1633815 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -29,8 +29,6 @@ Given a version number `MAJOR.MINOR.PATCH`, we increment the: - Add support for using `TM_ARG_*` environment variables to configure cli commands. Note: This is an incremental change. Only global flags and `terramate run` flags were added for now. - For example: Use `TM_ARG_CHDIR=stacks/prod TM_ARG_RUN_REVERSE=1 terramate run -- terraform apply` to run from inside `stacks/prod` and with reversed execution order (which is the same as `terramate --chdir stacks/prod run --reverse -- terraform apply`). -- Add support for dot (`.`) in the tag syntax. - - Now you can add tags like `v1.0.0-abc_xyz` ### Changed @@ -38,7 +36,6 @@ Given a version number `MAJOR.MINOR.PATCH`, we increment the: - This behavior can be turned off by `terramate.config.change_detection.git.untracked = "off"` and `terramate.config.change_detection.git.uncommitted = "off"`. - **(Breaking change)** Remove the deprecated `terramate experimental run-order`. - The `terramate list --run-order` was introduced in version `v0.4.5` and provides the same functionality as the removed command. -- The **Outputs Sharing** feature now has no default value for the `sensitive` field of `input` and `output` blocks. ## v0.10.8 From 7aae5085af51b34472a9a72fa1cb53ad44b3e383 Mon Sep 17 00:00:00 2001 From: i4k Date: Tue, 22 Oct 2024 18:36:44 +0100 Subject: [PATCH 6/7] chore: bump development version. Signed-off-by: i4k --- CHANGELOG.md | 2 ++ VERSION | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 8d1633815..d23fd49f6 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -20,6 +20,8 @@ Given a version number `MAJOR.MINOR.PATCH`, we increment the: - Backward compatibility in versions `0.0.z` is **not guaranteed** when `z` is increased. - Backward compatibility in versions `0.y.z` is **not guaranteed** when `y` is increased. +## Unreleased + ## v0.11.0 ### Added diff --git a/VERSION b/VERSION index d9df1bbc0..72ab694d3 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -0.11.0 +0.11.1-dev From 1553131ff6b58e079724271073fc5d3fb916fa7e Mon Sep 17 00:00:00 2001 From: i4k Date: Tue, 22 Oct 2024 22:16:29 +0100 Subject: [PATCH 7/7] ci: fix another change detection in push event. Signed-off-by: i4k --- .github/workflows/ci-sync-deployment.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ci-sync-deployment.yml b/.github/workflows/ci-sync-deployment.yml index cbd5c9720..9508e4bcb 100644 --- a/.github/workflows/ci-sync-deployment.yml +++ b/.github/workflows/ci-sync-deployment.yml @@ -98,7 +98,7 @@ jobs: - name: Run Terraform deployment on changed packages if: ${{ steps.list_go_packages.outputs.stdout }} timeout-minutes: 30 - run: terramate script run --changed --git-change-base origin/${{ github.base_ref }} --tags golang --continue-on-error --target ${{ matrix.os.name }}-go-packages --parallel 12 deploy + run: terramate script run --changed --git-change-base HEAD^ --tags golang --continue-on-error --target ${{ matrix.os.name }}-go-packages --parallel 12 deploy env: GITHUB_TOKEN: ${{ github.token }} TM_TEST_TERRAFORM_REQUIRED_VERSION: "1.7.5"