提交 4cd8478f 编写于 作者: K Kohsuke Kawaguchi

Merge remote-tracking branch 'origin/master'

......@@ -63,6 +63,18 @@ Upcoming changes</a>
<div id="rc" style="display:none;"><!--=BEGIN=-->
<h3><a name=v1.467>What's new in 1.467</a> <!--=DATE=--></h3>
<ul class=image>
<li class=bug>
Added more MIME type mapping for Winstone.
(<a href="https://issues.jenkins-ci.org/browse/JENKINS-13496">issue 13496</a>)
<li class=bug>
Winstone wasn't handling downloads bigger than 2GB.
(<a href="https://issues.jenkins-ci.org/browse/JENKINS-12854">issue 12854</a>)
<li class=bug>
With 'on-demand' retention strategy, wrong slave can be started for jobs restricted to specific slave.
(<a href="https://issues.jenkins-ci.org/browse/JENKINS-13735">issue 13735</a>)
<li class=bug>
Fixed encoding handling in e-mail headers.
(<a href="https://github.com/jenkinsci/jenkins/pull/486">pull 486</a>)
<li class=bug>
When accessing a page that requires authentication, redirection to start authentication results in a content decoding failure.
(<a href="https://issues.jenkins-ci.org/browse/JENKINS-13625">issue 13625</a>)
......@@ -93,6 +105,11 @@ Upcoming changes</a>
Exposed plugin manager and update center to the REST API
<li class=rfe>
Added a new extension point for agent protocols.
<li class=rfe>
Added a new extension point for custom checkout behaviour, especially targeted for matrix projects.
(<a href="https://github.com/jenkinsci/jenkins/pull/482">pull 482</a>)
<li class=rfe>
Allow the tree parameter and the xpath parameter to be used together in the REST API.
<li class=rfe>
Enabled concurrent build support for matrix projects
(<a href="https://issues.jenkins-ci.org/browse/JENKINS-6747">issue 6747</a>)
......
......@@ -34,9 +34,9 @@
<version>1.10</version>
</dependency>
<dependency>
<groupId>org.jvnet.hudson</groupId>
<groupId>org.jenkins-ci</groupId>
<artifactId>trilead-ssh2</artifactId>
<version>build212-hudson-5</version>
<version>build214-jenkins-1</version>
</dependency>
</dependencies>
......
......@@ -119,12 +119,12 @@ THE SOFTWARE.
<dependency>
<groupId>org.kohsuke</groupId>
<artifactId>trilead-putty-extension</artifactId>
<version>1.0</version>
<version>1.2</version>
</dependency>
<dependency>
<groupId>org.jvnet.hudson</groupId>
<groupId>org.jenkins-ci</groupId>
<artifactId>trilead-ssh2</artifactId>
<version>build212-hudson-5</version>
<version>build214-jenkins-1</version>
</dependency>
<dependency>
<groupId>org.kohsuke.stapler</groupId>
......
......@@ -245,7 +245,8 @@ public class ClassicPluginStrategy implements PluginStrategy {
new DetachedPlugin("subversion","1.310","1.0"),
new DetachedPlugin("cvs","1.340","0.1"),
new DetachedPlugin("ant","1.430.*","1.0"),
new DetachedPlugin("javadoc","1.430.*","1.0")
new DetachedPlugin("javadoc","1.430.*","1.0"),
new DetachedPlugin("external-monitor-job","1.467.*","1.0")
);
/**
......
......@@ -66,7 +66,6 @@ public class MatrixBuild extends AbstractBuild<MatrixProject,MatrixBuild> {
*/
private Integer baseBuild;
public MatrixBuild(MatrixProject job) throws IOException {
super(job);
}
......@@ -274,7 +273,7 @@ public class MatrixBuild extends AbstractBuild<MatrixProject,MatrixBuild> {
@Override
public void run() {
run(new RunnerImpl());
execute(new MatrixBuildExecution());
}
@Override
......@@ -285,7 +284,7 @@ public class MatrixBuild extends AbstractBuild<MatrixProject,MatrixBuild> {
return rs;
}
private class RunnerImpl extends AbstractRunner {
private class MatrixBuildExecution extends AbstractBuildExecution {
private final List<MatrixAggregator> aggregators = new ArrayList<MatrixAggregator>();
protected Result doRun(BuildListener listener) throws Exception {
......
......@@ -58,6 +58,7 @@ import hudson.util.CopyOnWriteMap;
import hudson.util.DescribableList;
import hudson.util.FormValidation;
import hudson.util.FormValidation.Kind;
import jenkins.scm.SCMCheckoutStrategyDescriptor;
import net.sf.json.JSONObject;
import org.kohsuke.stapler.HttpResponse;
import org.kohsuke.stapler.StaplerRequest;
......@@ -185,7 +186,7 @@ public class MatrixProject extends AbstractProject<MatrixProject,MatrixBuild> im
/**
* Gets the workspace location that {@link MatrixConfiguration} uses.
*
* @see MatrixRun.RunnerImpl#decideWorkspace(Node, WorkspaceList)
* @see MatrixRun.MatrixRunExecution#decideWorkspace(Node, WorkspaceList)
*
* @return never null
* even when {@link MatrixProject} uses no custom workspace, this method still
......@@ -843,6 +844,10 @@ public class MatrixProject extends AbstractProject<MatrixProject,MatrixBuild> im
public List<MatrixExecutionStrategyDescriptor> getExecutionStrategyDescriptors() {
return MatrixExecutionStrategyDescriptor.all();
}
public List<SCMCheckoutStrategyDescriptor> getMatrixRunCheckoutStrategyDescriptors() {
return SCMCheckoutStrategyDescriptor.all();
}
}
private static final Logger LOGGER = Logger.getLogger(MatrixProject.class.getName());
......
......@@ -26,11 +26,10 @@ package hudson.matrix;
import hudson.EnvVars;
import hudson.FilePath;
import hudson.model.AbstractBuild;
import hudson.model.TopLevelItem;
import hudson.slaves.WorkspaceList;
import hudson.slaves.WorkspaceList.Lease;
import hudson.model.Build;
import hudson.model.Node;
import hudson.slaves.WorkspaceList;
import hudson.slaves.WorkspaceList.Lease;
import org.kohsuke.stapler.Ancestor;
import org.kohsuke.stapler.Stapler;
import org.kohsuke.stapler.StaplerRequest;
......@@ -144,10 +143,10 @@ public class MatrixRun extends Build<MatrixConfiguration,MatrixRun> {
@Override
public void run() {
run(new RunnerImpl());
execute(new MatrixRunExecution());
}
protected class RunnerImpl extends Build<MatrixConfiguration,MatrixRun>.RunnerImpl {
private class MatrixRunExecution extends BuildExecution {
protected Lease getParentWorkspaceLease(Node n, WorkspaceList wsl) throws InterruptedException, IOException {
MatrixProject mp = getParent().getParent();
......
......@@ -27,37 +27,37 @@ import com.google.common.collect.ImmutableList;
import com.google.common.collect.ImmutableSortedSet;
import hudson.AbortException;
import hudson.EnvVars;
import hudson.FilePath;
import hudson.Functions;
import hudson.Launcher;
import hudson.Util;
import hudson.FilePath;
import hudson.console.AnnotatedLargeText;
import hudson.console.HyperlinkNote;
import hudson.console.ExpandableDetailsNote;
import hudson.console.ModelHyperlinkNote;
import hudson.model.listeners.RunListener;
import hudson.slaves.WorkspaceList;
import hudson.slaves.NodeProperty;
import hudson.slaves.WorkspaceList.Lease;
import hudson.matrix.MatrixConfiguration;
import hudson.model.Fingerprint.BuildPtr;
import hudson.model.Fingerprint.RangeSet;
import hudson.model.listeners.RunListener;
import hudson.model.listeners.SCMListener;
import hudson.scm.ChangeLogParser;
import hudson.scm.ChangeLogSet;
import hudson.scm.ChangeLogSet.Entry;
import hudson.scm.SCM;
import hudson.scm.NullChangeLogParser;
import hudson.scm.SCM;
import hudson.slaves.NodeProperty;
import hudson.slaves.WorkspaceList;
import hudson.slaves.WorkspaceList.Lease;
import hudson.tasks.BuildStep;
import hudson.tasks.BuildStepMonitor;
import hudson.tasks.BuildTrigger;
import hudson.tasks.BuildWrapper;
import hudson.tasks.Builder;
import hudson.tasks.Fingerprinter.FingerprintAction;
import hudson.tasks.Publisher;
import hudson.tasks.BuildStepMonitor;
import hudson.tasks.BuildTrigger;
import hudson.tasks.test.AbstractTestResultAction;
import hudson.tasks.test.AggregatedTestResultAction;
import hudson.util.AdaptedIterator;
import hudson.util.IOException2;
import hudson.util.Iterators;
import hudson.util.LogTaskListener;
import hudson.util.VariableResolver;
......@@ -73,8 +73,6 @@ import java.io.File;
import java.io.IOException;
import java.io.InterruptedIOException;
import java.io.StringWriter;
import java.lang.ref.Reference;
import java.lang.ref.SoftReference;
import java.lang.ref.WeakReference;
import java.text.MessageFormat;
import java.util.AbstractSet;
......@@ -88,8 +86,6 @@ import java.util.Iterator;
import java.util.List;
import java.util.Map;
import java.util.Set;
import java.util.Vector;
import java.util.concurrent.CopyOnWriteArrayList;
import java.util.logging.Level;
import java.util.logging.Logger;
......@@ -245,7 +241,7 @@ public abstract class AbstractBuild<P extends AbstractProject<P,R>,R extends Abs
*
* <p>
* Note to implementors: to control where the workspace is created, override
* {@link AbstractRunner#decideWorkspace(Node,WorkspaceList)}.
* {@link AbstractBuildExecution#decideWorkspace(Node,WorkspaceList)}.
*
* @return
* null if the workspace is on a slave that's not connected. Note that once the build is completed,
......@@ -261,7 +257,7 @@ public abstract class AbstractBuild<P extends AbstractProject<P,R>,R extends Abs
}
/**
* Normally, a workspace is assigned by {@link Runner}, but this lets you set the workspace in case
* Normally, a workspace is assigned by {@link RunExecution}, but this lets you set the workspace in case
* {@link AbstractBuild} is created without a build.
*/
protected void setWorkspace(FilePath ws) {
......@@ -411,7 +407,20 @@ public abstract class AbstractBuild<P extends AbstractProject<P,R>,R extends Abs
Util.createSymlink(getProject().getBuildDir(),"builds/"+getId(),"../"+name,listener);
}
protected abstract class AbstractRunner extends Runner {
/**
* @deprecated as of 1.467
* Please use {@link RunExecution}
*/
public abstract class AbstractRunner extends AbstractBuildExecution {
}
public abstract class AbstractBuildExecution extends Runner {
/*
Some plugins might depend on this instance castable to Runner, so we need to use
deprecated class here.
*/
/**
* Since configuration can be changed while a build is in progress,
* create a launcher once and stick to it for the entire build duration.
......@@ -472,8 +481,9 @@ public abstract class AbstractBuild<P extends AbstractProject<P,R>,R extends Abs
for (WorkspaceListener wl : WorkspaceListener.all()) {
wl.beforeUse(AbstractBuild.this, lease.path, listener);
}
preCheckout(launcher,listener);
checkout(listener);
getProject().getSCMCheckoutStrategy().preCheckout(AbstractBuild.this, launcher, this.listener);
getProject().getSCMCheckoutStrategy().checkout(this);
if (!preBuild(listener,project.getProperties()))
return Result.FAILURE;
......@@ -557,59 +567,47 @@ public abstract class AbstractBuild<P extends AbstractProject<P,R>,R extends Abs
return l;
}
/**
* Run preCheckout on {@link BuildWrapper}s
*
* @param launcher
* The launcher, never null.
* @param listener
* Never null, connected to the main build output.
* @throws IOException
* @throws InterruptedException
*/
private void preCheckout(Launcher launcher, BuildListener listener) throws IOException, InterruptedException{
if (project instanceof BuildableItemWithBuildWrappers) {
BuildableItemWithBuildWrappers biwbw = (BuildableItemWithBuildWrappers) project;
for (BuildWrapper bw : biwbw.getBuildWrappersList())
bw.preCheckout(AbstractBuild.this,launcher,listener);
}
}
private void checkout(BuildListener listener) throws Exception {
for (int retryCount=project.getScmCheckoutRetryCount(); ; retryCount--) {
// for historical reasons, null in the scm field means CVS, so we need to explicitly set this to something
// in case check out fails and leaves a broken changelog.xml behind.
// see http://www.nabble.com/CVSChangeLogSet.parse-yields-SAXParseExceptions-when-parsing-bad-*AccuRev*-changelog.xml-files-td22213663.html
AbstractBuild.this.scm = NullChangeLogParser.INSTANCE;
try {
if (project.checkout(AbstractBuild.this,launcher,listener,new File(getRootDir(),"changelog.xml"))) {
// check out succeeded
SCM scm = project.getScm();
public void defaultCheckout() throws IOException, InterruptedException {
AbstractBuild<?,?> build = AbstractBuild.this;
AbstractProject<?, ?> project = build.getProject();
AbstractBuild.this.scm = scm.createChangeLogParser();
AbstractBuild.this.changeSet = new WeakReference<ChangeLogSet<? extends Entry>>(AbstractBuild.this.calcChangeSet());
for (int retryCount=project.getScmCheckoutRetryCount(); ; retryCount--) {
// for historical reasons, null in the scm field means CVS, so we need to explicitly set this to something
// in case check out fails and leaves a broken changelog.xml behind.
// see http://www.nabble.com/CVSChangeLogSet.parse-yields-SAXParseExceptions-when-parsing-bad-*AccuRev*-changelog.xml-files-td22213663.html
build.scm = NullChangeLogParser.INSTANCE;
for (SCMListener l : Jenkins.getInstance().getSCMListeners())
l.onChangeLogParsed(AbstractBuild.this,listener,getChangeSet());
return;
}
} catch (AbortException e) {
listener.error(e.getMessage());
} catch (InterruptedIOException e) {
throw (InterruptedException)new InterruptedException().initCause(e);
} catch (IOException e) {
// checkout error not yet reported
e.printStackTrace(listener.getLogger());
try {
if (project.checkout(build,launcher,listener,new File(build.getRootDir(),"changelog.xml"))) {
// check out succeeded
SCM scm = project.getScm();
build.scm = scm.createChangeLogParser();
build.changeSet = new WeakReference<ChangeLogSet<? extends Entry>>(build.calcChangeSet());
for (SCMListener l : Jenkins.getInstance().getSCMListeners())
try {
l.onChangeLogParsed(build,listener,build.getChangeSet());
} catch (Exception e) {
throw new IOException2("Failed to parse changelog",e);
}
return;
}
} catch (AbortException e) {
listener.error(e.getMessage());
} catch (InterruptedIOException e) {
throw (InterruptedException)new InterruptedException().initCause(e);
} catch (IOException e) {
// checkout error not yet reported
e.printStackTrace(listener.getLogger());
}
if (retryCount == 0) // all attempts failed
throw new RunnerAbortedException();
if (retryCount == 0) // all attempts failed
throw new RunnerAbortedException();
listener.getLogger().println("Retrying after 10 seconds");
Thread.sleep(10000);
}
listener.getLogger().println("Retrying after 10 seconds");
Thread.sleep(10000);
}
}
/**
......
......@@ -77,7 +77,7 @@ public abstract class AbstractCIBase extends Node implements ItemGroup<TopLevelI
v.owner = this;
}
protected void interruptReloadThread() {
ExternalJob.reloadThread.interrupt();
ViewJob.reloadThread.interrupt();
}
protected void killComputer(Computer c) {
......
......@@ -45,6 +45,7 @@ import hudson.model.Descriptor.FormException;
import hudson.model.Fingerprint.RangeSet;
import hudson.model.Queue.Executable;
import hudson.model.Queue.Task;
import hudson.model.listeners.SCMListener;
import hudson.model.queue.SubTask;
import hudson.model.Queue.WaitingItem;
import hudson.model.RunMap.Constructor;
......@@ -54,6 +55,7 @@ import hudson.model.queue.CauseOfBlockage;
import hudson.model.queue.SubTaskContributor;
import hudson.scm.ChangeLogSet;
import hudson.scm.ChangeLogSet.Entry;
import hudson.scm.NullChangeLogParser;
import hudson.scm.NullSCM;
import hudson.scm.PollingResult;
import hudson.scm.SCM;
......@@ -76,14 +78,19 @@ import hudson.util.AlternativeUiTextProvider.Message;
import hudson.util.DescribableList;
import hudson.util.EditDistance;
import hudson.util.FormValidation;
import hudson.util.IOException2;
import hudson.widgets.BuildHistoryWidget;
import hudson.widgets.HistoryWidget;
import jenkins.model.Jenkins;
import jenkins.scm.DefaultSCMCheckoutStrategyImpl;
import jenkins.scm.SCMCheckoutStrategy;
import jenkins.scm.SCMCheckoutStrategyDescriptor;
import net.sf.json.JSONObject;
import org.kohsuke.accmod.Restricted;
import org.kohsuke.accmod.restrictions.NoExternalUse;
import org.kohsuke.args4j.Argument;
import org.kohsuke.args4j.CmdLineException;
import org.kohsuke.stapler.AncestorInPath;
import org.kohsuke.stapler.ForwardToView;
import org.kohsuke.stapler.HttpRedirect;
import org.kohsuke.stapler.HttpResponse;
......@@ -97,6 +104,8 @@ import org.kohsuke.stapler.interceptor.RequirePOST;
import javax.servlet.ServletException;
import java.io.File;
import java.io.IOException;
import java.io.InterruptedIOException;
import java.lang.ref.WeakReference;
import java.lang.reflect.InvocationTargetException;
import java.util.ArrayList;
import java.util.Arrays;
......@@ -136,6 +145,11 @@ public abstract class AbstractProject<P extends AbstractProject<P,R>,R extends A
*/
private volatile SCM scm = new NullSCM();
/**
* Controls how the checkout is done.
*/
private volatile SCMCheckoutStrategy scmCheckoutStrategy;
/**
* State returned from {@link SCM#poll(AbstractProject, Launcher, FilePath, TaskListener, SCMRevisionState)}.
*/
......@@ -516,7 +530,17 @@ public abstract class AbstractProject<P extends AbstractProject<P,R>,R extends A
public int getQuietPeriod() {
return quietPeriod!=null ? quietPeriod : Jenkins.getInstance().getQuietPeriod();
}
public SCMCheckoutStrategy getSCMCheckoutStrategy() {
return scmCheckoutStrategy == null ? new DefaultSCMCheckoutStrategyImpl() : scmCheckoutStrategy;
}
public void setSCMCheckoutStrategy(SCMCheckoutStrategy scmCheckoutStrategy) throws IOException {
this.scmCheckoutStrategy = scmCheckoutStrategy;
save();
}
public int getScmCheckoutRetryCount() {
return scmCheckoutRetryCount !=null ? scmCheckoutRetryCount : Jenkins.getInstance().getScmCheckoutRetryCount();
}
......@@ -1688,6 +1712,7 @@ public abstract class AbstractProject<P extends AbstractProject<P,R>,R extends A
@Override
protected void submit(StaplerRequest req, StaplerResponse rsp) throws IOException, ServletException, FormException {
super.submit(req,rsp);
JSONObject json = req.getSubmittedForm();
makeDisabled(req.getParameter("disable")!=null);
......@@ -1710,6 +1735,13 @@ public abstract class AbstractProject<P extends AbstractProject<P,R>,R extends A
} else {
customWorkspace = null;
}
if (json.has("scmCheckoutStrategy"))
scmCheckoutStrategy = req.bindJSON(SCMCheckoutStrategy.class,
json.getJSONObject("scmCheckoutStrategy"));
else
scmCheckoutStrategy = null;
if(req.getParameter("hasSlaveAffinity")!=null) {
assignedNode = Util.fixEmptyAndTrim(req.getParameter("_.assignedLabelString"));
......@@ -1956,6 +1988,11 @@ public abstract class AbstractProject<P extends AbstractProject<P,R>,R extends A
return c;
}
public List<SCMCheckoutStrategyDescriptor> getApplicableSCMCheckoutStrategyDescriptors(@AncestorInPath AbstractProject p) {
return SCMCheckoutStrategyDescriptor._for(p);
}
/**
* Utility class for taking the current input value and computing a list
* of potential terms to match against the list of defined labels.
......
......@@ -35,6 +35,7 @@ import org.kohsuke.stapler.QueryParameter;
import org.kohsuke.stapler.StaplerRequest;
import org.kohsuke.stapler.StaplerResponse;
import org.kohsuke.stapler.export.*;
import org.kohsuke.stapler.export.TreePruner.ByDepth;
import javax.servlet.ServletException;
import javax.servlet.http.HttpServletResponse;
......@@ -79,6 +80,7 @@ public class Api extends AbstractModelObject {
public void doXml(StaplerRequest req, StaplerResponse rsp,
@QueryParameter String xpath,
@QueryParameter String wrapper,
@QueryParameter String tree,
@QueryParameter int depth) throws IOException, ServletException {
String[] excludes = req.getParameterValues("exclude");
......@@ -92,7 +94,8 @@ public class Api extends AbstractModelObject {
// first write to String
Model p = MODEL_BUILDER.get(bean.getClass());
p.writeTo(bean,depth,Flavor.XML.createDataWriter(bean,sw));
TreePruner pruner = (tree!=null) ? new NamedPathPruner(tree) : new ByDepth(1 - depth);
p.writeTo(bean,pruner,Flavor.XML.createDataWriter(bean,sw));
// apply XPath
Object result;
......
......@@ -23,11 +23,14 @@
*/
package hudson.model;
import hudson.Launcher;
import hudson.tasks.BuildStep;
import hudson.tasks.BuildWrapper;
import hudson.tasks.Builder;
import hudson.tasks.Recorder;
import hudson.tasks.Notifier;
import org.kohsuke.accmod.Restricted;
import org.kohsuke.accmod.restrictions.NoExternalUse;
import java.io.File;
import java.io.IOException;
......@@ -107,14 +110,32 @@ public abstract class Build <P extends Project<P,B>,B extends Build<P,B>>
//
@Override
public void run() {
run(createRunner());
execute(createRunner());
}
/**
* @deprecated as of 1.467
* Override the {@link #run()} method by calling {@link #execute(RunExecution)} with
* proper execution object.
*/
@Restricted(NoExternalUse.class)
protected Runner createRunner() {
return new RunnerImpl();
return new BuildExecution();
}
/**
* @deprecated as of 1.467
* Please use {@link BuildExecution}
*/
protected class RunnerImpl extends BuildExecution {
}
protected class RunnerImpl extends AbstractRunner {
protected class BuildExecution extends AbstractRunner {
/*
Some plugins might depend on this instance castable to Runner, so we need to use
deprecated class here.
*/
protected Result doRun(BuildListener listener) throws Exception {
if(!preBuild(listener,project.getBuilders()))
return FAILURE;
......
/*
* The MIT License
*
* Copyright (c) 2004-2009, Sun Microsystems, Inc., Kohsuke Kawaguchi, id:cactusman
*
* 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.
*/
package hudson.model;
import hudson.model.RunMap.Constructor;
import hudson.Extension;
import hudson.util.AlternativeUiTextProvider;
import jenkins.model.Jenkins;
import org.kohsuke.stapler.StaplerRequest;
import org.kohsuke.stapler.StaplerResponse;
import javax.servlet.ServletException;
import javax.servlet.http.HttpServletResponse;
import java.io.File;
import java.io.IOException;
/**
* Job that runs outside Hudson whose result is submitted to Hudson
* (either via web interface, or simply by placing files on the file system,
* for compatibility.)
*
* @author Kohsuke Kawaguchi
*/
public class ExternalJob extends ViewJob<ExternalJob,ExternalRun> implements TopLevelItem {
public ExternalJob(String name) {
this(Jenkins.getInstance(),name);
}
public ExternalJob(ItemGroup parent, String name) {
super(parent,name);
}
@Override
protected void reload() {
this.runs.load(this,new Constructor<ExternalRun>() {
public ExternalRun create(File dir) throws IOException {
return new ExternalRun(ExternalJob.this,dir);
}
});
}
// keep track of the previous time we started a build
private transient long lastBuildStartTime;
/**
* Creates a new build of this project for immediate execution.
*
* Needs to be synchronized so that two {@link #newBuild()} invocations serialize each other.
*/
public synchronized ExternalRun newBuild() throws IOException {
// make sure we don't start two builds in the same second
// so the build directories will be different too
long timeSinceLast = System.currentTimeMillis() - lastBuildStartTime;
if (timeSinceLast < 1000) {
try {
Thread.sleep(1000 - timeSinceLast);
} catch (InterruptedException e) {
}
}
lastBuildStartTime = System.currentTimeMillis();
ExternalRun run = new ExternalRun(this);
runs.put(run);
return run;
}
/**
* Used to check if this is an external job and ready to accept a build result.
*/
public void doAcceptBuildResult(StaplerResponse rsp) throws IOException, ServletException {
rsp.setStatus(HttpServletResponse.SC_OK);
}
/**
* Used to post the build result from a remote machine.
*/
public void doPostBuildResult( StaplerRequest req, StaplerResponse rsp ) throws IOException, ServletException {
checkPermission(AbstractProject.BUILD);
ExternalRun run = newBuild();
run.acceptRemoteSubmission(req.getReader());
rsp.setStatus(HttpServletResponse.SC_OK);
}
public TopLevelItemDescriptor getDescriptor() {
return DESCRIPTOR;
}
@Extension
public static final TopLevelItemDescriptor DESCRIPTOR = new DescriptorImpl();
@Override
public String getPronoun() {
return AlternativeUiTextProvider.get(PRONOUN, this, Messages.ExternalJob_Pronoun());
}
public static final class DescriptorImpl extends TopLevelItemDescriptor {
public String getDisplayName() {
return Messages.ExternalJob_DisplayName();
}
public ExternalJob newInstance(ItemGroup parent, String name) {
return new ExternalJob(parent,name);
}
}
}
/*
* The MIT License
*
* Copyright (c) 2004-2009, Sun Microsystems, Inc., Kohsuke Kawaguchi
*
* 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.
*/
package hudson.model;
import hudson.Proc;
import hudson.util.DecodingStream;
import hudson.util.DualOutputStream;
import org.codehaus.mojo.animal_sniffer.IgnoreJRERequirement;
import javax.xml.stream.XMLInputFactory;
import javax.xml.stream.XMLStreamException;
import javax.xml.stream.XMLStreamReader;
import java.io.File;
import java.io.IOException;
import java.io.PrintStream;
import java.io.Reader;
import static javax.xml.stream.XMLStreamConstants.*;
/**
* {@link Run} for {@link ExternalJob}.
*
* @author Kohsuke Kawaguchi
*/
public class ExternalRun extends Run<ExternalJob,ExternalRun> {
/**
* Loads a run from a log file.
*/
ExternalRun(ExternalJob owner, File runDir) throws IOException {
super(owner,runDir);
}
/**
* Creates a new run.
*/
ExternalRun(ExternalJob project) throws IOException {
super(project);
}
/**
* Instead of performing a build, run the specified command,
* record the log and its exit code, then call it a build.
*/
public void run(final String[] cmd) {
run(new Runner() {
public Result run(BuildListener listener) throws Exception {
Proc proc = new Proc.LocalProc(cmd,getEnvironment(listener),System.in,new DualOutputStream(System.out,listener.getLogger()));
return proc.join()==0?Result.SUCCESS:Result.FAILURE;
}
public void post(BuildListener listener) {
// do nothing
}
public void cleanUp(BuildListener listener) {
// do nothing
}
});
}
/**
* Instead of performing a build, accept the log and the return code
* from a remote machine.
*
* <p>
* The format of the XML is:
*
* <pre><xmp>
* <run>
* <log>...console output...</log>
* <result>exit code</result>
* </run>
* </xmp></pre>
*/
@SuppressWarnings({"Since15"})
@IgnoreJRERequirement
public void acceptRemoteSubmission(final Reader in) throws IOException {
final long[] duration = new long[1];
run(new Runner() {
private String elementText(XMLStreamReader r) throws XMLStreamException {
StringBuilder buf = new StringBuilder();
while(true) {
int type = r.next();
if(type== CHARACTERS || type== CDATA)
buf.append(r.getTextCharacters(), r.getTextStart(), r.getTextLength());
else
return buf.toString();
}
}
public Result run(BuildListener listener) throws Exception {
PrintStream logger = new PrintStream(new DecodingStream(listener.getLogger()));
XMLInputFactory xif = XMLInputFactory.newInstance();
XMLStreamReader p = xif.createXMLStreamReader(in);
p.nextTag(); // get to the <run>
p.nextTag(); // get to the <log>
charset=p.getAttributeValue(null,"content-encoding");
while(p.next()!= END_ELEMENT) {
int type = p.getEventType();
if(type== CHARACTERS || type== CDATA)
logger.print(p.getText());
}
p.nextTag(); // get to <result>
Result r = Integer.parseInt(elementText(p))==0?Result.SUCCESS:Result.FAILURE;
do {
p.nextTag();
if(p.getEventType()== START_ELEMENT){
if(p.getLocalName().equals("duration")) {
duration[0] = Long.parseLong(elementText(p));
}
else if(p.getLocalName().equals("displayName")) {
setDisplayName(p.getElementText());
}
else if(p.getLocalName().equals("description")) {
setDescription(p.getElementText());
}
}
} while(!(p.getEventType() == END_ELEMENT && p.getLocalName().equals("run")));
return r;
}
public void post(BuildListener listener) {
// do nothing
}
public void cleanUp(BuildListener listener) {
// do nothing
}
});
if(duration[0]!=0) {
super.duration = duration[0];
// save the updated duration
save();
}
}
}
......@@ -43,6 +43,6 @@ public class FreeStyleBuild extends Build<FreeStyleProject,FreeStyleBuild> {
@Override
public void run() {
run(new RunnerImpl());
execute(new BuildExecution());
}
}
......@@ -238,10 +238,10 @@ public abstract class Run <JobT extends Job<JobT,RunT>,RunT extends Run<JobT,Run
private boolean keepLog;
/**
* If the build is in progress, remember {@link Runner} that's running it.
* If the build is in progress, remember {@link RunExecution} that's running it.
* This field is not persisted.
*/
private volatile transient Runner runner;
private volatile transient RunExecution runner;
protected static final ThreadLocal<SimpleDateFormat> ID_FORMATTER =
new ThreadLocal<SimpleDateFormat>() {
......@@ -1282,7 +1282,7 @@ public abstract class Run <JobT extends Job<JobT,RunT>,RunT extends Run<JobT,Run
while(true) {
Run b = RunnerStack.INSTANCE.peek().getBuild().getPreviousBuildInProgress();
if(b==null) return; // no pending earlier build
Run.Runner runner = b.runner;
Run.RunExecution runner = b.runner;
if(runner==null) {
// polled at the wrong moment. try again.
Thread.sleep(0);
......@@ -1295,14 +1295,24 @@ public abstract class Run <JobT extends Job<JobT,RunT>,RunT extends Run<JobT,Run
}
}
protected abstract class Runner {
/**
* @deprecated as of 1.467
* Please use {@link RunExecution}
*/
protected abstract class Runner extends RunExecution {}
/**
* Object that lives while the build is executed, to keep track of things that
* are needed only during the build.
*/
public abstract class RunExecution {
/**
* Keeps track of the check points attained by a build, and abstracts away the synchronization needed to
* maintain this data structure.
*/
private final class CheckpointSet {
/**
* Stages of the builds that this runner has completed. This is used for concurrent {@link Runner}s to
* Stages of the builds that this runner has completed. This is used for concurrent {@link RunExecution}s to
* coordinate and serialize their executions where necessary.
*/
private final Set<CheckPoint> checkpoints = new HashSet<CheckPoint>();
......@@ -1376,7 +1386,7 @@ public abstract class Run <JobT extends Job<JobT,RunT>,RunT extends Run<JobT,Run
}
/**
* Used in {@link Runner#run} to indicates that a fatal error in a build
* Used in {@link RunExecution#run} to indicates that a fatal error in a build
* is reported to {@link BuildListener} and the build should be simply aborted
* without further recording a stack trace.
*/
......@@ -1384,7 +1394,15 @@ public abstract class Run <JobT extends Job<JobT,RunT>,RunT extends Run<JobT,Run
private static final long serialVersionUID = 1L;
}
/**
* @deprecated as of 1.467
* Use {@link #execute(RunExecution)}
*/
protected final void run(Runner job) {
execute(job);
}
protected final void execute(RunExecution job) {
if(result!=null)
return; // already built.
......
......@@ -23,37 +23,37 @@
*/
package hudson.model;
import hudson.model.Run.Runner;
import hudson.model.Run.RunExecution;
import java.util.Stack;
import java.util.Map;
import java.util.WeakHashMap;
/**
* Keeps track of {@link Runner}s that are currently executing on the given thread
* Keeps track of {@link RunExecution}s that are currently executing on the given thread
* (that can be either an {@link Executor} or threads that are impersonating one.)
*
* @author Kohsuke Kawaguchi
* @since 1.319
*/
final class RunnerStack {
private final Map<Executor,Stack<Runner>> stack = new WeakHashMap<Executor,Stack<Runner>>();
private final Map<Executor,Stack<RunExecution>> stack = new WeakHashMap<Executor,Stack<RunExecution>>();
synchronized void push(Runner r) {
synchronized void push(RunExecution r) {
Executor e = Executor.currentExecutor();
Stack<Runner> s = stack.get(e);
if(s==null) stack.put(e,s=new Stack<Runner>());
Stack<RunExecution> s = stack.get(e);
if(s==null) stack.put(e,s=new Stack<RunExecution>());
s.push(r);
}
synchronized void pop() {
Executor e = Executor.currentExecutor();
Stack<Runner> s = stack.get(e);
Stack<RunExecution> s = stack.get(e);
s.pop();
if(s.isEmpty()) stack.remove(e);
}
synchronized Runner peek() {
synchronized RunExecution peek() {
return stack.get(Executor.currentExecutor()).peek();
}
......
......@@ -49,7 +49,7 @@ public abstract class SCMListener implements ExtensionPoint {
* Called once the changelog is determined.
*
* <p>
* During a build, Hudson fetches the update of the workspace from SCM,
* During a build, Jenkins fetches the update of the workspace from SCM,
* and determines the changelog (see {@link SCM#checkout}). Immediately
* after that, a build will invoke this method on all registered
* {@link SCMListener}s.
......
......@@ -199,13 +199,16 @@ public abstract class RetentionStrategy<T extends Computer> extends AbstractDesc
for (Computer o : Jenkins.getInstance().getComputers()) {
if ((o.isOnline() || o.isConnecting()) && o.isPartiallyIdle()) {
final int idleExecutors = o.countIdle();
availableComputers.put(o, idleExecutors);
if (idleExecutors>0)
availableComputers.put(o, idleExecutors);
}
}
boolean needComputer = false;
long demandMilliseconds = 0;
for (Queue.BuildableItem item : Queue.getInstance().getBuildableItems()) {
// can any of the currently idle executors take this task?
// assume the answer is no until we can find such an executor
boolean needExecutor = true;
for (Computer o : Collections.unmodifiableSet(availableComputers.keySet())) {
if (o.getNode().canTake(item) == null) {
......@@ -213,12 +216,15 @@ public abstract class RetentionStrategy<T extends Computer> extends AbstractDesc
final int availableExecutors = availableComputers.remove(o);
if (availableExecutors > 1) {
availableComputers.put(o, availableExecutors - 1);
} else {
availableComputers.remove(o);
}
break;
}
}
if (needExecutor) {
// this 'item' cannot be built by any of the existing idle nodes, but it can be built by 'c'
if (needExecutor && c.getNode().canTake(item) == null) {
demandMilliseconds = System.currentTimeMillis() - item.buildableStartMilliseconds;
needComputer = demandMilliseconds > inDemandDelay * 1000 * 60 /*MINS->MILLIS*/;
break;
......
......@@ -43,6 +43,7 @@ import org.apache.commons.lang.StringUtils;
import java.io.File;
import java.io.IOException;
import java.io.UnsupportedEncodingException;
import java.util.*;
import java.util.regex.Matcher;
import java.util.regex.Pattern;
......@@ -120,6 +121,8 @@ public class MailSender {
}
} catch (MessagingException e) {
e.printStackTrace(listener.error(e.getMessage()));
} catch (UnsupportedEncodingException e) {
e.printStackTrace(listener.error(e.getMessage()));
} finally {
CHECKPOINT.report();
}
......@@ -145,7 +148,7 @@ public class MailSender {
return b.getResult();
}
protected MimeMessage getMail(AbstractBuild<?, ?> build, BuildListener listener) throws MessagingException, InterruptedException {
protected MimeMessage getMail(AbstractBuild<?, ?> build, BuildListener listener) throws MessagingException, UnsupportedEncodingException, InterruptedException {
if (build.getResult() == Result.FAILURE) {
return createFailureMail(build, listener);
}
......@@ -169,7 +172,7 @@ public class MailSender {
return null;
}
private MimeMessage createBackToNormalMail(AbstractBuild<?, ?> build, String subject, BuildListener listener) throws MessagingException {
private MimeMessage createBackToNormalMail(AbstractBuild<?, ?> build, String subject, BuildListener listener) throws MessagingException, UnsupportedEncodingException {
MimeMessage msg = createEmptyMail(build, listener);
msg.setSubject(getSubject(build, Messages.MailSender_BackToNormalMail_Subject(subject)),charset);
......@@ -180,7 +183,7 @@ public class MailSender {
return msg;
}
private MimeMessage createUnstableMail(AbstractBuild<?, ?> build, BuildListener listener) throws MessagingException {
private MimeMessage createUnstableMail(AbstractBuild<?, ?> build, BuildListener listener) throws MessagingException, UnsupportedEncodingException {
MimeMessage msg = createEmptyMail(build, listener);
String subject = Messages.MailSender_UnstableMail_Subject();
......@@ -219,7 +222,7 @@ public class MailSender {
buf.append(Messages.MailSender_Link(baseUrl, url)).append("\n\n");
}
private MimeMessage createFailureMail(AbstractBuild<?, ?> build, BuildListener listener) throws MessagingException, InterruptedException {
private MimeMessage createFailureMail(AbstractBuild<?, ?> build, BuildListener listener) throws MessagingException, UnsupportedEncodingException, InterruptedException {
MimeMessage msg = createEmptyMail(build, listener);
msg.setSubject(getSubject(build, Messages.MailSender_FailureMail_Subject()),charset);
......@@ -304,19 +307,19 @@ public class MailSender {
return msg;
}
private MimeMessage createEmptyMail(AbstractBuild<?, ?> build, BuildListener listener) throws MessagingException {
private MimeMessage createEmptyMail(AbstractBuild<?, ?> build, BuildListener listener) throws MessagingException, UnsupportedEncodingException {
MimeMessage msg = new MimeMessage(Mailer.descriptor().createSession());
// TODO: I'd like to put the URL to the page in here,
// but how do I obtain that?
msg.addHeader("X-Jenkins-Job", build.getProject().getDisplayName());
msg.addHeader("X-Jenkins-Result", build.getResult().toString());
msg.setContent("", "text/plain");
msg.setFrom(new InternetAddress(Mailer.descriptor().getAdminAddress()));
msg.setFrom(Mailer.StringToAddress(Mailer.descriptor().getAdminAddress(), charset));
msg.setSentDate(new Date());
String replyTo = Mailer.descriptor().getReplyToAddress();
if (StringUtils.isNotBlank(replyTo)) {
msg.setHeader("Reply-To", replyTo);
msg.setReplyTo(new Address[]{Mailer.StringToAddress(replyTo, charset)});
}
Set<InternetAddress> rcp = new LinkedHashSet<InternetAddress>();
......@@ -342,7 +345,7 @@ public class MailSender {
}
try {
rcp.add(new InternetAddress(address));
rcp.add(Mailer.StringToAddress(address, charset));
} catch (AddressException e) {
// report bad address, but try to send to other addresses
listener.getLogger().println("Unable to send to address: " + address);
......@@ -377,7 +380,7 @@ public class MailSender {
return msg;
}
void includeCulpritsOf(AbstractProject upstreamProject, AbstractBuild<?, ?> currentBuild, BuildListener listener, Set<InternetAddress> recipientList) throws AddressException {
void includeCulpritsOf(AbstractProject upstreamProject, AbstractBuild<?, ?> currentBuild, BuildListener listener, Set<InternetAddress> recipientList) throws AddressException, UnsupportedEncodingException {
AbstractBuild<?,?> upstreamBuild = currentBuild.getUpstreamRelationshipBuild(upstreamProject);
AbstractBuild<?,?> previousBuild = currentBuild.getPreviousBuild();
AbstractBuild<?,?> previousBuildUpstreamBuild = previousBuild!=null ? previousBuild.getUpstreamRelationshipBuild(upstreamProject) : null;
......@@ -398,14 +401,14 @@ public class MailSender {
} while ( b != upstreamBuild && b != null );
}
private Set<InternetAddress> buildCulpritList(BuildListener listener, Set<User> culprits) throws AddressException {
private Set<InternetAddress> buildCulpritList(BuildListener listener, Set<User> culprits) throws AddressException, UnsupportedEncodingException {
Set<InternetAddress> r = new HashSet<InternetAddress>();
for (User a : culprits) {
String adrs = Util.fixEmpty(a.getProperty(Mailer.UserProperty.class).getAddress());
if(debug)
listener.getLogger().println(" User "+a.getId()+" -> "+adrs);
if (adrs != null)
r.add(new InternetAddress(adrs));
r.add(Mailer.StringToAddress(adrs, charset));
else {
listener.getLogger().println(Messages.MailSender_NoAddress(a.getFullName()));
}
......
......@@ -50,12 +50,16 @@ import org.kohsuke.stapler.export.Exported;
import java.io.File;
import java.io.IOException;
import java.io.UnsupportedEncodingException;
import java.net.InetAddress;
import java.net.UnknownHostException;
import java.util.Date;
import java.util.Properties;
import java.util.logging.Level;
import java.util.logging.Logger;
import java.util.regex.Pattern;
import java.util.regex.Matcher;
import javax.mail.Address;
import javax.mail.Authenticator;
import javax.mail.Message;
import javax.mail.MessagingException;
......@@ -141,6 +145,18 @@ public class Mailer extends Notifier {
return BuildStepMonitor.NONE;
}
private static Pattern ADDRESS_PATTERN = Pattern.compile("\\s*([^<]*)<([^>]+)>\\s*");
public static InternetAddress StringToAddress(String strAddress, String charset) throws AddressException, UnsupportedEncodingException {
Matcher m = ADDRESS_PATTERN.matcher(strAddress);
if(!m.matches()) {
return new InternetAddress(strAddress);
}
String personal = m.group(1);
String address = m.group(2);
return new InternetAddress(address, personal, charset);
}
/**
* @deprecated as of 1.286
* Use {@link #descriptor()} to obtain the current instance.
......@@ -472,12 +488,12 @@ public class Mailer extends Notifier {
MimeMessage msg = new MimeMessage(createSession(smtpServer,smtpPort,useSsl,smtpAuthUserName,Secret.fromString(smtpAuthPassword)));
msg.setSubject(Messages.Mailer_TestMail_Subject(++testEmailCount), charset);
msg.setText(Messages.Mailer_TestMail_Content(testEmailCount, Jenkins.getInstance().getDisplayName()), charset);
msg.setFrom(new InternetAddress(adminAddress));
msg.setFrom(StringToAddress(adminAddress, charset));
if (StringUtils.isNotBlank(replyToAddress)) {
msg.setHeader("Reply-To", replyToAddress);
msg.setReplyTo(new Address[]{StringToAddress(replyToAddress, charset)});
}
msg.setSentDate(new Date());
msg.setRecipient(Message.RecipientType.TO, new InternetAddress(sendTestMailTo));
msg.setRecipient(Message.RecipientType.TO, StringToAddress(sendTestMailTo, charset));
Transport.send(msg);
return FormValidation.ok(Messages.Mailer_EmailSentSuccessfully());
......
package jenkins.scm;
import hudson.Extension;
import hudson.model.AbstractProject;
import org.kohsuke.stapler.DataBoundConstructor;
/**
* Default {@link SCMCheckoutStrategy} implementation.
*/
public class DefaultSCMCheckoutStrategyImpl extends SCMCheckoutStrategy {
@DataBoundConstructor
public DefaultSCMCheckoutStrategyImpl() {}
@Extension
public static class DescriptorImpl extends SCMCheckoutStrategyDescriptor {
@Override
public String getDisplayName() {
return "Default";
}
@Override
public boolean isApplicable(AbstractProject project) {
return true;
}
}
}
package jenkins.scm;
import hudson.ExtensionPoint;
import hudson.Launcher;
import hudson.matrix.MatrixBuild;
import hudson.matrix.MatrixRun;
import hudson.model.AbstractBuild;
import hudson.model.AbstractBuild.AbstractBuildExecution;
import hudson.model.AbstractDescribableImpl;
import hudson.model.AbstractProject;
import hudson.model.BuildListener;
import hudson.model.BuildableItemWithBuildWrappers;
import hudson.model.Executor;
import hudson.scm.SCM;
import hudson.tasks.BuildWrapper;
import java.io.File;
import java.io.IOException;
/**
* Controls the check out behavior in the matrix project.
*
* <p>
* This extension point can be used to control the check out behaviour in matrix projects. The intended use cases
* include situations like:
*
* <ul>
* <li>Check out will only happen once in {@link MatrixBuild}, and its state will be then sent
* to {@link MatrixRun}s by other means such as rsync.
* <li>{@link MatrixBuild} does no check out of its own, and check out is only done on {@link MatrixRun}s
* </ul>
*
* <h2>Hook Semantics</h2>
* There are currently two hooks defined on this class:
*
* <h3>pre checkout</h3>
* <p>
* The default implementation calls into {@link BuildWrapper#preCheckout(AbstractBuild, Launcher, BuildListener)} calls.
* You can override this method to do something before/after this, but you must still call into the {@code super.preCheckout}
* so that matrix projects can satisfy the contract with {@link BuildWrapper}s.
*
* <h3>checkout</h3>
* <p>
* The default implementation uses {@link AbstractProject#checkout(AbstractBuild, Launcher, BuildListener, File)} to
* let {@link SCM} do check out, but your {@link SCMCheckoutStrategy} impls can substitute this call with other
* operations that substitutes this semantics.
*
* <h2>State and concurrency</h2>
* <p>
* An instance of this object gets created for a project for which this strategy is configured, so
* the subtype needs to avoid using instance variables to refer to build-specific state (such as {@link BuildListener}s.)
* Similarly, methods can be invoked concurrently. The code executes on the master, even if builds are running remotely.
*/
public abstract class SCMCheckoutStrategy extends AbstractDescribableImpl<SCMCheckoutStrategy> implements ExtensionPoint {
/*
Default behavior is defined in AbstractBuild.AbstractRunner, which is the common
implementation for not just matrix projects but all sorts of other project types.
*/
/**
* Performs the pre checkout step.
*
* This method is called by the {@link Executor} that's carrying out the build.
*
* @param build
* Build being in progress. Never null.
* @param launcher
* Allows you to launch process on the node where the build is actually running. Never null.
* @param listener
* Allows you to write to console output and report errors. Never null.
*/
public void preCheckout(AbstractBuild<?,?> build, Launcher launcher, BuildListener listener) throws IOException, InterruptedException {
AbstractProject<?, ?> project = build.getProject();
if (project instanceof BuildableItemWithBuildWrappers) {
BuildableItemWithBuildWrappers biwbw = (BuildableItemWithBuildWrappers) project;
for (BuildWrapper bw : biwbw.getBuildWrappersList())
bw.preCheckout(build,launcher,listener);
}
}
/**
* Performs the checkout step.
*
* See {@link #preCheckout(AbstractBuild, Launcher, BuildListener)} for the semantics of the parameters.
*/
public void checkout(AbstractBuildExecution execution) throws IOException, InterruptedException {
execution.defaultCheckout();
}
@Override
public SCMCheckoutStrategyDescriptor getDescriptor() {
return (SCMCheckoutStrategyDescriptor)super.getDescriptor();
}
}
package jenkins.scm;
import com.google.common.collect.Lists;
import hudson.DescriptorExtensionList;
import hudson.matrix.MatrixExecutionStrategyDescriptor;
import hudson.model.AbstractProject;
import hudson.model.Descriptor;
import hudson.scm.SCM;
import jenkins.model.Jenkins;
import java.util.ArrayList;
import java.util.List;
/**
* {@link Descriptor} for {@link SCMCheckoutStrategy}.
*
*/
public abstract class SCMCheckoutStrategyDescriptor extends Descriptor<SCMCheckoutStrategy> {
protected SCMCheckoutStrategyDescriptor(Class<? extends SCMCheckoutStrategy> clazz) {
super(clazz);
}
protected SCMCheckoutStrategyDescriptor() {
}
/**
* Allows {@link SCMCheckoutStrategyDescriptor} to target specific kind of projects,
* such as matrix projects.
*/
public abstract boolean isApplicable(AbstractProject project);
/**
* Returns all the registered {@link MatrixExecutionStrategyDescriptor}s.
*/
public static DescriptorExtensionList<SCMCheckoutStrategy,SCMCheckoutStrategyDescriptor> all() {
return Jenkins.getInstance().<SCMCheckoutStrategy,SCMCheckoutStrategyDescriptor>getDescriptorList(SCMCheckoutStrategy.class);
}
public static List<SCMCheckoutStrategyDescriptor> _for(AbstractProject p) {
List<SCMCheckoutStrategyDescriptor> r = Lists.newArrayList();
for (SCMCheckoutStrategyDescriptor d : all()) {
if (d.isApplicable(p))
r.add(d);
}
return r;
}
}
......@@ -48,13 +48,21 @@ THE SOFTWARE.
For XPath that matches multiple nodes, you need to also specify the "wrapper" query parameter
to specify the name of the root XML element to be create so that the resulting XML becomes well-formed.
</p>
</p>
<p>
Similarly <tt>exclude</tt> query parameter can be used to exclude nodes
that match the given XPath from the result. This is useful for
trimming down the amount of data you fetch (but again see <a href="#tree">below</a>). This query parameter can be specified
multiple times.
</p>
<p>
XPath filtering is powerful, and you can have it only return a very small data, but note that
the server still has to build a full DOM of the raw data, which could cause a large memory spike.
To avoid overloading the server, consider using the <tt>tree</tt> parameter, or use the <tt>xpath</tt> parameter
in conjunction with the <tt>tree</tt> parameter. When used together, the result of the <tt>tree</tt> parameter
filtering is built into DOM, then the XPath is applied to compute the final return value. In this way,
you can often substantially reduce the size of DOM built in memory.
</p>
</dd>
<dt><a href="json">JSON API</a></dt>
......
# The MIT License
#
# Copyright (c) 2004-2010, Sun Microsystems, Inc., Kohsuke Kawaguchi, id:cactusman
#
# 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.
body=\
This type of job allows you to record the execution of a process run outside Jenkins, \
even on a remote machine. This is designed so that you can use Jenkins \
as a dashboard of your existing automation system. See \
<a href="http://wiki.jenkins-ci.org/display/JENKINS/Monitoring+external+jobs">the documentation for more details</a>.
# The MIT License
#
# Copyright (c) 2004-2010, Sun Microsystems, Inc. Kohsuke Kawaguchi. Knud Poulsen.
#
# 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.
body=Denne jobtype giver dig mulighed til at overv\u00E5ge udf\u00F8relsen af en process, der k\u00F8rer udenfor Jenkins, ogs\u00E5 p\u00E5 en anden maskine. Ideen er at du kan bruge Jenkins som dashboard til overv\u00E5gning af dit eksisterende automatiseringssystem. Se <a href="http://wiki.jenkins-ci.org/display/JENKINS/Monitoring+external+jobs">dokumentationen for flere detaljer</a>
# The MIT License
#
# Copyright (c) 2004-2009, Sun Microsystems, Inc., Kohsuke Kawaguchi, Simon Wiest
#
# 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.
body=\
Dieses Profil erlaubt die Überwachung von Prozessen, die außerhalb von Jenkins ausgeführt werden \
- eventuell sogar auf einem anderen Rechner! Dadurch können Sie Jenkins ganz allgemein zur zentralen Protokollierung \
von automatisiert ausgeführten Prozessen einsetzen. \
<a href="http://wiki.jenkins-ci.org/display/JENKINS/Monitoring+external+jobs">Mehr...</a>
# The MIT License
#
# Copyright (c) 2004-2009, Sun Microsystems, Inc., Kohsuke Kawaguchi, id:cactusman
#
# 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.
body=\
Este tipo de tareas te permite registrar la ejecución de un proceso externo a Jenkins, incluso en una máquina remota. \
Está diseñado para usar Jenkins como un panel de control de tu sistema de automatización. \
Para más información consulta esta <a href="http://wiki.jenkins-ci.org/display/JENKINS/Monitoring+external+jobs">página</a>.
# The MIT License
#
# Copyright (c) 2004-2009, Sun Microsystems, Inc., Kohsuke Kawaguchi, Eric Lefevre-Ardant
#
# 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.
body=Ce type de t\u00E2che permet de suivre l''''ex\u00E9cution d''''un process lanc\u00E9 en dehors de Hudson, m\u00EAme sur une machine distante. <br>Cette option permet l''''utilisation de Hudson comme tableau de bord de votre environnement d''''automatisation. <br>Voir <a href="http://wiki.hudson-ci.org/display/HUDSON/Monitoring+external+jobs">la documentation</a> pour plus de d\u00E9tails.
# The MIT License
#
# Copyright (c) 2004-2010, Sun Microsystems, 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.
body=Questo tipo di job permette di registrare l''esecuzione di un processo fuori da Jenkins, anche su una macchina remota. \u00C9 progettato in modo che si possa usare Jenkins come dashboard per un sistema automatizzato esistente. Vedi <a href="http://wiki.jenkins-ci.org/display/JENKINS/Monitoring+external+jobs">la documentazione per ulteriori dettagli</a>.
# The MIT License
#
# Copyright (c) 2004-2009, Sun Microsystems, Inc., Kohsuke Kawaguchi, Seiji Sogabe, id:cactusman
#
# 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.
body=\
Jenkins\u306E\u5916\uFF08\u542B\u3080\u5225\u306E\u30DE\u30B7\u30F3\u4E0A\uFF09\u3067\u5B9F\u884C\u3055\u308C\u308B\u30D7\u30ED\u30BB\u30B9\u306E\u5B9F\u884C\u3092Jenkins\u306B\u8A18\u9332\u3057\u307E\u3059\u3002\
\u3053\u308C\u306B\u3088\u308A\u3001\u65E2\u5B58\u306E\u81EA\u52D5\u5316\u30B7\u30B9\u30C6\u30E0\u306E\u52D5\u4F5C\u3092Jenkins\u3092\u4F7F\u3063\u3066\u76E3\u8996\u3067\u304D\u307E\u3059\u3002\
<a href="http://wiki.jenkins-ci.org/display/JA/Monitoring+external+jobs">\u8A73\u3057\u304F\u306F\u3053\u306E\u30C9\u30AD\u30E5\u30E1\u30F3\u30C8</a>\u3092\u3054\u89A7\u304F\u3060\u3055\u3044\u3002
# The MIT License
#
# Copyright (c) 2004-2010, Sun Microsystems, 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.
body=\uC774 \uC720\uD615\uC758 \uC791\uC5C5\uC740 \uC6D0\uACA9 \uC7A5\uBE44\uCC98\uB7FC Jenkins \uC678\uBD80\uC5D0\uC11C \uB3D9\uC791\uD558\uB294 \uD504\uB85C\uC138\uC2A4\uC758 \uC2E4\uD589\uC744 \uAE30\uB85D\uD558\uB294 \uAC83\uC744 \uD5C8\uC6A9\uD569\uB2C8\uB2E4. \uADF8\uB807\uAC8C \uC124\uACC4\uB418\uC5B4\uC11C, \uAE30\uC874\uC758 \uC790\uB3D9 \uC2DC\uC2A4\uD15C\uC758 \uB300\uC2DC\uBCF4\uB4DC\uB85C\uC11C Jenkins\uC744 \uC0AC\uC6A9\uD560 \uC218 \uC788\uC2B5\uB2C8\uB2E4. \uC790\uC138\uD55C \uC124\uBA85\uC740 <a href="http://wiki.jenkins-ci.org/display/JENKINS/Monitoring+external+jobs">\uC5EC\uAE30(\uC601\uBB38)</a>\uB97C \uBCF4\uC138\uC694.
# The MIT License
#
# Copyright (c) 2004-2010, Sun Microsystems, 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.
body=Denne typen jobb tillater deg \u00E5 sette opp eksekvering av en prosessen som kj\u00F8res utenfor Jenkins.Denne prosessen kan ogs\u00E5 kj\u00F8res p\u00E5 en annen maskin.Denne jobben er laget for at du skal kunne bruke Jenkins som dashbord for eksekvering av automatiske jobber. Se <a href="http://wiki.jenkins-ci.org/display/JENKINS/Monitoring+external+jobs">denne dokumentasjonen for flere detaljer</a>.
# The MIT License
#
# Copyright (c) 2004-2009, Sun Microsystems, Inc., Kohsuke Kawaguchi, id:sorokh
#
# 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.
body=\
Deze soort job laat u toe om de uitvoering van een proces buiten Jenkins te volgen. \
Dit kan zelfs een proces op afstand zijn. Het werd zo ontworpen dat je Jenkins kunt \
gebruiken als dashboard voor je bestaande automatisatiesysteem. Zie \
<a href="http://wiki.jenkins-ci.org/display/JENKINS/Monitoring+external+jobs">de documentatie voor meer details.</a>
# The MIT License
#
# Copyright (c) 2004-2010, Sun Microsystems, 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.
body=Ten rodzaj zadania pozwala na monitorowanie proces\u00F3w uruchamianych poza Jenkinsem, nawet na urz\u0105dzeniu zdalnym. Zosta\u0142o to stworzone by m\u00F3c u\u017Cywa\u0107 Jenkinsa jako tablicy kontrolnej istniej\u0105cego automatycznego systemu. Sprawd\u017A w <a href="http://wiki.jenkins-ci.org/display/JENKINS/Monitoring+external+jobs">dokumentacji by zapozna\u0107 si\u0119 ze szczeg\u00F3\u0142ami</a>.
# The MIT License
#
# Copyright (c) 2004-2009, Sun Microsystems, Inc., Kohsuke Kawaguchi, Reginaldo L. Russinholi, Cleiber Silva
#
# 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.
body=Este tipo de trabalho permite que voc\u00EA grave a execu\u00E7\u00E3o de um processo rodando fora do Jenkins (talvez at\u00E9 de uma m\u00E1quina remota.) Isto foi projetado para que voc\u00EA possa usar Jenkins como um painel principal de seus sistemas de automa\u00E7\u00E3o. Veja a documenta\u00E7\u00E3o <a href="http://wiki.jenkins-ci.org/display/JENKINS/Monitoring+external+jobs"> para mais detalhes.</a>
# The MIT License
#
# Copyright (c) 2004-2009, Sun Microsystems, Inc., Kohsuke Kawaguchi, Mike Salnikov
#
# 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.
body=\u042D\u0442\u043E\u0442 \u0442\u0438\u043F \u0437\u0430\u0434\u0430\u0447\u0438 \u043F\u043E\u0437\u0432\u043E\u043B\u044F\u0435\u0442 \u0432\u0430\u043C \u0441\u043E\u0445\u0440\u0430\u043D\u0438\u0442\u044C \u0440\u0435\u0437\u0443\u043B\u044C\u0442\u0430\u0442\u044B \u0432\u044B\u043F\u043E\u043B\u043D\u0435\u043D\u0438\u044F \u043F\u0440\u043E\u0446\u0435\u0441\u0441\u043E\u0432, \u0432\u044B\u043F\u043E\u043B\u043D\u044F\u044E\u0449\u0438\u0445\u0441\u044F \u0432\u043D\u0435 Jenkins (\u0432\u043E\u0437\u043C\u043E\u0436\u043D\u043E, \u0434\u0430\u0436\u0435 \u043D\u0430 \u0443\u0434\u0430\u043B\u0435\u043D\u043D\u044B\u0445 \u0441\u0435\u0440\u0432\u0435\u0440\u0430\u0445). \u041E\u043D \u0440\u0430\u0437\u0440\u0430\u0431\u043E\u0442\u0430\u043D \u0442\u0430\u043A\u0438\u043C \u043E\u0431\u0440\u0430\u0437\u043E\u043C, \u0447\u0442\u043E\u0431\u044B \u0432\u044B \u043C\u043E\u0433\u043B\u0438 \u0438\u0441\u043F\u043E\u043B\u044C\u0437\u043E\u0432\u0430\u0442\u044C Jenkins \u0441\u043E\u0432\u043C\u0435\u0441\u0442\u043D\u043E \u0441 \u0432\u0430\u0448\u0435\u0439 \u0441\u0443\u0449\u0435\u0441\u0442\u0432\u0443\u044E\u0449\u0435\u0439 \u0441\u0438\u0441\u0442\u0435\u043C\u043E\u0439 \u0430\u0432\u0442\u043E\u043C\u0430\u0442\u0438\u0437\u0430\u0446\u0438\u0438. \u0421\u043C\u043E\u0442\u0440\u0438\u0442\u0435 <a href="http://wiki.jenkins-ci.org/display/JENKINS/Monitoring+external+jobs">\u0434\u043E\u043A\u0443\u043C\u0435\u043D\u0442\u0430\u0446\u0438\u044E</a> \u0434\u043B\u044F \u043F\u043E\u043B\u0443\u0447\u0435\u043D\u0438\u044F \u0431\u043E\u043B\u0435\u0435 \u043F\u043E\u0434\u0440\u043E\u0431\u043D\u043E\u0439 \u0438\u043D\u0444\u043E\u0440\u043C\u0430\u0446\u0438\u0438.
# The MIT License
#
# Copyright (c) 2004-2010, Sun Microsystems, 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.
body=Den h\u00E4r jobbtypen g\u00F6r det m\u00F6jligt att \u00F6vervaka ett program som k\u00F6rs utanf\u00F6r Jenkins, \u00E4ven p\u00E5 en fj\u00E4rransluten dator. Detta \u00E4r utformat s\u00E5 att du kan anv\u00E4nda Jenkins som en instrumentbr\u00E4da av dina befintliga automationssystem. Se <a href="http://wiki.jenkins-ci.org/display/JENKINS/Monitoring+external+jobs"> dokumentationen f\u00F6r mer information </ a>.
# The MIT License
#
# Copyright (c) 2004-2009, Sun Microsystems, Inc., Kohsuke Kawaguchi, Oguz Dag
#
# 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.
body=\
Bu i\u015f t\u00fcr\u00fc, Jenkins''\u0131n d\u0131\u015f\u0131nda kontrol edilen bir i\u015flemin kaydedilmesini sa\u011flar\
(Uzak makinede olsa bile.) Bu i\u015f t\u00fcr\u00fcn\u00fcn tasarlanma sebebi Jenkins''\u0131, varolan otomasyon sisteminizde \
kontrol merkezi olarak kullanman\u0131z\u0131 sa\u011flamakt\u0131r. \
<a href="http://wiki.jenkins-ci.org/display/JENKINS/Monitoring+external+jobs">Detayl\u0131 bilgi i\u00e7in t\u0131klay\u0131n</a>
# The MIT License
#
# Copyright (c) 2004-2010, Sun Microsystems, Inc., Kohsuke Kawaguchi, id:cactusman
#
# 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.
body=\
\u8fd9\u4e2a\u7c7b\u578b\u7684\u4efb\u52a1\u5141\u8bb8\u4f60\u8bb0\u5f55\u6267\u884c\u5728\u5916\u90e8Jenkins\u7684\u4efb\u52a1, \
\u4efb\u52a1\u751a\u81f3\u8fd0\u884c\u5728\u8fdc\u7a0b\u673a\u5668\u4e0a.\u8fd9\u53ef\u4ee5\u8ba9Jenkins\u4f5c\u4e3a\u4f60\u6240\u6709\u81ea\u52a8\u6784\u5efa\u7cfb\u7edf\u7684\u63a7\u5236\u9762\u677f.\u53c2\u9605 \
<a href="http://wiki.jenkins-ci.org/display/JENKINS/Monitoring+external+jobs">\u8fd9\u4e2a\u6587\u6863\u67e5\u770b\u8be6\u7ec6\u5185\u5bb9</a>.
# The MIT License
#
# Copyright (c) 2004-2010, Sun Microsystems, 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.
body=\u9019\u985E\u578B\u7684\u4F5C\u696D\u5145\u8A31\u60A8\u8A18\u9304 Jenkins \u4E4B\u5916\uFF0C\u751A\u81F3\u662F\u5728\u9060\u7AEF\u6A5F\u5668\u4E0A\u7684\u7A0B\u5E8F\u7684\u57F7\u884C\u7D50\u679C\u3002\u9019\u500B\u8A2D\u8A08\u80FD\u8B93\u60A8\u7684 Jenkins \u505A\u70BA\u65E2\u6709\u81EA\u52D5\u5316\u7CFB\u7D71\u7684\u5100\u8868\u7248\u3002<a href="http://wiki.jenkins-ci.org/display/JENKINS/Monitoring+external+jobs">\u9019\u4EFD\u6587\u4EF6</a>\u88E1\u6709\u8A73\u7D30\u7684\u8AAA\u660E\u3002
<!--
The MIT License
Copyright (c) 2004-2009, Sun Microsystems, Inc., Kohsuke Kawaguchi, Seiji Sogabe
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.
-->
<!--
Side panel for the build view.
-->
<?jelly escape-by-default='true'?>
<j:jelly xmlns:j="jelly:core" xmlns:st="jelly:stapler" xmlns:d="jelly:define" xmlns:l="/lib/layout" xmlns:t="/lib/hudson" xmlns:f="/lib/form" xmlns:i="jelly:fmt">
<l:header title="${it.name}">
<st:include page="rssHeader.jelly" />
</l:header>
<l:side-panel>
<l:tasks>
<l:task icon="images/24x24/up.png" href="${rootURL}/" title="${%Back to Dashboard}" />
<l:task icon="images/24x24/search.png" href="." title="${%Status}" />
<l:isAdmin>
<l:task icon="images/24x24/edit-delete.png" href="delete" title="${%Delete Job}" />
<l:task icon="images/24x24/setting.png" href="configure" title="${%Configure}" />
</l:isAdmin>
<st:include page="actions.jelly" />
</l:tasks>
<j:forEach var="w" items="${it.widgets}">
<st:include it="${w}" page="index.jelly" />
</j:forEach>
</l:side-panel>
</j:jelly>
\ No newline at end of file
# The MIT License
#
# Copyright (c) 2004-2010, Sun Microsystems, Inc. Kohsuke Kawaguchi. Knud Poulsen.
#
# 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.
Configure=Konfigurer
Back\ to\ Dashboard=Tilbage til oversigtssiden
Status=Status
Delete\ Job=Slet Job
Back\ to\ Dashboard=Zurck zur bersicht
Status=Status
Delete\ Job=Job lschen
Configure=Konfigurieren
# The MIT License
#
# Copyright (c) 2004-2010, Sun Microsystems, 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.
Back\ to\ Dashboard=Volver al Panel de control
Status=Estado
Delete\ Job=Borrar una tarea
Configure=Configurar
# The MIT License
#
# Copyright (c) 2004-2009, Sun Microsystems, Inc., Kohsuke Kawaguchi, Eric Lefevre-Ardant
#
# 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.
Back\ to\ Dashboard=Retour au tableau de bord
Status=Statut
Delete\ Job=Supprimer le job
Configure=Configurer
# The MIT License
#
# Copyright (c) 2004-2009, Sun Microsystems, Inc., Kohsuke Kawaguchi, Seiji Sogabe
#
# 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.
Back\ to\ Dashboard=\u30c0\u30c3\u30b7\u30e5\u30dc\u30fc\u30c9\u3078\u623b\u308b
Status=\u72b6\u614b
Delete\ Job=\u30d7\u30ed\u30b8\u30a7\u30af\u30c8\u306e\u524a\u9664
Configure=\u8a2d\u5b9a
\ No newline at end of file
# The MIT License
#
# Copyright (c) 2004-2010, Sun Microsystems, Inc., Cleiber Silva
#
# 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.
Configure=Configurar
Back\ to\ Dashboard=Voltar ao menu principal
Status=Estado
Delete\ Job=Apagar a tarefa
# The MIT License
#
# Copyright (c) 2004-2010, Sun Microsystems, 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.
Configure=\u914D\u7F6E
Delete\ Job=\u522A\u9664\u5DE5\u4F5C
Status=\u72C0\u614B
<!--
The MIT License
Copyright (c) 2004-2009, Sun Microsystems, Inc., Kohsuke Kawaguchi
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.
-->
<?jelly escape-by-default='true'?>
<j:jelly xmlns:j="jelly:core" xmlns:st="jelly:stapler" xmlns:d="jelly:define" xmlns:l="/lib/layout" xmlns:t="/lib/hudson" xmlns:f="/lib/form" xmlns:i="jelly:fmt">
<st:include page="console.jelly"/>
</j:jelly>
\ No newline at end of file
<!--
The MIT License
Copyright (c) 2004-2009, Sun Microsystems, Inc., Kohsuke Kawaguchi, Romain Seguy
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.
-->
<!--
Side panel for the build view.
-->
<?jelly escape-by-default='true'?>
<j:jelly xmlns:j="jelly:core" xmlns:st="jelly:stapler" xmlns:d="jelly:define" xmlns:l="/lib/layout" xmlns:t="/lib/hudson" xmlns:f="/lib/form" xmlns:i="jelly:fmt">
<l:header title="${it.fullDisplayName}" />
<l:side-panel>
<l:tasks>
<l:task icon="images/24x24/up.png" href="${rootURL}/${it.parent.url}" title="${%Back to Job}" contextMenu="false"/>
<l:task icon="images/24x24/terminal.png" href="." title="${%Console Output}" />
<j:if test="${(!h.isArtifactsPermissionEnabled() or h.isArtifactsPermissionEnabled() and h.hasPermission(it,attrs.permission)) and it.hasArtifacts}">
<l:task icon="images/24x24/package.png" href="artifacts-index" title="${%Artifacts}" />
</j:if>
<st:include page="actions.jelly"/>
<l:task icon="images/24x24/setting.png" href="configure" title="${h.hasPermission(it,it.UPDATE)?'%Configure':'%View Configuration'}"/>
<j:if test="${it.previousBuild!=null}">
<l:task icon="images/24x24/previous.png" href="${rootURL}/${it.previousBuild.url}" title="${%Previous Run}" />
</j:if>
<j:if test="${it.nextBuild!=null}">
<l:task icon="images/24x24/next.png" href="${rootURL}/${it.nextBuild.url}" title="${%Next Run}" />
</j:if>
</l:tasks>
</l:side-panel>
</j:jelly>
# The MIT License
#
# Copyright (c) 2004-2010, Sun Microsystems, Inc. Kohsuke Kawaguchi. Knud Poulsen.
#
# 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.
Next\ Run=N\u00e6ste K\u00f8rsel
Artifacts=Artifakter
Previous\ Run=Foreg\u00e5ende K\u00f8rsel
Console\ Output=Konsol Output
Back\ to\ Job=Tilbage til Job
# The MIT License
#
# Copyright (c) 2004-2009, Sun Microsystems, Inc., Kohsuke Kawaguchi, Seiji Sogabe, Simon Wiest
#
# 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.
Back\ to\ Job=Zurück zum Job
Console\ Output=Konsolenausgabe
Artifacts=Artefakte
Previous\ Run=Vorherige Ausführung
Next\ Run=Nachfolgende Ausführung
Configure=Konfigurieren
View\ Configuration=Konfiguration anzeigen
\ No newline at end of file
# The MIT License
#
# Copyright (c) 2004-2010, Sun Microsystems, 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.
Back\ to\ Job=Volver al proyecto
Console\ Output=Salida de consola
Artifacts=Artefactos
Previous\ Run=Ejecución previa
Next\ Run=Ejecución siguiente
Configure=Configurar
# The MIT License
#
# Copyright (c) 2004-2010, Sun Microsystems, Inc., Kohsuke Kawaguchi, Seiji Sogabe
#
# 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.
Back\ to\ Job=\u30d7\u30ed\u30b8\u30a7\u30af\u30c8\u3078\u623b\u308b
Console\ Output=\u30b3\u30f3\u30bd\u30fc\u30eb\u51fa\u529bt
Artifacts=\u6210\u679c\u7269
Previous\ Run=\u524d\u306e\u5b9f\u884c
Next\ Run=\u6b21\u306e\u5b9f\u884c
Configure=\u8a2d\u5b9a
View\ Configuration=\u8a2d\u5b9a\u306e\u53c2\u7167
# The MIT License
#
# Copyright (c) 2004-2010, Sun Microsystems, Inc., Cleiber Silva
#
# 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.
Next\ Run=Pr\u00f3xima a executar
Artifacts=Artefatos
Previous\ Run=Executou anteriormente
Console\ Output=Sa\u00edda do Console
Back\ to\ Job=Voltar \u00e0 tarefa
<!--
The MIT License
Copyright (c) 2004-2009, Sun Microsystems, Inc., Kohsuke Kawaguchi, id:cactusman
Copyright (c) 2004-2009, Sun Microsystems, Inc., Kohsuke Kawaguchi
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
......@@ -22,7 +22,6 @@ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
THE SOFTWARE.
-->
<!-- nothing to configure -->
<?jelly escape-by-default='true'?>
<div>
${%body}
</div>
\ No newline at end of file
<j:jelly xmlns:j="jelly:core"/>
......@@ -37,4 +37,12 @@ THE SOFTWARE.
</f:radioBlock>
</j:forEach>
</f:section>
<j:set var="descriptors" value="${descriptor.getApplicableSCMCheckoutStrategyDescriptors()}"/>
<j:if test="${descriptors.size() gt 1}">
<f:section title="${%Advanced Source Code Management}">
<f:dropdownDescriptorSelector title="${%SCM Checkout Strategy}" field="scmCheckoutStrategy"
descriptors="${descriptors}" />
</f:section>
</j:if>
</j:jelly>
\ No newline at end of file
......@@ -76,7 +76,7 @@ complete {
rewriteLicense([],lgpl)
}
match(["org.jvnet.localizer:localizer","*:trilead-putty-extension"]) {
match(["org.jvnet.localizer:localizer"]) {
// see http://java.net/projects/localizer
// see http://java.net/projects/trilead-putty-extension/
rewriteLicense([],mitLicense);
......
......@@ -25,7 +25,6 @@ package hudson.maven;
import hudson.EnvVars;
import hudson.FilePath;
import hudson.maven.local_repo.LocalRepositoryLocator;
import hudson.maven.reporters.MavenArtifactRecord;
import hudson.maven.reporters.SurefireArchiver;
import hudson.slaves.WorkspaceList;
......@@ -246,7 +245,7 @@ public class MavenBuild extends AbstractMavenBuild<MavenModule,MavenBuild> {
@Override
public void run() {
run(new RunnerImpl());
execute(new MavenBuildExecution());
getProject().updateTransientActions();
......@@ -543,7 +542,7 @@ public class MavenBuild extends AbstractMavenBuild<MavenModule,MavenBuild> {
// failed before it didn't even get to this module
// OR if the aggregated build is an incremental one and this
// module needn't be build.
run(new Runner() {
MavenBuild.this.execute(new RunExecution() {
public Result run(BuildListener listener) {
listener.getLogger().println(Messages.MavenBuild_FailedEarlier());
return Result.NOT_BUILT;
......@@ -642,7 +641,7 @@ public class MavenBuild extends AbstractMavenBuild<MavenModule,MavenBuild> {
private class RunnerImpl extends AbstractRunner {
private class MavenBuildExecution extends AbstractBuildExecution {
private List<MavenReporter> reporters;
@Override
......
......@@ -474,7 +474,7 @@ public class MavenModuleSetBuild extends AbstractMavenBuild<MavenModuleSet,Maven
}
public void run() {
run(new RunnerImpl());
execute(new MavenModuleSetBuildExecution());
getProject().updateTransientActions();
}
......@@ -554,7 +554,7 @@ public class MavenModuleSetBuild extends AbstractMavenBuild<MavenModuleSet,Maven
* The sole job of the {@link MavenModuleSet} build is to update SCM
* and triggers module builds.
*/
private class RunnerImpl extends AbstractRunner {
private class MavenModuleSetBuildExecution extends AbstractBuildExecution {
private Map<ModuleName,MavenBuild.ProxyImpl2> proxies;
protected Result doRun(final BuildListener listener) throws Exception {
......
......@@ -64,7 +64,10 @@ public class TestPluginManager extends PluginManager {
protected Collection<String> loadBundledPlugins() throws Exception {
Set<String> names = new HashSet<String>();
File[] children = new File(WarExploder.getExplodedDir(),"WEB-INF/plugins").listFiles();
File bundledPlugins = new File(WarExploder.getExplodedDir(), "WEB-INF/plugins");
File[] children = bundledPlugins.listFiles();
if (children==null)
throw new Error("Unable to find "+bundledPlugins);
for (File child : children) {
try {
names.add(child.getName());
......
......@@ -65,16 +65,11 @@ final class WarExploder {
* Explodes hudson.war, if necessary, and returns its root dir.
*/
private static File explode() throws Exception {
// are we in the hudson main workspace? If so, pick up hudson/main/war/resources
// are we in the Jenkins main workspace? If so, pick up hudson/main/war/resources
// this saves the effort of packaging a war file and makes the debug cycle faster
File d = new File(".").getAbsoluteFile();
// just in case we were started from hudson instead of from hudson/main/...
if (new File(d, "main/war/target/jenkins").exists()) {
return new File(d, "main/war/target/jenkins");
}
for( ; d!=null; d=d.getParentFile()) {
if(new File(d,".jenkins").exists()) {
File dir = new File(d,"war/target/jenkins");
......@@ -85,11 +80,11 @@ final class WarExploder {
}
}
// locate hudson.war
// locate jenkins.war
URL winstone = WarExploder.class.getResource("/winstone.jar");
if(winstone==null)
// impossible, since the test harness pulls in hudson.war
throw new AssertionError("jenkins.war is not in the classpath.");
// impossible, since the test harness pulls in jenkins.war
throw new AssertionError("jenkins.war is not in the classpath. If you are running this from the core workspace, run 'mvn install' to create the war image in war/target/jenkins");
File war = Which.jarFile(Class.forName("executable.Executable"));
File explodeDir = new File("./target/jenkins-for-test").getAbsoluteFile();
......
package hudson.model;
import org.jvnet.hudson.test.HudsonTestCase;
import java.io.StringReader;
/**
* @author Kohsuke Kawaguchi
*/
public class ExternalRunTest extends HudsonTestCase {
public void test1() throws Exception {
ExternalJob p = hudson.createProject(ExternalJob.class, "test");
ExternalRun b = p.newBuild();
b.acceptRemoteSubmission(new StringReader(
"<run><log content-encoding='UTF-8'>AAAAAAAA</log><result>0</result><duration>100</duration></run>"
));
assertEquals(b.getResult(),Result.SUCCESS);
assertEquals(b.getDuration(),100);
b = p.newBuild();
b.acceptRemoteSubmission(new StringReader(
"<run><log content-encoding='UTF-8'>AAAAAAAA</log><result>1</result>"
));
assertEquals(b.getResult(),Result.FAILURE);
}
}
......@@ -85,16 +85,6 @@ public class GetEnvironmentOutsideBuildTest extends HudsonTestCase {
assertGetEnvironmentCallOutsideBuildWorks(createMatrixProject);
}
public void testExternalJob() throws Exception {
ExternalJob p = jenkins.createProject(ExternalJob.class, createUniqueProjectName());
ExternalRun b = p.newBuild();
b.acceptRemoteSubmission(new StringReader(
"<run><log content-encoding='UTF-8'></log><result>0</result><duration>1</duration></run>"
));
assertGetEnvironmentWorks(b);
}
@SuppressWarnings({"rawtypes", "unchecked"})
private void assertGetEnvironmentCallOutsideBuildWorks(AbstractProject job) throws Exception {
AbstractBuild build = buildAndAssertSuccess(job);
......
......@@ -110,7 +110,7 @@ public class MailSenderTest {
* list.
*/
@Test
public void testIncludeUpstreamCulprits() throws MessagingException, InterruptedException {
public void testIncludeUpstreamCulprits() throws Exception {
Collection<AbstractProject> upstreamProjects = Collections.singleton(this.upstreamProject);
MailSender sender = new MailSender("", false, false, "UTF-8", upstreamProjects);
......
......@@ -99,7 +99,7 @@ THE SOFTWARE.
-->
<groupId>org.jenkins-ci</groupId>
<artifactId>winstone</artifactId>
<version>0.9.10-jenkins-36</version>
<version>0.9.10-jenkins-37</version>
<scope>test</scope>
</dependency>
<dependency>
......@@ -278,6 +278,12 @@ THE SOFTWARE.
<version>1.8</version>
<type>hpi</type>
</artifactItem>
<artifactItem>
<groupId>org.jenkins-ci.plugins</groupId>
<artifactId>external-monitor-job</artifactId>
<version>1.0-SNAPSHOT</version>
<type>hpi</type>
</artifactItem>
</artifactItems>
<outputDirectory>${project.build.directory}/${project.build.finalName}/WEB-INF/plugins</outputDirectory>
<stripVersion>true</stripVersion>
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册