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 COPR jobs for easier branching #376

Merged
merged 2 commits into from
Nov 16, 2023

Conversation

ekohl
Copy link
Member

@ekohl ekohl commented Nov 15, 2023

See individual commits for details. The goal is to use include files to create the right jobs so there is only a single one. For Foreman this is a bit uglier because it's more complex.

@ekohl ekohl requested a review from ehelms November 15, 2023 16:56
@ekohl ekohl force-pushed the correct-branching branch from 3b59c2a to dd0184d Compare November 15, 2023 16:58
@ekohl ekohl force-pushed the correct-branching branch 3 times, most recently from 1b473a8 to f4ee103 Compare November 15, 2023 17:26
@ehelms
Copy link
Member

ehelms commented Nov 15, 2023

Right now the Copr PR test is locked to rpm/develop but would also need consideration for branching -- see https://github.com/theforeman/jenkins-jobs/blob/master/theforeman.org/yaml/jobs/packaging/foreman-packaging-rpm-pr-test.yaml#L31C9-L31C30

@@ -0,0 +1 @@
[]
Copy link
Member Author

Choose a reason for hiding this comment

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

This won't play well the first time, but if I left it empty then it failed to build. It'll easily show up in review if you add a line after this.

@@ -4,4 +4,3 @@
- '3.21'
- '3.22'
- '3.28'
- 'nightly'
Copy link
Member Author

Choose a reason for hiding this comment

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

AFAIK we don't build Pulp nightly in Koji anymore, so this can be cleaned up.

@ekohl
Copy link
Member Author

ekohl commented Nov 15, 2023

Right now the Copr PR test is locked to rpm/develop but would also need consideration for branching -- see https://github.com/theforeman/jenkins-jobs/blob/master/theforeman.org/yaml/jobs/packaging/foreman-packaging-rpm-pr-test.yaml#L31C9-L31C30

Looking at the source, this is tricky in trying to reuse the other configs.

@ehelms
Copy link
Member

ehelms commented Nov 15, 2023

Looking at the source, this is tricky in trying to reuse the other configs.

Yes... I think I would have to combine the jobs into a single job with when conditions. Question is if you want to block on that, or go the quick route and I can follow up with the re-factor.

@ekohl
Copy link
Member Author

ekohl commented Nov 15, 2023

I'm tempted to go the easy route on the triggers.

Copy link
Member

@ehelms ehelms left a comment

Choose a reason for hiding this comment

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

If you want to address the PR test issue here or in another PR.

@@ -21,6 +21,8 @@ sed -i "/nightly/i \ \ \ \ \ \ - '${KATELLO_VERSION}'" centos.org/jobs/katello-p

echo "- '${FOREMAN_VERSION}'" >> theforeman.org/yaml/includes/foreman_versions.yaml.inc
Copy link
Member

Choose a reason for hiding this comment

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

if we're not doing koji releases anymore, can't this go?

(also, the file is now foreman_versions_koji, right?)

Copy link
Member Author

Choose a reason for hiding this comment

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

No, this is the file with all releases. It's also used for Debian and other stuff like smart-proxy-X.Y-stable-test & test_X_Y_stable.

This uses the same approach as for Koji, but also makes it explicit
which is which.

It drops the pulpcore nightly koji job.
This introduces a completely reusable
foreman-packaging-{packaging_label}-{version}-release job template. Then
it instantiates the various versions of it.

The design is currently that it creates both koji and copr for nightly,
but only a single rpm instance for releases.

The branch-foreman script is modified to do the right thing.
@ekohl ekohl force-pushed the correct-branching branch from f4ee103 to 42ff27b Compare November 16, 2023 17:34
@ekohl
Copy link
Member Author

ekohl commented Nov 16, 2023

I think this covers it by introducing new GHPRB triggers with regexes. Not pretty, but I'd expect it to work. On a related note: we should really get away from GHPRB since it's unmaintained and has security problems.

@@ -0,0 +1 @@
- 'nightly'
Copy link
Member

Choose a reason for hiding this comment

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

We can include '3.39' here as well, since we are going to branch from rpm/develop

Copy link
Member Author

Choose a reason for hiding this comment

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

I think that's out of scope for this PR: we should treat 3.39 as a separate branching step. We already know https://github.com/theforeman/theforeman-rel-eng/blob/master/procedures/pulpcore/update.md.erb is out of date, so please keep notes when you do.

@ekohl ekohl merged commit 95223ca into theforeman:master Nov 16, 2023
2 checks passed
@ekohl ekohl deleted the correct-branching branch November 16, 2023 18:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants