Refactor and document templating of passwords
What does this MR do?
Implement findings of #2999 (closed)
-
Replace all uses of "<%= x.dump[1..-2] =>"
with<%= x.to_json =>
-
Replace all uses of "{% x | strings.TrimSpace %}"
with{% x | strings.TrimSpace | strings.Squote %}
-
Update any RSpecs impacted by the above -
Add note to doc/development/style_guide.md
regarding templating passwords from files
Testing
- Set a few of the secrets to include characters that must be escaped according to YAML, TOML, or JSON.
- Ensure all containers render complete, valid configurations.
- Handy linters: http://www.yamllint.com/, https://jsonlint.com/, https://www.toml-lint.com/
Related issues
Related to #1214 (closed), #1094 (closed)
Checklist
See Definition of done.
For anything in this list which will not be completed, please provide a reason in the MR discussion.
Required
-
Merge Request Title and Description are up to date, accurate, and descriptive -
MR targeting the appropriate branch -
MR has a green pipeline on GitLab.com
Expected (please provide an explanation if not completing)
-
Test plan indicating conditions for success has been posted and passes -
Documentation created/updated -
Tests added -
Integration tests added to GitLab QA -
Equivalent MR/issue for omnibus-gitlab opened
Closes #2999 (closed)
Edited by Jason Plum