Skip to content

Commit

Permalink
update with bpa image
Browse files Browse the repository at this point in the history
  • Loading branch information
jmurret committed Jul 8, 2024
1 parent 096f673 commit 79a1f7c
Showing 1 changed file with 38 additions and 27 deletions.
65 changes: 38 additions & 27 deletions .github/workflows/backport-commenter.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,53 +23,64 @@ on:
- jm/**

env:
GOPRIVATE: github.com/hashicorp # Required for private/internal backport-checker repo
GITHUB_TOKEN: ${{ secrets.ELEVATED_GITHUB_TOKEN }}
# This needs to be updated to the date of the last release.
BPA_COMMENTER_BEGIN_DATE: "2024-06-12"
# This needs to be updated to the versions that are currently being backported.
BPA_COMMENTER_VERSIONS: "1.15,1.16,1.17,1.18,1.19"

jobs:

validate-backports-oss:
container: hashicorpdev/backport-assistant:claire-dev
runs-on: [ 'ubuntu-latest' ]
container: hashicorpdev/backport-assistant:0.4.4
runs-on: [ 'self-hosted, linux' ]
steps:
- name: Fetch Secrets
id: secrets
uses: hashicorp/vault-action@v3
with:
url: ${{ vars.CI_VAULT_URL }}
method: ${{ vars.CI_VAULT_METHOD }}
path: ${{ vars.CI_VAULT_PATH }}
jwtGithubAudience: ${{ vars.CI_VAULT_AUD }}
secrets:
kv/data/github/${{ github.repository }} github_token ;

- name: backport commenter
env:
# this allows us to be able to run the workflow manually and input the versions and begin date
# and also allows us to use the repository environment variables as well if we were to run the workflow on a schedule.
# NOTE: The repository variables override the inputs if they are set. If you are using the workflow_dispatch, ensure
# you are unsetting the repository variables if you want to use the inputs.

# TODO(jmurret): Remove this before we merge this PR.
BEGIN_DATE: "2024-03-26" # "${{ github.event.inputs.begin-date || vars.BEGIN_DATE }}"
VERSIONS: "1.15,1.16,1.17,1.18,1.19" #"${{ github.event.inputs.versions || vars.VERSIONS }}"
OWNER: hashicorp
REPO: consul
SYNC_REPO: consul-enterprise
GITHUB_TOKEN: ${{ steps.secrets.outputs.github_token }}
run: |
backport-assistant validate \
--owner ${OWNER} --repo ${REPO} --sync-repo ${SYNC_REPO} --versions "${VERSIONS}" \
--begin-date "${BEGIN_DATE}" --add-comment
--owner ${OWNER} --repo ${REPO} --sync-repo ${SYNC_REPO} --versions "${BPA_COMMENTER_VERSIONS}" \
--begin-date "${BPA_COMMENTER_BEGIN_DATE}" --add-comment
validate-backports-enterprise:
container: hashicorpdev/backport-assistant:claire-dev
runs-on: [ 'ubuntu-latest' ]
container: hashicorpdev/backport-assistant:0.4.4
runs-on: [ 'self-hosted, linux' ]
# needs to run serially because github search api limits to 30 req/minute.
# running in parallel will push it over the limit.
needs:
- validate-backports-oss
- get-go-version
if: ${{ always() }}
steps:
- name: Fetch Secrets
id: secrets
uses: hashicorp/vault-action@v3
with:
url: ${{ vars.CI_VAULT_URL }}
method: ${{ vars.CI_VAULT_METHOD }}
path: ${{ vars.CI_VAULT_PATH }}
jwtGithubAudience: ${{ vars.CI_VAULT_AUD }}
secrets:
kv/data/github/${{ github.repository }} github_token ;

- name: backport commenter
env:
# this allows us to be able to run the workflow manually and input the versions and begin date
# and also allows us to use the repository environment variables as well if we were to run the workflow on a schedule.
# NOTE: The repository variables override the inputs if they are set. If you are using the workflow_dispatch, ensure
# you are unsetting the repository variables if you want to use the inputs.
# TODO(jmurret): Remove this before we merge this PR.
BEGIN_DATE: "2024-03-26" # "${{ github.event.inputs.begin-date || vars.BEGIN_DATE }}"
VERSIONS: "1.15,1.16,1.17,1.18,1.19" #"${{ github.event.inputs.versions || vars.VERSIONS }}"
OWNER: hashicorp
REPO: consul-enterprise
GITHUB_TOKEN: ${{ steps.secrets.outputs.github_token }}
run: |
backport-assistant validate \
--owner ${{ env.OWNER }} --repo ${{ env.REPO }} --versions "${{ env.VERSIONS }}" \
--begin-date ${{ env.BEGIN_DATE }} --add-comment
--owner "${OWNER}" --repo ${REPO} --versions ${BPA_COMMENTER_VERSIONS} \
--begin-date ${BPA_COMMENTER_BEGIN_DATE} --add-comment

0 comments on commit 79a1f7c

Please sign in to comment.