Merge pull request #65780 from s0undt3ch/hotfix/deprecations-3007.x

[3007.x] Be sure to trigger all release branches on nightly and scheduled builds
This commit is contained in:
David Murphy 2024-01-08 13:54:57 -07:00 committed by GitHub
commit 10612f6313
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
6 changed files with 22 additions and 5 deletions

View file

@ -68,13 +68,21 @@ jobs:
runs-on: ${{ github.event.repository.private && fromJSON('["self-hosted", "linux", "x86_64"]') || 'ubuntu-latest' }}
needs:
- workflow-requirements
steps:
- name: Trigger 3006.x branch
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
gh workflow run nightly.yml --repo ${{ github.repository }} --ref 3006.x
- name: Trigger 3007.x branch
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
gh workflow run nightly.yml --repo ${{ github.repository }} --ref 3007.x
prepare-workflow:
name: Prepare Workflow Run
runs-on: ${{ github.event.repository.private && fromJSON('["self-hosted", "linux", "x86_64"]') || 'ubuntu-latest' }}

View file

@ -58,13 +58,21 @@ jobs:
runs-on: ${{ github.event.repository.private && fromJSON('["self-hosted", "linux", "x86_64"]') || 'ubuntu-latest' }}
needs:
- workflow-requirements
steps:
- name: Trigger 3006.x branch
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
gh workflow run scheduled.yml --repo ${{ github.repository }} --ref 3006.x
- name: Trigger 3007.x branch
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
gh workflow run scheduled.yml --repo ${{ github.repository }} --ref 3007.x
prepare-workflow:
name: Prepare Workflow Run
runs-on: ${{ github.event.repository.private && fromJSON('["self-hosted", "linux", "x86_64"]') || 'ubuntu-latest' }}

View file

@ -1,7 +1,6 @@
<%- set job_name = "trigger-branch-{}-builds".format(workflow_slug) %>
<%- set branches = ["3006.x"] %>
<{ job_name }>:
<%- do conclusion_needs.append(job_name) %>
@ -10,8 +9,10 @@
runs-on: ${{ github.event.repository.private && fromJSON('["self-hosted", "linux", "x86_64"]') || 'ubuntu-latest' }}
needs:
- workflow-requirements
steps:
<%- for branch in branches %>
<%- for branch in release_branches %>
- name: Trigger <{ branch }> branch
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}

View file

@ -1,6 +1,6 @@
nox_version: "2022.8.7"
python_version: "3.10.13"
relenv_version: "0.14.2"
release-branches:
release_branches:
- "3006.x"
- "3007.x"

View file

@ -944,7 +944,7 @@ def get_release_changelog_target(ctx: Context, event_name: str):
shared_context = yaml.safe_load(
tools.utils.SHARED_WORKFLOW_CONTEXT_FILEPATH.read_text()
)
release_branches = shared_context["release-branches"]
release_branches = shared_context["release_branches"]
release_changelog_target = "next-major-release"
if event_name == "pull_request":

View file

@ -326,7 +326,7 @@ def generate_workflows(ctx: Context):
tools.utils.SHARED_WORKFLOW_CONTEXT_FILEPATH.read_text()
)
for key, value in shared_context.items():
context[key] = value
context[key.replace("-", "_")] = value
loaded_template = env.get_template(template_path.name)
rendered_template = loaded_template.render(**context)
workflow_path.write_text(rendered_template.rstrip() + "\n")