-
Notifications
You must be signed in to change notification settings - Fork 26
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
base: master
Are you sure you want to change the base?
Conversation
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.
f0fcdc7
to
05e3962
Compare
export PROJECT=${collection} | ||
./upload_stage_rpms | ||
""" | ||
sshagent(['yum-stage']) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This will need some manual migration, but allows us to drop this bit:
https://github.com/theforeman/foreman-infra/blob/801376af314f44108b4a851edc9e2d2173f7c247/puppet/modules/jenkins_node/manifests/packaging/rpm.pp#L44-L48
script { | ||
env.VERSION = candlepin_version | ||
} |
There was a problem hiding this comment.
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
script { | |
env.VERSION = candlepin_version | |
} | |
env.VERSION = candlepin_version |
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:
Currently very much untested and the SSH key needs some manual work to be created with some clean up in foreman-infra as well.