From 3c28e9dd1f8a75cf322dee90493bf537d766c981 Mon Sep 17 00:00:00 2001 From: claire labry Date: Mon, 20 May 2024 11:05:52 -0400 Subject: [PATCH] SMRE/BPA Onboarding LTS (#27053) * onboard to use backport-assistant with lts support * add active releases manifest file * fix CE active release versions * update manifest and backport files for 0.4.1 bpa version * remove BACKPORT_LABEL_TEMPLATE * remove extra container; * seperate backport.yml files --------- Co-authored-by: Jeanne Franco --- .github/workflows/backport-ce.yml | 37 +++++++++++++++++++++++++++++++ .github/workflows/backport.yml | 23 ------------------- .release/versions.hcl | 19 ++++++++++++++++ 3 files changed, 56 insertions(+), 23 deletions(-) create mode 100644 .github/workflows/backport-ce.yml delete mode 100644 .github/workflows/backport.yml create mode 100644 .release/versions.hcl diff --git a/.github/workflows/backport-ce.yml b/.github/workflows/backport-ce.yml new file mode 100644 index 0000000000..5a14cf18f4 --- /dev/null +++ b/.github/workflows/backport-ce.yml @@ -0,0 +1,37 @@ +--- +name: Backport Assistant Runner (for OSS & ENT) + +on: + pull_request_target: + types: + - closed + - labeled + repository_dispatch: + types: [ent-backport] + +jobs: + backport-targeted-release-branch: + if: github.event.pull_request.merged && github.repository == 'hashicorp/vault' + runs-on: ubuntu-latest + container: hashicorpdev/backport-assistant:0.4.1 + steps: + - name: Backport changes to targeted release branch + run: | + backport-assistant backport -merge-method=squash -gh-automerge + env: + BACKPORT_LABEL_REGEXP: "backport/(?P\\d+\\.\\d+\\.[+\\w]+)" + BACKPORT_TARGET_TEMPLATE: "release/{{.target}}" + BACKPORT_MERGE_COMMIT: true + GITHUB_TOKEN: ${{ secrets.ELEVATED_GITHUB_TOKEN }} + ENABLE_VERSION_MANIFESTS: true + backport-ent: + if: github.event.pull_request.merged && contains(join(github.event.pull_request.labels.*.name), 'backport/ent') + runs-on: ubuntu-latest + steps: + - name: Trigger backport for Enterprise + uses: peter-evans/repository-dispatch@ff45666b9427631e3450c54a1bcbee4d9ff4d7c0 # v3.0.0 + with: + token: ${{ secrets.ELEVATED_GITHUB_TOKEN }} + repository: hashicorp/vault-enterprise + event-type: ent-backport + client-payload: ${{ toJson(github.event) }} diff --git a/.github/workflows/backport.yml b/.github/workflows/backport.yml deleted file mode 100644 index f78464a8c8..0000000000 --- a/.github/workflows/backport.yml +++ /dev/null @@ -1,23 +0,0 @@ ---- -name: Backport Assistant Runner (for OSS & ENT) - -on: - pull_request_target: - types: - - closed - - labeled - -jobs: - backport-targeted-release-branch: - if: github.event.pull_request.merged - runs-on: ubuntu-latest - container: hashicorpdev/backport-assistant:0.3.3 - steps: - - name: Backport changes to targeted release branch - run: | - backport-assistant backport -merge-method=squash -gh-automerge - env: - BACKPORT_LABEL_REGEXP: "backport/(?P\\d+\\.\\d+\\.[+\\w]+)" - BACKPORT_TARGET_TEMPLATE: "release/{{.target}}" - BACKPORT_MERGE_COMMIT: true - GITHUB_TOKEN: ${{ secrets.ELEVATED_GITHUB_TOKEN }} diff --git a/.release/versions.hcl b/.release/versions.hcl new file mode 100644 index 0000000000..fa05b7c4c1 --- /dev/null +++ b/.release/versions.hcl @@ -0,0 +1,19 @@ +# Copyright (c) HashiCorp, Inc. +# SPDX-License-Identifier: BUSL-1.1 + +# This manifest file describes active releases and is consumed by the backport tooling. + +schema = 1 +active_versions { + version "1.16.x" { + ce_active = true + lts = true + } + version "1.15.x" { + ce_active = true + } + version "1.14.x" { + ce_active = true + } + +}