Skip to content

Commit

Permalink
Update procedures for Copr workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
ehelms committed Nov 17, 2023
1 parent 8ebeb8f commit ecef3a8
Show file tree
Hide file tree
Showing 6 changed files with 45 additions and 25 deletions.
9 changes: 9 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@ Below is a listing of access used.
* [Foreman infrastructure access](https://theforeman.github.io/foreman-infra/#access) including [secrets](https://theforeman.github.io/foreman-infra/secrets/)
* [Jenkins access](https://theforeman.github.io/foreman-infra/jenkins/#access)
* [Koji access](https://theforeman.github.io/foreman-infra/koji/#using-koji-as-a-user)
* [web01 stagingyum access](https://github.com/theforeman/foreman-infra/blob/master/puppet/modules/web/manifests/vhost/stagingyum.pp#L9)

#### Katello release owner

Expand Down Expand Up @@ -112,6 +113,14 @@ For running jobs in Jenkins, make sure you have [access](https://theforeman.gith
gopass edit theforeman/jenkins-token --create
```

### Copr

Copr is where all packages are built and the stage repositories are generated from for releases. API access is needed in order to perform release activities. To ensure you have Copr access setup:

1. Go to https://copr.fedorainfracloud.org/api/
2. Login if you are not already
3. Follow the directions

#### Release engineers

For commands on the Foreman infrastructure, add your personal `sudo` password:
Expand Down
16 changes: 6 additions & 10 deletions procedures/foreman/branch.md.erb
Original file line number Diff line number Diff line change
Expand Up @@ -60,12 +60,6 @@
- [ ] Use <%= rel_eng_script('upload_yum_gpg') %> to create [releases/<%= release %>/RPM-GPG-KEY-foreman](https://yum.theforeman.org/releases/<%= release %>/RPM-GPG-KEY-foreman) on yum.theforeman.org
- [ ] Commit the [settings file](https://github.com/theforeman/theforeman-rel-eng/blob/master/releases/foreman/<%= release %>/settings) to the `theforeman-rel-eng` repository
- [ ] Create new settings files for [client](https://github.com/theforeman/theforeman-rel-eng/blob/master/releases/client/<%= release %>/settings), ensure it has the rights `OSES` list and commit it too.
- [ ] Create mash configs in [tool_belt](https://github.com/theforeman/tool_belt/tree/master/configs/foreman) using <%= rel_eng_script('create_mash_configs') %> and submit this as a PR.
- [ ] Once merged, deploy mash configuration on Koji using <%= rel_eng_script('deploy_mash_configs') %>
- [ ] Update [collection-mash-split.py](https://github.com/theforeman/foreman-infra/blob/master/koji/collection-mash-split.py)
- Add a Katello version mapping
- Make any changes if needed (usually happens when there are tag changes)
- Deploy using `scp collection-mash-split.py [email protected]:/usr/local/bin`
- [ ] Open a PR with the result of [jenkins-jobs](https://github.com/theforeman/jenkins-jobs) branching: `./branch-foreman <%= release %> KATELLO_VERSION`
- [ ] Open PR to remove any jobs that are related to end of life versions
- [ ] Open PR to add <%= release %> to [Forklift versions config](https://github.com/theforeman/forklift/blob/master/vagrant/config/versions.yaml). Once the PR is merged, upgrade pipelines will fail, so do not merge it before packaging has been branched.
Expand All @@ -74,10 +68,12 @@

## Release Engineer

- Branch RPM packaging using [tool_belt](https://github.com/theforeman/tool_belt)
- [ ] Clone tags and create build targets in Koji: `bundle exec ./tools.rb koji --commit configs/foreman/<%= release %>.yaml`
Note that you must use koji client < 1.30 since clone-tag was changed and our Koji server is too old. See https://docs.pagure.org/koji/release_notes/release_notes_1.30/#system-changes for details.
- [ ] Create a `rpm/<%= release %>` branch in [foreman-packaging](https://github.com/theforeman/foreman-packaging) based on `rpm/develop`
- Branch RPM packaging
- [ ] Create a `rpm/<%= release %>` branch in [foreman-packaging](https://github.com/theforeman/foreman-packaging) based on `rpm/develop`: `git checkout rpm/develop && git pull && git checkout -b rpm/<%= release %>`
- [ ] Update `foreman_version` in `package_manifest.yaml` on the `rpm/<%= release %>` branch: `sed -i '/foreman_version:/ s/nightly/<%= release %>/' package_manifest.yaml`
- [ ] Update `katello_version` in `package_manifest.yaml` on the `rpm/<%= release %>` branch: `sed -i '/katello_version:/ s/nightly/KATELLO_VERSION_HERE/' package_manifest.yaml
- [ ] Create release repositories in Copr by forking nightly repositories `obal copr-project copr_projects` on the `rpm/<%= release %>` branch
- [ ] Push the `rpm/<%= release %>` branch
- Branch Debian packaging
- [ ] Clone Debian nightly repos to <%= release %> using [copy/freight instructions](https://projects.theforeman.org/projects/foreman/wiki/Debian_Packaging#Branching-for-release)
- [ ] Create a `deb/<%= release %>` branch in [foreman-packaging](https://github.com/theforeman/foreman-packaging) based on `deb/develop`
Expand Down
12 changes: 12 additions & 0 deletions procedures/foreman/release.md.erb
Original file line number Diff line number Diff line change
Expand Up @@ -69,15 +69,27 @@ Note: If for some reason there was an issue with the tarballs that required uplo
- [ ] [rpm/<%= short_version%>](https://github.com/theforeman/foreman-packaging/pulls?q=is%3Apr+is%3Aopen+base%3Arpm%2F<%= short_version %>)
- [ ] [deb/<%= short_version%>](https://github.com/theforeman/foreman-packaging/pulls?q=is%3Apr+is%3Aopen+base%3Adeb%2F<%= short_version %>)
- Sign the RPMs in the release
<% if Gem::Version.new(foreman_version) < Gem::Version.new('3.9') -%>
- [ ] <%= rel_eng_script('download_rpms') %>
- [ ] <%= rel_eng_script('sign_rpms') %>
- [ ] <%= rel_eng_script('upload_rpm_signatures') %>
- [ ] <%= rel_eng_script('upload_rpms') %>
<% else -%>
- [ ] <%= rel_eng_script('generate_stage_repository') %>
- [ ] <%= rel_eng_script('sign_stage_rpms') %>
- [ ] <%= rel_eng_script('upload_stage_rpms') %>
<% end -%>
- Sign RPMs for client repos (call scripts with `PROJECT=client`)
<% if Gem::Version.new(foreman_version) < Gem::Version.new('3.9') -%>
- [ ] <%= rel_eng_script('download_rpms') %>
- [ ] <%= rel_eng_script('sign_rpms') %>
- [ ] <%= rel_eng_script('upload_rpm_signatures') %>
- [ ] <%= rel_eng_script('upload_rpms') %>
<% else -%>
- [ ] <%= rel_eng_script('generate_stage_repository') %>
- [ ] <%= rel_eng_script('sign_stage_rpms') %>
- [ ] <%= rel_eng_script('upload_stage_rpms') %>
<% end -%>
- [ ] Kick off the [release pipeline](https://ci.theforeman.org/job/foreman-<%= short_version %>-release-pipeline/) by calling <%= rel_eng_script('release_pipeline') %>
- [ ] Kick off the [client pipeline](https://ci.theforeman.org/job/foreman-client-<%= short_version %>-rpm-pipeline/) by calling `PROJECT=client ./release_pipeline`
- [ ] Kick off the [plugins pipeline](https://ci.theforeman.org/job/foreman-plugins-<%= short_version %>-rpm-pipeline/) by calling <%= rel_eng_script('plugins_pipeline') %>
Expand Down
14 changes: 0 additions & 14 deletions procedures/katello/branch.md.erb
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
## Roles

* Release Owner: <%= owner %>
* Release Engineer: <%= engineer %>

# One Month Prior to Branch Date

Expand Down Expand Up @@ -39,10 +38,8 @@
- [ ] Manually update the following sections:
- [ ] releases: update to current release. Move the previous 'current' release to prior_releases below.
- [ ] prior_releases: Remove the oldest prior_release (check with that release owner first to see if there's a reason it should stay)
- [ ] mash_scripts: update Katello version number in all values
- [ ] repos: Update branch names to current versions, including any new releases that need to happen
- [ ] ignores: Delete all items from this list and start fresh (this will be used for cherry-picks later)
- [ ] gpg-key: When it becomes available, get the new Foreman GPG key for the corresponding Foreman version ([example here](https://github.com/theforeman/theforeman-rel-eng/blob/master/releases/foreman/2.5/settings) and put the last 8 characters here
- [ ] tags: update Katello version number in all values. Check the nightly config to see if any tags/repos need to be updated
- [ ] Open a PR to [tool_belt](https://github.com/theforeman/tool_belt) with the new config file
- [ ] Coordinate with installer maintainers that expected changes are completed.
Expand All @@ -52,10 +49,6 @@
- [ ] [katello](https://github.com/theforeman/puppet-katello)
- [ ] Review the Foreman schedule and planning ([example](https://community.theforeman.org/t/foreman-2-5-schedule-and-planning/22219)) and note the date of the first scheduled release candidate.

## Release Engineer

- [ ] Ensure tool_belt config is merged and output from `./tools.rb koji configs/katello/<%= release %>.yaml` matches expectations

# On Branch Date

## Release Owner
Expand All @@ -74,10 +67,3 @@
- [ ] Rename the "Katello Next" release to Katello <%= develop %>.0
- [ ] Recreate the "Katello Next" release and indicate that it is a placeholder for issues belonging to the next version of Katello
- [ ] Create the "Katello <%= release %>.1 TODO" custom query using the last one as a template


## Release Engineer

- [ ] Run `./tools.rb koji configs/katello/<%= release %>.yaml --confirm` from [tool_belt](https://github.com/theforeman/tool_belt) to create Koji tags
- [ ] Run `./tools.rb mash-scripts configs/katello/<%= release %>.yaml` from [tool_belt](https://github.com/theforeman/tool_belt) to create Koji mash configs and open PR to tool_belt to commit
- [ ] Copy mash configs to Koji using <%= rel_eng_script('deploy_mash_configs') %>
9 changes: 8 additions & 1 deletion procedures/katello/release.md.erb
Original file line number Diff line number Diff line change
Expand Up @@ -65,11 +65,18 @@
- [ ] Wait for Foreman <%= foreman_version %>.0 GA to be packaged and built before proceeding
<% end -%>
- [ ] Update release version similar to [here](https://github.com/theforeman/theforeman-rel-eng/commit/2029a9688da00d9c385c3438dd71b594ba5f728e)
- [ ] Update `katello`, `katello-repos` and `rubygem-katello`
- [ ] Update `katello`, `katello-repos` and `rubygem-katello`
- [ ] Use <%= rel_eng_script('bump_rpm_packaging') %>: `PROJECT=katello VERSION=<%= short_version %> ./bump_rpm_packaging`
- [ ] Merge packaging PR once job is green
- [ ] Use <%= rel_eng_script('wait_packaging') %> to wait for [Jenkins to build the packages](https://ci.theforeman.org/job/foreman-packaging-rpm-<%= foreman_version %>-release/)
<% if Gem::Version.new(foreman_version) >= Gem::Version.new('3.9') -%>
- Sign the RPMs in the release
- [ ] <%= rel_eng_script('generate_stage_repository') %>
- [ ] <%= rel_eng_script('sign_stage_rpms') %>
- [ ] <%= rel_eng_script('upload_stage_rpms') %>
<% else -%>
- [ ] <%= rel_eng_script('download_rpms') %>, <%= rel_eng_script('sign_rpms') %>, <%= rel_eng_script('upload_rpm_signatures') %>, <%= rel_eng_script('upload_rpms') %>
<% end -%>
- [ ] Use <%= rel_eng_script('release_pipeline') %> to kick off the [release pipeline](https://ci.theforeman.org/job/katello-<%= short_version %>-rpm-pipeline/)

# Once release is out
Expand Down
10 changes: 10 additions & 0 deletions procedures/pulpcore/update.md.erb
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,16 @@ The `python-pulp_2to3_migration` package is named differently due to a tito bug

Any change to packaging requires signing, as otherwise the repo can't be published.


If working with Pulpcore 3.29+:

* [ ] Sign the RPMs in the release, pass `PROJECT=pulpcore` and `VERSION=<%= release %>` to every invocation.
* [ ] <%= rel_eng_script('generate_stage_repository') %>
* [ ] <%= rel_eng_script('sign_stage_rpms') %>
* [ ] <%= rel_eng_script('upload_stage_rpms') %>

If working with Pulpcore 3.28 or less:

* [ ] Sign the RPMs in the release, pass `PROJECT=pulpcore` and `VERSION=<%= release %>` to every invocation.
* [ ] [Download](https://github.com/theforeman/theforeman-rel-eng/blob/master/download_rpms)
* [ ] [Sign](https://github.com/theforeman/theforeman-rel-eng/blob/master/sign_rpms)
Expand Down

0 comments on commit ecef3a8

Please sign in to comment.