Skip to content

Commit

Permalink
fixed problem with using in Pipeline jobs
Browse files Browse the repository at this point in the history
[FIXES JENKINS-45812]
  • Loading branch information
daspilker committed Aug 27, 2017
1 parent 62d5efd commit ccf0dad
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
2 changes: 2 additions & 0 deletions docs/Home.md
Expand Up @@ -41,6 +41,8 @@ Browse the Jenkins issue tracker to see any [open issues](https://issues.jenkins
([#1042](https://github.com/jenkinsci/job-dsl-plugin/pull/1042))
* Fixed problem with static analysis plugins
([JENKINS-46042](https://issues.jenkins-ci.org/browse/JENKINS-46042))
* Fixed problem with `using` in Pipeline jobs
([JENKINS-45812](https://issues.jenkins-ci.org/browse/JENKINS-45812))
* 1.64 (July 07 2017)
* Increased the minimum supported Java version to JDK 7
* Increased the minimum supported Jenkins version to 2.19
Expand Down
Expand Up @@ -12,6 +12,7 @@
import hudson.Launcher;
import hudson.Util;
import hudson.model.AbstractBuild;
import hudson.model.AbstractItem;
import hudson.model.AbstractProject;
import hudson.model.Item;
import hudson.model.ItemGroup;
Expand Down Expand Up @@ -362,7 +363,7 @@ private Set<String> updateTemplates(Job seedJob, TaskListener listener,
Collection<SeedReference> seedJobReferences = descriptor.getTemplateJobMap().get(templateName);
Collection<SeedReference> matching = Collections2.filter(seedJobReferences, new SeedNamePredicate(seedJobName));

AbstractProject templateProject = getLookupStrategy().getItem(seedJob, templateName, AbstractProject.class);
AbstractItem templateProject = getLookupStrategy().getItem(seedJob, templateName, AbstractItem.class);
final String digest = Util.getDigestOf(new FileInputStream(templateProject.getConfigFile().getFile()));

if (matching.size() == 1) {
Expand Down

0 comments on commit ccf0dad

Please sign in to comment.