Fix generation of repos using -DhostOnJenkinsGitHub=false
#710
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Fixes #709
The fix itself was trivial.
I added integration tests specifically for that scenario, but the tests broke with spotbugs errors (for the generated POM). Example (snippet):
Obviously a plugin not hosted under the Jenkins umbrella would not be subject to these checks, so turning it off (only for
-DhostOnJenkinsGitHub=false
) might be considered a viable option, but it was not immediately obvious how to do so, so I explored how I could get the check to pass.That led to my changing of the templates. It appears that white-space handling may be configurable (thus allowing the templates to remain as-is), but changing the template was easier and I hoped more agreeable. (Subjectively, I find it easier on the eyes as well.)
The key seemed to be having the directives at the beginning of the line. That led to
at which point I collapsed them into a single block.
I broke it into three commits to make it easy to:
Testing done
Executing the same invocation from #709, but with these fixes:
There are no maven failures, no
LICENSE.md
, noJenkinsfile
, no.github/
, and a correctly named.gitignore
.The new integration tests validates the generated repo meets the same quality checks that a GitHub-hosted repo would, whatever that's worth.
Submitter checklist