mirror of
https://github.com/jenkinsci/jenkins.git
synced 2026-11-16 13:32:24 +00:00
Honor $JENKINS_HOME.
Honor $JENKINS_HOME (just like we used to do $HUDSON_HOME) We still fall back to $HUDSON_HOME every step of the way for maximum backward compatibility. I wasn't initially planning to do this for the first version, but working on native packages made me think we should deliver this.
This commit is contained in:
1 parent
62100264ac
commit
8ea876faa4
13 files changed
+65
-48
No files matched your search
@@ -33,13 +33,13 @@ import java.net.MalformedURLException;
|
||||
import java.net.URL;
|
||||
|
||||
/**
|
||||
* Controls how a {@link HudsonTestCase} initializes <tt>HUDSON_HOME</tt>.
|
||||
* Controls how a {@link HudsonTestCase} initializes <tt>JENKINS_HOME</tt>.
|
||||
*
|
||||
* @author Kohsuke Kawaguchi
|
||||
*/
|
||||
public interface HudsonHomeLoader {
|
||||
/**
|
||||
* Returns a directory to be used as <tt>HUDSON_HOME</tt>
|
||||
* Returns a directory to be used as <tt>JENKINS_HOME</tt>
|
||||
*
|
||||
* @throws Exception
|
||||
* to cause a test to fail.
|
||||
|
||||
@@ -84,7 +84,7 @@ public class TestPluginManager extends PluginManager {
|
||||
}
|
||||
|
||||
// and pick up test dependency *.hpi that are placed by maven-hpi-plugin TestDependencyMojo.
|
||||
// and copy them into $HUDSON_HOME/plugins.
|
||||
// and copy them into $JENKINS_HOME/plugins.
|
||||
URL index = getClass().getResource("/test-dependencies/index");
|
||||
if (index!=null) {// if built with maven-hpi-plugin < 1.52 this file won't exist.
|
||||
BufferedReader r = new BufferedReader(new InputStreamReader(index.openStream(),"UTF-8"));
|
||||
|
||||
@@ -36,7 +36,7 @@ import static java.lang.annotation.ElementType.METHOD;
|
||||
* Runs a test case with a data set local to test method or the test class.
|
||||
*
|
||||
* <p>
|
||||
* This recipe allows your test case to start with the preset <tt>HUDSON_HOME</tt> data loaded
|
||||
* This recipe allows your test case to start with the preset <tt>JENKINS_HOME</tt> data loaded
|
||||
* either from your test method or from the test class.
|
||||
*
|
||||
* <p>
|
||||
@@ -47,12 +47,12 @@ import static java.lang.annotation.ElementType.METHOD;
|
||||
* <ol>
|
||||
* <li>
|
||||
* Under <tt>org/acme/FooTest/testBar</tt> directory (that is, you'll have
|
||||
* <tt>org/acme/FooTest/testBar/config.xml</tt>), in the same layout as in the real <tt>HUDSON_HOME</tt> directory.
|
||||
* <tt>org/acme/FooTest/testBar/config.xml</tt>), in the same layout as in the real <tt>JENKINS_HOME</tt> directory.
|
||||
* <li>
|
||||
* In <tt>org/acme/FooTest/testBar.zip</tt> as a zip file.
|
||||
* <li>
|
||||
* Under <tt>org/acme/FooTest</tt> directory (that is, you'll have
|
||||
* <tt>org/acme/FooTest/config.xml</tt>), in the same layout as in the real <tt>HUDSON_HOME</tt> directory.
|
||||
* <tt>org/acme/FooTest/config.xml</tt>), in the same layout as in the real <tt>JENKINS_HOME</tt> directory.
|
||||
* <li>
|
||||
* In <tt>org/acme/FooTest.zip</tt> as a zip file.
|
||||
* </ol>
|
||||
|
||||
@@ -33,7 +33,7 @@ import java.lang.annotation.Target;
|
||||
import java.util.Locale;
|
||||
|
||||
/**
|
||||
* Runs a test case with one of the preset HUDSON_HOME data set.
|
||||
* Runs a test case with one of the preset JENKINS_HOME data set.
|
||||
*
|
||||
* @author Kohsuke Kawaguchi
|
||||
* @see LocalData
|
||||
|
||||
Reference in new issue
Block a user