Branch: refs/heads/features/key-by-name
  Home:   https://github.com/jenkinsci/yaml-project-plugin
  Commit: 61244d06d11a130cb7d1b89f3c35e0e210cfddef
      
https://github.com/jenkinsci/yaml-project-plugin/commit/61244d06d11a130cb7d1b89f3c35e0e210cfddef
  Author: Matt Moore <mattm...@google.com>
  Date:   2014-10-30 (Thu, 30 Oct 2014)

  Changed paths:
    A samples/android-emulator/.jenkins.yaml
    A samples/with-param/.jenkins.yaml
    A 
src/main/java/com/google/jenkins/plugins/dsl/tag/KeyYamlTransformProvider.java
    M src/main/java/com/google/jenkins/plugins/dsl/util/JsonToYaml.java
    M src/test/java/com/google/jenkins/plugins/dsl/YamlDecoratorTest.java
    M 
src/test/java/com/google/jenkins/plugins/dsl/tag/DisplayNameYamlTransformProviderTest.java
    A 
src/test/java/com/google/jenkins/plugins/dsl/tag/KeyYamlTransformProviderTest.java
    M src/test/java/com/google/jenkins/plugins/dsl/util/JsonToYamlTest.java
    A src/test/java/goodbye/World.java
    A src/test/java/hello/World.java
    M src/test/resources/com/google/jenkins/plugins/dsl/param.yaml
    M src/test/resources/com/google/jenkins/plugins/dsl/tag/complex-by-name.json
    M src/test/resources/com/google/jenkins/plugins/dsl/tag/complex-by-name.yaml
    A src/test/resources/com/google/jenkins/plugins/dsl/tag/key.json
    A src/test/resources/com/google/jenkins/plugins/dsl/tag/key.yaml

  Log Message:
  -----------
  This change addresses JENKINS-25096.

=== Problem ===
When Jenkins submits certain types of form elements, such as BuildWrapper or 
JobProperties, it does so in a way that each kind is unique.

The way it does this is by submitting such elements with the type (digested) as 
the KEY in that level of the map, e.g.
   "com-example-Foo": { ... }

The digestion that occurs here inhibits our ability to translate these as 
"!by-name My foo: { ... }".

=== Solution ===

I thought about solving this by introducing "!key-by-name", which just did the 
right thing for "!by-name", however, this blocks @YamlTag from doing the right 
thing on annotated classes.

Instead, I introduced a new YamlTransformProvider, which walks all of the other 
providers composing a new transform with them to create: "!key:{old tag}".

So now, you can specify "!key:by-name My foo", but also "!key:foo" with no 
additional annotation.


-- 
You received this message because you are subscribed to the Google Groups 
"Jenkins Commits" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to jenkinsci-commits+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to