Skip to content

Commit

Permalink
Add a rel_eng_script macro in procedures
Browse files Browse the repository at this point in the history
This makes it easier to link to theforeman-rel-eng scripts.
  • Loading branch information
ekohl committed Aug 9, 2023
1 parent 3a147ad commit 1583f3c
Show file tree
Hide file tree
Showing 2 changed files with 29 additions and 23 deletions.
8 changes: 7 additions & 1 deletion procedure
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,16 @@ require 'optparse'
require 'optparse/date'
require 'ostruct'

class Context < OpenStruct
def rel_eng_script(name)
"[#{name}](https://github.com/theforeman/theforeman-rel-eng/blob/master/#{name})"
end
end

def self.render_file(filename, context)
erb = ERB.new(File.read(filename), trim_mode: '-')
erb.filename = File.expand_path(filename)
erb.result(OpenStruct.new(context).instance_eval { binding })
erb.result(Context.new(context).instance_eval { binding })
end

def render(project, procedure, context)
Expand Down
44 changes: 22 additions & 22 deletions procedures/foreman/release.md.erb
Original file line number Diff line number Diff line change
Expand Up @@ -32,24 +32,24 @@

## Release Owner

- [ ] Make sure [test_<%= short_version.tr('.', '_') %>_stable](https://ci.theforeman.org/job/test_<%= short_version.tr('.', '_') %>_stable/) and [smart-proxy<%= short_version %>-stable-test](https://ci.theforeman.org/job/smart-proxy-<%= short_version %>-stable-test/) are green using [verify_green_jobs](https://github.com/theforeman/theforeman-rel-eng/blob/master/verify_green_jobs)
- [ ] Make sure [test_<%= short_version.tr('.', '_') %>_stable](https://ci.theforeman.org/job/test_<%= short_version.tr('.', '_') %>_stable/) and [smart-proxy<%= short_version %>-stable-test](https://ci.theforeman.org/job/smart-proxy-<%= short_version %>-stable-test/) are green using <%= rel_eng_script('verify_green_jobs') %>
<% if is_rc || is_first_ga -%>
- [ ] Run `make -C locale tx-update` in foreman <%= short_version %>-stable
<% end -%>
<% unless is_first_rc -%>
- [ ] Update release version similar to [here](https://github.com/theforeman/theforeman-rel-eng/commit/2029a9688da00d9c385c3438dd71b594ba5f728e)
<% end -%>
- Tag the projects
- [ ] Create tags [tag_project](https://github.com/theforeman/theforeman-rel-eng/blob/master/tag_project)
- [ ] Push tags [tag_push](https://github.com/theforeman/theforeman-rel-eng/blob/master/tag_push)
- [ ] Run the Jenkins [Tarballs Release](https://ci.theforeman.org/job/tarballs-release/) using [release_tarballs](https://github.com/theforeman/theforeman-rel-eng/blob/master/release_tarballs) to create tarballs
- [ ] Create tags using <%= rel_eng_script('tag_project') %>
- [ ] Push tags using <%= rel_eng_script('tag_push') %>
- [ ] Run the Jenkins [Tarballs Release](https://ci.theforeman.org/job/tarballs-release/) using <%= rel_eng_script('release_tarballs') %> to create tarballs

## Release Engineer

- Sign Tarballs
- [ ] [Download](https://github.com/theforeman/theforeman-rel-eng/blob/master/download_tarballs)
- [ ] [Inspect](https://github.com/theforeman/theforeman-rel-eng/blob/master/inspect_tarballs)
- [ ] [Sign and upload detached signatures](https://github.com/theforeman/theforeman-rel-eng/blob/master/sign_tarballs)
- [ ] <%= rel_eng_script('download_tarballs') %>
- [ ] <%= rel_eng_script('inspect_tarballs') %>
- [ ] Sign and upload detached signatures using <%= rel_eng_script('sign_tarballs') %>

Note: If for some reason there was an issue with the tarballs that required uploading new tarballs, CDN cache should be invalidated so that the builders use the updated tarballs.

Expand All @@ -64,25 +64,25 @@ Note: If for some reason there was an issue with the tarballs that required uplo
[Background documentation](https://projects.theforeman.org/projects/foreman/wiki/Release_Process#Packaging-a-release)

- Update [foreman-packaging](https://github.com/theforeman/foreman-packaging) branches
- [ ] [rpm/<%= short_version %>](https://github.com/theforeman/theforeman-rel-eng/blob/master/bump_rpm_packaging)
- [ ] [deb/<%= short_version %>](https://github.com/theforeman/theforeman-rel-eng/blob/master/bump_deb_packaging)
- [ ] Wait for packages to be built using [wait_packaging](https://github.com/theforeman/theforeman-rel-eng/blob/master/wait_packaging) (checks [rpm/<%= short_version %>](https://ci.theforeman.org/job/foreman-packaging-rpm-<%= short_version %>-release/) and [deb/<%= short_version %>](https://ci.theforeman.org/job/foreman-packaging-deb-<%= short_version %>-release/)). This takes a while so you can already start on the manual updates.
- [ ] rpm/<%= short_version %> using <%= rel_eng_script('bump_rpm_packaging') %>
- [ ] deb/<%= short_version %> using <%= rel_eng_script('bump_deb_packaging') %>
- [ ] Wait for packages to be built using <%= rel_eng_script('wait_packaging') %> (checks [rpm/<%= short_version %>](https://ci.theforeman.org/job/foreman-packaging-rpm-<%= short_version %>-release/) and [deb/<%= short_version %>](https://ci.theforeman.org/job/foreman-packaging-deb-<%= short_version %>-release/)). This takes a while so you can already start on the manual updates.
- Check for outstanding PRs against <%= short_version %> packaging, and merge if possible:
- [ ] [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
- [ ] [Download](https://github.com/theforeman/theforeman-rel-eng/blob/master/download_rpms)
- [ ] [Sign](https://github.com/theforeman/theforeman-rel-eng/blob/master/sign_rpms)
- [ ] [Upload RPM signatures](https://github.com/theforeman/theforeman-rel-eng/blob/master/upload_rpm_signatures)
- [ ] [Upload RPMs](https://github.com/theforeman/theforeman-rel-eng/blob/master/upload_rpms)
- [ ] <%= rel_eng_script('download_rpms') %>
- [ ] <%= rel_eng_script('sign_rpms') %>
- [ ] <%= rel_eng_script('upload_rpm_signatures') %>
- [ ] <%= rel_eng_script('upload_rpms') %>
- Sign RPMs for client repos (call scripts with `PROJECT=client`)
- [ ] [Download](https://github.com/theforeman/theforeman-rel-eng/blob/master/download_rpms)
- [ ] [Sign](https://github.com/theforeman/theforeman-rel-eng/blob/master/sign_rpms)
- [ ] [Upload RPM signatures](https://github.com/theforeman/theforeman-rel-eng/blob/master/upload_rpm_signatures)
- [ ] [Upload RPMs](https://github.com/theforeman/theforeman-rel-eng/blob/master/upload_rpms)
- [ ] Kick off the [release pipeline](https://ci.theforeman.org/job/foreman-<%= short_version %>-release-pipeline/) by calling [`release_pipeline`](https://github.com/theforeman/theforeman-rel-eng/blob/master/release_pipeline)
- [ ] Kick off the [client pipeline](https://ci.theforeman.org/job/foreman-client-<%= short_version %>-rpm-pipeline/) by calling [`PROJECT=client release_pipeline`](https://github.com/theforeman/theforeman-rel-eng/blob/master/release_pipeline)
- [ ] Kick off the [plugins pipeline](https://ci.theforeman.org/job/foreman-plugins-<%= short_version %>-rpm-pipeline/) by calling [plugins_pipeline](https://github.com/theforeman/theforeman-rel-eng/blob/master/plugins_pipeline)
- [ ] <%= rel_eng_script('download_rpms') %>
- [ ] <%= rel_eng_script('sign_rpms') %>
- [ ] <%= rel_eng_script('upload_rpm_signatures') %>
- [ ] <%= rel_eng_script('upload_rpms') %>
- [ ] 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 <%= rel_eng_script('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') %>

# Manual updates: <%= target_date %>

Expand Down Expand Up @@ -143,7 +143,7 @@ Note: If for some reason there was an issue with the tarballs that required uplo
- Update <%= short_version %> as `supported`
- Update <%= short_version_minus_two %> as `unsupported`
<% end -%>
- [ ] Announce the release on [Discourse](https://community.theforeman.org/c/release-announcements/8) using [release_announcement](https://github.com/theforeman/theforeman-rel-eng/blob/master/release_announcement)
- [ ] Announce the release on [Discourse](https://community.theforeman.org/c/release-announcements/8) using <%= rel_eng_script('release_announcement') %>
- [ ] Update the topic in #theforeman channel on Libera.Chat
- [ ] Share the release announcement on Twitter
<% if is_first_ga -%>
Expand Down

0 comments on commit 1583f3c

Please sign in to comment.