Add dry run mode to release rake task
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:
-
Lint/UnusedBlockArgument
: https://docs.rubocop.org/rubocop/cops_lint.html#lintunusedblockargument -
Style/SoleNestedConditional
: https://docs.rubocop.org/rubocop/cops_style.html#stylesolenestedconditional
How to set up and validate locally
Numbered steps to set up and validate the change are strongly suggested.
-
Configure a local GitLab Docs environment: https://gitlab.com/gitlab-org/gitlab-docs/-/blob/main/doc/setup.md. -
Check out branch. -
Run DRY_RUN=true ./bin/rake "release:single[17.0]"
. See the output of dry mode. -
Because I've commented out the git
commands: !3671 (9e32daf7), you can also run./bin/rake "release:single[17.0]"
and see the output. -
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.
-
I have evaluated the MR acceptance checklist for this merge request.
Edited by Evan Read