Please sign in to comment.
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[FIXED JENKINS-47781] Narrow model lookups when appropriate
The original problem here is that if you just look up describables by the "upstream" symbol, you'll get one from Copy Artifact before you get `ReverseBuildTrigger`. Which...ok. Except that our syntax checking treats kicks in for the one from Copy Artifact! So let's narrow our model lookups when appropriate. I don't *love* this solution - it could be smarter and have a better understanding of context. But this works for now, so I'll go with it.
- Loading branch information
Showing with 154 additions and 25 deletions.
- +57 −22 ...model-api/src/main/java/org/jenkinsci/plugins/pipeline/modeldefinition/DescriptorLookupCache.java
- +5 −0 pipeline-model-definition/pom.xml
- +19 −0 ...line-model-definition/src/main/groovy/org/jenkinsci/plugins/pipeline/modeldefinition/Utils.groovy
- +20 −3 ...rc/main/groovy/org/jenkinsci/plugins/pipeline/modeldefinition/validator/ModelValidatorImpl.groovy
- +8 −0 ...-model-definition/src/test/java/org/jenkinsci/plugins/pipeline/modeldefinition/ValidatorTest.java
- +40 −0 pipeline-model-definition/src/test/resources/errors/specificDescribableMatch.groovy
- +5 −0 pom.xml
|@@ -0,0 +1,40 @@|
|* The MIT License|
|* Copyright (c) 2017, CloudBees, Inc.|
|* Permission is hereby granted, free of charge, to any person obtaining a copy|
|* of this software and associated documentation files (the "Software"), to deal|
|* in the Software without restriction, including without limitation the rights|
|* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell|
|* copies of the Software, and to permit persons to whom the Software is|
|* furnished to do so, subject to the following conditions:|
|* The above copyright notice and this permission notice shall be included in|
|* all copies or substantial portions of the Software.|
|* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR|
|* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,|
|* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE|
|* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER|
|* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,|
|* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN|
|* THE SOFTWARE.|