Skip to content

Commit

Permalink
Rename the freeze-date to cutoff-date in the create-schedule task (#3…
Browse files Browse the repository at this point in the history
  • Loading branch information
FlorentClarret authored Jan 3, 2025
1 parent 34197cd commit 97e21b6
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 8 deletions.
8 changes: 4 additions & 4 deletions .github/workflows/create_release_schedule.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@ on:
description: 'Full version of the release to schedule (e.g. 7.31.0)'
required: true
type: string
freeze_date:
description: 'Isoformat date when we freeze CI (e.g. 2023-12-31)'
cutoff_date:
description: 'Isoformat date when we the cut-off happens (e.g. 2023-12-31)'
required: true
type: string

Expand Down Expand Up @@ -38,6 +38,6 @@ jobs:
ATLASSIAN_USERNAME : ${{ secrets.ATLASSIAN_USERNAME }}
ATLASSIAN_PASSWORD : ${{ secrets.ATLASSIAN_PASSWORD }}
INPUT_VERSION: ${{ github.event.inputs.version }}
FREEZE_DATE: ${{ github.event.inputs.freeze_date }}
CUTOFF_DATE: ${{ github.event.inputs.cutoff_date }}
run: |
inv -e release.create-schedule --version "$INPUT_VERSION" --freeze-date "$FREEZE_DATE"
inv -e release.create-schedule --version "$INPUT_VERSION" --cutoff-date "CUTOFF_DATE"
7 changes: 3 additions & 4 deletions tasks/release.py
Original file line number Diff line number Diff line change
Expand Up @@ -1029,19 +1029,18 @@ def generate_release_metrics(ctx, milestone, freeze_date, release_date):
print(code_stats)


# TODO rename to freeze_date to cutoff_date
@task
def create_schedule(_, version, freeze_date):
def create_schedule(_, version, cutoff_date):
"""Create confluence pages for the release schedule.
Args:
freeze_date: Date when the code cut-off happened. Expected format YYYY-MM-DD, like '2022-02-01'
cutoff_date: Date when the code cut-off happened. Expected format YYYY-MM-DD, like '2022-02-01'
"""

required_environment_variables = ["ATLASSIAN_USERNAME", "ATLASSIAN_PASSWORD"]
if not all(key in os.environ for key in required_environment_variables):
raise Exit(f"You must set {required_environment_variables} environment variables to use this task.", code=1)
release_page = create_release_page(version, date.fromisoformat(freeze_date))
release_page = create_release_page(version, date.fromisoformat(cutoff_date))
print(f"Release schedule pages {release_page['url']} {color_message('successfully created', 'green')}")


Expand Down

0 comments on commit 97e21b6

Please sign in to comment.