Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

refactor(ci): stable-daily tagging #1815

Merged
merged 2 commits into from
Oct 24, 2024

Conversation

befanyt
Copy link
Contributor

@befanyt befanyt commented Oct 20, 2024

I have refactored the stable-daily tagging logic to make it much more readable. I hope M2 is happier with this code.
Reference: #1804

Psuedo logic:

if triggered by schedule and its not weekly_tag_day; then
    tag with stable-daily
else
    tag with stable stable-daily
fi

In the code, I used the explicit term stable instead of ${FEDORA_VERSION} to improve readability. I chose this because we are already in stable logic, so this would always be stable. If you prefer ${FEDORA_VERSION} I can, of course, put that back in.

Manual triggered run will produce: stable, stable-daily
Schedule triggered run on weekly_tag_day: stable, stable-daily
Schedule triggered run on non weekly_tag_days: stable-daily

On top of this I made changes that will allow you to manually build stable or stable-daily only by pushing a button.
Introduces the following workflows.

  • Aurora Stable Daily - (builds aurora:stable-daily)
  • Aurora Stable Weekly - (builds aurora:stable)
  • Bluefin Stable Daily - (builds bluefin:stable-daily)
  • Bluefin Stable Weekly - (builds bluefin:stable)

To make this possible I updated the above pseudo logic like so:

if triggered by schedule and its not weekly_tag_day; then
    tag with stable-daily
else if build_stable_weekly is false; then 
    tag with stable-daily
else if build_stable_daily is false; then 
    tag with stable
else
    tag with stable stable-daily
fi

build_stable_weekly and build_stable_daily are both set to true by default inn the reusable-build.yml and are toggled via the new workflow files.

@dosubot dosubot bot added size:S This PR changes 10-29 lines, ignoring generated files. github_actions Pull requests that update GitHub Actions code labels Oct 20, 2024
@befanyt befanyt marked this pull request as draft October 20, 2024 18:41
@befanyt befanyt marked this pull request as ready for review October 20, 2024 19:27
@dosubot dosubot bot added size:M This PR changes 30-99 lines, ignoring generated files. and removed size:S This PR changes 10-29 lines, ignoring generated files. labels Oct 20, 2024
@@ -20,6 +20,16 @@ on:
required: false
type: string
default: Tuesday
build_stable_daily:
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is fine for now, but it feels a bit like a belt and suspenders situation. We are being overly specific it feels like.

@@ -246,15 +256,18 @@ jobs:
COMMIT_TAGS+=("${SHA_SHORT}")
fi

TODAY="$(date +%A)"
if [[ ${{ matrix.fedora_version }} == "stable" ]]; then
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is much more readable now.

That said I think we have room for improvements in the future.

@dosubot dosubot bot added the lgtm This PR has been approved by a maintainer label Oct 23, 2024
@castrojo castrojo added this pull request to the merge queue Oct 23, 2024
@github-merge-queue github-merge-queue bot removed this pull request from the merge queue due to failed status checks Oct 23, 2024
@m2Giles m2Giles added this pull request to the merge queue Oct 23, 2024
@github-merge-queue github-merge-queue bot removed this pull request from the merge queue due to failed status checks Oct 23, 2024
@castrojo castrojo added this pull request to the merge queue Oct 24, 2024
@castrojo castrojo removed this pull request from the merge queue due to a manual request Oct 24, 2024
@castrojo
Copy link
Member

Builds are skewed, forcing this in. Thanks everyone!

@castrojo castrojo merged commit 14959e2 into ublue-os:main Oct 24, 2024
64 checks passed
@befanyt befanyt deleted the refactor-stable-daily branch October 26, 2024 22:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
github_actions Pull requests that update GitHub Actions code lgtm This PR has been approved by a maintainer size:M This PR changes 30-99 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants