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

Add nightly for each repository release stream #291

Merged
merged 1 commit into from
Jan 19, 2024

Conversation

ehelms
Copy link
Member

@ehelms ehelms commented Nov 1, 2023

This change will allow controlling for what OSes a given release from our release jobs, for nightly, and align it with a numerical release. Right now, we store in Jenkins the OSes nightly supports and then we iterate and call the build_stage_repository script [1]. By having the nightly releases captured here, our CI can instead call VERSION='nightly' PROJECT=<project> ./generate_stage_repositories and allow configuration inside this repository to drive what is generated.

In a similar fashion, we can make use of a single rsync script to stagingyum to handle uploads for nightly and releases in the same way without having to keep CI and this repository in sync. See theforeman/jenkins-jobs#369.

[1] https://github.com/theforeman/jenkins-jobs/blob/master/theforeman.org/pipelines/release/pipelines/foreman-rpm.groovy#L69-L73

Copy link
Member

@ekohl ekohl left a comment

Choose a reason for hiding this comment

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

We don't have rc1 in nightly. I'm not sure what a valid FULLVERSION would be. For example, in our release pipeline we pass FULLVERSION as the expected version and that would mean it expects nightly.0-rc1 in /usr/share/foreman*/VERSION. Perhaps it should just not be set at all?

@ehelms
Copy link
Member Author

ehelms commented Dec 15, 2023

We don't have rc1 in nightly. I'm not sure what a valid FULLVERSION would be. For example, in our release pipeline we pass FULLVERSION as the expected version and that would mean it expects nightly.0-rc1 in /usr/share/foreman*/VERSION. Perhaps it should just not be set at all?

For now I shortened it to nightly. Right now this appears to be forced by https://github.com/theforeman/theforeman-rel-eng/blob/master/settings#L25-L29 and I wouldn't want to relax this for releases. Whereas having this ability to use scripts in all versions including nightly is strong for centralizing our scripts. Perhaps we take this version as is and keep iterating if FULLVERSIOn for nightly becomes tricky with other workflows?

@ekohl
Copy link
Member

ekohl commented Dec 18, 2023

In #330 I made an effort to make some variables optional, which makes the files more logical.

@ehelms
Copy link
Member Author

ehelms commented Jan 17, 2024

With #330 merged, what are you expecting to change here?

Copy link
Member

@ekohl ekohl left a comment

Choose a reason for hiding this comment

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

I think we can now drop FULLVERSION in all of these files. The flows that need it shouldn't run and otherwise properly error out.

@ehelms
Copy link
Member Author

ehelms commented Jan 18, 2024

I think we can now drop FULLVERSION in all of these files. The flows that need it shouldn't run and otherwise properly error out.

Cleaned up, and seems to be working from my test scenarios on scripts.

Copy link
Member

@ekohl ekohl left a comment

Choose a reason for hiding this comment

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

I should have caught this in the previous review, but more simplifications are possible.

@@ -0,0 +1 @@
FOREMAN_VERSION='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 set this by default:

FOREMAN_VERSION=$VERSION

Suggested change
FOREMAN_VERSION='nightly'

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

Choose a reason for hiding this comment

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

Candlepin doesn't have a Foreman version:

FOREMAN_VERSION='none'

Suggested change
FOREMAN_VERSION='nightly'

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

Choose a reason for hiding this comment

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

I'd prefer a solution similar to client where in releases/plugins/settings we set FOREMAN_VERSION=$VERSION and be done with it.

Suggested change
FOREMAN_VERSION='nightly'

Comment on lines 1 to 2
PACKAGING_SUBDIR="packages/plugins"
OSES="el8"
Copy link
Member

Choose a reason for hiding this comment

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

As said above: we can set it by default (and sort the file alphabetically):

Suggested change
PACKAGING_SUBDIR="packages/plugins"
OSES="el8"
FOREMAN_VERSION=$VERSION
OSES="el8"
PACKAGING_SUBDIR="packages/plugins"

Copy link
Member

@ekohl ekohl left a comment

Choose a reason for hiding this comment

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

Wouldn't you still need a release/plugins/nightly/settings file, since it will error out if it doesn't exist? By now that needs OSES="el8 el9".

@ehelms ehelms force-pushed the add-nightly branch 2 times, most recently from 27688ac to 33e61ad Compare January 19, 2024 12:32
@ehelms ehelms requested a review from ekohl January 19, 2024 13:21
Copy link
Member

@ekohl ekohl left a comment

Choose a reason for hiding this comment

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

Last one, I promise ;)

releases/pulpcore/nightly/settings Outdated Show resolved Hide resolved
Copy link
Member

@evgeni evgeni left a comment

Choose a reason for hiding this comment

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

Glad I didn't promise anything

releases/client/settings Show resolved Hide resolved
@ehelms ehelms merged commit 13de94a into theforeman:master Jan 19, 2024
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

3 participants