New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We鈥檒l occasionally send you account related emails.
Already on GitHub? Sign in to your account
Ignore unknown root elements starting with x-
#1379
Conversation
we really do need some kind of plugin load test 馃槩
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This would properly need some docs
plugin/src/main/java/io/jenkins/plugins/casc/ConfigurationAsCode.java
Outdated
Show resolved
Hide resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Needs docs and 1 question on naming, but nice!
plugin/src/main/java/io/jenkins/plugins/casc/ConfigurationAsCode.java
Outdated
Show resolved
Hide resolved
This reverts commit 972e841.
Codecov Report
@@ Coverage Diff @@
## master #1379 +/- ##
============================================
+ Coverage 79.42% 79.61% +0.19%
- Complexity 797 804 +7
============================================
Files 66 66
Lines 2323 2330 +7
Branches 323 325 +2
============================================
+ Hits 1845 1855 +10
+ Misses 377 375 -2
+ Partials 101 100 -1
|
@almiroshnich any suggestion on how to document this feature? |
@jetersen huge kudos to you for doing this 馃殌 As for the documentation subject, I don't feel myself competent enough here to make suggestions, but if you'd ask me directly - I'd put a note about such functionality under jenkinsci/configuration-as-code-plugin//README.md#initial-configuration (after unclassified screenshot, before Examples section). Such a note could have a reference to the official YAML Node Anchors documentation and a few links to the existing JCasC demos (have to be adjusted as well). One could be easily taken from your test here or from my GH issue. Probably, yet another reasonable use of such functionality with anchors might be for permanent build agents, but practically speaking it's pretty much the same as other cloud-templates, either |
neat! From the docs point of view, in the main README.md, I think it could be added as an example of using the node anchors, to be automatically validated with the annotation: |
as a FYI, we use snakeyaml at the moment which is a processor for YAML 1.1 spec. |
I would like to avoid linking to the yaml spec as we do not follow the spec 100% for instance we do not support maps. |
As this has full test coverage and blocking #1375 I am going ahead and merging it. |
This should help #1246 to use anchors on root level.
Added tests for unknown root elements and added an alias test for EC2 cloud to demonstrate the potential.
cc @v1v @timja @almiroshnich
fixes #1246
Your checklist for this pull request
馃毃 Please review the guidelines for contributing to this repository.