introduced more stories around Item/ItemGroup and full names.

updating the rest of the code to work with this.


git-svn-id: https://hudson.dev.java.net/svn/hudson/trunk/hudson/main@1826 71c3de6d-444a-0410-be80-ed276b4c234a
This commit is contained in:
kohsuke committed 2007-01-20 06:31:16 +00:00
1 parent 95a7082efe
commit db430b3896
21 files changed
+325 -172

No files matched your search

+4 -4
View File
@@ -3,8 +3,8 @@ package hudson;
import hudson.model.ExternalJob;
import hudson.model.ExternalRun;
import hudson.model.Hudson;
import hudson.model.Job;
import hudson.model.Result;
import hudson.model.TopLevelItem;
import hudson.util.DualOutputStream;
import hudson.util.EncodingStream;
@@ -60,12 +60,12 @@ public class Main {
public static int localPost(String[] args) throws Exception {
Hudson app = new Hudson(new File(getHudsonHome()),null);
Job job = app.getJob(args[0]);
if(!(job instanceof ExternalJob)) {
TopLevelItem item = app.getItem(args[0]);
if(!(item instanceof ExternalJob)) {
System.err.println(args[0]+" is not a valid external job name in Hudson");
return -1;
}
ExternalJob ejob = (ExternalJob) job;
ExternalJob ejob = (ExternalJob) item;
ExternalRun run = ejob.newBuild();