Skip to content

[VDO-6059] Create separate CI files per branch, where needed#430

Merged
bjohnsto merged 2 commits intodm-vdo:mainfrom
bjohnsto:bjohnston_ci_file_per_branch
Feb 26, 2026
Merged

[VDO-6059] Create separate CI files per branch, where needed#430
bjohnsto merged 2 commits intodm-vdo:mainfrom
bjohnsto:bjohnston_ci_file_per_branch

Conversation

@bjohnsto
Copy link
Copy Markdown
Member

@bjohnsto bjohnsto commented Feb 26, 2026

Our CI uses pull_request_target because it allows for fork PRs to access repo secrets, which we need. However, using pull_request_target also comes with restrictions. One of those restrictions is that any actions run on the PR will be run in the main branch's context. Even if you have a PR targeting a different branch, it will still use the main branch's context; meaning it will use the CI from the main branch, not the CI file located on the branch. The plan is to have different ci files with separate branch filters. This will allow different actions to be run within the main branch's context.

Once this work is done, a separate PR updating the test code in the 8.3 branch to have tests run on rhel10 machines will need to be created to complete this task.

Additional work was done in our lab and Github itself to get this all to work. We added an additional runner machine that now runs rhel; vdo-lab-github-runner-03. We also added two new RHEL10 runner test machines; jfarm-002 and jfarm-003.

We added two new tags to our runner machine configuration; fedora for the current F42 runners and rhel for the current RHEL10 runner. I made them generic for the time being, since I know we tend to update fedora releases as we get new ones and having a fedora42 tag running fedora 43 didn't make much sense. We can always change this later.

These changes allows us to specify to the common CI code which private runner machines to run on. The default tag in the common CI code is fedora.

Our CI uses pull_request_target because it allows for fork PRs to
access repo secrets, which we need. However, using pull_request_target
also comes with restrictions. One of those restrictions is that any
actions run on the PR will be run in the main branch's context. Even
if you have a PR targeting a different branch, it will still use
the main branch's context; meaning it will use the CI from the main
branch, not the CI file located on the branch. The plan is to have
different ci files with separate branch filters. This will allow
different actions to be run within the main branch's context.

First step is to rename the current CI file.

Signed-off-by: Bruce Johnston <bjohnsto@redhat.com>
Copy link
Copy Markdown
Member

@lorelei-sakai lorelei-sakai left a comment

Choose a reason for hiding this comment

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

One tiny tweak about covering all 8.3.* release branches. Is that possible?

Otherwise this looks like it makes a lot of sense, the rest of it is good.

Comment thread .github/workflows/ci-8.3.yml Outdated
Comment thread .github/workflows/ci-main.yml Outdated
Create a new ci file specifically for our 8.3 branches that only runs
when any of the 8.3 branches are targeted. Update the ci-main.yml file
to only run when the main branch is targeted.

Signed-off-by: Bruce Johnston <bjohnsto@redhat.com>
Copy link
Copy Markdown
Member

@lorelei-sakai lorelei-sakai left a comment

Choose a reason for hiding this comment

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

Looks great.

@bjohnsto bjohnsto merged commit 7e9dd19 into dm-vdo:main Feb 26, 2026
7 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants