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

Align RPM pipelines' groovy code #458

Open
wants to merge 4 commits into
base: master
Choose a base branch
from

Conversation

ekohl
Copy link
Member

@ekohl ekohl commented May 8, 2024

This attempts to align the code as much as possible. See individual commits for details.

My goal would be to create some common library function that generates the whole pipeline with some parameters so we don't need to copy things.

Big differences remaining:

  • Repoclosures rely on variables. Perhaps we can also utilize theforeman-rel-eng here (since it already knows how to create and sync the repos).
  • Production repo pushing. Again, theforeman-rel-eng is a good candidate to use.

Currently very much untested and the SSH key needs some manual work to be created with some clean up in foreman-infra as well.

ekohl added 4 commits June 4, 2024 17:39
Rather than relying on Puppet to deploy an SSH key, this stores a key in
Jenkins and then uses an SSH-agent to provide access.
This creates a single stage to both build and push staging RPMs by
using the generate_stage_repository script from theforeman-rel-eng.

It uses environment variables to configure things, which further removes
unique configuration from individual pipeline steps.
This unifies RPM pipelines further by using environment variables that
are already available. It makes some changes to Discourse to align them,
other than that there should be no practical difference here.
export PROJECT=${collection}
./upload_stage_rpms
"""
sshagent(['yum-stage']) {
Copy link
Member Author

Choose a reason for hiding this comment

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

Comment on lines +15 to +17
script {
env.VERSION = candlepin_version
}
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 can't find a good way to set the environment variable as a script. Perhaps this needs to be

Suggested change
script {
env.VERSION = candlepin_version
}
env.VERSION = candlepin_version

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.

1 participant