Skip to content

Commit

Permalink
fix broken CASC_JENKINS_CONFIG_ENV support + test case
Browse files Browse the repository at this point in the history
[FIX JENKINS-51283] close #203
  • Loading branch information
ndeloof committed May 14, 2018
1 parent 624af92 commit 8ab67e7
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 5 deletions.
Expand Up @@ -125,11 +125,13 @@ public void configure() throws ConfiguratorException {
CASC_JENKINS_CONFIG_PROPERTY,
System.getenv(CASC_JENKINS_CONFIG_ENV)
);
if (configParameter == null && Files.exists(Paths.get(DEFAULT_JENKINS_YAML_PATH))) {
configParameter = DEFAULT_JENKINS_YAML_PATH;
} else {
// No configuration set nor default config file
return;
if (configParameter == null) {
if (Files.exists(Paths.get(DEFAULT_JENKINS_YAML_PATH))) {
configParameter = DEFAULT_JENKINS_YAML_PATH;
} else {
// No configuration set nor default config file
return;
}
}

configure(configParameter);
Expand Down
@@ -0,0 +1,7 @@
package org.jenkinsci.plugins.casc;

/**
* @author <a href="mailto:nicolas.deloof@gmail.com">Nicolas De Loof</a>
*/
public class JenkinsConfigTest {
}
Empty file.

0 comments on commit 8ab67e7

Please sign in to comment.