Skip to content

Add dry run mode to release rake task

Evan Read requested to merge eread/add-dry-run-mode-to-release-rake-task into main

What does this MR do and why?

To allow people to practice running the release Rake task before running it, add a dry mode to the Rake task. Also add more output about what the Rake task is doing when run outside of dry mode.

Also fix the following RuboCop violations in the file:

How to set up and validate locally

Numbered steps to set up and validate the change are strongly suggested.

  1. Configure a local GitLab Docs environment: https://gitlab.com/gitlab-org/gitlab-docs/-/blob/main/doc/setup.md.
  2. Check out branch.
  3. Run DRY_RUN=true ./bin/rake "release:single[17.0]". See the output of dry mode.
  4. Because I've commented out the git commands: !3671 (9e32daf7), you can also run ./bin/rake "release:single[17.0]" and see the output.
  5. Run ./bin/rake "release:single[17.0]" again, and see the "docker file exists" logic still works.

Merge request acceptance checklist

This checklist encourages us to confirm any changes have been analyzed to reduce risks in quality, performance, reliability, security, and maintainability.

Edited by Evan Read

Merge request reports