From 84e8d011805194578d3b3ccfca060ce5cffbf7eb Mon Sep 17 00:00:00 2001 From: christ66 Date: Wed, 26 Feb 2014 16:08:24 -0800 Subject: [PATCH 01/78] [FIXED JENKINS-21969] Performance issue with search box when doing case insensitive searching. --- core/src/main/java/hudson/model/User.java | 5 ++++- core/src/main/java/hudson/search/CollectionSearchIndex.java | 5 +++-- 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/core/src/main/java/hudson/model/User.java b/core/src/main/java/hudson/model/User.java index e72c6fe3cb..3ef1318879 100644 --- a/core/src/main/java/hudson/model/User.java +++ b/core/src/main/java/hudson/model/User.java @@ -374,7 +374,10 @@ public class User extends AbstractModelObject implements AccessControlled, Descr Authentication a = Jenkins.getAuthentication(); if(a instanceof AnonymousAuthenticationToken) return null; - return get(a.getName()); + + // Since we already know this is a name, we can just call getOrCreate with the name directly. + String id = a.getName(); + return getOrCreate(id, id, true); } private static volatile long lastScanned; diff --git a/core/src/main/java/hudson/search/CollectionSearchIndex.java b/core/src/main/java/hudson/search/CollectionSearchIndex.java index 53be8a62db..26422553c4 100644 --- a/core/src/main/java/hudson/search/CollectionSearchIndex.java +++ b/core/src/main/java/hudson/search/CollectionSearchIndex.java @@ -52,13 +52,14 @@ public abstract class CollectionSearchIndex i public void suggest(String token, List result) { Collection items = all(); - if(UserSearchProperty.isCaseInsensitive()){ + boolean isCaseSensitive = UserSearchProperty.isCaseInsensitive(); + if(isCaseSensitive){ token = token.toLowerCase(); } if(items==null) return; for (SMT o : items) { String name = getName(o); - if(UserSearchProperty.isCaseInsensitive()) + if(isCaseSensitive) name=name.toLowerCase(); if(o!=null && name.contains(token)) result.add(o); From c68cfc9d8cdb47c0e983a6eba9b75559bebc284d Mon Sep 17 00:00:00 2001 From: Jesse Glick Date: Tue, 4 Mar 2014 12:33:23 -0800 Subject: [PATCH 02/78] Introduced LazyBuildMixIn. --- .../hudson/matrix/MatrixConfiguration.java | 2 +- .../main/java/hudson/model/AbstractBuild.java | 2 +- .../java/hudson/model/AbstractProject.java | 145 ++------- core/src/main/java/hudson/model/Job.java | 14 +- .../jenkins/model/lazy/LazyBuildMixIn.java | 297 ++++++++++++++++++ 5 files changed, 342 insertions(+), 118 deletions(-) create mode 100644 core/src/main/java/jenkins/model/lazy/LazyBuildMixIn.java diff --git a/core/src/main/java/hudson/matrix/MatrixConfiguration.java b/core/src/main/java/hudson/matrix/MatrixConfiguration.java index f57fff9682..9704a35a96 100644 --- a/core/src/main/java/hudson/matrix/MatrixConfiguration.java +++ b/core/src/main/java/hudson/matrix/MatrixConfiguration.java @@ -248,7 +248,7 @@ public class MatrixConfiguration extends Project lastBuild.number = lb.getNumber(); - builds.put(lastBuild); + _getRuns().put(lastBuild); return lastBuild; } diff --git a/core/src/main/java/hudson/model/AbstractBuild.java b/core/src/main/java/hudson/model/AbstractBuild.java index eeeaf4e927..d1e9902c43 100644 --- a/core/src/main/java/hudson/model/AbstractBuild.java +++ b/core/src/main/java/hudson/model/AbstractBuild.java @@ -244,7 +244,7 @@ public abstract class AbstractBuild

,R extends Abs if (r==null) { // having two neighbors pointing to each other is important to make RunMap.removeValue work - R nb = getParent().builds.search(number+1, Direction.ASC); + R nb = getParent()._getRuns().search(number+1, Direction.ASC); if (nb!=null) { ((AbstractBuild)nb).previousBuild = selfReference; // establish bi-di link this.nextBuild = nb.selfReference; diff --git a/core/src/main/java/hudson/model/AbstractProject.java b/core/src/main/java/hudson/model/AbstractProject.java index 7271a76e80..523a1a2de5 100644 --- a/core/src/main/java/hudson/model/AbstractProject.java +++ b/core/src/main/java/hudson/model/AbstractProject.java @@ -32,7 +32,6 @@ import com.infradna.tool.bridge_method_injector.WithBridgeMethods; import hudson.AbortException; import hudson.CopyOnWrite; import hudson.EnvVars; -import hudson.Extension; import hudson.ExtensionPoint; import hudson.FeedAdapter; import hudson.FilePath; @@ -49,7 +48,6 @@ import hudson.model.Fingerprint.RangeSet; import hudson.model.PermalinkProjectAction.Permalink; import hudson.model.Queue.Executable; import hudson.model.Queue.Task; -import hudson.model.RunMap.Constructor; import hudson.model.labels.LabelAtom; import hudson.model.labels.LabelExpression; import hudson.model.listeners.ItemListener; @@ -86,11 +84,9 @@ import hudson.util.AlternativeUiTextProvider.Message; import hudson.util.DescribableList; import hudson.util.FormValidation; import hudson.util.TimeUnit2; -import hudson.widgets.BuildHistoryWidget; import hudson.widgets.HistoryWidget; import java.io.File; import java.io.IOException; -import java.lang.reflect.InvocationTargetException; import java.util.ArrayList; import java.util.Arrays; import java.util.Calendar; @@ -118,7 +114,7 @@ import jenkins.model.Jenkins; import jenkins.model.JenkinsLocationConfiguration; import jenkins.model.ModelObjectWithChildren; import jenkins.model.Uptime; -import jenkins.model.lazy.AbstractLazyLoadRunMap.Direction; +import jenkins.model.lazy.LazyBuildMixIn; import jenkins.scm.DefaultSCMCheckoutStrategyImpl; import jenkins.scm.SCMCheckoutStrategy; import jenkins.scm.SCMCheckoutStrategyDescriptor; @@ -129,7 +125,6 @@ import org.acegisecurity.context.SecurityContext; import org.acegisecurity.context.SecurityContextHolder; import org.jenkinsci.bytecode.AdaptField; import org.kohsuke.accmod.Restricted; -import org.kohsuke.accmod.restrictions.DoNotUse; import org.kohsuke.accmod.restrictions.NoExternalUse; import org.kohsuke.args4j.Argument; import org.kohsuke.args4j.CmdLineException; @@ -173,15 +168,16 @@ public abstract class AbstractProject

,R extends A */ private volatile transient SCMRevisionState pollingBaseline = null; + private transient LazyBuildMixIn buildMixIn; + /** * All the builds keyed by their build number. - * + * Kept here for binary compatibility only; otherwise use {@link #buildMixIn}. * External code should use {@link #getBuildByNumber(int)} or {@link #getLastBuild()} and traverse via * {@link Run#getPreviousBuild()} */ @Restricted(NoExternalUse.class) - @SuppressWarnings("deprecation") // [JENKINS-15156] builds accessed before onLoad or onCreatedFromScratch called - protected transient RunMap builds = new RunMap(); + protected transient RunMap builds; /** * The quiet period. Null to delegate to the system default. @@ -274,6 +270,7 @@ public abstract class AbstractProject

,R extends A protected AbstractProject(ItemGroup parent, String name) { super(parent,name); + initBuildMixIn(); if(Jenkins.getInstance()!=null && !Jenkins.getInstance().getNodes().isEmpty()) { // if a new job is configured with Hudson that already has slave nodes @@ -282,6 +279,15 @@ public abstract class AbstractProject

,R extends A } } + private void initBuildMixIn() { + buildMixIn = new LazyBuildMixIn(this) { + @Override protected Class getBuildClass() { + return AbstractProject.this.getBuildClass(); + } + }; + builds = buildMixIn.getRunMap(); + } + @Override public synchronized void save() throws IOException { super.save(); @@ -291,7 +297,8 @@ public abstract class AbstractProject

,R extends A @Override public void onCreatedFromScratch() { super.onCreatedFromScratch(); - builds = createBuildRunMap(); + buildMixIn.onCreatedFromScratch(); + builds = buildMixIn.getRunMap(); // solicit initial contributions, especially from TransientProjectActionFactory updateTransientActions(); } @@ -299,33 +306,7 @@ public abstract class AbstractProject

,R extends A @Override public void onLoad(ItemGroup parent, String name) throws IOException { super.onLoad(parent, name); - - RunMap builds = createBuildRunMap(); - - RunMap currentBuilds = this.builds; - - if (currentBuilds==null && parent!=null) { - // are we overwriting what currently exist? - // this is primarily when Jenkins is getting reloaded - Item current; - try { - current = parent.getItem(name); - } catch (RuntimeException x) { - LOGGER.log(Level.WARNING, "failed to look up " + name + " in " + parent, x); - current = null; - } - if (current!=null && current.getClass()==getClass()) { - currentBuilds = ((AbstractProject)current).builds; - } - } - if (currentBuilds !=null) { - // if we are reloading, keep all those that are still building intact - for (R r : currentBuilds.getLoadedBuilds().values()) { - if (r.isBuilding()) - builds.put(r); - } - } - this.builds = builds; + initBuildMixIn(); triggers().setOwner(this); for (Trigger t : triggers()) { t.start(this, Items.currentlyUpdatingByXml()); @@ -338,14 +319,6 @@ public abstract class AbstractProject

,R extends A updateTransientActions(); } - private RunMap createBuildRunMap() { - return new RunMap(getBuildDir(), new Constructor() { - public R create(File dir) throws IOException { - return loadBuild(dir); - } - }); - } - @WithBridgeMethods(List.class) protected DescribableList,TriggerDescriptor> triggers() { if (triggers == null) { @@ -1039,18 +1012,12 @@ public abstract class AbstractProject

,R extends A @Override public RunMap _getRuns() { - if (builds == null) { - throw new IllegalStateException("no run map created yet for " + this); - } - assert builds.baseDirInitialized() : "neither onCreatedFromScratch nor onLoad called on " + this + " yet"; - return builds; + return buildMixIn._getRuns(); } @Override public void removeRun(R run) { - if (!this.builds.remove(run)) { - LOGGER.log(Level.WARNING, "{0} did not contain {1} to begin with", new Object[] {this, run}); - } + buildMixIn.removeRun(run); } /** @@ -1060,7 +1027,7 @@ public abstract class AbstractProject

,R extends A */ @Override public R getBuild(String id) { - return builds.getById(id); + return buildMixIn.getBuild(id); } /** @@ -1070,7 +1037,7 @@ public abstract class AbstractProject

,R extends A */ @Override public R getBuildByNumber(int n) { - return builds.getByNumber(n); + return buildMixIn.getBuildByNumber(n); } /** @@ -1080,22 +1047,22 @@ public abstract class AbstractProject

,R extends A */ @Override public R getFirstBuild() { - return builds.oldestBuild(); + return buildMixIn.getFirstBuild(); } @Override public @CheckForNull R getLastBuild() { - return builds.newestBuild(); + return buildMixIn.getLastBuild(); } @Override public R getNearestBuild(int n) { - return builds.search(n, Direction.ASC); + return buildMixIn.getNearestBuild(n); } @Override public R getNearestOldBuild(int n) { - return builds.search(n, Direction.DESC); + return buildMixIn.getNearestOldBuild(n); } /** @@ -1106,61 +1073,19 @@ public abstract class AbstractProject

,R extends A */ protected abstract Class getBuildClass(); - // keep track of the previous time we started a build - private transient long lastBuildStartTime; - /** * Creates a new build of this project for immediate execution. + * Suitable for {@link SubTask#createExecutable}. */ protected synchronized R 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(); - try { - R lastBuild = getBuildClass().getConstructor(getClass()).newInstance(this); - builds.put(lastBuild); - return lastBuild; - } catch (InstantiationException e) { - throw new Error(e); - } catch (IllegalAccessException e) { - throw new Error(e); - } catch (InvocationTargetException e) { - throw handleInvocationTargetException(e); - } catch (NoSuchMethodException e) { - throw new Error(e); - } - } - - private IOException handleInvocationTargetException(InvocationTargetException e) { - Throwable t = e.getTargetException(); - if(t instanceof Error) throw (Error)t; - if(t instanceof RuntimeException) throw (RuntimeException)t; - if(t instanceof IOException) return (IOException)t; - throw new Error(t); + return buildMixIn.newBuild(); } /** * Loads an existing build record from disk. */ protected R loadBuild(File dir) throws IOException { - try { - return getBuildClass().getConstructor(getClass(),File.class).newInstance(this,dir); - } catch (InstantiationException e) { - throw new Error(e); - } catch (IllegalAccessException e) { - throw new Error(e); - } catch (InvocationTargetException e) { - throw handleInvocationTargetException(e); - } catch (NoSuchMethodException e) { - throw new Error(e); - } + return buildMixIn.loadBuild(dir); } /** @@ -1820,7 +1745,7 @@ public abstract class AbstractProject

,R extends A @Override protected HistoryWidget createHistoryWidget() { - return new BuildHistoryWidget(this,builds,HISTORY_ADAPTER); + return buildMixIn.createHistoryWidget(); } public boolean isParameterized() { @@ -2426,14 +2351,4 @@ public abstract class AbstractProject

,R extends A public abstract FormValidation check(@Nonnull AbstractProject project, @Nonnull Label label); } - @Restricted(DoNotUse.class) - @Extension public static final class ItemListenerImpl extends ItemListener { - @Override public void onLocationChanged(Item item, String oldFullName, String newFullName) { - if (item instanceof AbstractProject) { - AbstractProject p = (AbstractProject) item; - p.builds.updateBaseDir(p.getBuildDir()); - } - } - } - } diff --git a/core/src/main/java/hudson/model/Job.java b/core/src/main/java/hudson/model/Job.java index d73e1f6b68..56734c0e9f 100644 --- a/core/src/main/java/hudson/model/Job.java +++ b/core/src/main/java/hudson/model/Job.java @@ -98,6 +98,7 @@ import java.util.*; import java.util.List; import static javax.servlet.http.HttpServletResponse.*; +import jenkins.model.lazy.LazyBuildMixIn; /** * A job is an runnable entity under the monitoring of Hudson. @@ -570,11 +571,14 @@ public abstract class Job, RunT extends Run(this, getBuilds(), HISTORY_ADAPTER); } - protected static final HistoryWidget.Adapter HISTORY_ADAPTER = new Adapter() { + public static final HistoryWidget.Adapter HISTORY_ADAPTER = new Adapter() { public int compare(Run record, String key) { try { int k = Integer.parseInt(key); @@ -674,6 +678,7 @@ public abstract class Job, RunT extends Run, RunT extends Run, RunT extends Run m = _getRuns().headMap(n - 1); // the map should @@ -738,6 +745,7 @@ public abstract class Job, RunT extends Run m = _getRuns().tailMap(n); @@ -787,6 +795,7 @@ public abstract class Job, RunT extends Run _getRuns(); @@ -795,11 +804,13 @@ public abstract class Job, RunT extends Run, RunT extends RunShould be kept in a {@code transient} field in the job. + * @since TODO + */ +public abstract class LazyBuildMixIn

,R extends Run> { + + private static final Logger LOGGER = Logger.getLogger(LazyBuildMixIn.class.getName()); + + private final Job job; + + @SuppressWarnings("deprecation") // [JENKINS-15156] builds accessed before onLoad or onCreatedFromScratch called + private @Nonnull RunMap builds = new RunMap(); + + // keep track of the previous time we started a build + private long lastBuildStartTime; + + /** + * Initializes this mixin based on a job. + * Call this from a constructor and {@link AbstractItem#onLoad} to make sure it is always initialized. + * @param job the owning job (should be of type {@code P} and assignable to {@link Task}) + */ + public LazyBuildMixIn(Job job) { + this.job = job; + } + + /** + * Gets the raw model. + * Normally should not be called as such. + * Note that the initial value is replaced during {@link #onCreatedFromScratch} or {@link #onLoad}. + */ + public final @Nonnull RunMap getRunMap() { + return builds; + } + + /** + * Same as {@link #getRunMap} but suitable for {@link Job#_getRuns}, which you must override to be public. + */ + public final RunMap _getRuns() { + assert builds.baseDirInitialized() : "neither onCreatedFromScratch nor onLoad called on " + job + " yet"; + return builds; + } + + /** + * Something to be called from {@link AbstractItem#onCreatedFromScratch}. + */ + public final void onCreatedFromScratch() { + builds = createBuildRunMap(); + } + + /** + * Something to be called from {@link AbstractItem#onLoad}. + */ + @SuppressWarnings("unchecked") + public void onLoad(ItemGroup parent, String name) throws IOException { + RunMap _builds = createBuildRunMap(); + RunMap currentBuilds = this.builds; + if (parent != null) { + // are we overwriting what currently exist? + // this is primarily when Jenkins is getting reloaded + Item current; + try { + current = parent.getItem(name); + } catch (RuntimeException x) { + LOGGER.log(Level.WARNING, "failed to look up " + name + " in " + parent, x); + current = null; + } + if (current != null && current.getClass() == job.getClass()) { + try { + currentBuilds = (RunMap) current.getClass().getMethod("_getRuns").invoke(current); + } catch (Exception x) { + assert false : "you should have made _getRuns public in " + job.getClass(); + } + } + } + if (currentBuilds != null) { + // if we are reloading, keep all those that are still building intact + for (R r : currentBuilds.getLoadedBuilds().values()) { + if (r.isBuilding()) { + _builds.put(r); + } + } + } + this.builds = _builds; + } + + private RunMap createBuildRunMap() { + return new RunMap(job.getBuildDir(), new RunMap.Constructor() { + @Override public R create(File dir) throws IOException { + return loadBuild(dir); + } + }); + } + + /** + * Type token for the build type. + * The build class must have two constructors: + * one taking the project type ({@code P}); + * and one taking {@code P}, then {@link File}. + */ + protected abstract Class getBuildClass(); + + /** + * Loads an existing build record from disk. + * The default implementation just calls the ({@link Job}, {@link File}) constructor of {@link #getBuildClass}. + */ + public R loadBuild(File dir) throws IOException { + try { + return getBuildClass().getConstructor(job.getClass(), File.class).newInstance(job, dir); + } catch (InstantiationException e) { + throw new Error(e); + } catch (IllegalAccessException e) { + throw new Error(e); + } catch (InvocationTargetException e) { + throw handleInvocationTargetException(e); + } catch (NoSuchMethodException e) { + throw new Error(e); + } + } + + /** + * Creates a new build of this project for immediate execution. + * Calls the ({@link Job}) constructor of {@link #getBuildClass}. + */ + @SuppressWarnings("SleepWhileHoldingLock") + @edu.umd.cs.findbugs.annotations.SuppressWarnings("SWL_SLEEP_WITH_LOCK_HELD") + public final synchronized R 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(); + try { + R lastBuild = getBuildClass().getConstructor(job.getClass()).newInstance(job); + builds.put(lastBuild); + return lastBuild; + } catch (InstantiationException e) { + throw new Error(e); + } catch (IllegalAccessException e) { + throw new Error(e); + } catch (InvocationTargetException e) { + throw handleInvocationTargetException(e); + } catch (NoSuchMethodException e) { + throw new Error(e); + } + } + + private IOException handleInvocationTargetException(InvocationTargetException e) { + Throwable t = e.getTargetException(); + if (t instanceof Error) { + throw (Error) t; + } + if (t instanceof RuntimeException) { + throw (RuntimeException) t; + } + if (t instanceof IOException) { + return (IOException) t; + } + throw new Error(t); + } + + /** + * Suitable for {@link Job#removeRun}. + */ + public final void removeRun(R run) { + if (!builds.remove(run)) { + LOGGER.log(Level.WARNING, "{0} did not contain {1} to begin with", new Object[] {job, run}); + } + } + + /** + * Suitable for {@link Job#getBuild}. + */ + public final R getBuild(String id) { + return builds.getById(id); + } + + /** + * Suitable for {@link Job#getBuildByNumber}. + */ + public final R getBuildByNumber(int n) { + return builds.getByNumber(n); + } + + /** + * Suitable for {@link Job#getFirstBuild}. + */ + public final R getFirstBuild() { + return builds.oldestBuild(); + } + + /** + * Suitable for {@link Job#getLastBuild}. + */ + public final @CheckForNull R getLastBuild() { + return builds.newestBuild(); + } + + /** + * Suitable for {@link Job#getNearestBuild}. + */ + public final R getNearestBuild(int n) { + return builds.search(n, AbstractLazyLoadRunMap.Direction.ASC); + } + + /** + * Suitable for {@link Job#getNearestOldBuild}. + */ + public final R getNearestOldBuild(int n) { + return builds.search(n, AbstractLazyLoadRunMap.Direction.DESC); + } + + /** + * Suitable for {@link Job#createHistoryWidget}. + */ + @SuppressWarnings({"unchecked", "rawtypes"}) + public final HistoryWidget createHistoryWidget() { + return new BuildHistoryWidget((Task) job, builds, Job.HISTORY_ADAPTER); + } + + @Restricted(DoNotUse.class) + @Extension public static final class ItemListenerImpl extends ItemListener { + @Override public void onLocationChanged(Item item, String oldFullName, String newFullName) { + if (item instanceof Job) { + RunMap builds; + try { + builds = (RunMap) item.getClass().getMethod("_getRuns").invoke(item); + } catch (NoSuchMethodException x) { + // OK, did not override this to be public + return; + } catch (ClassCastException x) { + // override it to be public but of a different type, fine + return; + } catch (Exception x) { + LOGGER.log(Level.WARNING, null, x); + return; + } + builds.updateBaseDir(((Job) item).getBuildDir()); + } + } + } + +} From fad45aeb462de06012a3faa92b1c0cc219ebca22 Mon Sep 17 00:00:00 2001 From: Jesse Glick Date: Tue, 4 Mar 2014 12:46:50 -0800 Subject: [PATCH 03/78] Shuffled a line of Javadoc to its intended location. --- core/src/main/java/hudson/model/AbstractProject.java | 1 - core/src/main/java/jenkins/model/lazy/LazyBuildMixIn.java | 1 + 2 files changed, 1 insertion(+), 1 deletion(-) diff --git a/core/src/main/java/hudson/model/AbstractProject.java b/core/src/main/java/hudson/model/AbstractProject.java index 523a1a2de5..f624920abe 100644 --- a/core/src/main/java/hudson/model/AbstractProject.java +++ b/core/src/main/java/hudson/model/AbstractProject.java @@ -1075,7 +1075,6 @@ public abstract class AbstractProject

,R extends A /** * Creates a new build of this project for immediate execution. - * Suitable for {@link SubTask#createExecutable}. */ protected synchronized R newBuild() throws IOException { return buildMixIn.newBuild(); diff --git a/core/src/main/java/jenkins/model/lazy/LazyBuildMixIn.java b/core/src/main/java/jenkins/model/lazy/LazyBuildMixIn.java index ea950da2bc..a9c41114ba 100644 --- a/core/src/main/java/jenkins/model/lazy/LazyBuildMixIn.java +++ b/core/src/main/java/jenkins/model/lazy/LazyBuildMixIn.java @@ -170,6 +170,7 @@ public abstract class LazyBuildMixIn

,R extends Run> { /** * Creates a new build of this project for immediate execution. * Calls the ({@link Job}) constructor of {@link #getBuildClass}. + * Suitable for {@link SubTask#createExecutable}. */ @SuppressWarnings("SleepWhileHoldingLock") @edu.umd.cs.findbugs.annotations.SuppressWarnings("SWL_SLEEP_WITH_LOCK_HELD") From b1acf9c47cebc93d4a2aef5f891b79e65b64b811 Mon Sep 17 00:00:00 2001 From: Jesse Glick Date: Tue, 4 Mar 2014 14:47:59 -0800 Subject: [PATCH 04/78] Forgot to call LazyBuildMixIn.onLoad. --- core/src/main/java/hudson/model/AbstractProject.java | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/core/src/main/java/hudson/model/AbstractProject.java b/core/src/main/java/hudson/model/AbstractProject.java index f624920abe..35689572ff 100644 --- a/core/src/main/java/hudson/model/AbstractProject.java +++ b/core/src/main/java/hudson/model/AbstractProject.java @@ -270,7 +270,8 @@ public abstract class AbstractProject

,R extends A protected AbstractProject(ItemGroup parent, String name) { super(parent,name); - initBuildMixIn(); + buildMixIn = createBuildMixIn(); + builds = buildMixIn.getRunMap(); if(Jenkins.getInstance()!=null && !Jenkins.getInstance().getNodes().isEmpty()) { // if a new job is configured with Hudson that already has slave nodes @@ -279,13 +280,12 @@ public abstract class AbstractProject

,R extends A } } - private void initBuildMixIn() { - buildMixIn = new LazyBuildMixIn(this) { + private LazyBuildMixIn createBuildMixIn() { + return new LazyBuildMixIn(this) { @Override protected Class getBuildClass() { return AbstractProject.this.getBuildClass(); } }; - builds = buildMixIn.getRunMap(); } @Override @@ -306,7 +306,9 @@ public abstract class AbstractProject

,R extends A @Override public void onLoad(ItemGroup parent, String name) throws IOException { super.onLoad(parent, name); - initBuildMixIn(); + buildMixIn = createBuildMixIn(); + buildMixIn.onLoad(parent, name); + builds = buildMixIn.getRunMap(); triggers().setOwner(this); for (Trigger t : triggers()) { t.start(this, Items.currentlyUpdatingByXml()); From 4c3344bfd19607bb3a412e2023c91179872af10d Mon Sep 17 00:00:00 2001 From: Jesse Glick Date: Tue, 4 Mar 2014 15:44:22 -0800 Subject: [PATCH 05/78] Introduced LazyLoadingJob marker interface. 1. ItemListenerImpl needs to know which items have a RunMap on which it can call updateBaseDir. Using reflection sort of worked for this purpose, but was messy. 2. onLoad needs to get the RunMap from a peer of the owning job. Reflectively calling _getRuns on the peer did not work since it may not yet have had a base dir set. So we need a way of finding the actual mixin (or at least the RunMap) of a given job. This is not pretty but seems preferable to injecting something into the type hierarchy between AbstractProject and Job. --- .../java/hudson/model/AbstractProject.java | 6 ++- .../jenkins/model/lazy/LazyBuildMixIn.java | 40 ++++++++----------- 2 files changed, 22 insertions(+), 24 deletions(-) diff --git a/core/src/main/java/hudson/model/AbstractProject.java b/core/src/main/java/hudson/model/AbstractProject.java index 35689572ff..798d242512 100644 --- a/core/src/main/java/hudson/model/AbstractProject.java +++ b/core/src/main/java/hudson/model/AbstractProject.java @@ -149,7 +149,7 @@ import org.kohsuke.stapler.interceptor.RequirePOST; * @see AbstractBuild */ @SuppressWarnings("rawtypes") -public abstract class AbstractProject

,R extends AbstractBuild> extends Job implements BuildableItem, ModelObjectWithChildren { +public abstract class AbstractProject

,R extends AbstractBuild> extends Job implements BuildableItem, ModelObjectWithChildren, LazyBuildMixIn.LazyLoadingJob { /** * {@link SCM} associated with the project. @@ -288,6 +288,10 @@ public abstract class AbstractProject

,R extends A }; } + @Override public LazyBuildMixIn getLazyBuildMixIn() { + return buildMixIn; + } + @Override public synchronized void save() throws IOException { super.save(); diff --git a/core/src/main/java/jenkins/model/lazy/LazyBuildMixIn.java b/core/src/main/java/jenkins/model/lazy/LazyBuildMixIn.java index a9c41114ba..6891770d71 100644 --- a/core/src/main/java/jenkins/model/lazy/LazyBuildMixIn.java +++ b/core/src/main/java/jenkins/model/lazy/LazyBuildMixIn.java @@ -33,6 +33,7 @@ import hudson.model.Queue.Task; import hudson.model.Run; import hudson.model.RunMap; import hudson.model.listeners.ItemListener; +import hudson.model.queue.SubTask; import hudson.widgets.BuildHistoryWidget; import hudson.widgets.HistoryWidget; import java.io.File; @@ -56,7 +57,7 @@ public abstract class LazyBuildMixIn

,R extends Run> { private static final Logger LOGGER = Logger.getLogger(LazyBuildMixIn.class.getName()); - private final Job job; + private final Job job; @SuppressWarnings("deprecation") // [JENKINS-15156] builds accessed before onLoad or onCreatedFromScratch called private @Nonnull RunMap builds = new RunMap(); @@ -67,9 +68,11 @@ public abstract class LazyBuildMixIn

,R extends Run> { /** * Initializes this mixin based on a job. * Call this from a constructor and {@link AbstractItem#onLoad} to make sure it is always initialized. - * @param job the owning job (should be of type {@code P} and assignable to {@link Task}) + * @param job the owning job (should be of type {@code P} and assignable to {@link Task} and {@link LazyLoadingJob}) */ - public LazyBuildMixIn(Job job) { + public LazyBuildMixIn(Job job) { + Task.class.cast(job); + LazyLoadingJob.class.cast(job); this.job = job; } @@ -83,7 +86,7 @@ public abstract class LazyBuildMixIn

,R extends Run> { } /** - * Same as {@link #getRunMap} but suitable for {@link Job#_getRuns}, which you must override to be public. + * Same as {@link #getRunMap} but suitable for {@link Job#_getRuns}. */ public final RunMap _getRuns() { assert builds.baseDirInitialized() : "neither onCreatedFromScratch nor onLoad called on " + job + " yet"; @@ -115,11 +118,7 @@ public abstract class LazyBuildMixIn

,R extends Run> { current = null; } if (current != null && current.getClass() == job.getClass()) { - try { - currentBuilds = (RunMap) current.getClass().getMethod("_getRuns").invoke(current); - } catch (Exception x) { - assert false : "you should have made _getRuns public in " + job.getClass(); - } + currentBuilds = (RunMap) ((LazyLoadingJob) current).getLazyBuildMixIn().builds; } } if (currentBuilds != null) { @@ -273,23 +272,18 @@ public abstract class LazyBuildMixIn

,R extends Run> { return new BuildHistoryWidget((Task) job, builds, Job.HISTORY_ADAPTER); } + /** + * Marker for a {@link Job} which uses this mixin. + */ + public interface LazyLoadingJob { + LazyBuildMixIn getLazyBuildMixIn(); + } + @Restricted(DoNotUse.class) @Extension public static final class ItemListenerImpl extends ItemListener { @Override public void onLocationChanged(Item item, String oldFullName, String newFullName) { - if (item instanceof Job) { - RunMap builds; - try { - builds = (RunMap) item.getClass().getMethod("_getRuns").invoke(item); - } catch (NoSuchMethodException x) { - // OK, did not override this to be public - return; - } catch (ClassCastException x) { - // override it to be public but of a different type, fine - return; - } catch (Exception x) { - LOGGER.log(Level.WARNING, null, x); - return; - } + if (item instanceof LazyLoadingJob) { + RunMap builds = ((LazyLoadingJob) item).getLazyBuildMixIn().builds; builds.updateBaseDir(((Job) item).getBuildDir()); } } From da79f7b70fb68aee585c57d8f820b773781905ac Mon Sep 17 00:00:00 2001 From: Jesse Glick Date: Tue, 4 Mar 2014 17:09:30 -0800 Subject: [PATCH 06/78] No obvious reason why the specialized doDoDelete in AbstractProject could not be pulled up into AbstractItem. --- .../main/java/hudson/model/AbstractItem.java | 22 +++++++++++++-- .../java/hudson/model/AbstractProject.java | 27 ------------------- 2 files changed, 20 insertions(+), 29 deletions(-) diff --git a/core/src/main/java/hudson/model/AbstractItem.java b/core/src/main/java/hudson/model/AbstractItem.java index 20f21850db..6594b58e3a 100644 --- a/core/src/main/java/hudson/model/AbstractItem.java +++ b/core/src/main/java/hudson/model/AbstractItem.java @@ -52,6 +52,8 @@ import org.kohsuke.stapler.export.ExportedBean; import java.io.File; import java.io.IOException; import java.util.Collection; +import java.util.List; +import java.util.ListIterator; import javax.annotation.Nonnull; import org.kohsuke.stapler.StaplerRequest; @@ -71,6 +73,7 @@ import javax.xml.transform.stream.StreamResult; import javax.xml.transform.stream.StreamSource; import static javax.servlet.http.HttpServletResponse.SC_BAD_REQUEST; +import org.kohsuke.stapler.Ancestor; /** * Partial default implementation of {@link Item}. @@ -487,8 +490,23 @@ public abstract class AbstractItem extends Actionable implements Item, HttpDelet @RequirePOST public void doDoDelete( StaplerRequest req, StaplerResponse rsp ) throws IOException, ServletException, InterruptedException { delete(); - if (rsp != null) // null for CLI - rsp.sendRedirect2(req.getContextPath()+"/"+getParent().getUrl()); + if (req == null || rsp == null) { // CLI + return; + } + List ancestors = req.getAncestors(); + ListIterator it = ancestors.listIterator(ancestors.size()); + String url = getParent().getUrl(); // fallback but we ought to get to Jenkins.instance at the root + while (it.hasPrevious()) { + Object a = it.previous().getObject(); + if (a instanceof View) { + url = ((View) a).getUrl(); + break; + } else if (a instanceof ViewGroup) { + url = ((ViewGroup) a).getUrl(); + break; + } + } + rsp.sendRedirect2(req.getContextPath() + '/' + url); } public void delete( StaplerRequest req, StaplerResponse rsp ) throws IOException, ServletException { diff --git a/core/src/main/java/hudson/model/AbstractProject.java b/core/src/main/java/hudson/model/AbstractProject.java index 798d242512..5505f614ce 100644 --- a/core/src/main/java/hudson/model/AbstractProject.java +++ b/core/src/main/java/hudson/model/AbstractProject.java @@ -96,7 +96,6 @@ import java.util.Comparator; import java.util.HashSet; import java.util.Iterator; import java.util.List; -import java.util.ListIterator; import java.util.Map; import java.util.Set; import java.util.SortedMap; @@ -128,7 +127,6 @@ 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.Ancestor; import org.kohsuke.stapler.AncestorInPath; import org.kohsuke.stapler.ForwardToView; import org.kohsuke.stapler.HttpRedirect; @@ -1876,31 +1874,6 @@ public abstract class AbstractProject

,R extends A rsp.forwardToPreviousPage(req); } - /** - * Deletes this project. - */ - @Override - @RequirePOST - public void doDoDelete(StaplerRequest req, StaplerResponse rsp) throws IOException, ServletException, InterruptedException { - delete(); - if (req == null || rsp == null) - return; - List ancestors = req.getAncestors(); - ListIterator it = ancestors.listIterator(ancestors.size()); - String url = getParent().getUrl(); // fallback but we ought to get to Jenkins.instance at the root - while (it.hasPrevious()) { - Object a = it.previous().getObject(); - if (a instanceof View) { - url = ((View) a).getUrl(); - break; - } else if (a instanceof ViewGroup) { - url = ((ViewGroup) a).getUrl(); - break; - } - } - rsp.sendRedirect2(req.getContextPath() + '/' + url); - } - @Override protected void submit(StaplerRequest req, StaplerResponse rsp) throws IOException, ServletException, FormException { super.submit(req,rsp); From fbf3542e74f1e89e3400824914adc0a237b03a73 Mon Sep 17 00:00:00 2001 From: Jesse Glick Date: Tue, 4 Mar 2014 17:50:59 -0800 Subject: [PATCH 07/78] Some Jelly fragments which make sense only for AbstractProject were for some reason defined in AbstractItem. --- .../{AbstractItem => AbstractProject}/configure-common.jelly | 0 .../{AbstractItem => AbstractProject}/configure-common.properties | 0 .../configure-common_bg.properties | 0 .../configure-common_ca.properties | 0 .../configure-common_da.properties | 0 .../configure-common_de.properties | 0 .../configure-common_es.properties | 0 .../configure-common_fr.properties | 0 .../configure-common_he.properties | 0 .../configure-common_hu.properties | 0 .../configure-common_it.properties | 0 .../configure-common_ja.properties | 0 .../configure-common_ko.properties | 0 .../configure-common_lt.properties | 0 .../configure-common_lv.properties | 0 .../configure-common_nb_NO.properties | 0 .../configure-common_nl.properties | 0 .../configure-common_pl.properties | 0 .../configure-common_pt_BR.properties | 0 .../configure-common_ro.properties | 0 .../configure-common_ru.properties | 0 .../configure-common_sk.properties | 0 .../configure-common_sv_SE.properties | 0 .../configure-common_tr.properties | 0 .../configure-common_uk.properties | 0 .../configure-common_zh_CN.properties | 0 .../configure-common_zh_TW.properties | 0 .../{AbstractItem => AbstractProject}/configure-scm.jellytag | 0 28 files changed, 0 insertions(+), 0 deletions(-) rename core/src/main/resources/hudson/model/{AbstractItem => AbstractProject}/configure-common.jelly (100%) rename core/src/main/resources/hudson/model/{AbstractItem => AbstractProject}/configure-common.properties (100%) rename core/src/main/resources/hudson/model/{AbstractItem => AbstractProject}/configure-common_bg.properties (100%) rename core/src/main/resources/hudson/model/{AbstractItem => AbstractProject}/configure-common_ca.properties (100%) rename core/src/main/resources/hudson/model/{AbstractItem => AbstractProject}/configure-common_da.properties (100%) rename core/src/main/resources/hudson/model/{AbstractItem => AbstractProject}/configure-common_de.properties (100%) rename core/src/main/resources/hudson/model/{AbstractItem => AbstractProject}/configure-common_es.properties (100%) rename core/src/main/resources/hudson/model/{AbstractItem => AbstractProject}/configure-common_fr.properties (100%) rename core/src/main/resources/hudson/model/{AbstractItem => AbstractProject}/configure-common_he.properties (100%) rename core/src/main/resources/hudson/model/{AbstractItem => AbstractProject}/configure-common_hu.properties (100%) rename core/src/main/resources/hudson/model/{AbstractItem => AbstractProject}/configure-common_it.properties (100%) rename core/src/main/resources/hudson/model/{AbstractItem => AbstractProject}/configure-common_ja.properties (100%) rename core/src/main/resources/hudson/model/{AbstractItem => AbstractProject}/configure-common_ko.properties (100%) rename core/src/main/resources/hudson/model/{AbstractItem => AbstractProject}/configure-common_lt.properties (100%) rename core/src/main/resources/hudson/model/{AbstractItem => AbstractProject}/configure-common_lv.properties (100%) rename core/src/main/resources/hudson/model/{AbstractItem => AbstractProject}/configure-common_nb_NO.properties (100%) rename core/src/main/resources/hudson/model/{AbstractItem => AbstractProject}/configure-common_nl.properties (100%) rename core/src/main/resources/hudson/model/{AbstractItem => AbstractProject}/configure-common_pl.properties (100%) rename core/src/main/resources/hudson/model/{AbstractItem => AbstractProject}/configure-common_pt_BR.properties (100%) rename core/src/main/resources/hudson/model/{AbstractItem => AbstractProject}/configure-common_ro.properties (100%) rename core/src/main/resources/hudson/model/{AbstractItem => AbstractProject}/configure-common_ru.properties (100%) rename core/src/main/resources/hudson/model/{AbstractItem => AbstractProject}/configure-common_sk.properties (100%) rename core/src/main/resources/hudson/model/{AbstractItem => AbstractProject}/configure-common_sv_SE.properties (100%) rename core/src/main/resources/hudson/model/{AbstractItem => AbstractProject}/configure-common_tr.properties (100%) rename core/src/main/resources/hudson/model/{AbstractItem => AbstractProject}/configure-common_uk.properties (100%) rename core/src/main/resources/hudson/model/{AbstractItem => AbstractProject}/configure-common_zh_CN.properties (100%) rename core/src/main/resources/hudson/model/{AbstractItem => AbstractProject}/configure-common_zh_TW.properties (100%) rename core/src/main/resources/hudson/model/{AbstractItem => AbstractProject}/configure-scm.jellytag (100%) diff --git a/core/src/main/resources/hudson/model/AbstractItem/configure-common.jelly b/core/src/main/resources/hudson/model/AbstractProject/configure-common.jelly similarity index 100% rename from core/src/main/resources/hudson/model/AbstractItem/configure-common.jelly rename to core/src/main/resources/hudson/model/AbstractProject/configure-common.jelly diff --git a/core/src/main/resources/hudson/model/AbstractItem/configure-common.properties b/core/src/main/resources/hudson/model/AbstractProject/configure-common.properties similarity index 100% rename from core/src/main/resources/hudson/model/AbstractItem/configure-common.properties rename to core/src/main/resources/hudson/model/AbstractProject/configure-common.properties diff --git a/core/src/main/resources/hudson/model/AbstractItem/configure-common_bg.properties b/core/src/main/resources/hudson/model/AbstractProject/configure-common_bg.properties similarity index 100% rename from core/src/main/resources/hudson/model/AbstractItem/configure-common_bg.properties rename to core/src/main/resources/hudson/model/AbstractProject/configure-common_bg.properties diff --git a/core/src/main/resources/hudson/model/AbstractItem/configure-common_ca.properties b/core/src/main/resources/hudson/model/AbstractProject/configure-common_ca.properties similarity index 100% rename from core/src/main/resources/hudson/model/AbstractItem/configure-common_ca.properties rename to core/src/main/resources/hudson/model/AbstractProject/configure-common_ca.properties diff --git a/core/src/main/resources/hudson/model/AbstractItem/configure-common_da.properties b/core/src/main/resources/hudson/model/AbstractProject/configure-common_da.properties similarity index 100% rename from core/src/main/resources/hudson/model/AbstractItem/configure-common_da.properties rename to core/src/main/resources/hudson/model/AbstractProject/configure-common_da.properties diff --git a/core/src/main/resources/hudson/model/AbstractItem/configure-common_de.properties b/core/src/main/resources/hudson/model/AbstractProject/configure-common_de.properties similarity index 100% rename from core/src/main/resources/hudson/model/AbstractItem/configure-common_de.properties rename to core/src/main/resources/hudson/model/AbstractProject/configure-common_de.properties diff --git a/core/src/main/resources/hudson/model/AbstractItem/configure-common_es.properties b/core/src/main/resources/hudson/model/AbstractProject/configure-common_es.properties similarity index 100% rename from core/src/main/resources/hudson/model/AbstractItem/configure-common_es.properties rename to core/src/main/resources/hudson/model/AbstractProject/configure-common_es.properties diff --git a/core/src/main/resources/hudson/model/AbstractItem/configure-common_fr.properties b/core/src/main/resources/hudson/model/AbstractProject/configure-common_fr.properties similarity index 100% rename from core/src/main/resources/hudson/model/AbstractItem/configure-common_fr.properties rename to core/src/main/resources/hudson/model/AbstractProject/configure-common_fr.properties diff --git a/core/src/main/resources/hudson/model/AbstractItem/configure-common_he.properties b/core/src/main/resources/hudson/model/AbstractProject/configure-common_he.properties similarity index 100% rename from core/src/main/resources/hudson/model/AbstractItem/configure-common_he.properties rename to core/src/main/resources/hudson/model/AbstractProject/configure-common_he.properties diff --git a/core/src/main/resources/hudson/model/AbstractItem/configure-common_hu.properties b/core/src/main/resources/hudson/model/AbstractProject/configure-common_hu.properties similarity index 100% rename from core/src/main/resources/hudson/model/AbstractItem/configure-common_hu.properties rename to core/src/main/resources/hudson/model/AbstractProject/configure-common_hu.properties diff --git a/core/src/main/resources/hudson/model/AbstractItem/configure-common_it.properties b/core/src/main/resources/hudson/model/AbstractProject/configure-common_it.properties similarity index 100% rename from core/src/main/resources/hudson/model/AbstractItem/configure-common_it.properties rename to core/src/main/resources/hudson/model/AbstractProject/configure-common_it.properties diff --git a/core/src/main/resources/hudson/model/AbstractItem/configure-common_ja.properties b/core/src/main/resources/hudson/model/AbstractProject/configure-common_ja.properties similarity index 100% rename from core/src/main/resources/hudson/model/AbstractItem/configure-common_ja.properties rename to core/src/main/resources/hudson/model/AbstractProject/configure-common_ja.properties diff --git a/core/src/main/resources/hudson/model/AbstractItem/configure-common_ko.properties b/core/src/main/resources/hudson/model/AbstractProject/configure-common_ko.properties similarity index 100% rename from core/src/main/resources/hudson/model/AbstractItem/configure-common_ko.properties rename to core/src/main/resources/hudson/model/AbstractProject/configure-common_ko.properties diff --git a/core/src/main/resources/hudson/model/AbstractItem/configure-common_lt.properties b/core/src/main/resources/hudson/model/AbstractProject/configure-common_lt.properties similarity index 100% rename from core/src/main/resources/hudson/model/AbstractItem/configure-common_lt.properties rename to core/src/main/resources/hudson/model/AbstractProject/configure-common_lt.properties diff --git a/core/src/main/resources/hudson/model/AbstractItem/configure-common_lv.properties b/core/src/main/resources/hudson/model/AbstractProject/configure-common_lv.properties similarity index 100% rename from core/src/main/resources/hudson/model/AbstractItem/configure-common_lv.properties rename to core/src/main/resources/hudson/model/AbstractProject/configure-common_lv.properties diff --git a/core/src/main/resources/hudson/model/AbstractItem/configure-common_nb_NO.properties b/core/src/main/resources/hudson/model/AbstractProject/configure-common_nb_NO.properties similarity index 100% rename from core/src/main/resources/hudson/model/AbstractItem/configure-common_nb_NO.properties rename to core/src/main/resources/hudson/model/AbstractProject/configure-common_nb_NO.properties diff --git a/core/src/main/resources/hudson/model/AbstractItem/configure-common_nl.properties b/core/src/main/resources/hudson/model/AbstractProject/configure-common_nl.properties similarity index 100% rename from core/src/main/resources/hudson/model/AbstractItem/configure-common_nl.properties rename to core/src/main/resources/hudson/model/AbstractProject/configure-common_nl.properties diff --git a/core/src/main/resources/hudson/model/AbstractItem/configure-common_pl.properties b/core/src/main/resources/hudson/model/AbstractProject/configure-common_pl.properties similarity index 100% rename from core/src/main/resources/hudson/model/AbstractItem/configure-common_pl.properties rename to core/src/main/resources/hudson/model/AbstractProject/configure-common_pl.properties diff --git a/core/src/main/resources/hudson/model/AbstractItem/configure-common_pt_BR.properties b/core/src/main/resources/hudson/model/AbstractProject/configure-common_pt_BR.properties similarity index 100% rename from core/src/main/resources/hudson/model/AbstractItem/configure-common_pt_BR.properties rename to core/src/main/resources/hudson/model/AbstractProject/configure-common_pt_BR.properties diff --git a/core/src/main/resources/hudson/model/AbstractItem/configure-common_ro.properties b/core/src/main/resources/hudson/model/AbstractProject/configure-common_ro.properties similarity index 100% rename from core/src/main/resources/hudson/model/AbstractItem/configure-common_ro.properties rename to core/src/main/resources/hudson/model/AbstractProject/configure-common_ro.properties diff --git a/core/src/main/resources/hudson/model/AbstractItem/configure-common_ru.properties b/core/src/main/resources/hudson/model/AbstractProject/configure-common_ru.properties similarity index 100% rename from core/src/main/resources/hudson/model/AbstractItem/configure-common_ru.properties rename to core/src/main/resources/hudson/model/AbstractProject/configure-common_ru.properties diff --git a/core/src/main/resources/hudson/model/AbstractItem/configure-common_sk.properties b/core/src/main/resources/hudson/model/AbstractProject/configure-common_sk.properties similarity index 100% rename from core/src/main/resources/hudson/model/AbstractItem/configure-common_sk.properties rename to core/src/main/resources/hudson/model/AbstractProject/configure-common_sk.properties diff --git a/core/src/main/resources/hudson/model/AbstractItem/configure-common_sv_SE.properties b/core/src/main/resources/hudson/model/AbstractProject/configure-common_sv_SE.properties similarity index 100% rename from core/src/main/resources/hudson/model/AbstractItem/configure-common_sv_SE.properties rename to core/src/main/resources/hudson/model/AbstractProject/configure-common_sv_SE.properties diff --git a/core/src/main/resources/hudson/model/AbstractItem/configure-common_tr.properties b/core/src/main/resources/hudson/model/AbstractProject/configure-common_tr.properties similarity index 100% rename from core/src/main/resources/hudson/model/AbstractItem/configure-common_tr.properties rename to core/src/main/resources/hudson/model/AbstractProject/configure-common_tr.properties diff --git a/core/src/main/resources/hudson/model/AbstractItem/configure-common_uk.properties b/core/src/main/resources/hudson/model/AbstractProject/configure-common_uk.properties similarity index 100% rename from core/src/main/resources/hudson/model/AbstractItem/configure-common_uk.properties rename to core/src/main/resources/hudson/model/AbstractProject/configure-common_uk.properties diff --git a/core/src/main/resources/hudson/model/AbstractItem/configure-common_zh_CN.properties b/core/src/main/resources/hudson/model/AbstractProject/configure-common_zh_CN.properties similarity index 100% rename from core/src/main/resources/hudson/model/AbstractItem/configure-common_zh_CN.properties rename to core/src/main/resources/hudson/model/AbstractProject/configure-common_zh_CN.properties diff --git a/core/src/main/resources/hudson/model/AbstractItem/configure-common_zh_TW.properties b/core/src/main/resources/hudson/model/AbstractProject/configure-common_zh_TW.properties similarity index 100% rename from core/src/main/resources/hudson/model/AbstractItem/configure-common_zh_TW.properties rename to core/src/main/resources/hudson/model/AbstractProject/configure-common_zh_TW.properties diff --git a/core/src/main/resources/hudson/model/AbstractItem/configure-scm.jellytag b/core/src/main/resources/hudson/model/AbstractProject/configure-scm.jellytag similarity index 100% rename from core/src/main/resources/hudson/model/AbstractItem/configure-scm.jellytag rename to core/src/main/resources/hudson/model/AbstractProject/configure-scm.jellytag From 6c4a104993dd9c7fe888835955e0bc11add4a9d0 Mon Sep 17 00:00:00 2001 From: Jesse Glick Date: Tue, 4 Mar 2014 18:14:21 -0800 Subject: [PATCH 08/78] onLoad should not *recreate* LazyBuildMixIn after a reload. --- core/src/main/java/hudson/model/AbstractProject.java | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/core/src/main/java/hudson/model/AbstractProject.java b/core/src/main/java/hudson/model/AbstractProject.java index 5505f614ce..e26f91dfe5 100644 --- a/core/src/main/java/hudson/model/AbstractProject.java +++ b/core/src/main/java/hudson/model/AbstractProject.java @@ -308,7 +308,9 @@ public abstract class AbstractProject

,R extends A @Override public void onLoad(ItemGroup parent, String name) throws IOException { super.onLoad(parent, name); - buildMixIn = createBuildMixIn(); + if (buildMixIn == null) { + buildMixIn = createBuildMixIn(); + } buildMixIn.onLoad(parent, name); builds = buildMixIn.getRunMap(); triggers().setOwner(this); From 66d61328ccd986204d37e550d10f3aa694839713 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Oliver=20Gond=C5=BEa?= Date: Tue, 4 Mar 2014 23:38:14 +0100 Subject: [PATCH 09/78] Expose PrivateKeyProvider --- cli/src/main/java/hudson/cli/CLI.java | 116 ++----------- .../java/hudson/cli/PrivateKeyProvider.java | 162 ++++++++++++++++++ 2 files changed, 175 insertions(+), 103 deletions(-) create mode 100644 cli/src/main/java/hudson/cli/PrivateKeyProvider.java diff --git a/cli/src/main/java/hudson/cli/CLI.java b/cli/src/main/java/hudson/cli/CLI.java index 2ee12793cd..f24549f8c5 100644 --- a/cli/src/main/java/hudson/cli/CLI.java +++ b/cli/src/main/java/hudson/cli/CLI.java @@ -23,7 +23,6 @@ */ package hudson.cli; -import com.trilead.ssh2.crypto.PEMDecoder; import hudson.cli.client.Messages; import hudson.remoting.Channel; import hudson.remoting.PingThread; @@ -49,7 +48,6 @@ import java.io.Closeable; import java.io.DataInputStream; import java.io.DataOutputStream; import java.io.File; -import java.io.FileInputStream; import java.io.IOException; import java.io.InputStream; import java.io.OutputStream; @@ -61,13 +59,10 @@ import java.net.Socket; import java.net.URL; import java.net.URLConnection; import java.security.GeneralSecurityException; -import java.security.KeyFactory; import java.security.KeyPair; import java.security.PublicKey; import java.security.SecureRandom; import java.security.Signature; -import java.security.spec.DSAPrivateKeySpec; -import java.security.spec.DSAPublicKeySpec; import java.util.ArrayList; import java.util.Arrays; import java.util.Collections; @@ -78,8 +73,6 @@ import java.util.concurrent.ExecutorService; import java.util.concurrent.Executors; import java.util.logging.Level; import java.util.logging.Logger; -import java.io.Console; - import static java.util.logging.Level.*; /** @@ -391,7 +384,7 @@ public class CLI { public static int _main(String[] _args) throws Exception { List args = Arrays.asList(_args); - List candidateKeys = new ArrayList(); + PrivateKeyProvider provider = new PrivateKeyProvider(); boolean sshAuthRequestedExplicitly = false; String httpProxy=null; @@ -431,17 +424,9 @@ public class CLI { printUsage(Messages.CLI_NoSuchFileExists(f)); return -1; } - KeyPair kp; - try { - kp = loadKey(f); - } catch (IOException e) { - //if the PEM file is encrypted, IOException is thrown - kp = tryEncryptedFile(f); - } catch (GeneralSecurityException e) { - throw new Exception("Failed to load key: "+f,e); - } - if(kp != null) - candidateKeys.add(kp); + + provider.readFrom(f); + args = args.subList(2,args.size()); sshAuthRequestedExplicitly = true; continue; @@ -462,8 +447,8 @@ public class CLI { if(args.isEmpty()) args = Arrays.asList("help"); // default to help - if (candidateKeys.isEmpty()) - addDefaultPrivateKeyLocations(candidateKeys); + if (!provider.hasKeys()) + provider.readFromDefaultLocations(); CLIConnectionFactory factory = new CLIConnectionFactory().url(url).httpsProxyTunnel(httpProxy); String userInfo = new URL(url).getUserInfo(); @@ -473,10 +458,10 @@ public class CLI { CLI cli = factory.connect(); try { - if (!candidateKeys.isEmpty()) { + if (provider.hasKeys()) { try { // TODO: server verification - cli.authenticate(candidateKeys); + cli.authenticate(provider.getKeys()); } catch (IllegalStateException e) { if (sshAuthRequestedExplicitly) { System.err.println("The server doesn't support public key authentication"); @@ -528,97 +513,22 @@ public class CLI { * Loads RSA/DSA private key in a PEM format into {@link KeyPair}. */ public static KeyPair loadKey(File f, String passwd) throws IOException, GeneralSecurityException { - return loadKey(readPemFile(f), passwd); + return PrivateKeyProvider.loadKey(f, passwd); } public static KeyPair loadKey(File f) throws IOException, GeneralSecurityException { - return loadKey(f, null); + return loadKey(f, null); } - - private static String readPemFile(File f) throws IOException{ - FileInputStream is = new FileInputStream(f); - try { - DataInputStream dis = new DataInputStream(is); - byte[] bytes = new byte[(int) f.length()]; - dis.readFully(bytes); - dis.close(); - return new String(bytes); - } finally { - is.close(); - } - } - + /** * Loads RSA/DSA private key in a PEM format into {@link KeyPair}. */ public static KeyPair loadKey(String pemString, String passwd) throws IOException, GeneralSecurityException { - Object key = PEMDecoder.decode(pemString.toCharArray(), passwd); - if (key instanceof com.trilead.ssh2.signature.RSAPrivateKey) { - com.trilead.ssh2.signature.RSAPrivateKey x = (com.trilead.ssh2.signature.RSAPrivateKey)key; -// System.out.println("ssh-rsa " + new String(Base64.encode(RSASHA1Verify.encodeSSHRSAPublicKey(x.getPublicKey())))); - - return x.toJCEKeyPair(); - } - if (key instanceof com.trilead.ssh2.signature.DSAPrivateKey) { - com.trilead.ssh2.signature.DSAPrivateKey x = (com.trilead.ssh2.signature.DSAPrivateKey)key; - KeyFactory kf = KeyFactory.getInstance("DSA"); -// System.out.println("ssh-dsa " + new String(Base64.encode(DSASHA1Verify.encodeSSHDSAPublicKey(x.getPublicKey())))); - - return new KeyPair( - kf.generatePublic(new DSAPublicKeySpec(x.getY(), x.getP(), x.getQ(), x.getG())), - kf.generatePrivate(new DSAPrivateKeySpec(x.getX(), x.getP(), x.getQ(), x.getG()))); - } - - throw new UnsupportedOperationException("Unrecognizable key format: "+key); + return PrivateKeyProvider.loadKey(pemString, passwd); } public static KeyPair loadKey(String pemString) throws IOException, GeneralSecurityException { - return loadKey(pemString, null); - } - - private static KeyPair tryEncryptedFile(File f) throws IOException, GeneralSecurityException{ - KeyPair kp = null; - if(isPemEncrypted(f)){ - String passwd = askForPasswd(f.getCanonicalPath()); - kp = loadKey(f,passwd); - } - return kp; - } - - private static boolean isPemEncrypted(File f) throws IOException{ - String pemString = readPemFile(f); - //simple check if the file is encrypted - return pemString.contains("4,ENCRYPTED"); - } - - private static String askForPasswd(String filePath){ - Console cons = System.console(); - String passwd = null; - if (cons != null){ - char[] p = cons.readPassword("%s", "Enter passphrase for "+filePath+":"); - passwd = String.valueOf(p); - } - return passwd; - } - - /** - * try all the default key locations - */ - private static void addDefaultPrivateKeyLocations(List keyFileCandidates) { - File home = new File(System.getProperty("user.home")); - for (String path : new String[]{".ssh/id_rsa",".ssh/id_dsa",".ssh/identity"}) { - File key = new File(home,path); - if (key.exists()) { - try { - keyFileCandidates.add(loadKey(key)); - } catch (IOException e) { - // don't report an error. the user can still see it by using the -i option - LOGGER.log(FINE, "Failed to load "+key,e); - } catch (GeneralSecurityException e) { - LOGGER.log(FINE, "Failed to load " + key, e); - } - } - } + return loadKey(pemString, null); } /** diff --git a/cli/src/main/java/hudson/cli/PrivateKeyProvider.java b/cli/src/main/java/hudson/cli/PrivateKeyProvider.java new file mode 100644 index 0000000000..cb3da68611 --- /dev/null +++ b/cli/src/main/java/hudson/cli/PrivateKeyProvider.java @@ -0,0 +1,162 @@ +/* + * The MIT License + * + * Copyright (c) 2014 Red Hat, 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. + */ +package hudson.cli; + +import static java.util.logging.Level.FINE; + +import java.io.Console; +import java.io.DataInputStream; +import java.io.File; +import java.io.FileInputStream; +import java.io.IOException; +import java.security.GeneralSecurityException; +import java.security.KeyFactory; +import java.security.KeyPair; +import java.security.spec.DSAPrivateKeySpec; +import java.security.spec.DSAPublicKeySpec; +import java.util.ArrayList; +import java.util.Collections; +import java.util.List; +import java.util.logging.Logger; + +import com.trilead.ssh2.crypto.PEMDecoder; + +/** + * Read DSA or RSA key from file(s) asking for password interactively. + * + * @author ogondza + * @since 1.555 + */ +public class PrivateKeyProvider { + + private List privateKeys = new ArrayList(); + + /** + * Get keys read so far. + * + * @return Possibly empty list. Never null. + */ + public List getKeys() { + return Collections.unmodifiableList(privateKeys); + } + + public boolean hasKeys() { + return !privateKeys.isEmpty(); + } + + /** + * Read keys from default keyFiles + * + * .ssh/id_rsa, .ssh/id_dsa and .ssh/identity. + * + * @return true if some key was read successfully. + */ + public boolean readFromDefaultLocations() { + final File home = new File(System.getProperty("user.home")); + + boolean read = false; + for (String path : new String[] {".ssh/id_rsa", ".ssh/id_dsa", ".ssh/identity"}) { + final File key = new File(home, path); + if (!key.exists()) continue; + + try { + + readFrom(key); + read = true; + } catch (IOException e) { + + LOGGER.log(FINE, "Failed to load " + key, e); + } catch (GeneralSecurityException e) { + + LOGGER.log(FINE, "Failed to load " + key, e); + } + } + + return read; + } + + /** + * Read key from keyFile. + */ + public void readFrom(File keyFile) throws IOException, GeneralSecurityException { + final String password = isPemEncrypted(keyFile) + ? askForPasswd(keyFile.getCanonicalPath()) + : null + ; + privateKeys.add(loadKey(keyFile, password)); + } + + private static boolean isPemEncrypted(File f) throws IOException{ + //simple check if the file is encrypted + return readPemFile(f).contains("4,ENCRYPTED"); + } + + private static String askForPasswd(String filePath){ + Console cons = System.console(); + String passwd = null; + if (cons != null){ + char[] p = cons.readPassword("%s", "Enter passphrase for " + filePath + ":"); + passwd = String.valueOf(p); + } + return passwd; + } + + public static KeyPair loadKey(File f, String passwd) throws IOException, GeneralSecurityException { + return loadKey(readPemFile(f), passwd); + } + + private static String readPemFile(File f) throws IOException{ + FileInputStream is = new FileInputStream(f); + try { + DataInputStream dis = new DataInputStream(is); + byte[] bytes = new byte[(int) f.length()]; + dis.readFully(bytes); + dis.close(); + return new String(bytes); + } finally { + is.close(); + } + } + + public static KeyPair loadKey(String pemString, String passwd) throws IOException, GeneralSecurityException { + Object key = PEMDecoder.decode(pemString.toCharArray(), passwd); + if (key instanceof com.trilead.ssh2.signature.RSAPrivateKey) { + com.trilead.ssh2.signature.RSAPrivateKey x = (com.trilead.ssh2.signature.RSAPrivateKey)key; + + return x.toJCEKeyPair(); + } + if (key instanceof com.trilead.ssh2.signature.DSAPrivateKey) { + com.trilead.ssh2.signature.DSAPrivateKey x = (com.trilead.ssh2.signature.DSAPrivateKey)key; + KeyFactory kf = KeyFactory.getInstance("DSA"); + + return new KeyPair( + kf.generatePublic(new DSAPublicKeySpec(x.getY(), x.getP(), x.getQ(), x.getG())), + kf.generatePrivate(new DSAPrivateKeySpec(x.getX(), x.getP(), x.getQ(), x.getG()))); + } + + throw new UnsupportedOperationException("Unrecognizable key format: " + key); + } + + private static final Logger LOGGER = Logger.getLogger(PrivateKeyProvider.class.getName()); +} From e1ecb6beb17a8f20a5e0432d70796fbabee2a510 Mon Sep 17 00:00:00 2001 From: Adam Wolf Date: Wed, 5 Mar 2014 15:27:34 -0600 Subject: [PATCH 10/78] JENKINS-21773: Removed one level of ../ in the Up link to fix matrix job Up links. --- .../main/resources/hudson/model/AbstractProject/sidepanel.jelly | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/core/src/main/resources/hudson/model/AbstractProject/sidepanel.jelly b/core/src/main/resources/hudson/model/AbstractProject/sidepanel.jelly index 12c2879743..8877be1aec 100644 --- a/core/src/main/resources/hudson/model/AbstractProject/sidepanel.jelly +++ b/core/src/main/resources/hudson/model/AbstractProject/sidepanel.jelly @@ -42,7 +42,7 @@ THE SOFTWARE. - + From 432d07bfdb97c5707a3a3a4a19f72cbc3b8e24c8 Mon Sep 17 00:00:00 2001 From: Adam Wolf Date: Wed, 5 Mar 2014 16:55:32 -0600 Subject: [PATCH 11/78] JENKINS-21773: Fixed sidepanel Up link for multiaxis jobs. --- .../main/resources/hudson/model/AbstractProject/sidepanel.jelly | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/core/src/main/resources/hudson/model/AbstractProject/sidepanel.jelly b/core/src/main/resources/hudson/model/AbstractProject/sidepanel.jelly index 8877be1aec..b2f17e35a7 100644 --- a/core/src/main/resources/hudson/model/AbstractProject/sidepanel.jelly +++ b/core/src/main/resources/hudson/model/AbstractProject/sidepanel.jelly @@ -42,7 +42,7 @@ THE SOFTWARE. - + From f024f59058fd8475b78fbb09b23a121e695a1ae1 Mon Sep 17 00:00:00 2001 From: Jesse Glick Date: Wed, 5 Mar 2014 16:24:02 -0800 Subject: [PATCH 12/78] Making RunMap work properly for non-AbstractProject-based jobs using lazy loading. JENKINS-22052 is not fixed by this for existing Job types like ExternalJob which still do not use lazy loading. --- .../main/java/hudson/model/AbstractBuild.java | 95 --------------- core/src/main/java/hudson/model/Run.java | 113 +++++++++++++++++- core/src/main/java/hudson/model/RunMap.java | 13 +- 3 files changed, 112 insertions(+), 109 deletions(-) diff --git a/core/src/main/java/hudson/model/AbstractBuild.java b/core/src/main/java/hudson/model/AbstractBuild.java index d1e9902c43..53f81056e5 100644 --- a/core/src/main/java/hudson/model/AbstractBuild.java +++ b/core/src/main/java/hudson/model/AbstractBuild.java @@ -58,8 +58,6 @@ import hudson.tasks.test.AbstractTestResultAction; import hudson.tasks.test.AggregatedTestResultAction; import hudson.util.*; import jenkins.model.Jenkins; -import jenkins.model.lazy.AbstractLazyLoadRunMap.Direction; -import jenkins.model.lazy.BuildReference; import org.kohsuke.stapler.HttpResponse; import org.kohsuke.stapler.Stapler; import org.kohsuke.stapler.StaplerRequest; @@ -156,23 +154,6 @@ public abstract class AbstractBuild

,R extends Abs */ protected transient List buildEnvironments; - /** - * Pointers to form bi-directional link between adjacent {@link AbstractBuild}s. - * - *

- * Unlike {@link Run}, {@link AbstractBuild}s do lazy-loading, so we don't use - * {@link Run#previousBuild} and {@link Run#nextBuild}, and instead use these - * fields and point to {@link #selfReference} (or {@link #none}) of adjacent builds. - */ - private volatile transient BuildReference previousBuild, nextBuild; - - @SuppressWarnings({"unchecked", "rawtypes"}) private static final BuildReference NONE = new BuildReference("NONE", null); - @SuppressWarnings("unchecked") private BuildReference none() {return NONE;} - - /*package*/ final transient BuildReference selfReference = new BuildReference(getId(),_this()); - - - protected AbstractBuild(P job) throws IOException { super(job); } @@ -189,82 +170,6 @@ public abstract class AbstractBuild

,R extends Abs return getParent(); } - @Override - void dropLinks() { - super.dropLinks(); - - if(nextBuild!=null) { - AbstractBuild nb = nextBuild.get(); - if (nb!=null) { - nb.previousBuild = previousBuild; - } - } - if(previousBuild!=null) { - AbstractBuild pb = previousBuild.get(); - if (pb!=null) pb.nextBuild = nextBuild; - } - } - - @Override - public R getPreviousBuild() { - while (true) { - BuildReference r = previousBuild; // capture the value once - - if (r==null) { - // having two neighbors pointing to each other is important to make RunMap.removeValue work - P _parent = getParent(); - if (_parent == null) { - throw new IllegalStateException("no parent for " + number + " in " + workspace); - } - R pb = _parent._getRuns().search(number-1, Direction.DESC); - if (pb!=null) { - ((AbstractBuild)pb).nextBuild = selfReference; // establish bi-di link - this.previousBuild = pb.selfReference; - return pb; - } else { - this.previousBuild = none(); - return null; - } - } - if (r==none()) - return null; - - R referent = r.get(); - if (referent!=null) return referent; - - // the reference points to a GC-ed object, drop the reference and do it again - this.previousBuild = null; - } - } - - @Override - public R getNextBuild() { - while (true) { - BuildReference r = nextBuild; // capture the value once - - if (r==null) { - // having two neighbors pointing to each other is important to make RunMap.removeValue work - R nb = getParent()._getRuns().search(number+1, Direction.ASC); - if (nb!=null) { - ((AbstractBuild)nb).previousBuild = selfReference; // establish bi-di link - this.nextBuild = nb.selfReference; - return nb; - } else { - this.nextBuild = none(); - return null; - } - } - if (r==none()) - return null; - - R referent = r.get(); - if (referent!=null) return referent; - - // the reference points to a GC-ed object, drop the reference and do it again - this.nextBuild = null; - } - } - /** * Returns a {@link Slave} on which this build was done. * diff --git a/core/src/main/java/hudson/model/Run.java b/core/src/main/java/hudson/model/Run.java index b8540ebfea..874b7a996f 100644 --- a/core/src/main/java/hudson/model/Run.java +++ b/core/src/main/java/hudson/model/Run.java @@ -124,6 +124,9 @@ import jenkins.model.ArtifactManagerFactory; import jenkins.model.PeepholePermalink; import jenkins.model.StandardArtifactManager; import jenkins.model.RunAction2; +import jenkins.model.lazy.AbstractLazyLoadRunMap; +import jenkins.model.lazy.BuildReference; +import jenkins.model.lazy.LazyBuildMixIn; import jenkins.util.VirtualFile; /** @@ -154,7 +157,7 @@ public abstract class Run ,RunT extends Run,RunT extends Run + * Some {@link Run}s do lazy-loading, so we don't use + * {@link #previousBuild} and {@link #nextBuild}, and instead use these + * fields and point to {@link #selfReference} (or {@link #none}) of adjacent builds. + */ + private volatile transient BuildReference previousBuildR, nextBuildR; + + @SuppressWarnings({"unchecked", "rawtypes"}) private static final BuildReference NONE = new BuildReference("NONE", null); + @SuppressWarnings("unchecked") private BuildReference none() {return NONE;} + + /*package*/ final transient BuildReference selfReference = new BuildReference(getId(), _this()); + /** * Pointer to the next younger build in progress. This data structure is lazily updated, * so it may point to the build that's already completed. This pointer is set to 'this' @@ -772,19 +790,72 @@ public abstract class Run ,RunT extends Run r = previousBuildR; // capture the value once + + if (r == null) { + // having two neighbors pointing to each other is important to make RunMap.removeValue work + JobT _parent = getParent(); + if (_parent == null) { + throw new IllegalStateException("no parent for " + number); + } + Run pb = ((LazyBuildMixIn.LazyLoadingJob) _parent).getLazyBuildMixIn()._getRuns().search(number - 1, AbstractLazyLoadRunMap.Direction.DESC); + if (pb != null) { + pb.nextBuildR = selfReference; // establish bi-di link + this.previousBuildR = pb.selfReference; + return (RunT) pb; + } else { + this.previousBuildR = none(); + return null; + } + } + if (r == none()) { + return null; + } + + RunT referent = r.get(); + if (referent != null) { + return referent; + } + + // the reference points to a GC-ed object, drop the reference and do it again + this.previousBuildR = null; + } } /** @@ -905,8 +976,38 @@ public abstract class Run ,RunT extends Run r = nextBuildR; // capture the value once + + if (r == null) { + // having two neighbors pointing to each other is important to make RunMap.removeValue work + Run nb = ((LazyBuildMixIn.LazyLoadingJob) getParent()).getLazyBuildMixIn()._getRuns().search(number + 1, AbstractLazyLoadRunMap.Direction.ASC); + if (nb != null) { + nb.previousBuildR = selfReference; // establish bi-di link + this.nextBuildR = nb.selfReference; + return (RunT) nb; + } else { + this.nextBuildR = none(); + return null; + } + } + if (r == none()) { + return null; + } + + RunT referent = r.get(); + if (referent != null) { + return referent; + } + + // the reference points to a GC-ed object, drop the reference and do it again + this.nextBuildR = null; + } } /** diff --git a/core/src/main/java/hudson/model/RunMap.java b/core/src/main/java/hudson/model/RunMap.java index a7aa192124..9d4d272fb5 100644 --- a/core/src/main/java/hudson/model/RunMap.java +++ b/core/src/main/java/hudson/model/RunMap.java @@ -23,10 +23,6 @@ */ package hudson.model; -import jenkins.model.lazy.AbstractLazyLoadRunMap; -import jenkins.model.lazy.BuildReference; -import org.apache.commons.collections.comparators.ReverseComparator; - import java.io.File; import java.io.FilenameFilter; import java.io.IOException; @@ -39,10 +35,13 @@ import java.util.Map; import java.util.NoSuchElementException; import java.util.SortedMap; import java.util.logging.Level; -import java.util.logging.Logger; import static java.util.logging.Level.*; +import java.util.logging.Logger; +import jenkins.model.lazy.AbstractLazyLoadRunMap; import static jenkins.model.lazy.AbstractLazyLoadRunMap.Direction.*; +import jenkins.model.lazy.BuildReference; +import org.apache.commons.collections.comparators.ReverseComparator; /** * {@link Map} from build number to {@link Run}. @@ -54,8 +53,6 @@ import static jenkins.model.lazy.AbstractLazyLoadRunMap.Direction.*; * * @author Kohsuke Kawaguchi */ -// in practice R is always bound by AbstractBuild, but making that change causes all kinds of -// signature breakage. public final class RunMap> extends AbstractLazyLoadRunMap implements Iterable { /** * Read-only view of this map. @@ -185,7 +182,7 @@ public final class RunMap> extends AbstractLazyLoadRunMap */ @Override protected BuildReference createReference(R r) { - if (r instanceof AbstractBuild) return ((AbstractBuild)r).selfReference; + if (r.isLazy()) return r.selfReference; else return super.createReference(r); } From d3c02465f070c1b8b3d8cbacf93201a16c1e6ff6 Mon Sep 17 00:00:00 2001 From: Jesse Glick Date: Wed, 5 Mar 2014 19:33:56 -0800 Subject: [PATCH 13/78] For binary compatibility must continue to override getPrevious/NextBuild in AbstractBuild. --- core/src/main/java/hudson/model/AbstractBuild.java | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/core/src/main/java/hudson/model/AbstractBuild.java b/core/src/main/java/hudson/model/AbstractBuild.java index 53f81056e5..5ab752b727 100644 --- a/core/src/main/java/hudson/model/AbstractBuild.java +++ b/core/src/main/java/hudson/model/AbstractBuild.java @@ -170,6 +170,17 @@ public abstract class AbstractBuild

,R extends Abs return getParent(); } + // Just here so that we do not get e.g. NoSuchMethodError: hudson.maven.MavenModuleSetBuild.getNextBuild()Lhudson/model/AbstractBuild; from getModuleLastBuilds + @Override + public R getPreviousBuild() { + return super.getPreviousBuild(); + } + + @Override + public R getNextBuild() { + return super.getNextBuild(); + } + /** * Returns a {@link Slave} on which this build was done. * From dee334fb0ab24b34a06e39ea3c6c72f971917cf8 Mon Sep 17 00:00:00 2001 From: Jesse Glick Date: Wed, 5 Mar 2014 20:04:49 -0800 Subject: [PATCH 14/78] Cannot initialize selfReference until getId() is correct. --- core/src/main/java/hudson/model/Run.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/core/src/main/java/hudson/model/Run.java b/core/src/main/java/hudson/model/Run.java index 874b7a996f..b39a019ef7 100644 --- a/core/src/main/java/hudson/model/Run.java +++ b/core/src/main/java/hudson/model/Run.java @@ -185,7 +185,7 @@ public abstract class Run ,RunT extends Run none() {return NONE;} - /*package*/ final transient BuildReference selfReference = new BuildReference(getId(), _this()); + /*package*/ final transient BuildReference selfReference; /** * Pointer to the next younger build in progress. This data structure is lazily updated, @@ -320,6 +320,7 @@ public abstract class Run ,RunT extends Run(getId(), _this()); } /** From f9b0f348d0ff674fe058eb1aa4d609c6e3e962e5 Mon Sep 17 00:00:00 2001 From: Stephen Connolly Date: Fri, 7 Mar 2014 15:26:06 +0000 Subject: [PATCH 15/78] [FIXED JENKINS-22080] NPE if trying to install a plugin from the update center and either the update source or the plugin contains a '.' in its name --- core/src/main/java/hudson/PluginManager.java | 27 +++++++++++++++----- 1 file changed, 21 insertions(+), 6 deletions(-) diff --git a/core/src/main/java/hudson/PluginManager.java b/core/src/main/java/hudson/PluginManager.java index ace1d44d41..ccf17cf176 100644 --- a/core/src/main/java/hudson/PluginManager.java +++ b/core/src/main/java/hudson/PluginManager.java @@ -684,13 +684,28 @@ public abstract class PluginManager extends AbstractModelObject implements OnMas String n = en.nextElement(); if(n.startsWith("plugin.")) { n = n.substring(7); - if (n.indexOf(".") > 0) { - String[] pluginInfo = n.split("\\."); - UpdateSite.Plugin p = Jenkins.getInstance().getUpdateCenter().getById(pluginInfo[1]).getPlugin(pluginInfo[0]); - if(p==null) - throw new Failure("No such plugin: "+n); - p.deploy(dynamicLoad); + // JENKINS-22080 plugin names can contain '.' as could (according to rumour) update sites + int index = n.indexOf('.'); + UpdateSite.Plugin p = null; + while (index != -1) { + if (index + 1 >= n.length()) { + break; + } + String pluginName = n.substring(0, index); + String siteName = n.substring(index + 1); + UpdateSite updateSite = Jenkins.getInstance().getUpdateCenter().getById(siteName); + if (siteName != null) { + if (p != null) { + throw new Failure("Ambiguous plugin: " + n); + } + p = updateSite.getPlugin(pluginName); + } + index = n.indexOf('.', index + 1); } + if (p == null) { + throw new Failure("No such plugin: " + n); + } + p.deploy(dynamicLoad); } } rsp.sendRedirect("../updateCenter/"); From 483181c0a1a0fdb1cb435164d8a8bbfd76084016 Mon Sep 17 00:00:00 2001 From: Stephen Connolly Date: Fri, 7 Mar 2014 15:29:21 +0000 Subject: [PATCH 16/78] [FIXED JENKINS-22080] Braindead logic in author of original fix... corrected by same author --- core/src/main/java/hudson/PluginManager.java | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/core/src/main/java/hudson/PluginManager.java b/core/src/main/java/hudson/PluginManager.java index ccf17cf176..2e4ab887c5 100644 --- a/core/src/main/java/hudson/PluginManager.java +++ b/core/src/main/java/hudson/PluginManager.java @@ -695,10 +695,13 @@ public abstract class PluginManager extends AbstractModelObject implements OnMas String siteName = n.substring(index + 1); UpdateSite updateSite = Jenkins.getInstance().getUpdateCenter().getById(siteName); if (siteName != null) { - if (p != null) { - throw new Failure("Ambiguous plugin: " + n); + UpdateSite.Plugin plugin = updateSite.getPlugin(pluginName); + if (plugin != null) { + if (p != null) { + throw new Failure("Ambiguous plugin: " + n); + } + p = plugin; } - p = updateSite.getPlugin(pluginName); } index = n.indexOf('.', index + 1); } From bb2100c84fff74bd1b90919d93be3ca643650d26 Mon Sep 17 00:00:00 2001 From: Jesse Glick Date: Fri, 7 Mar 2014 10:09:47 -0800 Subject: [PATCH 17/78] The concurrentBuild field is defined in AbstractProject (at least for now) so that is where its help should live. --- .../{AbstractItem => AbstractProject}/help-concurrentBuild.html | 0 .../help-concurrentBuild_de.html | 0 .../help-concurrentBuild_ja.html | 0 .../help-concurrentBuild_zh_TW.html | 0 4 files changed, 0 insertions(+), 0 deletions(-) rename core/src/main/resources/hudson/model/{AbstractItem => AbstractProject}/help-concurrentBuild.html (100%) rename core/src/main/resources/hudson/model/{AbstractItem => AbstractProject}/help-concurrentBuild_de.html (100%) rename core/src/main/resources/hudson/model/{AbstractItem => AbstractProject}/help-concurrentBuild_ja.html (100%) rename core/src/main/resources/hudson/model/{AbstractItem => AbstractProject}/help-concurrentBuild_zh_TW.html (100%) diff --git a/core/src/main/resources/hudson/model/AbstractItem/help-concurrentBuild.html b/core/src/main/resources/hudson/model/AbstractProject/help-concurrentBuild.html similarity index 100% rename from core/src/main/resources/hudson/model/AbstractItem/help-concurrentBuild.html rename to core/src/main/resources/hudson/model/AbstractProject/help-concurrentBuild.html diff --git a/core/src/main/resources/hudson/model/AbstractItem/help-concurrentBuild_de.html b/core/src/main/resources/hudson/model/AbstractProject/help-concurrentBuild_de.html similarity index 100% rename from core/src/main/resources/hudson/model/AbstractItem/help-concurrentBuild_de.html rename to core/src/main/resources/hudson/model/AbstractProject/help-concurrentBuild_de.html diff --git a/core/src/main/resources/hudson/model/AbstractItem/help-concurrentBuild_ja.html b/core/src/main/resources/hudson/model/AbstractProject/help-concurrentBuild_ja.html similarity index 100% rename from core/src/main/resources/hudson/model/AbstractItem/help-concurrentBuild_ja.html rename to core/src/main/resources/hudson/model/AbstractProject/help-concurrentBuild_ja.html diff --git a/core/src/main/resources/hudson/model/AbstractItem/help-concurrentBuild_zh_TW.html b/core/src/main/resources/hudson/model/AbstractProject/help-concurrentBuild_zh_TW.html similarity index 100% rename from core/src/main/resources/hudson/model/AbstractItem/help-concurrentBuild_zh_TW.html rename to core/src/main/resources/hudson/model/AbstractProject/help-concurrentBuild_zh_TW.html From 9f19ae91f7611344268390470f22515fdadc5c71 Mon Sep 17 00:00:00 2001 From: Jesse Glick Date: Fri, 7 Mar 2014 11:44:28 -0800 Subject: [PATCH 18/78] =?UTF-8?q?Introduced=20ParameterizedJobMixIn=20so?= =?UTF-8?q?=20that=20non-AbstractProject=E2=80=99s=20can=20use=20Parameter?= =?UTF-8?q?sDefinitionProperty.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../java/hudson/model/AbstractProject.java | 129 ++------- .../hudson/model/BooleanParameterValue.java | 2 +- .../hudson/model/BuildAuthorizationToken.java | 4 +- .../java/hudson/model/FileParameterValue.java | 2 +- .../java/hudson/model/JobParameterValue.java | 2 +- .../java/hudson/model/ParameterValue.java | 36 ++- .../java/hudson/model/ParametersAction.java | 4 +- .../model/ParametersDefinitionProperty.java | 51 ++-- .../hudson/model/PasswordParameterValue.java | 2 +- .../java/hudson/model/RunParameterValue.java | 2 +- .../hudson/model/StringParameterValue.java | 2 +- .../jenkins/model/ParameterizedJobMixIn.java | 265 ++++++++++++++++++ .../model/AbstractProject/sidepanel.jelly | 25 +- .../AbstractProject/sidepanel.properties | 2 - .../AbstractProject/sidepanel_ar.properties | 13 +- .../AbstractProject/sidepanel_bg.properties | 14 +- .../AbstractProject/sidepanel_ca.properties | 6 +- .../AbstractProject/sidepanel_cs.properties | 14 +- .../AbstractProject/sidepanel_da.properties | 5 - .../AbstractProject/sidepanel_de.properties | 7 +- .../AbstractProject/sidepanel_el.properties | 13 +- .../AbstractProject/sidepanel_es.properties | 5 - .../sidepanel_es_AR.properties | 3 - .../AbstractProject/sidepanel_et.properties | 10 +- .../AbstractProject/sidepanel_eu.properties | 2 - .../AbstractProject/sidepanel_fi.properties | 10 +- .../AbstractProject/sidepanel_fr.properties | 9 +- .../AbstractProject/sidepanel_gl.properties | 2 - .../AbstractProject/sidepanel_he.properties | 16 +- .../sidepanel_hi_IN.properties | 8 +- .../AbstractProject/sidepanel_hu.properties | 12 +- .../AbstractProject/sidepanel_id.properties | 1 - .../AbstractProject/sidepanel_is.properties | 11 +- .../AbstractProject/sidepanel_it.properties | 4 - .../AbstractProject/sidepanel_ja.properties | 5 - .../AbstractProject/sidepanel_kn.properties | 13 +- .../AbstractProject/sidepanel_ko.properties | 16 +- .../AbstractProject/sidepanel_lt.properties | 12 +- .../AbstractProject/sidepanel_lv.properties | 10 +- .../sidepanel_nb_NO.properties | 11 +- .../AbstractProject/sidepanel_nl.properties | 4 - .../AbstractProject/sidepanel_pl.properties | 11 +- .../sidepanel_pt_BR.properties | 5 - .../sidepanel_pt_PT.properties | 10 +- .../AbstractProject/sidepanel_ro.properties | 10 +- .../AbstractProject/sidepanel_ru.properties | 5 - .../AbstractProject/sidepanel_si.properties | 8 +- .../AbstractProject/sidepanel_sk.properties | 14 +- .../AbstractProject/sidepanel_sl.properties | 6 +- .../AbstractProject/sidepanel_sr.properties | 6 +- .../sidepanel_sv_SE.properties | 6 +- .../AbstractProject/sidepanel_te.properties | 12 +- .../AbstractProject/sidepanel_th.properties | 13 +- .../AbstractProject/sidepanel_tr.properties | 10 +- .../AbstractProject/sidepanel_uk.properties | 14 +- .../sidepanel_zh_CN.properties | 15 +- .../sidepanel_zh_TW.properties | 10 +- .../requirePOST.jelly | 0 .../requirePOST.properties | 0 .../requirePOST_de.properties | 0 .../requirePOST_ja.properties | 0 .../requirePOST_pt_BR.properties | 0 .../requirePOST_zh_TW.properties | 0 .../hudson/model/ParametersAction/index.jelly | 2 +- .../ParametersDefinitionProperty/index.jelly | 4 +- .../lib/hudson/project/configurable.jelly | 49 ++++ .../hudson/project/configurable.properties | 24 ++ .../hudson/project/configurable_ar.properties | 25 ++ .../hudson/project/configurable_bg.properties | 26 ++ .../hudson/project/configurable_ca.properties | 26 ++ .../hudson/project/configurable_cs.properties | 26 ++ .../hudson/project/configurable_da.properties | 27 ++ .../hudson/project/configurable_de.properties | 27 ++ .../hudson/project/configurable_el.properties | 25 ++ .../hudson/project/configurable_es.properties | 27 ++ .../project/configurable_es_AR.properties | 25 ++ .../hudson/project/configurable_et.properties | 26 ++ .../hudson/project/configurable_eu.properties | 24 ++ .../hudson/project/configurable_fi.properties | 26 ++ .../hudson/project/configurable_fr.properties | 27 ++ .../hudson/project/configurable_gl.properties | 24 ++ .../hudson/project/configurable_he.properties | 26 ++ .../project/configurable_hi_IN.properties | 24 ++ .../hudson/project/configurable_hu.properties | 26 ++ .../hudson/project/configurable_id.properties | 23 ++ .../hudson/project/configurable_is.properties | 25 ++ .../hudson/project/configurable_it.properties | 26 ++ .../hudson/project/configurable_ja.properties | 27 ++ .../hudson/project/configurable_kn.properties | 25 ++ .../hudson/project/configurable_ko.properties | 26 ++ .../hudson/project/configurable_lt.properties | 26 ++ .../hudson/project/configurable_lv.properties | 26 ++ .../project/configurable_nb_NO.properties | 27 ++ .../hudson/project/configurable_nl.properties | 26 ++ .../hudson/project/configurable_pl.properties | 27 ++ .../project/configurable_pt_BR.properties | 27 ++ .../project/configurable_pt_PT.properties | 26 ++ .../hudson/project/configurable_ro.properties | 26 ++ .../hudson/project/configurable_ru.properties | 27 ++ .../hudson/project/configurable_si.properties | 24 ++ .../hudson/project/configurable_sk.properties | 26 ++ .../hudson/project/configurable_sl.properties | 26 ++ .../hudson/project/configurable_sr.properties | 26 ++ .../project/configurable_sv_SE.properties | 26 ++ .../hudson/project/configurable_te.properties | 24 ++ .../hudson/project/configurable_th.properties | 25 ++ .../hudson/project/configurable_tr.properties | 26 ++ .../hudson/project/configurable_uk.properties | 26 ++ .../project/configurable_zh_CN.properties | 27 ++ .../project/configurable_zh_TW.properties | 27 ++ .../model/RunParameterDefinitionTest.java | 4 +- 111 files changed, 1662 insertions(+), 450 deletions(-) create mode 100644 core/src/main/java/jenkins/model/ParameterizedJobMixIn.java rename core/src/main/resources/hudson/model/{AbstractProject => Job}/requirePOST.jelly (100%) rename core/src/main/resources/hudson/model/{AbstractProject => Job}/requirePOST.properties (100%) rename core/src/main/resources/hudson/model/{AbstractProject => Job}/requirePOST_de.properties (100%) rename core/src/main/resources/hudson/model/{AbstractProject => Job}/requirePOST_ja.properties (100%) rename core/src/main/resources/hudson/model/{AbstractProject => Job}/requirePOST_pt_BR.properties (100%) rename core/src/main/resources/hudson/model/{AbstractProject => Job}/requirePOST_zh_TW.properties (100%) create mode 100644 core/src/main/resources/lib/hudson/project/configurable.jelly create mode 100644 core/src/main/resources/lib/hudson/project/configurable.properties create mode 100644 core/src/main/resources/lib/hudson/project/configurable_ar.properties create mode 100644 core/src/main/resources/lib/hudson/project/configurable_bg.properties create mode 100644 core/src/main/resources/lib/hudson/project/configurable_ca.properties create mode 100644 core/src/main/resources/lib/hudson/project/configurable_cs.properties create mode 100644 core/src/main/resources/lib/hudson/project/configurable_da.properties create mode 100644 core/src/main/resources/lib/hudson/project/configurable_de.properties create mode 100644 core/src/main/resources/lib/hudson/project/configurable_el.properties create mode 100644 core/src/main/resources/lib/hudson/project/configurable_es.properties create mode 100644 core/src/main/resources/lib/hudson/project/configurable_es_AR.properties create mode 100644 core/src/main/resources/lib/hudson/project/configurable_et.properties create mode 100644 core/src/main/resources/lib/hudson/project/configurable_eu.properties create mode 100644 core/src/main/resources/lib/hudson/project/configurable_fi.properties create mode 100644 core/src/main/resources/lib/hudson/project/configurable_fr.properties create mode 100644 core/src/main/resources/lib/hudson/project/configurable_gl.properties create mode 100644 core/src/main/resources/lib/hudson/project/configurable_he.properties create mode 100644 core/src/main/resources/lib/hudson/project/configurable_hi_IN.properties create mode 100644 core/src/main/resources/lib/hudson/project/configurable_hu.properties create mode 100644 core/src/main/resources/lib/hudson/project/configurable_id.properties create mode 100644 core/src/main/resources/lib/hudson/project/configurable_is.properties create mode 100644 core/src/main/resources/lib/hudson/project/configurable_it.properties create mode 100644 core/src/main/resources/lib/hudson/project/configurable_ja.properties create mode 100644 core/src/main/resources/lib/hudson/project/configurable_kn.properties create mode 100644 core/src/main/resources/lib/hudson/project/configurable_ko.properties create mode 100644 core/src/main/resources/lib/hudson/project/configurable_lt.properties create mode 100644 core/src/main/resources/lib/hudson/project/configurable_lv.properties create mode 100644 core/src/main/resources/lib/hudson/project/configurable_nb_NO.properties create mode 100644 core/src/main/resources/lib/hudson/project/configurable_nl.properties create mode 100644 core/src/main/resources/lib/hudson/project/configurable_pl.properties create mode 100644 core/src/main/resources/lib/hudson/project/configurable_pt_BR.properties create mode 100644 core/src/main/resources/lib/hudson/project/configurable_pt_PT.properties create mode 100644 core/src/main/resources/lib/hudson/project/configurable_ro.properties create mode 100644 core/src/main/resources/lib/hudson/project/configurable_ru.properties create mode 100644 core/src/main/resources/lib/hudson/project/configurable_si.properties create mode 100644 core/src/main/resources/lib/hudson/project/configurable_sk.properties create mode 100644 core/src/main/resources/lib/hudson/project/configurable_sl.properties create mode 100644 core/src/main/resources/lib/hudson/project/configurable_sr.properties create mode 100644 core/src/main/resources/lib/hudson/project/configurable_sv_SE.properties create mode 100644 core/src/main/resources/lib/hudson/project/configurable_te.properties create mode 100644 core/src/main/resources/lib/hudson/project/configurable_th.properties create mode 100644 core/src/main/resources/lib/hudson/project/configurable_tr.properties create mode 100644 core/src/main/resources/lib/hudson/project/configurable_uk.properties create mode 100644 core/src/main/resources/lib/hudson/project/configurable_zh_CN.properties create mode 100644 core/src/main/resources/lib/hudson/project/configurable_zh_TW.properties diff --git a/core/src/main/java/hudson/model/AbstractProject.java b/core/src/main/java/hudson/model/AbstractProject.java index e26f91dfe5..12eab720f0 100644 --- a/core/src/main/java/hudson/model/AbstractProject.java +++ b/core/src/main/java/hudson/model/AbstractProject.java @@ -41,8 +41,6 @@ import hudson.Util; import hudson.cli.declarative.CLIMethod; import hudson.cli.declarative.CLIResolver; import hudson.model.Cause.LegacyCodeCause; -import hudson.model.Cause.RemoteCause; -import hudson.model.Cause.UserIdCause; import hudson.model.Descriptor.FormException; import hudson.model.Fingerprint.RangeSet; import hudson.model.PermalinkProjectAction.Permalink; @@ -54,7 +52,6 @@ import hudson.model.listeners.ItemListener; import hudson.model.listeners.SCMPollListener; import hudson.model.queue.CauseOfBlockage; import hudson.model.queue.QueueTaskFuture; -import hudson.model.queue.ScheduleResult; import hudson.model.queue.SubTask; import hudson.model.queue.SubTaskContributor; import hudson.node_monitors.DiskSpaceMonitor; @@ -108,10 +105,10 @@ import java.util.logging.Logger; import javax.annotation.CheckForNull; import javax.annotation.Nonnull; import javax.servlet.ServletException; -import static javax.servlet.http.HttpServletResponse.*; import jenkins.model.Jenkins; import jenkins.model.JenkinsLocationConfiguration; import jenkins.model.ModelObjectWithChildren; +import jenkins.model.ParameterizedJobMixIn; import jenkins.model.Uptime; import jenkins.model.lazy.LazyBuildMixIn; import jenkins.scm.DefaultSCMCheckoutStrategyImpl; @@ -131,7 +128,6 @@ import org.kohsuke.stapler.AncestorInPath; import org.kohsuke.stapler.ForwardToView; import org.kohsuke.stapler.HttpRedirect; import org.kohsuke.stapler.HttpResponse; -import org.kohsuke.stapler.HttpResponses; import org.kohsuke.stapler.QueryParameter; import org.kohsuke.stapler.StaplerRequest; import org.kohsuke.stapler.StaplerResponse; @@ -147,7 +143,7 @@ import org.kohsuke.stapler.interceptor.RequirePOST; * @see AbstractBuild */ @SuppressWarnings("rawtypes") -public abstract class AbstractProject

,R extends AbstractBuild> extends Job implements BuildableItem, ModelObjectWithChildren, LazyBuildMixIn.LazyLoadingJob { +public abstract class AbstractProject

,R extends AbstractBuild> extends Job implements BuildableItem, ModelObjectWithChildren, LazyBuildMixIn.LazyLoadingJob, ParameterizedJobMixIn.ParameterizedJob { /** * {@link SCM} associated with the project. @@ -167,6 +163,7 @@ public abstract class AbstractProject

,R extends A private volatile transient SCMRevisionState pollingBaseline = null; private transient LazyBuildMixIn buildMixIn; + private transient ParameterizedJobMixIn parameterizedJobMixIn; /** * All the builds keyed by their build number. @@ -290,6 +287,18 @@ public abstract class AbstractProject

,R extends A return buildMixIn; } + @Override public synchronized ParameterizedJobMixIn getParameterizedJobMixIn() { + if (parameterizedJobMixIn == null) { + parameterizedJobMixIn = new ParameterizedJobMixIn() { + @SuppressWarnings("unchecked") // untypable + @Override protected P asJob() { + return (P) AbstractProject.this; + } + }; + } + return parameterizedJobMixIn; + } + @Override public synchronized void save() throws IOException { super.save(); @@ -455,7 +464,7 @@ public abstract class AbstractProject

,R extends A * @since 1.401 */ public String getBuildNowText() { - return AlternativeUiTextProvider.get(BUILD_NOW_TEXT, this, isParameterized() ? Messages.AbstractProject_build_with_parameters() : Messages.AbstractProject_BuildNow()); + return AlternativeUiTextProvider.get(BUILD_NOW_TEXT, this, getParameterizedJobMixIn().getBuildNowText()); } /** @@ -845,7 +854,7 @@ public abstract class AbstractProject

,R extends A * Use {@link #scheduleBuild(Cause)}. Since 1.283 */ public boolean scheduleBuild() { - return scheduleBuild(new LegacyCodeCause()); + return getParameterizedJobMixIn().scheduleBuild(); } /** @@ -853,7 +862,7 @@ public abstract class AbstractProject

,R extends A * Use {@link #scheduleBuild(int, Cause)}. Since 1.283 */ public boolean scheduleBuild(int quietPeriod) { - return scheduleBuild(quietPeriod, new LegacyCodeCause()); + return getParameterizedJobMixIn().scheduleBuild(quietPeriod); } /** @@ -864,11 +873,11 @@ public abstract class AbstractProject

,R extends A * false if the task was rejected from the queue (such as when the system is being shut down.) */ public boolean scheduleBuild(Cause c) { - return scheduleBuild(getQuietPeriod(), c); + return getParameterizedJobMixIn().scheduleBuild(c); } public boolean scheduleBuild(int quietPeriod, Cause c) { - return scheduleBuild(quietPeriod, c, new Action[0]); + return getParameterizedJobMixIn().scheduleBuild(quietPeriod, c); } /** @@ -910,44 +919,11 @@ public abstract class AbstractProject

,R extends A @SuppressWarnings("unchecked") @WithBridgeMethods(Future.class) public QueueTaskFuture scheduleBuild2(int quietPeriod, Cause c, Collection actions) { - if (!isBuildable()) - return null; - List queueActions = new ArrayList(actions); - if (isParameterized() && Util.filter(queueActions, ParametersAction.class).isEmpty()) { - queueActions.add(new ParametersAction(getDefaultParametersValues())); - } - if (c != null) { queueActions.add(new CauseAction(c)); } - - ScheduleResult i = Jenkins.getInstance().getQueue().schedule2(this, quietPeriod, queueActions); - if(i.isAccepted()) - return (QueueTaskFuture)i.getItem().getFuture(); - return null; - } - - private List getDefaultParametersValues() { - ParametersDefinitionProperty paramDefProp = getProperty(ParametersDefinitionProperty.class); - ArrayList defValues = new ArrayList(); - - /* - * This check is made ONLY if someone will call this method even if isParametrized() is false. - */ - if(paramDefProp == null) - return defValues; - - /* Scan for all parameter with an associated default values */ - for(ParameterDefinition paramDefinition : paramDefProp.getParameterDefinitions()) - { - ParameterValue defaultValue = paramDefinition.getDefaultParameterValue(); - - if(defaultValue != null) - defValues.add(defaultValue); - } - - return defValues; + return getParameterizedJobMixIn().scheduleBuild2(quietPeriod, queueActions.toArray(new Action[queueActions.size()])); } /** @@ -1742,10 +1718,7 @@ public abstract class AbstractProject

,R extends A @Override protected SearchIndexBuilder makeSearchIndex() { - SearchIndexBuilder sib = super.makeSearchIndex(); - if(isBuildable() && hasPermission(Jenkins.ADMINISTER)) - sib.add("build","build"); - return sib; + return getParameterizedJobMixIn().extendSearchIndex(super.makeSearchIndex()); } @Override @@ -1754,7 +1727,7 @@ public abstract class AbstractProject

,R extends A } public boolean isParameterized() { - return getProperty(ParametersDefinitionProperty.class) != null; + return getParameterizedJobMixIn().isParameterized(); } // @@ -1766,31 +1739,7 @@ public abstract class AbstractProject

,R extends A * Schedules a new build command. */ public void doBuild( StaplerRequest req, StaplerResponse rsp, @QueryParameter TimeDuration delay ) throws IOException, ServletException { - if (delay==null) delay=new TimeDuration(getQuietPeriod()); - - // if a build is parameterized, let that take over - ParametersDefinitionProperty pp = getProperty(ParametersDefinitionProperty.class); - if (pp != null && !req.getMethod().equals("POST")) { - // show the parameter entry form. - req.getView(pp, "index.jelly").forward(req, rsp); - return; - } - - BuildAuthorizationToken.checkPermission(this, authToken, req, rsp); - - if (pp != null) { - pp._doBuild(req,rsp,delay); - return; - } - - if (!isBuildable()) - throw HttpResponses.error(SC_INTERNAL_SERVER_ERROR,new IOException(getFullName()+" is not buildable")); - - ScheduleResult r = Jenkins.getInstance().getQueue().schedule2(this, delay.getTime(), getBuildCause(req)); - if (r.isAccepted()) { - rsp.sendRedirect(SC_CREATED,req.getContextPath()+'/'+r.getItem().getUrl()); - } else - rsp.sendRedirect("."); + getParameterizedJobMixIn().doBuild(req, rsp, delay); } /** @deprecated use {@link #doBuild(StaplerRequest, StaplerResponse, TimeDuration)} */ @@ -1799,21 +1748,6 @@ public abstract class AbstractProject

,R extends A doBuild(req, rsp, TimeDuration.fromString(req.getParameter("delay"))); } - /** - * Computes the build cause, using RemoteCause or UserCause as appropriate. - */ - /*package*/ CauseAction getBuildCause(StaplerRequest req) { - Cause cause; - if (authToken != null && authToken.getToken() != null && req.getParameter("token") != null) { - // Optional additional cause text when starting via token - String causeText = req.getParameter("cause"); - cause = new RemoteCause(req.getRemoteAddr(), causeText); - } else { - cause = new UserIdCause(); - } - return new CauseAction(cause); - } - /** * Computes the delay by taking the default value and the override in the request parameter into the account. * @@ -1839,15 +1773,7 @@ public abstract class AbstractProject

,R extends A * Currently only String parameters are supported. */ public void doBuildWithParameters(StaplerRequest req, StaplerResponse rsp, @QueryParameter TimeDuration delay) throws IOException, ServletException { - BuildAuthorizationToken.checkPermission(this, authToken, req, rsp); - - ParametersDefinitionProperty pp = getProperty(ParametersDefinitionProperty.class); - if (pp != null) { - pp.buildWithParameters(req,rsp,delay); - } else { - throw new IllegalStateException("This build is not parameterized!"); - } - + getParameterizedJobMixIn().doBuildWithParameters(req, rsp, delay); } /** @deprecated use {@link #doBuildWithParameters(StaplerRequest, StaplerResponse, TimeDuration)} */ @@ -1870,10 +1796,7 @@ public abstract class AbstractProject

,R extends A */ @RequirePOST public void doCancelQueue( StaplerRequest req, StaplerResponse rsp ) throws IOException, ServletException { - checkPermission(ABORT); - - Jenkins.getInstance().getQueue().cancel(this); - rsp.forwardToPreviousPage(req); + getParameterizedJobMixIn().doCancelQueue(req, rsp); } @Override diff --git a/core/src/main/java/hudson/model/BooleanParameterValue.java b/core/src/main/java/hudson/model/BooleanParameterValue.java index 3caac05813..fd2742c893 100644 --- a/core/src/main/java/hudson/model/BooleanParameterValue.java +++ b/core/src/main/java/hudson/model/BooleanParameterValue.java @@ -52,7 +52,7 @@ public class BooleanParameterValue extends ParameterValue { * Exposes the name/value as an environment variable. */ @Override - public void buildEnvVars(AbstractBuild build, EnvVars env) { + public void buildEnvVars(Run build, EnvVars env) { env.put(name,Boolean.toString(value)); env.put(name.toUpperCase(Locale.ENGLISH),Boolean.toString(value)); // backward compatibility pre 1.345 } diff --git a/core/src/main/java/hudson/model/BuildAuthorizationToken.java b/core/src/main/java/hudson/model/BuildAuthorizationToken.java index 1fba190925..da08b0b17e 100644 --- a/core/src/main/java/hudson/model/BuildAuthorizationToken.java +++ b/core/src/main/java/hudson/model/BuildAuthorizationToken.java @@ -42,7 +42,7 @@ import org.kohsuke.stapler.HttpResponses; * @author Kohsuke Kawaguchi * @see BuildableItem * @deprecated 2008-07-20 - * Use {@link ACL} and {@link AbstractProject#BUILD}. This code is only here + * Use {@link ACL} and {@link Item#BUILD}. This code is only here * for the backward compatibility. */ public final class BuildAuthorizationToken { @@ -62,7 +62,7 @@ public final class BuildAuthorizationToken { return null; } - public static void checkPermission(AbstractProject project, BuildAuthorizationToken token, StaplerRequest req, StaplerResponse rsp) throws IOException { + public static void checkPermission(Job project, BuildAuthorizationToken token, StaplerRequest req, StaplerResponse rsp) throws IOException { if (!Jenkins.getInstance().isUseSecurity()) return; // everyone is authorized diff --git a/core/src/main/java/hudson/model/FileParameterValue.java b/core/src/main/java/hudson/model/FileParameterValue.java index e5bfda9881..647af7ac14 100644 --- a/core/src/main/java/hudson/model/FileParameterValue.java +++ b/core/src/main/java/hudson/model/FileParameterValue.java @@ -100,7 +100,7 @@ public class FileParameterValue extends ParameterValue { * Exposes the originalFileName as an environment variable. */ @Override - public void buildEnvVars(AbstractBuild build, EnvVars env) { + public void buildEnvVars(Run build, EnvVars env) { env.put(name,originalFileName); } diff --git a/core/src/main/java/hudson/model/JobParameterValue.java b/core/src/main/java/hudson/model/JobParameterValue.java index 8620107e2e..5dd0df9145 100644 --- a/core/src/main/java/hudson/model/JobParameterValue.java +++ b/core/src/main/java/hudson/model/JobParameterValue.java @@ -41,7 +41,7 @@ public class JobParameterValue extends ParameterValue { * Exposes the name/value as an environment variable. */ @Override - public void buildEnvVars(AbstractBuild build, EnvVars env) { + public void buildEnvVars(Run build, EnvVars env) { // TODO: check with Tom if this is really what he had in mind env.put(name,job.toString()); env.put(name.toUpperCase(Locale.ENGLISH),job.toString()); // backward compatibility pre 1.345 diff --git a/core/src/main/java/hudson/model/ParameterValue.java b/core/src/main/java/hudson/model/ParameterValue.java index 8489858132..baf37aec60 100644 --- a/core/src/main/java/hudson/model/ParameterValue.java +++ b/core/src/main/java/hudson/model/ParameterValue.java @@ -125,16 +125,31 @@ public abstract class ParameterValue implements Serializable { * @param build * The build for which this parameter is being used. Never null. * @deprecated as of 1.344 - * Use {@link #buildEnvVars(AbstractBuild, EnvVars)} instead. + * Use {@link #buildEnvVars(Run, EnvVars)} instead. */ public void buildEnvVars(AbstractBuild build, Map env) { - if (env instanceof EnvVars && Util.isOverridden(ParameterValue.class,getClass(),"buildEnvVars", AbstractBuild.class,EnvVars.class)) - // if the subtype already derives buildEnvVars(AbstractBuild,Map), then delegate to it - buildEnvVars(build,(EnvVars)env); - + if (env instanceof EnvVars) { + if (Util.isOverridden(ParameterValue.class, getClass(), "buildEnvVars", Run.class, EnvVars.class)) { + // if the subtype already derives buildEnvVars(Run, Map), then delegate to it + buildEnvVars((Run) build, (EnvVars) env); + } else if (Util.isOverridden(ParameterValue.class, getClass(), "buildEnvVars", AbstractBuild.class, EnvVars.class)) { + buildEnvVars(build, (EnvVars) env); + } + } // otherwise no-op by default } + /** @deprecated Use {@link #buildEnvVars(Run, EnvVars)} instead. */ + @Deprecated + public void buildEnvVars(AbstractBuild build, EnvVars env) { + if (Util.isOverridden(ParameterValue.class, getClass(), "buildEnvVars", Run.class, EnvVars.class)) { + buildEnvVars((Run) build, env); + } else { + // for backward compatibility + buildEnvVars(build,(Map)env); + } + } + /** * Adds environmental variables for the builds to the given map. * @@ -151,10 +166,13 @@ public abstract class ParameterValue implements Serializable { * never null. * @param build * The build for which this parameter is being used. Never null. + * @since TODO */ - public void buildEnvVars(AbstractBuild build, EnvVars env) { - // for backward compatibility - buildEnvVars(build,(Map)env); + public void buildEnvVars(Run build, EnvVars env) { + if (build instanceof AbstractBuild) { + buildEnvVars((AbstractBuild) build, env); + } + // else do not know how to do it } /** @@ -193,6 +211,8 @@ public abstract class ParameterValue implements Serializable { return VariableResolver.NONE; } + // TODO should there be a Run overload of this? + /** * Accessing {@link ParameterDefinition} is not a good idea. * diff --git a/core/src/main/java/hudson/model/ParametersAction.java b/core/src/main/java/hudson/model/ParametersAction.java index 09aebf7ebf..dd48b14334 100644 --- a/core/src/main/java/hudson/model/ParametersAction.java +++ b/core/src/main/java/hudson/model/ParametersAction.java @@ -82,9 +82,11 @@ public class ParametersAction implements Action, Iterable, Queue public void buildEnvVars(AbstractBuild build, EnvVars env) { for (ParameterValue p : parameters) - p.buildEnvVars(build,env); + p.buildEnvVars((Run) build, env); } + // TODO do we need an EnvironmentContributingAction variant that takes Run so this can implement it? + /** * Performs a variable substitution to the given text and return it. */ diff --git a/core/src/main/java/hudson/model/ParametersDefinitionProperty.java b/core/src/main/java/hudson/model/ParametersDefinitionProperty.java index 1081078ec9..b4e2efbe33 100644 --- a/core/src/main/java/hudson/model/ParametersDefinitionProperty.java +++ b/core/src/main/java/hudson/model/ParametersDefinitionProperty.java @@ -24,44 +24,44 @@ */ package hudson.model; +import hudson.Extension; +import hudson.Util; +import hudson.model.Queue.WaitingItem; import java.io.IOException; +import java.util.AbstractList; import java.util.ArrayList; import java.util.Arrays; import java.util.Collection; import java.util.Collections; import java.util.List; -import java.util.AbstractList; - +import javax.annotation.CheckForNull; import javax.servlet.ServletException; - -import hudson.Util; -import hudson.model.Queue.WaitingItem; +import static javax.servlet.http.HttpServletResponse.SC_CREATED; import jenkins.model.Jenkins; +import jenkins.model.ParameterizedJobMixIn; import jenkins.util.TimeDuration; import net.sf.json.JSONArray; import net.sf.json.JSONObject; - +import org.kohsuke.accmod.Restricted; +import org.kohsuke.accmod.restrictions.NoExternalUse; import org.kohsuke.stapler.QueryParameter; import org.kohsuke.stapler.StaplerRequest; import org.kohsuke.stapler.StaplerResponse; import org.kohsuke.stapler.export.Exported; import org.kohsuke.stapler.export.ExportedBean; - -import hudson.Extension; -import javax.annotation.CheckForNull; import org.kohsuke.stapler.export.Flavor; -import static javax.servlet.http.HttpServletResponse.SC_CREATED; - /** * Keeps a list of the parameters defined for a project. * *

* This class also implements {@link Action} so that index.jelly provides - * a form to enter build parameters. + * a form to enter build parameters. + *

The owning job needs a {@code sidepanel.jelly} and should have web methods delegating to {@link ParameterizedJobMixIn#doBuild} and {@link ParameterizedJobMixIn#doBuildWithParameters}. + * The builds also need a {@code sidepanel.jelly}. */ @ExportedBean(defaultVisibility=2) -public class ParametersDefinitionProperty extends JobProperty> +public class ParametersDefinitionProperty extends JobProperty> implements Action { private final List parameterDefinitions; @@ -73,9 +73,15 @@ public class ParametersDefinitionProperty extends JobProperty getOwner() { - return owner; + return (AbstractProject) owner; + } + + @Restricted(NoExternalUse.class) // Jelly + public ParameterizedJobMixIn.ParameterizedJob getJob() { + return (ParameterizedJobMixIn.ParameterizedJob) owner; } @Exported @@ -99,10 +105,11 @@ public class ParametersDefinitionProperty extends JobProperty getJobActions(AbstractProject job) { + public Collection getJobActions(Job job) { return Collections.singleton(this); } + @Deprecated public AbstractProject getProject() { return (AbstractProject) owner; } @@ -117,10 +124,10 @@ public class ParametersDefinitionProperty extends JobProperty - * This method is supposed to be invoked from {@link AbstractProject#doBuild(StaplerRequest, StaplerResponse, TimeDuration)}. + * This method is supposed to be invoked from {@link ParameterizedJobMixIn#doBuild(StaplerRequest, StaplerResponse, TimeDuration)}. */ public void _doBuild(StaplerRequest req, StaplerResponse rsp, @QueryParameter TimeDuration delay) throws IOException, ServletException { - if (delay==null) delay=new TimeDuration(owner.getQuietPeriod()); + if (delay==null) delay=new TimeDuration(getJob().getQuietPeriod()); List values = new ArrayList(); @@ -140,7 +147,7 @@ public class ParametersDefinitionProperty extends JobProperty jobType) { - return AbstractProject.class.isAssignableFrom(jobType); + return ParameterizedJobMixIn.ParameterizedJob.class.isAssignableFrom(jobType); } @Override diff --git a/core/src/main/java/hudson/model/PasswordParameterValue.java b/core/src/main/java/hudson/model/PasswordParameterValue.java index 8cbdda50a7..3d7d4f012f 100644 --- a/core/src/main/java/hudson/model/PasswordParameterValue.java +++ b/core/src/main/java/hudson/model/PasswordParameterValue.java @@ -49,7 +49,7 @@ public class PasswordParameterValue extends ParameterValue { } @Override - public void buildEnvVars(AbstractBuild build, EnvVars env) { + public void buildEnvVars(Run build, EnvVars env) { String v = Secret.toString(value); env.put(name, v); env.put(name.toUpperCase(Locale.ENGLISH),v); // backward compatibility pre 1.345 diff --git a/core/src/main/java/hudson/model/RunParameterValue.java b/core/src/main/java/hudson/model/RunParameterValue.java index 6368a94277..ded35aa9e6 100644 --- a/core/src/main/java/hudson/model/RunParameterValue.java +++ b/core/src/main/java/hudson/model/RunParameterValue.java @@ -68,7 +68,7 @@ public class RunParameterValue extends ParameterValue { * Exposes the name/value as an environment variable. */ @Override - public void buildEnvVars(AbstractBuild build, EnvVars env) { + public void buildEnvVars(Run build, EnvVars env) { Run run = getRun(); String value = Jenkins.getInstance().getRootUrl() + run.getUrl(); diff --git a/core/src/main/java/hudson/model/StringParameterValue.java b/core/src/main/java/hudson/model/StringParameterValue.java index a855d40988..c9f4ee3312 100644 --- a/core/src/main/java/hudson/model/StringParameterValue.java +++ b/core/src/main/java/hudson/model/StringParameterValue.java @@ -52,7 +52,7 @@ public class StringParameterValue extends ParameterValue { * Exposes the name/value as an environment variable. */ @Override - public void buildEnvVars(AbstractBuild build, EnvVars env) { + public void buildEnvVars(Run build, EnvVars env) { env.put(name,value); env.put(name.toUpperCase(Locale.ENGLISH),value); // backward compatibility pre 1.345 } diff --git a/core/src/main/java/jenkins/model/ParameterizedJobMixIn.java b/core/src/main/java/jenkins/model/ParameterizedJobMixIn.java new file mode 100644 index 0000000000..47845f91ea --- /dev/null +++ b/core/src/main/java/jenkins/model/ParameterizedJobMixIn.java @@ -0,0 +1,265 @@ +/* + * The MIT License + * + * Copyright 2014 Jesse Glick. + * + * 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 jenkins.model; + +import hudson.Util; +import static hudson.model.AbstractProject.ABORT; +import hudson.model.Action; +import hudson.model.BuildableItem; +import hudson.model.Cause; +import hudson.model.CauseAction; +import hudson.model.Item; +import hudson.model.Job; +import hudson.model.ParameterDefinition; +import hudson.model.ParameterValue; +import hudson.model.ParametersAction; +import hudson.model.ParametersDefinitionProperty; +import hudson.model.Queue; +import hudson.model.Run; +import hudson.model.queue.QueueTaskFuture; +import hudson.search.SearchIndexBuilder; +import hudson.views.BuildButtonColumn; +import java.io.IOException; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.Collections; +import java.util.List; +import javax.annotation.CheckForNull; +import javax.servlet.ServletException; +import static javax.servlet.http.HttpServletResponse.SC_CREATED; +import static javax.servlet.http.HttpServletResponse.SC_INTERNAL_SERVER_ERROR; +import jenkins.util.TimeDuration; +import org.kohsuke.accmod.Restricted; +import org.kohsuke.accmod.restrictions.NoExternalUse; +import org.kohsuke.stapler.HttpResponses; +import org.kohsuke.stapler.QueryParameter; +import org.kohsuke.stapler.StaplerRequest; +import org.kohsuke.stapler.StaplerResponse; +import org.kohsuke.stapler.interceptor.RequirePOST; + +/** + * Allows a {@link Job} to make use of {@link ParametersDefinitionProperty} and be scheduled in various ways. + * @since TODO + */ +@SuppressWarnings("unchecked") // AbstractItem.getParent does not correctly override; scheduleBuild2 inherently untypable +public abstract class ParameterizedJobMixIn & ParameterizedJobMixIn.ParameterizedJob & Queue.Task, RunT extends Run & Queue.Executable> { + + protected abstract JobT asJob(); + + /** @see BuildableItem#scheduleBuild() */ + @SuppressWarnings("deprecation") + public final boolean scheduleBuild() { + return scheduleBuild(Jenkins.getInstance().getQuietPeriod(), new Cause.LegacyCodeCause()); + } + + /** @see BuildableItem#scheduleBuild(Cause) */ + public final boolean scheduleBuild(Cause c) { + return scheduleBuild(Jenkins.getInstance().getQuietPeriod(), c); + } + + /** @see BuildableItem#scheduleBuild(int) */ + @SuppressWarnings("deprecation") + public final boolean scheduleBuild(int quietPeriod) { + return scheduleBuild(quietPeriod, new Cause.LegacyCodeCause()); + } + + /** @see BuildableItem#scheduleBuild(int, Cause) */ + public final boolean scheduleBuild(int quietPeriod, Cause c) { + return scheduleBuild2(quietPeriod, c != null ? Collections.singletonList(new CauseAction(c)) : Collections.emptyList()) != null; + } + + /** + * Convenience method to schedule a build with the ability to wait for its result. + * Often used during functional tests ({@code JenkinsRule.assertBuildStatusSuccess}). + * @param quietPeriod seconds to wait before starting (normally 0) + * @param actions various actions to associate with the scheduling, such as {@link ParametersAction} or {@link CauseAction} + * @return a handle by which you may wait for the build to complete (or just start); or null if the build was not actually scheduled for some reason + */ + public final @CheckForNull QueueTaskFuture scheduleBuild2(int quietPeriod, Action... actions) { + return scheduleBuild2(quietPeriod, Arrays.asList(actions)); + } + + private @CheckForNull QueueTaskFuture scheduleBuild2(int quietPeriod, List actions) { + if (!asJob().isBuildable()) + return null; + + List queueActions = new ArrayList(actions); + if (isParameterized() && Util.filter(queueActions, ParametersAction.class).isEmpty()) { + queueActions.add(new ParametersAction(getDefaultParametersValues())); + } + Queue.Item i = Jenkins.getInstance().getQueue().schedule2(asJob(), quietPeriod, queueActions).getItem(); + return i != null ? (QueueTaskFuture) i.getFuture() : null; + } + + private List getDefaultParametersValues() { + ParametersDefinitionProperty paramDefProp = asJob().getProperty(ParametersDefinitionProperty.class); + ArrayList defValues = new ArrayList(); + + /* + * This check is made ONLY if someone will call this method even if isParametrized() is false. + */ + if(paramDefProp == null) + return defValues; + + /* Scan for all parameter with an associated default values */ + for(ParameterDefinition paramDefinition : paramDefProp.getParameterDefinitions()) + { + ParameterValue defaultValue = paramDefinition.getDefaultParameterValue(); + + if(defaultValue != null) + defValues.add(defaultValue); + } + + return defValues; + } + + /** + * A job should define a method of the same signature for use from {@link BuildButtonColumn}. + */ + public final boolean isParameterized() { + return asJob().getProperty(ParametersDefinitionProperty.class) != null; + } + + /** + * Schedules a new build command. + * Create a method on your job with the same signature and delegate to this. + */ + @SuppressWarnings("deprecation") + public final void doBuild(StaplerRequest req, StaplerResponse rsp, @QueryParameter TimeDuration delay) throws IOException, ServletException { + if (delay == null) { + delay = new TimeDuration(asJob().getQuietPeriod()); + } + + // if a build is parameterized, let that take over + ParametersDefinitionProperty pp = asJob().getProperty(ParametersDefinitionProperty.class); + if (pp != null && !req.getMethod().equals("POST")) { + // show the parameter entry form. + req.getView(pp, "index.jelly").forward(req, rsp); + return; + } + + hudson.model.BuildAuthorizationToken.checkPermission(asJob(), asJob().getAuthToken(), req, rsp); + + if (pp != null) { + pp._doBuild(req, rsp, delay); + return; + } + + if (!asJob().isBuildable()) { + throw HttpResponses.error(SC_INTERNAL_SERVER_ERROR, new IOException(asJob().getFullName() + " is not buildable")); + } + + Queue.Item item = Jenkins.getInstance().getQueue().schedule2(asJob(), delay.getTime(), getBuildCause(req)).getItem(); + if (item != null) { + rsp.sendRedirect(SC_CREATED, req.getContextPath() + '/' + item.getUrl()); + } else { + rsp.sendRedirect("."); + } + } + + /** + * Supports build trigger with parameters via an HTTP GET or POST. + * Currently only String parameters are supported. + * Create a method on your job with the same signature and delegate to this. + */ + @SuppressWarnings("deprecation") + public final void doBuildWithParameters(StaplerRequest req, StaplerResponse rsp, @QueryParameter TimeDuration delay) throws IOException, ServletException { + hudson.model.BuildAuthorizationToken.checkPermission(asJob(), asJob().getAuthToken(), req, rsp); + + ParametersDefinitionProperty pp = asJob().getProperty(ParametersDefinitionProperty.class); + if (pp != null) { + pp.buildWithParameters(req, rsp, delay); + } else { + throw new IllegalStateException("This build is not parameterized!"); + } + } + + /** + * Cancels a scheduled build. + * Create a method on your job marked {@link RequirePOST} but with the same signature and delegate to this. + */ + @RequirePOST + public final void doCancelQueue( StaplerRequest req, StaplerResponse rsp ) throws IOException, ServletException { + asJob().checkPermission(ABORT); + Jenkins.getInstance().getQueue().cancel(asJob()); + rsp.forwardToPreviousPage(req); + } + + /** + * Use from a {@link Job#makeSearchIndex} override. + * @param sib the super value + * @return the value to return + */ + public final SearchIndexBuilder extendSearchIndex(SearchIndexBuilder sib) { + if (asJob().isBuildable() && asJob().hasPermission(Item.BUILD)) { + sib.add("build", "build"); + } + return sib; + } + + /** + * Computes the build cause, using RemoteCause or UserCause as appropriate. + */ + @Restricted(NoExternalUse.class) + public final CauseAction getBuildCause(StaplerRequest req) { + Cause cause; + @SuppressWarnings("deprecation") + hudson.model.BuildAuthorizationToken authToken = asJob().getAuthToken(); + if (authToken != null && authToken.getToken() != null && req.getParameter("token") != null) { + // Optional additional cause text when starting via token + String causeText = req.getParameter("cause"); + cause = new Cause.RemoteCause(req.getRemoteAddr(), causeText); + } else { + cause = new Cause.UserIdCause(); + } + return new CauseAction(cause); + } + + /** + * Suggested implementation of {@link ParameterizedJob#getBuildNowText}. + */ + public final String getBuildNowText() { + // TODO is it worthwhile to define a replacement for AbstractProject.BUILD_NOW_TEXT? + // TODO move these messages (& translations) to this package + return isParameterized() ? hudson.model.Messages.AbstractProject_build_with_parameters() : hudson.model.Messages.AbstractProject_BuildNow(); + } + + /** + * Marker for job using this mixin. + */ + public interface ParameterizedJob extends hudson.model.Queue.Task { + + ParameterizedJobMixIn getParameterizedJobMixIn(); + + @SuppressWarnings("deprecation") + @CheckForNull hudson.model.BuildAuthorizationToken getAuthToken(); + + int getQuietPeriod(); + + String getBuildNowText(); + + } + +} diff --git a/core/src/main/resources/hudson/model/AbstractProject/sidepanel.jelly b/core/src/main/resources/hudson/model/AbstractProject/sidepanel.jelly index 12c2879743..98f89ab202 100644 --- a/core/src/main/resources/hudson/model/AbstractProject/sidepanel.jelly +++ b/core/src/main/resources/hudson/model/AbstractProject/sidepanel.jelly @@ -28,7 +28,7 @@ THE SOFTWARE. Side panel for the project view. --> - + @@ -51,28 +51,7 @@ THE SOFTWARE. - - - - - - - - - - - - - - + diff --git a/core/src/main/resources/hudson/model/AbstractProject/sidepanel.properties b/core/src/main/resources/hudson/model/AbstractProject/sidepanel.properties index 2719924026..fd02d0d55f 100644 --- a/core/src/main/resources/hudson/model/AbstractProject/sidepanel.properties +++ b/core/src/main/resources/hudson/model/AbstractProject/sidepanel.properties @@ -20,7 +20,5 @@ # OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN # THE SOFTWARE. -delete=Delete {0} -delete.confirm=Are you sure about deleting the {0} \u2018{1}\u2019? wipe.out.confirm=Are you sure about wiping out the workspace? Wipe\ Out\ Workspace=Wipe Out Current Workspace \ No newline at end of file diff --git a/core/src/main/resources/hudson/model/AbstractProject/sidepanel_ar.properties b/core/src/main/resources/hudson/model/AbstractProject/sidepanel_ar.properties index 78fd12a39d..a6b376a431 100644 --- a/core/src/main/resources/hudson/model/AbstractProject/sidepanel_ar.properties +++ b/core/src/main/resources/hudson/model/AbstractProject/sidepanel_ar.properties @@ -1,10 +1,7 @@ # This file is under the MIT License by authors -Back\ to\ Dashboard=\u0627\u0644\u0639\u0648\u062F\u0647 -Build\ scheduled=\u0628\u0631\u0646\u0627\u0645\u062C \u0627\u0644\u0628\u0646\u0627\u0621 -Changes=\u0627\u0644\u062A\u063A\u064A\u0631\u0627\u062A -Configure=\u063A\u064A\u0631 \u0627\u0644\u0625\u0639\u062F\u0627\u062F\u0627\u062A -Status=\u0627\u0644\u062D\u0627\u0644\u0647 -Wipe\ Out\ Workspace=\u0645\u0633\u062D \u0627\u0644\u0645\u0644\u0641\u0627\u062A -Workspace=\u0645\u0633\u0627\u062D\u0629 \u0627\u0644\u0639\u0645\u0644 -delete=\u062E\u0630\u0641 +Back\ to\ Dashboard=\u0627\u0644\u0639\u0648\u062f\u0647 +Changes=\u0627\u0644\u062a\u063a\u064a\u0631\u0627\u062a +Status=\u0627\u0644\u062d\u0627\u0644\u0647 +Wipe\ Out\ Workspace=\u0645\u0633\u062d \u0627\u0644\u0645\u0644\u0641\u0627\u062a +Workspace=\u0645\u0633\u0627\u062d\u0629 \u0627\u0644\u0639\u0645\u0644 diff --git a/core/src/main/resources/hudson/model/AbstractProject/sidepanel_bg.properties b/core/src/main/resources/hudson/model/AbstractProject/sidepanel_bg.properties index c1bfa99dbe..9f36e0f690 100644 --- a/core/src/main/resources/hudson/model/AbstractProject/sidepanel_bg.properties +++ b/core/src/main/resources/hudson/model/AbstractProject/sidepanel_bg.properties @@ -20,13 +20,9 @@ # OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN # THE SOFTWARE. -Back\ to\ Dashboard=\u043A\u044A\u043C \u0418\u043D\u0444\u043E\u0440\u043C\u0430\u0446\u0438\u043E\u043D\u043D\u043E\u0442\u043E \u0422\u0430\u0431\u043B\u043E -Build\ scheduled=\u041D\u0430\u0441\u0440\u043E\u0447\u0435\u043D \u0431\u0438\u043B\u0434 -Changes=\u041F\u0440\u043E\u043C\u0435\u043D\u0438 -Configure=\u041A\u043E\u043D\u0444\u0438\u0433\u0443\u0440\u0438\u0440\u0430\u0439 +Back\ to\ Dashboard=\u043a\u044a\u043c \u0418\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u043e\u043d\u043d\u043e\u0442\u043e \u0422\u0430\u0431\u043b\u043e +Changes=\u041f\u0440\u043e\u043c\u0435\u043d\u0438 Status=\u0421\u0442\u0430\u0442\u0443\u0441 -Wipe\ Out\ Workspace=\u0418\u0437\u0442\u0440\u0438\u0439 \u0440\u0430\u0431\u043E\u0442\u043D\u043E\u0442\u043E \u043C\u044F\u0441\u0442\u043E -Workspace=\u0420\u0430\u0431\u043E\u0442\u043D\u043E \u043C\u044F\u0441\u0442\u043E -delete=\u0418\u0437\u0442\u0440\u0438\u0439 {0} -delete.confirm=\u0421\u0438\u0433\u0443\u0440\u043D\u0438 \u043B\u0438 \u0441\u0442\u0435, \u0447\u0435 \u0438\u0441\u043A\u0430\u0442\u0435 \u0434\u0430 \u0438\u0437\u0442\u0440\u0438\u0435\u0442\u0435 {0} \u2018{1}\u2019? -wipe.out.confirm=\u0421\u0438\u0433\u0443\u0440\u043D\u0438 \u043B\u0438 \u0441\u0442\u0435, \u0447\u0435 \u0438\u0441\u043A\u0430\u0442\u0435 \u0434\u0430 \u0438\u0437\u0442\u0440\u0438\u0435\u0442\u0435 \u0440\u0430\u0431\u043E\u0442\u043D\u043E\u0442\u043E \u043F\u0440\u043E\u0441\u0442\u0440\u0430\u043D\u0441\u0442\u0432\u043E? +Wipe\ Out\ Workspace=\u0418\u0437\u0442\u0440\u0438\u0439 \u0440\u0430\u0431\u043e\u0442\u043d\u043e\u0442\u043e \u043c\u044f\u0441\u0442\u043e +Workspace=\u0420\u0430\u0431\u043e\u0442\u043d\u043e \u043c\u044f\u0441\u0442\u043e +wipe.out.confirm=\u0421\u0438\u0433\u0443\u0440\u043d\u0438 \u043b\u0438 \u0441\u0442\u0435, \u0447\u0435 \u0438\u0441\u043a\u0430\u0442\u0435 \u0434\u0430 \u0438\u0437\u0442\u0440\u0438\u0435\u0442\u0435 \u0440\u0430\u0431\u043e\u0442\u043d\u043e\u0442\u043e \u043f\u0440\u043e\u0441\u0442\u0440\u0430\u043d\u0441\u0442\u0432\u043e? diff --git a/core/src/main/resources/hudson/model/AbstractProject/sidepanel_ca.properties b/core/src/main/resources/hudson/model/AbstractProject/sidepanel_ca.properties index 157b3d0335..afc4fd99e0 100644 --- a/core/src/main/resources/hudson/model/AbstractProject/sidepanel_ca.properties +++ b/core/src/main/resources/hudson/model/AbstractProject/sidepanel_ca.properties @@ -21,12 +21,8 @@ # THE SOFTWARE. Back\ to\ Dashboard=Retornar al Panell de Control -Build\ scheduled=Construcci\u00F3 programada Changes=Canvis -Configure=Configura Status=Estat Wipe\ Out\ Workspace=Neteja l''''''''espai de treball Workspace=Espai de treball -delete=Suprimeix {0} -delete.confirm=Est\u00E0s segur que vols esborrar {0} \u2018{1}\u2019? -wipe.out.confirm=Est\u00E0s segur que vols netejar l''espai de treball? +wipe.out.confirm=Est\u00e0s segur que vols netejar l''espai de treball? diff --git a/core/src/main/resources/hudson/model/AbstractProject/sidepanel_cs.properties b/core/src/main/resources/hudson/model/AbstractProject/sidepanel_cs.properties index 63c5c41fd7..443bedcc5e 100644 --- a/core/src/main/resources/hudson/model/AbstractProject/sidepanel_cs.properties +++ b/core/src/main/resources/hudson/model/AbstractProject/sidepanel_cs.properties @@ -20,13 +20,9 @@ # OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN # THE SOFTWARE. -Back\ to\ Dashboard=Zp\u011Bt na \u00FAvodn\u00ED stranu -Build\ scheduled=Sestaven\u00ED napl\u00E1nov\u00E1no -Changes=Zm\u011Bny -Configure=Nastavit +Back\ to\ Dashboard=Zp\u011bt na \u00favodn\u00ed stranu +Changes=Zm\u011bny Status=Stav -Wipe\ Out\ Workspace=Smazat pracovn\u00ED prostor -Workspace=Pracovn\u00ED prostor -delete=Smazat {0} -delete.confirm=Jste si jisti, \u017Ee chcete smazat {0} \u2018{1}\u2019? -wipe.out.confirm=Jste si jisti, \u017Ee chcete vy\u010Distit pracovn\u00ED prostor? +Wipe\ Out\ Workspace=Smazat pracovn\u00ed prostor +Workspace=Pracovn\u00ed prostor +wipe.out.confirm=Jste si jisti, \u017ee chcete vy\u010distit pracovn\u00ed prostor? diff --git a/core/src/main/resources/hudson/model/AbstractProject/sidepanel_da.properties b/core/src/main/resources/hudson/model/AbstractProject/sidepanel_da.properties index e3809d56ec..2a2e546aa3 100644 --- a/core/src/main/resources/hudson/model/AbstractProject/sidepanel_da.properties +++ b/core/src/main/resources/hudson/model/AbstractProject/sidepanel_da.properties @@ -21,13 +21,8 @@ # THE SOFTWARE. Changes=\u00c6ndringer -delete=Slet {0} -Configure=Konfigurer Back\ to\ Dashboard=Tilbage til oversigtssiden Status=Status Workspace=Arbejdsomr\u00e5de -Build\ scheduled=Byg planlagt -View\ Configuration=Vis konfiguration Wipe\ Out\ Workspace=Slet arbejdsomr\u00e5det -delete.confirm=Er du sikker p\u00E5 at du vil slette {0} ''{1}''? wipe.out.confirm=Er du sikker p\u00e5 at du vil slette arbejdsomr\u00e5det? diff --git a/core/src/main/resources/hudson/model/AbstractProject/sidepanel_de.properties b/core/src/main/resources/hudson/model/AbstractProject/sidepanel_de.properties index 77b8af3cc0..5f890204af 100644 --- a/core/src/main/resources/hudson/model/AbstractProject/sidepanel_de.properties +++ b/core/src/main/resources/hudson/model/AbstractProject/sidepanel_de.properties @@ -21,15 +21,10 @@ # THE SOFTWARE. Back\ to\ Dashboard=Zur\u00fcck zur \u00dcbersicht -Up=Zur\u00FCck +Up=Zur\u00fcck Status=Status Changes=\u00c4nderungen Workspace=Arbeitsbereich -delete={0} L\u00f6schen -Configure=Konfigurieren -View\ Configuration=Konfiguration anzeigen -Build\ scheduled=Build geplant Wipe\ Out\ Workspace=Arbeitsbereich l\u00f6schen View\ Configuration=Konfiguration anzeigen -delete.confirm=Sind Sie sicher, dass Sie das {0} \u2018{1}\u2019 l\u00F6schen m\u00F6chten? wipe.out.confirm=Sind Sie sicher, dass Sie den Arbeitsbereich l\u00f6schen m\u00f6chten? diff --git a/core/src/main/resources/hudson/model/AbstractProject/sidepanel_el.properties b/core/src/main/resources/hudson/model/AbstractProject/sidepanel_el.properties index d2c11e0048..27c47c816a 100644 --- a/core/src/main/resources/hudson/model/AbstractProject/sidepanel_el.properties +++ b/core/src/main/resources/hudson/model/AbstractProject/sidepanel_el.properties @@ -20,11 +20,8 @@ # OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN # THE SOFTWARE. -Back\ to\ Dashboard=\u0395\u03C0\u03B9\u03C3\u03C4\u03C1\u03BF\u03C6\u03AE \u03C3\u03C4\u03BF Dashboard -Build\ scheduled=\u03A4\u03BF build \u03C0\u03C1\u03BF\u03B3\u03C1\u03B1\u03BC\u03BC\u03B1\u03C4\u03AF\u03C3\u03C4\u03B7\u03BA\u03B5 -Changes=\u0391\u03BB\u03BB\u03B1\u03B3\u03AD\u03C2 -Configure=\u03A1\u03C5\u03B8\u03BC\u03AF\u03C3\u03B5\u03B9\u03C2 -Status=\u039A\u03B1\u03C4\u03AC\u03C3\u03C4\u03B1\u03C3\u03B7 -Wipe\ Out\ Workspace=\u039A\u03B1\u03B8\u03B1\u03C1\u03B9\u03C3\u03BC\u03CC\u03C2 \u03A7\u03CE\u03C1\u03BF\u03C5 \u0395\u03C1\u03B3\u03B1\u03C3\u03AF\u03B1\u03C2 -Workspace=\u03A7\u03CE\u03C1\u03BF\u03C2 \u0395\u03C1\u03B3\u03B1\u03C3\u03AF\u03B1\u03C2 -delete=\u0394\u03B9\u03B1\u03B3\u03C1\u03B1\u03C6\u03AE +Back\ to\ Dashboard=\u0395\u03c0\u03b9\u03c3\u03c4\u03c1\u03bf\u03c6\u03ae \u03c3\u03c4\u03bf Dashboard +Changes=\u0391\u03bb\u03bb\u03b1\u03b3\u03ad\u03c2 +Status=\u039a\u03b1\u03c4\u03ac\u03c3\u03c4\u03b1\u03c3\u03b7 +Wipe\ Out\ Workspace=\u039a\u03b1\u03b8\u03b1\u03c1\u03b9\u03c3\u03bc\u03cc\u03c2 \u03a7\u03ce\u03c1\u03bf\u03c5 \u0395\u03c1\u03b3\u03b1\u03c3\u03af\u03b1\u03c2 +Workspace=\u03a7\u03ce\u03c1\u03bf\u03c2 \u0395\u03c1\u03b3\u03b1\u03c3\u03af\u03b1\u03c2 diff --git a/core/src/main/resources/hudson/model/AbstractProject/sidepanel_es.properties b/core/src/main/resources/hudson/model/AbstractProject/sidepanel_es.properties index 5e1c56b952..553f7b4d39 100644 --- a/core/src/main/resources/hudson/model/AbstractProject/sidepanel_es.properties +++ b/core/src/main/resources/hudson/model/AbstractProject/sidepanel_es.properties @@ -20,14 +20,9 @@ # OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN # THE SOFTWARE. -Build\ scheduled=Ejecuci\u00F3n planificada Changes=Cambios -Configure=Configurar Status=Estado Actual Wipe\ Out\ Workspace=Limpiar el espacio de trabajo Workspace=Zona de Trabajo -delete=Borrar {0} -View\ Configuration=Ver Configuraci\u00F3n Back\ to\ Dashboard=Volver al Panel de Control -delete.confirm=Est\u00E1s seguro de querer borrar el {0} `{1}\u00B4 wipe.out.confirm=\u00bfEst\u00e1s seguro de que quieres limpiar el espacio de trabajo? diff --git a/core/src/main/resources/hudson/model/AbstractProject/sidepanel_es_AR.properties b/core/src/main/resources/hudson/model/AbstractProject/sidepanel_es_AR.properties index 6b9247db3a..b4adbb2b98 100644 --- a/core/src/main/resources/hudson/model/AbstractProject/sidepanel_es_AR.properties +++ b/core/src/main/resources/hudson/model/AbstractProject/sidepanel_es_AR.properties @@ -1,10 +1,7 @@ # This file is under the MIT License by authors Back\ to\ Dashboard=Volver al Dashboard -Build\ scheduled=Construcci\u00F3n agendada Changes=Cambios -Configure=Configurar Status=Estado Wipe\ Out\ Workspace=Limpiar espacio de trabajo Workspace=Espacio de trabajo -delete=Eliminar {0} diff --git a/core/src/main/resources/hudson/model/AbstractProject/sidepanel_et.properties b/core/src/main/resources/hudson/model/AbstractProject/sidepanel_et.properties index 1e50303ef0..b88e1b5f7d 100644 --- a/core/src/main/resources/hudson/model/AbstractProject/sidepanel_et.properties +++ b/core/src/main/resources/hudson/model/AbstractProject/sidepanel_et.properties @@ -1,12 +1,8 @@ # This file is under the MIT License by authors Back\ to\ Dashboard=Tagasi pealehele -Build\ scheduled=T\u00F6\u00F6 on tellitud Changes=Muudatused -Configure=Seadista Status=Staatus -Wipe\ Out\ Workspace=Tee t\u00F6\u00F6ruum t\u00FChjaks -Workspace=T\u00F6\u00F6ruum -delete=Kustuta {0} -delete.confirm=Oled sa ikka kindel et soovid kustutada {0} \u2018{1}\u2019? -wipe.out.confirm=Oled kindel et soovid t\u00F6\u00F6ala kustutada? +Wipe\ Out\ Workspace=Tee t\u00f6\u00f6ruum t\u00fchjaks +Workspace=T\u00f6\u00f6ruum +wipe.out.confirm=Oled kindel et soovid t\u00f6\u00f6ala kustutada? diff --git a/core/src/main/resources/hudson/model/AbstractProject/sidepanel_eu.properties b/core/src/main/resources/hudson/model/AbstractProject/sidepanel_eu.properties index 3b00ec864c..8789cfe50a 100644 --- a/core/src/main/resources/hudson/model/AbstractProject/sidepanel_eu.properties +++ b/core/src/main/resources/hudson/model/AbstractProject/sidepanel_eu.properties @@ -2,7 +2,5 @@ Back\ to\ Dashboard=Taulara itzuli Changes=Aldaketak -Configure=Itxuratu Status=Estatus Wipe\ Out\ Workspace=Garbitu Workspace-a -delete={0} Ezabatu diff --git a/core/src/main/resources/hudson/model/AbstractProject/sidepanel_fi.properties b/core/src/main/resources/hudson/model/AbstractProject/sidepanel_fi.properties index 8c8b5383fe..1e0e1bd7ab 100644 --- a/core/src/main/resources/hudson/model/AbstractProject/sidepanel_fi.properties +++ b/core/src/main/resources/hudson/model/AbstractProject/sidepanel_fi.properties @@ -21,12 +21,8 @@ # THE SOFTWARE. Back\ to\ Dashboard=Takaisin kojetauluun -Build\ scheduled=K\u00E4\u00E4nn\u00F6s on jonossa Changes=Muutokset -Configure=Muokkaa Status=Tila -Wipe\ Out\ Workspace=Tyhjenn\u00E4 ty\u00F6tila -Workspace=Ty\u00F6hakemisto -delete=Poista projekti -delete.confirm=Oletko varmna ett\u00E4 {0} ''{1}'' poistetaan ? -wipe.out.confirm=Oletko varma t\u00E4m\u00E4n ty\u00F6p\u00F6yd\u00E4n poistamisesta? +Wipe\ Out\ Workspace=Tyhjenn\u00e4 ty\u00f6tila +Workspace=Ty\u00f6hakemisto +wipe.out.confirm=Oletko varma t\u00e4m\u00e4n ty\u00f6p\u00f6yd\u00e4n poistamisesta? diff --git a/core/src/main/resources/hudson/model/AbstractProject/sidepanel_fr.properties b/core/src/main/resources/hudson/model/AbstractProject/sidepanel_fr.properties index 6e69196e99..e453af67e8 100644 --- a/core/src/main/resources/hudson/model/AbstractProject/sidepanel_fr.properties +++ b/core/src/main/resources/hudson/model/AbstractProject/sidepanel_fr.properties @@ -23,11 +23,6 @@ Back\ to\ Dashboard=Retour au tableau de bord Status=\u00c9tat Changes=Modifications -Workspace=R\u00E9pertoire de travail -delete=Supprimer {0} -Configure=Configurer -Build\ scheduled=Build programm\u00E9 -View\ Configuration=Voir la configuration +Workspace=R\u00e9pertoire de travail Wipe\ Out\ Workspace=Effacer l''espace de travail -delete.confirm=\u00CAtes-vous s\u00FBr de vouloir supprimer le {0} \u2018{1}\u2019? -wipe.out.confirm=Voulez-vous vraiment effacer le r\u00E9pertoire de travail\u00A0? +wipe.out.confirm=Voulez-vous vraiment effacer le r\u00e9pertoire de travail\u00a0? diff --git a/core/src/main/resources/hudson/model/AbstractProject/sidepanel_gl.properties b/core/src/main/resources/hudson/model/AbstractProject/sidepanel_gl.properties index 311e676640..44ee6042f4 100644 --- a/core/src/main/resources/hudson/model/AbstractProject/sidepanel_gl.properties +++ b/core/src/main/resources/hudson/model/AbstractProject/sidepanel_gl.properties @@ -1,8 +1,6 @@ # This file is under the MIT License by authors Back\ to\ Dashboard=Volver ao Dashboard -Build\ scheduled=Compilaci\u00F3n programada Changes=Cambios Status=Estado Wipe\ Out\ Workspace=Borrar Workspace -delete=Borrar {0} diff --git a/core/src/main/resources/hudson/model/AbstractProject/sidepanel_he.properties b/core/src/main/resources/hudson/model/AbstractProject/sidepanel_he.properties index 1a16059f31..6ae926b697 100644 --- a/core/src/main/resources/hudson/model/AbstractProject/sidepanel_he.properties +++ b/core/src/main/resources/hudson/model/AbstractProject/sidepanel_he.properties @@ -20,13 +20,9 @@ # OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN # THE SOFTWARE. -Back\ to\ Dashboard=\u05D7\u05D6\u05E8\u05D4 \u05DC\u05E8\u05D0\u05E9\u05D9 -Build\ scheduled=\u05EA\u05D6\u05DE\u05D5\u05DF \u05D1\u05E0\u05D9\u05D9\u05D4 -Changes=\u05E9\u05D9\u05E0\u05D5\u05D9\u05D9\u05DD -Configure=\u05D4\u05D2\u05D3\u05E8\u05D4 -Status=\u05DE\u05E6\u05D1 -Wipe\ Out\ Workspace=\u05DE\u05D7\u05E7 \u05D0\u05EA \u05E9\u05D8\u05D7 \u05D4\u05E2\u05D1\u05D5\u05D3\u05D4 -Workspace=\u05E9\u05D8\u05D7 \u05E2\u05D1\u05D5\u05D3\u05D4 -delete={0} \u05DE\u05D7\u05E7 -delete.confirm=\u05D4\u05D0\u05DD \u05D0\u05EA\u05D4 \u05D1\u05D8\u05D5\u05D7 \u05E9\u05D1\u05E8\u05E6\u05D5\u05E0\u05DA \u05DC\u05DE\u05D7\u05D5\u05E7 \u05D0\u05EA {0} ''{1}''? -wipe.out.confirm=\u05D4\u05D0\u05DD \u05D0\u05EA\u05D4 \u05D1\u05D8\u05D5\u05D7 \u05E9\u05D1\u05E8\u05E6\u05D5\u05E0\u05DA \u05DC\u05DE\u05D7\u05D5\u05E7 \u05D0\u05EA \u05DE\u05E9\u05D8\u05D7 \u05D4\u05E2\u05D1\u05D5\u05D3\u05D4? +Back\ to\ Dashboard=\u05d7\u05d6\u05e8\u05d4 \u05dc\u05e8\u05d0\u05e9\u05d9 +Changes=\u05e9\u05d9\u05e0\u05d5\u05d9\u05d9\u05dd +Status=\u05de\u05e6\u05d1 +Wipe\ Out\ Workspace=\u05de\u05d7\u05e7 \u05d0\u05ea \u05e9\u05d8\u05d7 \u05d4\u05e2\u05d1\u05d5\u05d3\u05d4 +Workspace=\u05e9\u05d8\u05d7 \u05e2\u05d1\u05d5\u05d3\u05d4 +wipe.out.confirm=\u05d4\u05d0\u05dd \u05d0\u05ea\u05d4 \u05d1\u05d8\u05d5\u05d7 \u05e9\u05d1\u05e8\u05e6\u05d5\u05e0\u05da \u05dc\u05de\u05d7\u05d5\u05e7 \u05d0\u05ea \u05de\u05e9\u05d8\u05d7 \u05d4\u05e2\u05d1\u05d5\u05d3\u05d4? diff --git a/core/src/main/resources/hudson/model/AbstractProject/sidepanel_hi_IN.properties b/core/src/main/resources/hudson/model/AbstractProject/sidepanel_hi_IN.properties index cf851307e9..301650ffbf 100644 --- a/core/src/main/resources/hudson/model/AbstractProject/sidepanel_hi_IN.properties +++ b/core/src/main/resources/hudson/model/AbstractProject/sidepanel_hi_IN.properties @@ -1,9 +1,7 @@ # This file is under the MIT License by authors -Back\ to\ Dashboard=\u0921\u0948\u0936\u092C\u094B\u0930\u094D\u0921 \u0935\u093E\u092A\u0938 \u0915\u0930\u0928\u0947 \u0915\u0947 \u0932\u093F\u090F +Back\ to\ Dashboard=\u0921\u0948\u0936\u092c\u094b\u0930\u094d\u0921 \u0935\u093e\u092a\u0938 \u0915\u0930\u0928\u0947 \u0915\u0947 \u0932\u093f\u090f Changes=Badlav -Configure=\u0915\u0949\u0928\u094D\u092B\u093C\u093F\u0917\u0930 Status=Stithi -Wipe\ Out\ Workspace=\u0915\u093E\u0930\u094D\u092F\u0915\u094D\u0937\u0947\u0924\u094D\u0930 \u0935\u093F\u0928\u093E\u0936 -Workspace=\u0915\u093E\u0930\u094D\u092F\u0915\u094D\u0937\u0947\u0924\u094D\u0930 -delete=\u0939\u091F\u093E\u0928\u093E +Wipe\ Out\ Workspace=\u0915\u093e\u0930\u094d\u092f\u0915\u094d\u0937\u0947\u0924\u094d\u0930 \u0935\u093f\u0928\u093e\u0936 +Workspace=\u0915\u093e\u0930\u094d\u092f\u0915\u094d\u0937\u0947\u0924\u094d\u0930 diff --git a/core/src/main/resources/hudson/model/AbstractProject/sidepanel_hu.properties b/core/src/main/resources/hudson/model/AbstractProject/sidepanel_hu.properties index 725fa0300d..c79140e908 100644 --- a/core/src/main/resources/hudson/model/AbstractProject/sidepanel_hu.properties +++ b/core/src/main/resources/hudson/model/AbstractProject/sidepanel_hu.properties @@ -20,14 +20,10 @@ # OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN # THE SOFTWARE. -Back\ to\ Dashboard=Vissza a ir\u00E1ny\u00EDt\u00F3pultra -Build\ scheduled=\u00C9p\u00EDt\u00E9s be\u00FCtemez\u00E9se +Back\ to\ Dashboard=Vissza a ir\u00e1ny\u00edt\u00f3pultra Changes=V\u00e1ltoz\u00e1sok -Configure=Be\u00e1ll\u00edt\u00e1sok -Status=St\u00E1tusz -Wipe\ Out\ Workspace=Munkater\u00FClet kipucol\u00E1sa -Workspace=Munkater\u00FClet -delete={0} t\u00F6rl\u00E9se -delete.confirm=Biztosan t\u00F6rli a {0} \u2018{1}\u2019? +Status=St\u00e1tusz +Wipe\ Out\ Workspace=Munkater\u00fclet kipucol\u00e1sa +Workspace=Munkater\u00fclet wipe.out.confirm=Biztosan t\u00f6r\u00f6lni akarja a munkater\u00fcletet? diff --git a/core/src/main/resources/hudson/model/AbstractProject/sidepanel_id.properties b/core/src/main/resources/hudson/model/AbstractProject/sidepanel_id.properties index a0c22419b0..e06bfd1b61 100644 --- a/core/src/main/resources/hudson/model/AbstractProject/sidepanel_id.properties +++ b/core/src/main/resources/hudson/model/AbstractProject/sidepanel_id.properties @@ -21,6 +21,5 @@ # THE SOFTWARE. Back\ to\ Dashboard=Kembali ke Dashboard -Build\ scheduled=Jadwal Pembangunan Changes=Perubahan Status=Status diff --git a/core/src/main/resources/hudson/model/AbstractProject/sidepanel_is.properties b/core/src/main/resources/hudson/model/AbstractProject/sidepanel_is.properties index 04db7a0b7f..46399c4a16 100644 --- a/core/src/main/resources/hudson/model/AbstractProject/sidepanel_is.properties +++ b/core/src/main/resources/hudson/model/AbstractProject/sidepanel_is.properties @@ -20,11 +20,8 @@ # OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN # THE SOFTWARE. -Back\ to\ Dashboard=Aftur \u00E1 m\u00E6labor\u00F0 -Build\ scheduled=\u00C1\u00E6tla\u00F0ar keyrslur +Back\ to\ Dashboard=Aftur \u00e1 m\u00e6labor\u00f0 Changes=Breytingar -Configure=Breyta -Status=Sta\u00F0a -Wipe\ Out\ Workspace=Hreinsa vinnusv\u00E6\u00F0i -Workspace=Vinnusv\u00E6\u00F0i -delete=Ey\u00F0a {0} +Status=Sta\u00f0a +Wipe\ Out\ Workspace=Hreinsa vinnusv\u00e6\u00f0i +Workspace=Vinnusv\u00e6\u00f0i diff --git a/core/src/main/resources/hudson/model/AbstractProject/sidepanel_it.properties b/core/src/main/resources/hudson/model/AbstractProject/sidepanel_it.properties index aef3cb3baf..d3c4fa6beb 100644 --- a/core/src/main/resources/hudson/model/AbstractProject/sidepanel_it.properties +++ b/core/src/main/resources/hudson/model/AbstractProject/sidepanel_it.properties @@ -21,13 +21,9 @@ # THE SOFTWARE. Back\ to\ Dashboard=Ritorna al pannello di controllo -Build\ scheduled=Lavoro pianificato Changes=Modifiche -Configure=Configura Status=Stato Wipe\ Out\ Workspace=Pulisci Workspace Workspace=Area di lavoro -delete=Elimina {0} -delete.confirm=Si sicuro di voler cancellare {0} \u2018{1}\u2019? wipe.out.confirm=Sei sicuro di voler pulire il workspace? diff --git a/core/src/main/resources/hudson/model/AbstractProject/sidepanel_ja.properties b/core/src/main/resources/hudson/model/AbstractProject/sidepanel_ja.properties index cbfe2d0a6f..4ec1e1eb7f 100644 --- a/core/src/main/resources/hudson/model/AbstractProject/sidepanel_ja.properties +++ b/core/src/main/resources/hudson/model/AbstractProject/sidepanel_ja.properties @@ -25,9 +25,4 @@ Status=\u72b6\u614b Changes=\u5909\u66f4\u5c65\u6b74 Workspace=\u30ef\u30fc\u30af\u30b9\u30da\u30fc\u30b9 Wipe\ Out\ Workspace=\u30ef\u30fc\u30af\u30b9\u30da\u30fc\u30b9\u306e\u30af\u30ea\u30a2 -delete={0}\u306e\u524a\u9664 -Configure=\u8a2d\u5b9a -Build\ scheduled=\u30d3\u30eb\u30c9\u304c\u30b9\u30b1\u30b8\u30e5\u30fc\u30eb\u3055\u308c\u307e\u3057\u305f -View\ Configuration=\u8a2d\u5b9a\u306e\u53c2\u7167 -delete.confirm={0} "{1}"\u3092\u524a\u9664\u3057\u3066\u3082\u3088\u308d\u3057\u3044\u3067\u3059\u304b? wipe.out.confirm=\u30ef\u30fc\u30af\u30b9\u30da\u30fc\u30b9\u3092\u30af\u30ea\u30a2\u3057\u3066\u3082\u3088\u308d\u3057\u3044\u3067\u3059\u304b? diff --git a/core/src/main/resources/hudson/model/AbstractProject/sidepanel_kn.properties b/core/src/main/resources/hudson/model/AbstractProject/sidepanel_kn.properties index 0573b46f91..92e62377aa 100644 --- a/core/src/main/resources/hudson/model/AbstractProject/sidepanel_kn.properties +++ b/core/src/main/resources/hudson/model/AbstractProject/sidepanel_kn.properties @@ -1,10 +1,7 @@ # This file is under the MIT License by authors -Back\ to\ Dashboard=\u0CAA\u0CC1\u0CA8\u0C83 \u0CA6\u0CB7\u0CCD \u0CAC\u0CCB\u0CB0\u0CCD\u0CA1\u0CCD \u0C97\u0CC6 \u0CB9\u0CCB\u0C97\u0CC1 -Build\ scheduled=\u0CAC\u0CBF\u0CB2\u0CCD\u0CA1\u0CCD \u0C85\u0CA8\u0CC1\u0CB8\u0CC2\u0C9A\u0CBF -Changes=\u0CAC\u0CA6\u0CB2\u0CBE\u0CB5\u0CA3\u0CC6 -Configure=\u0CB8\u0C82\u0CB0\u0C9A\u0CBF\u0CB8\u0CC1 -Status=\u0CB8\u0CCD\u0CA5\u0CBF\u0CA4\u0CBF -Wipe\ Out\ Workspace=\u0C95\u0CBE\u0CB0\u0CCD\u0CAF\u0CB8\u0CCD\u0CA5\u0CB3\u0CA6\u0CBF\u0C82\u0CA6 \u0C92\u0CB0\u0CB8\u0CC1 -Workspace=\u0C95\u0CBE\u0CB0\u0CCD\u0CAF\u0CB8\u0CCD\u0CA5\u0CB3 -delete=\u0C85\u0CB3\u0CBF\u0CB8\u0CC1 +Back\ to\ Dashboard=\u0caa\u0cc1\u0ca8\u0c83 \u0ca6\u0cb7\u0ccd \u0cac\u0ccb\u0cb0\u0ccd\u0ca1\u0ccd \u0c97\u0cc6 \u0cb9\u0ccb\u0c97\u0cc1 +Changes=\u0cac\u0ca6\u0cb2\u0cbe\u0cb5\u0ca3\u0cc6 +Status=\u0cb8\u0ccd\u0ca5\u0cbf\u0ca4\u0cbf +Wipe\ Out\ Workspace=\u0c95\u0cbe\u0cb0\u0ccd\u0caf\u0cb8\u0ccd\u0ca5\u0cb3\u0ca6\u0cbf\u0c82\u0ca6 \u0c92\u0cb0\u0cb8\u0cc1 +Workspace=\u0c95\u0cbe\u0cb0\u0ccd\u0caf\u0cb8\u0ccd\u0ca5\u0cb3 diff --git a/core/src/main/resources/hudson/model/AbstractProject/sidepanel_ko.properties b/core/src/main/resources/hudson/model/AbstractProject/sidepanel_ko.properties index 179555e01b..12755400f2 100644 --- a/core/src/main/resources/hudson/model/AbstractProject/sidepanel_ko.properties +++ b/core/src/main/resources/hudson/model/AbstractProject/sidepanel_ko.properties @@ -20,13 +20,9 @@ # OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN # THE SOFTWARE. -Back\ to\ Dashboard=\uB300\uC2DC\uBCF4\uB4DC\uB85C \uB3CC\uC544\uAC00\uAE30 -Build\ scheduled=\uACC4\uD68D\uB41C \uBE4C\uB4DC -Changes=\uBCC0\uACBD\uC0AC\uD56D -Configure=\uAD6C\uC131 -Status=\uC0C1\uD0DC -Wipe\ Out\ Workspace=\uC791\uC5C5\uACF5\uAC04 \uCD08\uAE30\uD654 -Workspace=\uC791\uC5C5\uACF5\uAC04 -delete={0} \uC0AD\uC81C -delete.confirm={0} \uC744 \uC0AD\uC81C\uD558\uB294\uAC70\uC5D0 \uB300\uD574 \uB3D9\uC758\uD558\uC2ED\uB2C8\uAE4C? ''{1}'' -wipe.out.confirm=\uC791\uC5C5\uACF5\uAC04\uC744 \uCD08\uAE30\uD654\uD558\uC2DC\uACA0\uC2B5\uB2C8\uAE4C? +Back\ to\ Dashboard=\ub300\uc2dc\ubcf4\ub4dc\ub85c \ub3cc\uc544\uac00\uae30 +Changes=\ubcc0\uacbd\uc0ac\ud56d +Status=\uc0c1\ud0dc +Wipe\ Out\ Workspace=\uc791\uc5c5\uacf5\uac04 \ucd08\uae30\ud654 +Workspace=\uc791\uc5c5\uacf5\uac04 +wipe.out.confirm=\uc791\uc5c5\uacf5\uac04\uc744 \ucd08\uae30\ud654\ud558\uc2dc\uaca0\uc2b5\ub2c8\uae4c? diff --git a/core/src/main/resources/hudson/model/AbstractProject/sidepanel_lt.properties b/core/src/main/resources/hudson/model/AbstractProject/sidepanel_lt.properties index 543f60fae0..913bc959d1 100644 --- a/core/src/main/resources/hudson/model/AbstractProject/sidepanel_lt.properties +++ b/core/src/main/resources/hudson/model/AbstractProject/sidepanel_lt.properties @@ -20,13 +20,9 @@ # OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN # THE SOFTWARE. -Back\ to\ Dashboard=Gr\u012F\u017Eti \u012F Prietais\u0173 skydel\u012Fsdfs -Build\ scheduled=Konstrukcija suplanuota +Back\ to\ Dashboard=Gr\u012f\u017eti \u012f Prietais\u0173 skydel\u012fsdfs Changes=Pakeitimai -Configure=Nustatyti -Status=B\u016Bsena -Wipe\ Out\ Workspace=I\u0161valyti vis\u0105 darbalauk\u012F +Status=B\u016bsena +Wipe\ Out\ Workspace=I\u0161valyti vis\u0105 darbalauk\u012f Workspace=Darbalaukis -delete=I\u0161trinti {0} -delete.confirm=Ar j\u016Bs tikri, kad norite i\u0161trinti {0} "{1}"? -wipe.out.confirm=Ar j\u016Bs tikri, kad norite i\u0161trinti visus duomenis darbalaukyje? +wipe.out.confirm=Ar j\u016bs tikri, kad norite i\u0161trinti visus duomenis darbalaukyje? diff --git a/core/src/main/resources/hudson/model/AbstractProject/sidepanel_lv.properties b/core/src/main/resources/hudson/model/AbstractProject/sidepanel_lv.properties index 7f65c98e37..4feda737a6 100644 --- a/core/src/main/resources/hudson/model/AbstractProject/sidepanel_lv.properties +++ b/core/src/main/resources/hudson/model/AbstractProject/sidepanel_lv.properties @@ -20,13 +20,9 @@ # OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN # THE SOFTWARE. -Back\ to\ Dashboard=Atpaka\u013C uz m\u0113rinstrumentu paneli -Build\ scheduled=B\u016Bv\u0113jums iepl\u0101nots +Back\ to\ Dashboard=Atpaka\u013c uz m\u0113rinstrumentu paneli Changes=Izmai\u0146as -Configure=Konfigur\u0113t Status=Statuss -Wipe\ Out\ Workspace=Izt\u012Br\u012Bt darbavirsmu +Wipe\ Out\ Workspace=Izt\u012br\u012bt darbavirsmu Workspace=Darbavirsma -delete=Dz\u0113st {0} -delete.confirm=Vai tie\u0161\u0101m dz\u0113st {0}, \u2018{1}\u2019? -wipe.out.confirm=Vai esi p\u0101rliecin\u0101ts, ka v\u0113lies izt\u012Br\u012Bt darba mapi? +wipe.out.confirm=Vai esi p\u0101rliecin\u0101ts, ka v\u0113lies izt\u012br\u012bt darba mapi? diff --git a/core/src/main/resources/hudson/model/AbstractProject/sidepanel_nb_NO.properties b/core/src/main/resources/hudson/model/AbstractProject/sidepanel_nb_NO.properties index 88e88c3957..b15503ed26 100644 --- a/core/src/main/resources/hudson/model/AbstractProject/sidepanel_nb_NO.properties +++ b/core/src/main/resources/hudson/model/AbstractProject/sidepanel_nb_NO.properties @@ -21,13 +21,8 @@ # THE SOFTWARE. Back\ to\ Dashboard=Tilbake til oversikt -Build\ scheduled=Versjonssteg lagt i k\u00F8 Changes=Endringer -Configure=Konfigur\u00E9r Status=Status -View\ Configuration=Vis konfigurasjon -Wipe\ Out\ Workspace=Nullstill arbeidsomr\u00E5de -Workspace=Arbeidsomr\u00E5de -delete=Slett {0} -delete.confirm=Er du sikker p\u00E5 at du vil slette {0} \u2018{1}\u2019? -wipe.out.confirm=Er du sikker p\u00E5 at du vil slette filene i arbeids omr\u00E5de +Wipe\ Out\ Workspace=Nullstill arbeidsomr\u00e5de +Workspace=Arbeidsomr\u00e5de +wipe.out.confirm=Er du sikker p\u00e5 at du vil slette filene i arbeids omr\u00e5de diff --git a/core/src/main/resources/hudson/model/AbstractProject/sidepanel_nl.properties b/core/src/main/resources/hudson/model/AbstractProject/sidepanel_nl.properties index 0e4a786c58..8efc4dcfb5 100644 --- a/core/src/main/resources/hudson/model/AbstractProject/sidepanel_nl.properties +++ b/core/src/main/resources/hudson/model/AbstractProject/sidepanel_nl.properties @@ -22,11 +22,7 @@ Back\ to\ Dashboard=Terug naar dashboard Status=Projectstatus -Build\ scheduled=Bouw gepland Changes=Wijzigingen Wipe\ Out\ Workspace=Leeg Werkmap Workspace=Werkmap -delete={0} verwijderen -Configure=Configureren -delete.confirm=Ben je zeker van het verwijderen van de {0} {1}? wipe.out.confirm=Ben je zeker van de werkplaats leegmaken? diff --git a/core/src/main/resources/hudson/model/AbstractProject/sidepanel_pl.properties b/core/src/main/resources/hudson/model/AbstractProject/sidepanel_pl.properties index 06ae13020a..5b8c205892 100644 --- a/core/src/main/resources/hudson/model/AbstractProject/sidepanel_pl.properties +++ b/core/src/main/resources/hudson/model/AbstractProject/sidepanel_pl.properties @@ -20,13 +20,8 @@ # OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN # THE SOFTWARE. -Back\ to\ Dashboard=Powr\u00F3t do Dashboard''u -Build\ scheduled=Kompilacja zaplanowana +Back\ to\ Dashboard=Powr\u00f3t do Dashboard''u Changes=Rejestr zmian -Configure=Konfiguruj -View\ Configuration=Podgl\u0105d konfiguracji -Wipe\ Out\ Workspace=Wyczy\u015B\u0107 przestrze\u0144 robocz\u0105 +Wipe\ Out\ Workspace=Wyczy\u015b\u0107 przestrze\u0144 robocz\u0105 Workspace=Przestrze\u0144 robocza -delete=Usu\u0144 {0} -delete.confirm=Czy na pewno usun\u0105\u0107 {0} \u2018{1}\u2019? -wipe.out.confirm=Czy na pewno wyczy\u015Bci\u0107 przestrze\u0144 robocz\u0105? +wipe.out.confirm=Czy na pewno wyczy\u015bci\u0107 przestrze\u0144 robocz\u0105? diff --git a/core/src/main/resources/hudson/model/AbstractProject/sidepanel_pt_BR.properties b/core/src/main/resources/hudson/model/AbstractProject/sidepanel_pt_BR.properties index 5f5c8076a2..0c5243b19d 100644 --- a/core/src/main/resources/hudson/model/AbstractProject/sidepanel_pt_BR.properties +++ b/core/src/main/resources/hudson/model/AbstractProject/sidepanel_pt_BR.properties @@ -22,11 +22,6 @@ Back\ to\ Dashboard=Voltar para o Dashboard Status=Situa\u00e7\u00e3o -Build\ scheduled=build agendada Changes=Altera\u00e7\u00f5es Wipe\ Out\ Workspace=Limpar workspace -delete=Excluir {0} -Configure=Configurar -View\ Configuration= Configurar a view -delete.confirm=Quer mesmo remover {0} '{1}'? wipe.out.confirm=Tem certeza que quer remover o workspace? diff --git a/core/src/main/resources/hudson/model/AbstractProject/sidepanel_pt_PT.properties b/core/src/main/resources/hudson/model/AbstractProject/sidepanel_pt_PT.properties index 59425a653f..2aa9f3f43a 100644 --- a/core/src/main/resources/hudson/model/AbstractProject/sidepanel_pt_PT.properties +++ b/core/src/main/resources/hudson/model/AbstractProject/sidepanel_pt_PT.properties @@ -21,11 +21,7 @@ # THE SOFTWARE. Back\ to\ Dashboard=Voltar para o Dashboard -Build\ scheduled=Build Agendado -Changes=Altera\u00E7\u00F5es -Configure=Configurar +Changes=Altera\u00e7\u00f5es Status=Estado -Wipe\ Out\ Workspace=Limpe para fora o espa\u00E7o de trabalho atual -delete=Eliminar {0} -delete.confirm=Voc\u00EA tem certeza sobre a exclus\u00E3o do {0} {1} ''? -wipe.out.confirm=Tem certeza acabando com o espa\u00E7o de trabalho? +Wipe\ Out\ Workspace=Limpe para fora o espa\u00e7o de trabalho atual +wipe.out.confirm=Tem certeza acabando com o espa\u00e7o de trabalho? diff --git a/core/src/main/resources/hudson/model/AbstractProject/sidepanel_ro.properties b/core/src/main/resources/hudson/model/AbstractProject/sidepanel_ro.properties index f2bfdcc1cb..a35313f314 100644 --- a/core/src/main/resources/hudson/model/AbstractProject/sidepanel_ro.properties +++ b/core/src/main/resources/hudson/model/AbstractProject/sidepanel_ro.properties @@ -21,12 +21,8 @@ # THE SOFTWARE. Back\ to\ Dashboard=Inapoi la Dashboard -Build\ scheduled=Build programat Changes=Schimb\u0103ri -Configure=Configureaz\u0103 Status=Stare -Wipe\ Out\ Workspace=Cur\u0103\u021B\u0103 spa\u021Biul de lucru -Workspace=Spa\u021Biul de lucru -delete=\u0218terge {0} -delete.confirm=E\u0219ti sigur c\u0103 vrei s\u0103 \u0219tergi {0} \u2018{1}\u2019? -wipe.out.confirm=E\u0219ti sigur c\u0103 vrei s\u0103 cure\u021Bi spa\u021Biul de lucru? +Wipe\ Out\ Workspace=Cur\u0103\u021b\u0103 spa\u021biul de lucru +Workspace=Spa\u021biul de lucru +wipe.out.confirm=E\u0219ti sigur c\u0103 vrei s\u0103 cure\u021bi spa\u021biul de lucru? diff --git a/core/src/main/resources/hudson/model/AbstractProject/sidepanel_ru.properties b/core/src/main/resources/hudson/model/AbstractProject/sidepanel_ru.properties index 63fc57f51b..cab30ebfd7 100644 --- a/core/src/main/resources/hudson/model/AbstractProject/sidepanel_ru.properties +++ b/core/src/main/resources/hudson/model/AbstractProject/sidepanel_ru.properties @@ -23,11 +23,6 @@ Back\ to\ Dashboard=\u041d\u0430 \u0433\u043b\u0430\u0432\u043d\u0443\u044e Status=\u0421\u0442\u0430\u0442\u0443\u0441 Changes=\u0418\u0437\u043c\u0435\u043d\u0435\u043d\u0438\u044f -View\ Configuration=\u0421\u043c\u043e\u0442\u0440\u0435\u0442\u044c \u043a\u043e\u043d\u0444\u0438\u0433\u0443\u0440\u0430\u0446\u0438\u044e Wipe\ Out\ Workspace=\u0423\u0434\u0430\u043b\u0438\u0442\u044c \u0432\u0441\u0435 \u0432 \u0441\u0431\u043e\u0440\u043e\u0447\u043d\u043e\u0439 \u0434\u0438\u0440\u0435\u043a\u0442\u043e\u0440\u0438\u0438 Workspace=\u0421\u0431\u043e\u0440\u043e\u0447\u043d\u0430\u044f \u0434\u0438\u0440\u0435\u043a\u0442\u043e\u0440\u0438\u044f -delete=\u0423\u0434\u0430\u043b\u0438\u0442\u044c {0} -Configure=\u041d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0438 -Build\ scheduled=\u0421\u0431\u043e\u0440\u043a\u0430 \u0437\u0430\u043f\u043b\u0430\u043d\u0438\u0440\u043e\u0432\u0430\u043d\u0430 -delete.confirm=\u0412\u044b \u0442\u043e\u0447\u043d\u043e \u0445\u043e\u0442\u0438\u0442\u0435 \u0443\u0434\u0430\u043b\u0438\u0442\u044c {0} \u2018{1}\u2019? wipe.out.confirm=\u041f\u043e\u0434\u0442\u0432\u0435\u0440\u0434\u0438\u0442\u0435, \u0447\u0442\u043e \u0432\u044b \u0445\u043e\u0442\u0438\u0442\u0435 \u0444\u0438\u0437\u0438\u0447\u0435\u0441\u043a\u0438 \u0443\u0434\u0430\u043b\u0438\u0442\u044c \u0432\u0441\u0435 \u0444\u0430\u0439\u043b\u044b \u0438\u0437 \u0440\u0430\u0431\u043e\u0447\u0435\u0433\u043e \u043f\u0440\u043e\u0441\u0442\u0440\u0430\u043d\u0441\u0442\u0432\u0430? diff --git a/core/src/main/resources/hudson/model/AbstractProject/sidepanel_si.properties b/core/src/main/resources/hudson/model/AbstractProject/sidepanel_si.properties index 1e608e8652..871e1bdc86 100644 --- a/core/src/main/resources/hudson/model/AbstractProject/sidepanel_si.properties +++ b/core/src/main/resources/hudson/model/AbstractProject/sidepanel_si.properties @@ -1,7 +1,5 @@ # This file is under the MIT License by authors -Back\ to\ Dashboard=\u0D86\u0DB4\u0DC3\u0DD4 \u0DB1\u0DD2\u0DBB\u0DD3\u0D9A\u0DCA\u0DC2\u0DAB \u0DB4\u0DD2\u0DA7\u0DD4\u0DC0\u0DA7 -Changes=\u0DC0\u0DD9\u0DB1\u0DC3\u0DCA\u0D9A\u0DB8\u0DCA -Configure=\u0DC3\u0D9A\u0DC3\u0DB1\u0DCA\u0DB1 -Status=\u0DAD\u0DAD\u0DCA\u0DC0\u0DBA -delete=\u0DB8\u0D9A\u0DB1\u0DCA\u0DB1 {0} +Back\ to\ Dashboard=\u0d86\u0db4\u0dc3\u0dd4 \u0db1\u0dd2\u0dbb\u0dd3\u0d9a\u0dca\u0dc2\u0dab \u0db4\u0dd2\u0da7\u0dd4\u0dc0\u0da7 +Changes=\u0dc0\u0dd9\u0db1\u0dc3\u0dca\u0d9a\u0db8\u0dca +Status=\u0dad\u0dad\u0dca\u0dc0\u0dba diff --git a/core/src/main/resources/hudson/model/AbstractProject/sidepanel_sk.properties b/core/src/main/resources/hudson/model/AbstractProject/sidepanel_sk.properties index 920c73c75a..a85399d897 100644 --- a/core/src/main/resources/hudson/model/AbstractProject/sidepanel_sk.properties +++ b/core/src/main/resources/hudson/model/AbstractProject/sidepanel_sk.properties @@ -20,13 +20,9 @@ # OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN # THE SOFTWARE. -Back\ to\ Dashboard=Sp\u00E4\u0165 na Dashboard -Build\ scheduled=Zostavenie napl\u00E1novan\u00E9 +Back\ to\ Dashboard=Sp\u00e4\u0165 na Dashboard Changes=Zmeny -Configure=Nastav -Status=S\u00FAhrn -Wipe\ Out\ Workspace=Vy\u010Disti\u0165 pracovn\u00FD priestor -Workspace=Pracovn\u00FD priestor -delete=Odstr\u00E1ni\u0165 -delete.confirm=Si si ist\u00FD vymazan\u00EDm {0} ''{1}''? -wipe.out.confirm=Si si ist\u00FD vymazan\u00EDm pracovn\u00E9ho priestoru? +Status=S\u00fahrn +Wipe\ Out\ Workspace=Vy\u010disti\u0165 pracovn\u00fd priestor +Workspace=Pracovn\u00fd priestor +wipe.out.confirm=Si si ist\u00fd vymazan\u00edm pracovn\u00e9ho priestoru? diff --git a/core/src/main/resources/hudson/model/AbstractProject/sidepanel_sl.properties b/core/src/main/resources/hudson/model/AbstractProject/sidepanel_sl.properties index 84870f8eac..52226789c1 100644 --- a/core/src/main/resources/hudson/model/AbstractProject/sidepanel_sl.properties +++ b/core/src/main/resources/hudson/model/AbstractProject/sidepanel_sl.properties @@ -21,12 +21,8 @@ # THE SOFTWARE. Back\ to\ Dashboard=Nazaj na Pregledni zapis -Build\ scheduled=Buildaj po umiku Changes=Spremembe -Configure=Nastavitve Status=Stanje Wipe\ Out\ Workspace=Bri\u0161i delovno okolje Workspace=Delovno okolje -delete=Izbri\u0161i -delete.confirm=Ali ste prepri\u010Dana o izbrisanju ? -wipe.out.confirm=Ali ste prepri\u010Dani, da bi izbrisal delovno okolje? +wipe.out.confirm=Ali ste prepri\u010dani, da bi izbrisal delovno okolje? diff --git a/core/src/main/resources/hudson/model/AbstractProject/sidepanel_sr.properties b/core/src/main/resources/hudson/model/AbstractProject/sidepanel_sr.properties index 650f18c0ea..2eebf4c981 100644 --- a/core/src/main/resources/hudson/model/AbstractProject/sidepanel_sr.properties +++ b/core/src/main/resources/hudson/model/AbstractProject/sidepanel_sr.properties @@ -1,10 +1,6 @@ # This file is under the MIT License by authors Back\ to\ Dashboard=Nazad na Tablu -Build\ scheduled=Build je zakazan Changes=Izmene -Configure=Podesavana Wipe\ Out\ Workspace=Obrisi Workspace -delete=Obrisi {0} -delete.confirm=Da li \u017Eeli\u0161 da obri\u0161e\u0161 {0} \u2018{1}\u2019? -wipe.out.confirm=Da li si siguran da \u017Eeli\u0161 da poni\u0161ti\u0161 radni prostor +wipe.out.confirm=Da li si siguran da \u017eeli\u0161 da poni\u0161ti\u0161 radni prostor diff --git a/core/src/main/resources/hudson/model/AbstractProject/sidepanel_sv_SE.properties b/core/src/main/resources/hudson/model/AbstractProject/sidepanel_sv_SE.properties index 5088b3cfde..2eb380d534 100644 --- a/core/src/main/resources/hudson/model/AbstractProject/sidepanel_sv_SE.properties +++ b/core/src/main/resources/hudson/model/AbstractProject/sidepanel_sv_SE.properties @@ -20,13 +20,9 @@ # OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN # THE SOFTWARE. -Back\ to\ Dashboard=Tillbaka till \u00D6versikten -Build\ scheduled=Jobbet schemalagt +Back\ to\ Dashboard=Tillbaka till \u00d6versikten Changes=F\u00f6r\u00e4ndringar -Configure=Konfigurera Status=Status Wipe\ Out\ Workspace=Ta bort arbetsyta Workspace=Arbetsyta -delete=Ta bort {0} -delete.confirm=\u00C4r du s\u00E4ker p\u00E5 att du vill ta bort {0} \u2018{1}\u2019? wipe.out.confirm=\u00c4r du s\u00e4ker p\u00e5 att du vill rensa arbetsytan? diff --git a/core/src/main/resources/hudson/model/AbstractProject/sidepanel_te.properties b/core/src/main/resources/hudson/model/AbstractProject/sidepanel_te.properties index 8c568c0013..bea0ddc980 100644 --- a/core/src/main/resources/hudson/model/AbstractProject/sidepanel_te.properties +++ b/core/src/main/resources/hudson/model/AbstractProject/sidepanel_te.properties @@ -1,9 +1,7 @@ # This file is under the MIT License by authors -Back\ to\ Dashboard=\u0C24\u0C3F\u0C30\u0C3F\u0C17\u0C3F \u0C21\u0C3E\u0C37\u0C4D\u0C2C\u0C4B\u0C30\u0C4D\u0C21\u0C4D \u0C15\u0C41 -Build\ scheduled=\u0C37\u0C46\u0C21\u0C4D\u0C2F\u0C42\u0C32\u0C4D \u0C1A\u0C47\u0C2F\u0C2C\u0C21\u0C3F\u0C28 \u0C2C\u0C3F\u0C32\u0C4D\u0C21\u0C4D -Changes=\u0C2E\u0C3E\u0C30\u0C4D\u0C2A\u0C41\u0C32\u0C41 -Status=\u0C38\u0C4D\u0C1F\u0C47\u0C1F\u0C38\u0C4D -Wipe\ Out\ Workspace=\u0C35\u0C30\u0C4D\u0C15\u0C4D \u0C38\u0C4D\u0C2A\u0C47\u0C38\u0C4D \u0C24\u0C41\u0C21\u0C41\u0C35\u0C41 -Workspace=\u0C35\u0C30\u0C4D\u0C15\u0C4D \u0C38\u0C4D\u0C2A\u0C47\u0C38\u0C4D -delete=\u0C24\u0C4A\u0C32\u0C17\u0C3F\u0C02\u0C1A\u0C41 {0} +Back\ to\ Dashboard=\u0c24\u0c3f\u0c30\u0c3f\u0c17\u0c3f \u0c21\u0c3e\u0c37\u0c4d\u0c2c\u0c4b\u0c30\u0c4d\u0c21\u0c4d \u0c15\u0c41 +Changes=\u0c2e\u0c3e\u0c30\u0c4d\u0c2a\u0c41\u0c32\u0c41 +Status=\u0c38\u0c4d\u0c1f\u0c47\u0c1f\u0c38\u0c4d +Wipe\ Out\ Workspace=\u0c35\u0c30\u0c4d\u0c15\u0c4d \u0c38\u0c4d\u0c2a\u0c47\u0c38\u0c4d \u0c24\u0c41\u0c21\u0c41\u0c35\u0c41 +Workspace=\u0c35\u0c30\u0c4d\u0c15\u0c4d \u0c38\u0c4d\u0c2a\u0c47\u0c38\u0c4d diff --git a/core/src/main/resources/hudson/model/AbstractProject/sidepanel_th.properties b/core/src/main/resources/hudson/model/AbstractProject/sidepanel_th.properties index 6ebfb0a0eb..a717f2a0fb 100644 --- a/core/src/main/resources/hudson/model/AbstractProject/sidepanel_th.properties +++ b/core/src/main/resources/hudson/model/AbstractProject/sidepanel_th.properties @@ -1,10 +1,7 @@ # This file is under the MIT License by authors -Back\ to\ Dashboard=\u0E01\u0E25\u0E31\u0E1A\u0E44\u0E1B\u0E22\u0E31\u0E07\u0E41\u0E14\u0E0A\u0E1A\u0E2D\u0E23\u0E4C\u0E14 -Build\ scheduled=\u0E1A\u0E34\u0E25\u0E14\u0E4C\u0E44\u0E14\u0E49\u0E16\u0E39\u0E01\u0E01\u0E33\u0E2B\u0E19\u0E14\u0E40\u0E27\u0E25\u0E32\u0E2A\u0E23\u0E49\u0E32\u0E07\u0E41\u0E25\u0E49\u0E27 -Changes=\u0E04\u0E27\u0E32\u0E21\u0E40\u0E1B\u0E25\u0E35\u0E48\u0E22\u0E19\u0E41\u0E1B\u0E25\u0E07 -Status=\u0E2A\u0E16\u0E32\u0E19\u0E30 -View\ Configuration=\u0E14\u0E39\u0E01\u0E32\u0E23\u0E1B\u0E23\u0E31\u0E1A\u0E15\u0E31\u0E49\u0E07\u0E04\u0E48\u0E32 -Wipe\ Out\ Workspace=\u0E25\u0E49\u0E32\u0E07\u0E1E\u0E37\u0E49\u0E19\u0E17\u0E35\u0E48\u0E17\u0E33\u0E07\u0E32\u0E19 -Workspace=\u0E1E\u0E37\u0E49\u0E19\u0E17\u0E35\u0E48\u0E17\u0E33\u0E07\u0E32\u0E19 -delete=\u0E25\u0E1A {0} +Back\ to\ Dashboard=\u0e01\u0e25\u0e31\u0e1a\u0e44\u0e1b\u0e22\u0e31\u0e07\u0e41\u0e14\u0e0a\u0e1a\u0e2d\u0e23\u0e4c\u0e14 +Changes=\u0e04\u0e27\u0e32\u0e21\u0e40\u0e1b\u0e25\u0e35\u0e48\u0e22\u0e19\u0e41\u0e1b\u0e25\u0e07 +Status=\u0e2a\u0e16\u0e32\u0e19\u0e30 +Wipe\ Out\ Workspace=\u0e25\u0e49\u0e32\u0e07\u0e1e\u0e37\u0e49\u0e19\u0e17\u0e35\u0e48\u0e17\u0e33\u0e07\u0e32\u0e19 +Workspace=\u0e1e\u0e37\u0e49\u0e19\u0e17\u0e35\u0e48\u0e17\u0e33\u0e07\u0e32\u0e19 diff --git a/core/src/main/resources/hudson/model/AbstractProject/sidepanel_tr.properties b/core/src/main/resources/hudson/model/AbstractProject/sidepanel_tr.properties index bcc869676d..e093cae2c2 100644 --- a/core/src/main/resources/hudson/model/AbstractProject/sidepanel_tr.properties +++ b/core/src/main/resources/hudson/model/AbstractProject/sidepanel_tr.properties @@ -20,13 +20,9 @@ # OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN # THE SOFTWARE. -delete={0} sil -Back\ to\ Dashboard=Kontrol Merkezi''ne D\u00F6n +Back\ to\ Dashboard=Kontrol Merkezi''ne D\u00f6n Status=Durum Changes=De\u011fi\u015fiklikler -Wipe\ Out\ Workspace=\u00C7al\u0131\u015Fma alan\u0131n\u0131 sil +Wipe\ Out\ Workspace=\u00c7al\u0131\u015fma alan\u0131n\u0131 sil Workspace=\u00c7al\u0131\u015fma Alan\u0131 -Configure=Konfig\u00fcrasyonu D\u00fczenle -Build\ scheduled=Yap\u0131land\u0131rma planland\u0131 -delete.confirm=Silmek istedi\u011Finizden emin misiniz: {0} ''{1}''? -wipe.out.confirm=T\u00FCm alan\u0131 silmek istedi\u011Finize emin misiniz? +wipe.out.confirm=T\u00fcm alan\u0131 silmek istedi\u011finize emin misiniz? diff --git a/core/src/main/resources/hudson/model/AbstractProject/sidepanel_uk.properties b/core/src/main/resources/hudson/model/AbstractProject/sidepanel_uk.properties index 304a9dc4c3..ab36cd129a 100644 --- a/core/src/main/resources/hudson/model/AbstractProject/sidepanel_uk.properties +++ b/core/src/main/resources/hudson/model/AbstractProject/sidepanel_uk.properties @@ -20,13 +20,9 @@ # OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN # THE SOFTWARE. -Back\ to\ Dashboard=\u041D\u0430\u0437\u0430\u0434 \u0434\u043E \u041F\u0430\u043D\u0435\u043B\u0456 -Build\ scheduled=\u0417\u0430\u043F\u043B\u0430\u043D\u043E\u0432\u0430\u043D\u0456 \u0437\u0431\u0456\u0440\u043A\u0438 -Changes=\u0417\u043C\u0456\u043D\u0438 -Configure=\u041D\u0430\u043B\u0430\u0448\u0442\u0443\u0432\u0430\u043D\u043D\u044F +Back\ to\ Dashboard=\u041d\u0430\u0437\u0430\u0434 \u0434\u043e \u041f\u0430\u043d\u0435\u043b\u0456 +Changes=\u0417\u043c\u0456\u043d\u0438 Status=\u0421\u0442\u0430\u0442\u0443\u0441 -Wipe\ Out\ Workspace=\u041E\u0447\u0438\u0441\u0442\u0438\u0442\u0438 \u0440\u043E\u0431\u043E\u0447\u0438\u0439 \u043F\u0440\u043E\u0441\u0442\u0456\u0440 -Workspace=\u0420\u043E\u0431\u043E\u0447\u0438\u0439 \u041F\u0440\u043E\u0441\u0442\u0456\u0440 -delete=\u0412\u0438\u0434\u0430\u043B\u0438\u0442\u0438 {0} -delete.confirm=\u0412\u0438 \u0432\u043F\u0435\u0432\u043D\u0435\u043D\u0456, \u0449\u043E \u0445\u043E\u0447\u0435\u0442\u0435 \u0432\u0438\u0434\u0430\u043B\u0438\u0442\u0438 {0} \u2018{1}\u2019? -wipe.out.confirm=\u0412\u0438 \u0432\u043F\u0435\u0432\u043D\u0435\u043D\u0456, \u0449\u043E \u0445\u043E\u0447\u0435\u0442\u0435 \u0432\u0438\u0434\u0430\u043B\u0438\u0442\u0438 \u0440\u043E\u0431\u043E\u0447\u0456 \u0444\u0430\u0439\u043B\u0438? +Wipe\ Out\ Workspace=\u041e\u0447\u0438\u0441\u0442\u0438\u0442\u0438 \u0440\u043e\u0431\u043e\u0447\u0438\u0439 \u043f\u0440\u043e\u0441\u0442\u0456\u0440 +Workspace=\u0420\u043e\u0431\u043e\u0447\u0438\u0439 \u041f\u0440\u043e\u0441\u0442\u0456\u0440 +wipe.out.confirm=\u0412\u0438 \u0432\u043f\u0435\u0432\u043d\u0435\u043d\u0456, \u0449\u043e \u0445\u043e\u0447\u0435\u0442\u0435 \u0432\u0438\u0434\u0430\u043b\u0438\u0442\u0438 \u0440\u043e\u0431\u043e\u0447\u0456 \u0444\u0430\u0439\u043b\u0438? diff --git a/core/src/main/resources/hudson/model/AbstractProject/sidepanel_zh_CN.properties b/core/src/main/resources/hudson/model/AbstractProject/sidepanel_zh_CN.properties index 08f9a336e5..eb009ec925 100644 --- a/core/src/main/resources/hudson/model/AbstractProject/sidepanel_zh_CN.properties +++ b/core/src/main/resources/hudson/model/AbstractProject/sidepanel_zh_CN.properties @@ -20,14 +20,9 @@ # OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN # THE SOFTWARE. -Back\ to\ Dashboard=\u8FD4\u56DE\u9762\u677F -Build\ scheduled=\u6784\u5EFA\u8BA1\u5212 -Changes=\u4FEE\u6539\u8BB0\u5F55 -Configure=\u914d\u7f6e +Back\ to\ Dashboard=\u8fd4\u56de\u9762\u677f +Changes=\u4fee\u6539\u8bb0\u5f55 Status=\u72b6\u6001 -View\ Configuration=\u67e5\u770b\u914d\u7f6e -Wipe\ Out\ Workspace=\u6E05\u7406\u5DE5\u4F5C\u7A7A\u95F4 -Workspace=\u5DE5\u4F5C\u7A7A\u95F4 -delete=\u5220\u9664 {0} -delete.confirm=\u786E\u8BA4\u5220\u9664 {0} \u2018{1}\u2019? -wipe.out.confirm=\u786E\u5B9A\u60F3\u8981\u6E05\u7A7A\u5DE5\u4F5C\u7A7A\u95F4\u5417\uFF1F +Wipe\ Out\ Workspace=\u6e05\u7406\u5de5\u4f5c\u7a7a\u95f4 +Workspace=\u5de5\u4f5c\u7a7a\u95f4 +wipe.out.confirm=\u786e\u5b9a\u60f3\u8981\u6e05\u7a7a\u5de5\u4f5c\u7a7a\u95f4\u5417\uff1f diff --git a/core/src/main/resources/hudson/model/AbstractProject/sidepanel_zh_TW.properties b/core/src/main/resources/hudson/model/AbstractProject/sidepanel_zh_TW.properties index c64b997543..726ef4a234 100644 --- a/core/src/main/resources/hudson/model/AbstractProject/sidepanel_zh_TW.properties +++ b/core/src/main/resources/hudson/model/AbstractProject/sidepanel_zh_TW.properties @@ -24,13 +24,7 @@ Back\ to\ Dashboard=\u56de\u5230\u5100\u8868\u677f Status=\u72c0\u614b Changes=\u8b8a\u66f4 -Workspace=\u5DE5\u4F5C\u76EE\u9304 -Wipe\ Out\ Workspace=\u6E05\u9664\u5DE5\u4F5C\u76EE\u9304 +Workspace=\u5de5\u4f5c\u76ee\u9304 +Wipe\ Out\ Workspace=\u6e05\u9664\u5de5\u4f5c\u76ee\u9304 -Build\ scheduled=\u5df2\u6392\u5165\u5efa\u7f6e - -delete=\u522A\u9664{0} -Configure=\u7D44\u614B -View\ Configuration=\u6aa2\u8996\u8a2d\u5b9a -delete.confirm=\u60A8\u78BA\u5B9A\u8981\u522A\u9664 {0} \u2018{1}\u2019 \u55CE\uFF1F wipe.out.confirm=\u78ba\u5b9a\u8981\u6e05\u9664\u5de5\u4f5c\u5340? diff --git a/core/src/main/resources/hudson/model/AbstractProject/requirePOST.jelly b/core/src/main/resources/hudson/model/Job/requirePOST.jelly similarity index 100% rename from core/src/main/resources/hudson/model/AbstractProject/requirePOST.jelly rename to core/src/main/resources/hudson/model/Job/requirePOST.jelly diff --git a/core/src/main/resources/hudson/model/AbstractProject/requirePOST.properties b/core/src/main/resources/hudson/model/Job/requirePOST.properties similarity index 100% rename from core/src/main/resources/hudson/model/AbstractProject/requirePOST.properties rename to core/src/main/resources/hudson/model/Job/requirePOST.properties diff --git a/core/src/main/resources/hudson/model/AbstractProject/requirePOST_de.properties b/core/src/main/resources/hudson/model/Job/requirePOST_de.properties similarity index 100% rename from core/src/main/resources/hudson/model/AbstractProject/requirePOST_de.properties rename to core/src/main/resources/hudson/model/Job/requirePOST_de.properties diff --git a/core/src/main/resources/hudson/model/AbstractProject/requirePOST_ja.properties b/core/src/main/resources/hudson/model/Job/requirePOST_ja.properties similarity index 100% rename from core/src/main/resources/hudson/model/AbstractProject/requirePOST_ja.properties rename to core/src/main/resources/hudson/model/Job/requirePOST_ja.properties diff --git a/core/src/main/resources/hudson/model/AbstractProject/requirePOST_pt_BR.properties b/core/src/main/resources/hudson/model/Job/requirePOST_pt_BR.properties similarity index 100% rename from core/src/main/resources/hudson/model/AbstractProject/requirePOST_pt_BR.properties rename to core/src/main/resources/hudson/model/Job/requirePOST_pt_BR.properties diff --git a/core/src/main/resources/hudson/model/AbstractProject/requirePOST_zh_TW.properties b/core/src/main/resources/hudson/model/Job/requirePOST_zh_TW.properties similarity index 100% rename from core/src/main/resources/hudson/model/AbstractProject/requirePOST_zh_TW.properties rename to core/src/main/resources/hudson/model/Job/requirePOST_zh_TW.properties diff --git a/core/src/main/resources/hudson/model/ParametersAction/index.jelly b/core/src/main/resources/hudson/model/ParametersAction/index.jelly index b163b8f3aa..2c25579adc 100644 --- a/core/src/main/resources/hudson/model/ParametersAction/index.jelly +++ b/core/src/main/resources/hudson/model/ParametersAction/index.jelly @@ -29,7 +29,7 @@ THE SOFTWARE. - + diff --git a/core/src/main/resources/hudson/model/ParametersDefinitionProperty/index.jelly b/core/src/main/resources/hudson/model/ParametersDefinitionProperty/index.jelly index ec2bd58aec..d91f088dcb 100644 --- a/core/src/main/resources/hudson/model/ParametersDefinitionProperty/index.jelly +++ b/core/src/main/resources/hudson/model/ParametersDefinitionProperty/index.jelly @@ -36,10 +36,10 @@ THE SOFTWARE. --> - +

${%LOADING}
-

${it.owner.pronoun} ${it.owner.displayName}

+

${it.job.pronoun} ${it.job.displayName}

${%description}

+ + + + + + + + + + + + + + + + + + + diff --git a/core/src/main/resources/lib/hudson/project/configurable.properties b/core/src/main/resources/lib/hudson/project/configurable.properties new file mode 100644 index 0000000000..a61ee48077 --- /dev/null +++ b/core/src/main/resources/lib/hudson/project/configurable.properties @@ -0,0 +1,24 @@ +# The MIT License +# +# Copyright 2014 Jesse Glick. +# +# 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. + +delete=Delete {0} +delete.confirm=Are you sure about deleting the {0} \u2018{1}\u2019? diff --git a/core/src/main/resources/lib/hudson/project/configurable_ar.properties b/core/src/main/resources/lib/hudson/project/configurable_ar.properties new file mode 100644 index 0000000000..ae43171b38 --- /dev/null +++ b/core/src/main/resources/lib/hudson/project/configurable_ar.properties @@ -0,0 +1,25 @@ +# The MIT License +# +# Copyright 2014 Jesse Glick. +# +# 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. + +Build\ scheduled=\u0628\u0631\u0646\u0627\u0645\u062c \u0627\u0644\u0628\u0646\u0627\u0621 +Configure=\u063a\u064a\u0631 \u0627\u0644\u0625\u0639\u062f\u0627\u062f\u0627\u062a +delete=\u062e\u0630\u0641 diff --git a/core/src/main/resources/lib/hudson/project/configurable_bg.properties b/core/src/main/resources/lib/hudson/project/configurable_bg.properties new file mode 100644 index 0000000000..10ba94dfd7 --- /dev/null +++ b/core/src/main/resources/lib/hudson/project/configurable_bg.properties @@ -0,0 +1,26 @@ +# The MIT License +# +# Copyright 2014 Jesse Glick. +# +# 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. + +Build\ scheduled=\u041d\u0430\u0441\u0440\u043e\u0447\u0435\u043d \u0431\u0438\u043b\u0434 +Configure=\u041a\u043e\u043d\u0444\u0438\u0433\u0443\u0440\u0438\u0440\u0430\u0439 +delete=\u0418\u0437\u0442\u0440\u0438\u0439 {0} +delete.confirm=\u0421\u0438\u0433\u0443\u0440\u043d\u0438 \u043b\u0438 \u0441\u0442\u0435, \u0447\u0435 \u0438\u0441\u043a\u0430\u0442\u0435 \u0434\u0430 \u0438\u0437\u0442\u0440\u0438\u0435\u0442\u0435 {0} \u2018{1}\u2019? diff --git a/core/src/main/resources/lib/hudson/project/configurable_ca.properties b/core/src/main/resources/lib/hudson/project/configurable_ca.properties new file mode 100644 index 0000000000..c7e45e429b --- /dev/null +++ b/core/src/main/resources/lib/hudson/project/configurable_ca.properties @@ -0,0 +1,26 @@ +# The MIT License +# +# Copyright 2014 Jesse Glick. +# +# 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. + +Build\ scheduled=Construcci\u00f3 programada +Configure=Configura +delete=Suprimeix {0} +delete.confirm=Est\u00e0s segur que vols esborrar {0} \u2018{1}\u2019? diff --git a/core/src/main/resources/lib/hudson/project/configurable_cs.properties b/core/src/main/resources/lib/hudson/project/configurable_cs.properties new file mode 100644 index 0000000000..0d23024288 --- /dev/null +++ b/core/src/main/resources/lib/hudson/project/configurable_cs.properties @@ -0,0 +1,26 @@ +# The MIT License +# +# Copyright 2014 Jesse Glick. +# +# 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. + +Build\ scheduled=Sestaven\u00ed napl\u00e1nov\u00e1no +Configure=Nastavit +delete=Smazat {0} +delete.confirm=Jste si jisti, \u017ee chcete smazat {0} \u2018{1}\u2019? diff --git a/core/src/main/resources/lib/hudson/project/configurable_da.properties b/core/src/main/resources/lib/hudson/project/configurable_da.properties new file mode 100644 index 0000000000..47bf0e6ac1 --- /dev/null +++ b/core/src/main/resources/lib/hudson/project/configurable_da.properties @@ -0,0 +1,27 @@ +# The MIT License +# +# Copyright 2014 Jesse Glick. +# +# 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. + +delete=Slet {0} +Configure=Konfigurer +Build\ scheduled=Byg planlagt +View\ Configuration=Vis konfiguration +delete.confirm=Er du sikker p\u00e5 at du vil slette {0} ''{1}''? diff --git a/core/src/main/resources/lib/hudson/project/configurable_de.properties b/core/src/main/resources/lib/hudson/project/configurable_de.properties new file mode 100644 index 0000000000..a883c645d9 --- /dev/null +++ b/core/src/main/resources/lib/hudson/project/configurable_de.properties @@ -0,0 +1,27 @@ +# The MIT License +# +# Copyright 2014 Jesse Glick. +# +# 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. + +delete={0} L\u00f6schen +Configure=Konfigurieren +View\ Configuration=Konfiguration anzeigen +Build\ scheduled=Build geplant +delete.confirm=Sind Sie sicher, dass Sie das {0} \u2018{1}\u2019 l\u00f6schen m\u00f6chten? diff --git a/core/src/main/resources/lib/hudson/project/configurable_el.properties b/core/src/main/resources/lib/hudson/project/configurable_el.properties new file mode 100644 index 0000000000..78e4ad51a4 --- /dev/null +++ b/core/src/main/resources/lib/hudson/project/configurable_el.properties @@ -0,0 +1,25 @@ +# The MIT License +# +# Copyright 2014 Jesse Glick. +# +# 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. + +Build\ scheduled=\u03a4\u03bf build \u03c0\u03c1\u03bf\u03b3\u03c1\u03b1\u03bc\u03bc\u03b1\u03c4\u03af\u03c3\u03c4\u03b7\u03ba\u03b5 +Configure=\u03a1\u03c5\u03b8\u03bc\u03af\u03c3\u03b5\u03b9\u03c2 +delete=\u0394\u03b9\u03b1\u03b3\u03c1\u03b1\u03c6\u03ae diff --git a/core/src/main/resources/lib/hudson/project/configurable_es.properties b/core/src/main/resources/lib/hudson/project/configurable_es.properties new file mode 100644 index 0000000000..0270695a2d --- /dev/null +++ b/core/src/main/resources/lib/hudson/project/configurable_es.properties @@ -0,0 +1,27 @@ +# The MIT License +# +# Copyright 2014 Jesse Glick. +# +# 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. + +Build\ scheduled=Ejecuci\u00f3n planificada +Configure=Configurar +delete=Borrar {0} +View\ Configuration=Ver Configuraci\u00f3n +delete.confirm=Est\u00e1s seguro de querer borrar el {0} `{1}\u00b4 diff --git a/core/src/main/resources/lib/hudson/project/configurable_es_AR.properties b/core/src/main/resources/lib/hudson/project/configurable_es_AR.properties new file mode 100644 index 0000000000..4d931e0c17 --- /dev/null +++ b/core/src/main/resources/lib/hudson/project/configurable_es_AR.properties @@ -0,0 +1,25 @@ +# The MIT License +# +# Copyright 2014 Jesse Glick. +# +# 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. + +Build\ scheduled=Construcci\u00f3n agendada +Configure=Configurar +delete=Eliminar {0} diff --git a/core/src/main/resources/lib/hudson/project/configurable_et.properties b/core/src/main/resources/lib/hudson/project/configurable_et.properties new file mode 100644 index 0000000000..58f9930e2a --- /dev/null +++ b/core/src/main/resources/lib/hudson/project/configurable_et.properties @@ -0,0 +1,26 @@ +# The MIT License +# +# Copyright 2014 Jesse Glick. +# +# 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. + +Build\ scheduled=T\u00f6\u00f6 on tellitud +Configure=Seadista +delete=Kustuta {0} +delete.confirm=Oled sa ikka kindel et soovid kustutada {0} \u2018{1}\u2019? diff --git a/core/src/main/resources/lib/hudson/project/configurable_eu.properties b/core/src/main/resources/lib/hudson/project/configurable_eu.properties new file mode 100644 index 0000000000..1b721b9c06 --- /dev/null +++ b/core/src/main/resources/lib/hudson/project/configurable_eu.properties @@ -0,0 +1,24 @@ +# The MIT License +# +# Copyright 2014 Jesse Glick. +# +# 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=Itxuratu +delete={0} Ezabatu diff --git a/core/src/main/resources/lib/hudson/project/configurable_fi.properties b/core/src/main/resources/lib/hudson/project/configurable_fi.properties new file mode 100644 index 0000000000..9201a690c6 --- /dev/null +++ b/core/src/main/resources/lib/hudson/project/configurable_fi.properties @@ -0,0 +1,26 @@ +# The MIT License +# +# Copyright 2014 Jesse Glick. +# +# 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. + +Build\ scheduled=K\u00e4\u00e4nn\u00f6s on jonossa +Configure=Muokkaa +delete=Poista projekti +delete.confirm=Oletko varmna ett\u00e4 {0} ''{1}'' poistetaan ? diff --git a/core/src/main/resources/lib/hudson/project/configurable_fr.properties b/core/src/main/resources/lib/hudson/project/configurable_fr.properties new file mode 100644 index 0000000000..2b90f0495b --- /dev/null +++ b/core/src/main/resources/lib/hudson/project/configurable_fr.properties @@ -0,0 +1,27 @@ +# The MIT License +# +# Copyright 2014 Jesse Glick. +# +# 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. + +delete=Supprimer {0} +Configure=Configurer +Build\ scheduled=Build programm\u00e9 +View\ Configuration=Voir la configuration +delete.confirm=\u00cates-vous s\u00fbr de vouloir supprimer le {0} \u2018{1}\u2019? diff --git a/core/src/main/resources/lib/hudson/project/configurable_gl.properties b/core/src/main/resources/lib/hudson/project/configurable_gl.properties new file mode 100644 index 0000000000..a3d9d9314e --- /dev/null +++ b/core/src/main/resources/lib/hudson/project/configurable_gl.properties @@ -0,0 +1,24 @@ +# The MIT License +# +# Copyright 2014 Jesse Glick. +# +# 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. + +Build\ scheduled=Compilaci\u00f3n programada +delete=Borrar {0} diff --git a/core/src/main/resources/lib/hudson/project/configurable_he.properties b/core/src/main/resources/lib/hudson/project/configurable_he.properties new file mode 100644 index 0000000000..4e6a524313 --- /dev/null +++ b/core/src/main/resources/lib/hudson/project/configurable_he.properties @@ -0,0 +1,26 @@ +# The MIT License +# +# Copyright 2014 Jesse Glick. +# +# 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. + +Build\ scheduled=\u05ea\u05d6\u05de\u05d5\u05df \u05d1\u05e0\u05d9\u05d9\u05d4 +Configure=\u05d4\u05d2\u05d3\u05e8\u05d4 +delete={0} \u05de\u05d7\u05e7 +delete.confirm=\u05d4\u05d0\u05dd \u05d0\u05ea\u05d4 \u05d1\u05d8\u05d5\u05d7 \u05e9\u05d1\u05e8\u05e6\u05d5\u05e0\u05da \u05dc\u05de\u05d7\u05d5\u05e7 \u05d0\u05ea {0} ''{1}''? diff --git a/core/src/main/resources/lib/hudson/project/configurable_hi_IN.properties b/core/src/main/resources/lib/hudson/project/configurable_hi_IN.properties new file mode 100644 index 0000000000..28df56936b --- /dev/null +++ b/core/src/main/resources/lib/hudson/project/configurable_hi_IN.properties @@ -0,0 +1,24 @@ +# The MIT License +# +# Copyright 2014 Jesse Glick. +# +# 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=\u0915\u0949\u0928\u094d\u092b\u093c\u093f\u0917\u0930 +delete=\u0939\u091f\u093e\u0928\u093e diff --git a/core/src/main/resources/lib/hudson/project/configurable_hu.properties b/core/src/main/resources/lib/hudson/project/configurable_hu.properties new file mode 100644 index 0000000000..10dfd54360 --- /dev/null +++ b/core/src/main/resources/lib/hudson/project/configurable_hu.properties @@ -0,0 +1,26 @@ +# The MIT License +# +# Copyright 2014 Jesse Glick. +# +# 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. + +Build\ scheduled=\u00c9p\u00edt\u00e9s be\u00fctemez\u00e9se +Configure=Be\u00e1ll\u00edt\u00e1sok +delete={0} t\u00f6rl\u00e9se +delete.confirm=Biztosan t\u00f6rli a {0} \u2018{1}\u2019? diff --git a/core/src/main/resources/lib/hudson/project/configurable_id.properties b/core/src/main/resources/lib/hudson/project/configurable_id.properties new file mode 100644 index 0000000000..b100a17e59 --- /dev/null +++ b/core/src/main/resources/lib/hudson/project/configurable_id.properties @@ -0,0 +1,23 @@ +# The MIT License +# +# Copyright 2014 Jesse Glick. +# +# 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. + +Build\ scheduled=Jadwal Pembangunan diff --git a/core/src/main/resources/lib/hudson/project/configurable_is.properties b/core/src/main/resources/lib/hudson/project/configurable_is.properties new file mode 100644 index 0000000000..678dce19d7 --- /dev/null +++ b/core/src/main/resources/lib/hudson/project/configurable_is.properties @@ -0,0 +1,25 @@ +# The MIT License +# +# Copyright 2014 Jesse Glick. +# +# 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. + +Build\ scheduled=\u00c1\u00e6tla\u00f0ar keyrslur +Configure=Breyta +delete=Ey\u00f0a {0} diff --git a/core/src/main/resources/lib/hudson/project/configurable_it.properties b/core/src/main/resources/lib/hudson/project/configurable_it.properties new file mode 100644 index 0000000000..c4a2782261 --- /dev/null +++ b/core/src/main/resources/lib/hudson/project/configurable_it.properties @@ -0,0 +1,26 @@ +# The MIT License +# +# Copyright 2014 Jesse Glick. +# +# 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. + +Build\ scheduled=Lavoro pianificato +Configure=Configura +delete=Elimina {0} +delete.confirm=Si sicuro di voler cancellare {0} \u2018{1}\u2019? diff --git a/core/src/main/resources/lib/hudson/project/configurable_ja.properties b/core/src/main/resources/lib/hudson/project/configurable_ja.properties new file mode 100644 index 0000000000..14e2fb5d5d --- /dev/null +++ b/core/src/main/resources/lib/hudson/project/configurable_ja.properties @@ -0,0 +1,27 @@ +# The MIT License +# +# Copyright 2014 Jesse Glick. +# +# 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. + +delete={0}\u306e\u524a\u9664 +Configure=\u8a2d\u5b9a +Build\ scheduled=\u30d3\u30eb\u30c9\u304c\u30b9\u30b1\u30b8\u30e5\u30fc\u30eb\u3055\u308c\u307e\u3057\u305f +View\ Configuration=\u8a2d\u5b9a\u306e\u53c2\u7167 +delete.confirm={0} "{1}"\u3092\u524a\u9664\u3057\u3066\u3082\u3088\u308d\u3057\u3044\u3067\u3059\u304b? diff --git a/core/src/main/resources/lib/hudson/project/configurable_kn.properties b/core/src/main/resources/lib/hudson/project/configurable_kn.properties new file mode 100644 index 0000000000..f63ecd0f01 --- /dev/null +++ b/core/src/main/resources/lib/hudson/project/configurable_kn.properties @@ -0,0 +1,25 @@ +# The MIT License +# +# Copyright 2014 Jesse Glick. +# +# 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. + +Build\ scheduled=\u0cac\u0cbf\u0cb2\u0ccd\u0ca1\u0ccd \u0c85\u0ca8\u0cc1\u0cb8\u0cc2\u0c9a\u0cbf +Configure=\u0cb8\u0c82\u0cb0\u0c9a\u0cbf\u0cb8\u0cc1 +delete=\u0c85\u0cb3\u0cbf\u0cb8\u0cc1 diff --git a/core/src/main/resources/lib/hudson/project/configurable_ko.properties b/core/src/main/resources/lib/hudson/project/configurable_ko.properties new file mode 100644 index 0000000000..23b90346c6 --- /dev/null +++ b/core/src/main/resources/lib/hudson/project/configurable_ko.properties @@ -0,0 +1,26 @@ +# The MIT License +# +# Copyright 2014 Jesse Glick. +# +# 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. + +Build\ scheduled=\uacc4\ud68d\ub41c \ube4c\ub4dc +Configure=\uad6c\uc131 +delete={0} \uc0ad\uc81c +delete.confirm={0} \uc744 \uc0ad\uc81c\ud558\ub294\uac70\uc5d0 \ub300\ud574 \ub3d9\uc758\ud558\uc2ed\ub2c8\uae4c? ''{1}'' diff --git a/core/src/main/resources/lib/hudson/project/configurable_lt.properties b/core/src/main/resources/lib/hudson/project/configurable_lt.properties new file mode 100644 index 0000000000..cf01c535e5 --- /dev/null +++ b/core/src/main/resources/lib/hudson/project/configurable_lt.properties @@ -0,0 +1,26 @@ +# The MIT License +# +# Copyright 2014 Jesse Glick. +# +# 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. + +Build\ scheduled=Konstrukcija suplanuota +Configure=Nustatyti +delete=I\u0161trinti {0} +delete.confirm=Ar j\u016bs tikri, kad norite i\u0161trinti {0} "{1}"? diff --git a/core/src/main/resources/lib/hudson/project/configurable_lv.properties b/core/src/main/resources/lib/hudson/project/configurable_lv.properties new file mode 100644 index 0000000000..f4c3deec4c --- /dev/null +++ b/core/src/main/resources/lib/hudson/project/configurable_lv.properties @@ -0,0 +1,26 @@ +# The MIT License +# +# Copyright 2014 Jesse Glick. +# +# 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. + +Build\ scheduled=B\u016bv\u0113jums iepl\u0101nots +Configure=Konfigur\u0113t +delete=Dz\u0113st {0} +delete.confirm=Vai tie\u0161\u0101m dz\u0113st {0}, \u2018{1}\u2019? diff --git a/core/src/main/resources/lib/hudson/project/configurable_nb_NO.properties b/core/src/main/resources/lib/hudson/project/configurable_nb_NO.properties new file mode 100644 index 0000000000..f00f9588d9 --- /dev/null +++ b/core/src/main/resources/lib/hudson/project/configurable_nb_NO.properties @@ -0,0 +1,27 @@ +# The MIT License +# +# Copyright 2014 Jesse Glick. +# +# 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. + +Build\ scheduled=Versjonssteg lagt i k\u00f8 +Configure=Konfigur\u00e9r +View\ Configuration=Vis konfigurasjon +delete=Slett {0} +delete.confirm=Er du sikker p\u00e5 at du vil slette {0} \u2018{1}\u2019? diff --git a/core/src/main/resources/lib/hudson/project/configurable_nl.properties b/core/src/main/resources/lib/hudson/project/configurable_nl.properties new file mode 100644 index 0000000000..8bf8f3cb50 --- /dev/null +++ b/core/src/main/resources/lib/hudson/project/configurable_nl.properties @@ -0,0 +1,26 @@ +# The MIT License +# +# Copyright 2014 Jesse Glick. +# +# 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. + +Build\ scheduled=Bouw gepland +delete={0} verwijderen +Configure=Configureren +delete.confirm=Ben je zeker van het verwijderen van de {0} {1}? diff --git a/core/src/main/resources/lib/hudson/project/configurable_pl.properties b/core/src/main/resources/lib/hudson/project/configurable_pl.properties new file mode 100644 index 0000000000..e93f340c5d --- /dev/null +++ b/core/src/main/resources/lib/hudson/project/configurable_pl.properties @@ -0,0 +1,27 @@ +# The MIT License +# +# Copyright 2014 Jesse Glick. +# +# 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. + +Build\ scheduled=Kompilacja zaplanowana +Configure=Konfiguruj +View\ Configuration=Podgl\u0105d konfiguracji +delete=Usu\u0144 {0} +delete.confirm=Czy na pewno usun\u0105\u0107 {0} \u2018{1}\u2019? diff --git a/core/src/main/resources/lib/hudson/project/configurable_pt_BR.properties b/core/src/main/resources/lib/hudson/project/configurable_pt_BR.properties new file mode 100644 index 0000000000..d56206fcc2 --- /dev/null +++ b/core/src/main/resources/lib/hudson/project/configurable_pt_BR.properties @@ -0,0 +1,27 @@ +# The MIT License +# +# Copyright 2014 Jesse Glick. +# +# 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. + +Build\ scheduled=build agendada +delete=Excluir {0} +Configure=Configurar +View\ Configuration= Configurar a view +delete.confirm=Quer mesmo remover {0} '{1}'? diff --git a/core/src/main/resources/lib/hudson/project/configurable_pt_PT.properties b/core/src/main/resources/lib/hudson/project/configurable_pt_PT.properties new file mode 100644 index 0000000000..fb39e8562b --- /dev/null +++ b/core/src/main/resources/lib/hudson/project/configurable_pt_PT.properties @@ -0,0 +1,26 @@ +# The MIT License +# +# Copyright 2014 Jesse Glick. +# +# 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. + +Build\ scheduled=Build Agendado +Configure=Configurar +delete=Eliminar {0} +delete.confirm=Voc\u00ea tem certeza sobre a exclus\u00e3o do {0} {1} ''? diff --git a/core/src/main/resources/lib/hudson/project/configurable_ro.properties b/core/src/main/resources/lib/hudson/project/configurable_ro.properties new file mode 100644 index 0000000000..8f4d4dab6b --- /dev/null +++ b/core/src/main/resources/lib/hudson/project/configurable_ro.properties @@ -0,0 +1,26 @@ +# The MIT License +# +# Copyright 2014 Jesse Glick. +# +# 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. + +Build\ scheduled=Build programat +Configure=Configureaz\u0103 +delete=\u0218terge {0} +delete.confirm=E\u0219ti sigur c\u0103 vrei s\u0103 \u0219tergi {0} \u2018{1}\u2019? diff --git a/core/src/main/resources/lib/hudson/project/configurable_ru.properties b/core/src/main/resources/lib/hudson/project/configurable_ru.properties new file mode 100644 index 0000000000..9f9d1c1d12 --- /dev/null +++ b/core/src/main/resources/lib/hudson/project/configurable_ru.properties @@ -0,0 +1,27 @@ +# The MIT License +# +# Copyright 2014 Jesse Glick. +# +# 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. + +View\ Configuration=\u0421\u043c\u043e\u0442\u0440\u0435\u0442\u044c \u043a\u043e\u043d\u0444\u0438\u0433\u0443\u0440\u0430\u0446\u0438\u044e +delete=\u0423\u0434\u0430\u043b\u0438\u0442\u044c {0} +Configure=\u041d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0438 +Build\ scheduled=\u0421\u0431\u043e\u0440\u043a\u0430 \u0437\u0430\u043f\u043b\u0430\u043d\u0438\u0440\u043e\u0432\u0430\u043d\u0430 +delete.confirm=\u0412\u044b \u0442\u043e\u0447\u043d\u043e \u0445\u043e\u0442\u0438\u0442\u0435 \u0443\u0434\u0430\u043b\u0438\u0442\u044c {0} \u2018{1}\u2019? diff --git a/core/src/main/resources/lib/hudson/project/configurable_si.properties b/core/src/main/resources/lib/hudson/project/configurable_si.properties new file mode 100644 index 0000000000..e7950da6d3 --- /dev/null +++ b/core/src/main/resources/lib/hudson/project/configurable_si.properties @@ -0,0 +1,24 @@ +# The MIT License +# +# Copyright 2014 Jesse Glick. +# +# 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=\u0dc3\u0d9a\u0dc3\u0db1\u0dca\u0db1 +delete=\u0db8\u0d9a\u0db1\u0dca\u0db1 {0} diff --git a/core/src/main/resources/lib/hudson/project/configurable_sk.properties b/core/src/main/resources/lib/hudson/project/configurable_sk.properties new file mode 100644 index 0000000000..7f14c934cd --- /dev/null +++ b/core/src/main/resources/lib/hudson/project/configurable_sk.properties @@ -0,0 +1,26 @@ +# The MIT License +# +# Copyright 2014 Jesse Glick. +# +# 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. + +Build\ scheduled=Zostavenie napl\u00e1novan\u00e9 +Configure=Nastav +delete=Odstr\u00e1ni\u0165 +delete.confirm=Si si ist\u00fd vymazan\u00edm {0} ''{1}''? diff --git a/core/src/main/resources/lib/hudson/project/configurable_sl.properties b/core/src/main/resources/lib/hudson/project/configurable_sl.properties new file mode 100644 index 0000000000..7ed175f8b0 --- /dev/null +++ b/core/src/main/resources/lib/hudson/project/configurable_sl.properties @@ -0,0 +1,26 @@ +# The MIT License +# +# Copyright 2014 Jesse Glick. +# +# 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. + +Build\ scheduled=Buildaj po umiku +Configure=Nastavitve +delete=Izbri\u0161i +delete.confirm=Ali ste prepri\u010dana o izbrisanju ? diff --git a/core/src/main/resources/lib/hudson/project/configurable_sr.properties b/core/src/main/resources/lib/hudson/project/configurable_sr.properties new file mode 100644 index 0000000000..2b7db5910f --- /dev/null +++ b/core/src/main/resources/lib/hudson/project/configurable_sr.properties @@ -0,0 +1,26 @@ +# The MIT License +# +# Copyright 2014 Jesse Glick. +# +# 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. + +Build\ scheduled=Build je zakazan +Configure=Podesavana +delete=Obrisi {0} +delete.confirm=Da li \u017eeli\u0161 da obri\u0161e\u0161 {0} \u2018{1}\u2019? diff --git a/core/src/main/resources/lib/hudson/project/configurable_sv_SE.properties b/core/src/main/resources/lib/hudson/project/configurable_sv_SE.properties new file mode 100644 index 0000000000..ba0fcb2de5 --- /dev/null +++ b/core/src/main/resources/lib/hudson/project/configurable_sv_SE.properties @@ -0,0 +1,26 @@ +# The MIT License +# +# Copyright 2014 Jesse Glick. +# +# 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. + +Build\ scheduled=Jobbet schemalagt +Configure=Konfigurera +delete=Ta bort {0} +delete.confirm=\u00c4r du s\u00e4ker p\u00e5 att du vill ta bort {0} \u2018{1}\u2019? diff --git a/core/src/main/resources/lib/hudson/project/configurable_te.properties b/core/src/main/resources/lib/hudson/project/configurable_te.properties new file mode 100644 index 0000000000..af089b3159 --- /dev/null +++ b/core/src/main/resources/lib/hudson/project/configurable_te.properties @@ -0,0 +1,24 @@ +# The MIT License +# +# Copyright 2014 Jesse Glick. +# +# 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. + +Build\ scheduled=\u0c37\u0c46\u0c21\u0c4d\u0c2f\u0c42\u0c32\u0c4d \u0c1a\u0c47\u0c2f\u0c2c\u0c21\u0c3f\u0c28 \u0c2c\u0c3f\u0c32\u0c4d\u0c21\u0c4d +delete=\u0c24\u0c4a\u0c32\u0c17\u0c3f\u0c02\u0c1a\u0c41 {0} diff --git a/core/src/main/resources/lib/hudson/project/configurable_th.properties b/core/src/main/resources/lib/hudson/project/configurable_th.properties new file mode 100644 index 0000000000..f926fb928b --- /dev/null +++ b/core/src/main/resources/lib/hudson/project/configurable_th.properties @@ -0,0 +1,25 @@ +# The MIT License +# +# Copyright 2014 Jesse Glick. +# +# 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. + +Build\ scheduled=\u0e1a\u0e34\u0e25\u0e14\u0e4c\u0e44\u0e14\u0e49\u0e16\u0e39\u0e01\u0e01\u0e33\u0e2b\u0e19\u0e14\u0e40\u0e27\u0e25\u0e32\u0e2a\u0e23\u0e49\u0e32\u0e07\u0e41\u0e25\u0e49\u0e27 +View\ Configuration=\u0e14\u0e39\u0e01\u0e32\u0e23\u0e1b\u0e23\u0e31\u0e1a\u0e15\u0e31\u0e49\u0e07\u0e04\u0e48\u0e32 +delete=\u0e25\u0e1a {0} diff --git a/core/src/main/resources/lib/hudson/project/configurable_tr.properties b/core/src/main/resources/lib/hudson/project/configurable_tr.properties new file mode 100644 index 0000000000..f89453dcb6 --- /dev/null +++ b/core/src/main/resources/lib/hudson/project/configurable_tr.properties @@ -0,0 +1,26 @@ +# The MIT License +# +# Copyright 2014 Jesse Glick. +# +# 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. + +delete={0} sil +Configure=Konfig\u00fcrasyonu D\u00fczenle +Build\ scheduled=Yap\u0131land\u0131rma planland\u0131 +delete.confirm=Silmek istedi\u011finizden emin misiniz: {0} ''{1}''? diff --git a/core/src/main/resources/lib/hudson/project/configurable_uk.properties b/core/src/main/resources/lib/hudson/project/configurable_uk.properties new file mode 100644 index 0000000000..7f51c3bde5 --- /dev/null +++ b/core/src/main/resources/lib/hudson/project/configurable_uk.properties @@ -0,0 +1,26 @@ +# The MIT License +# +# Copyright 2014 Jesse Glick. +# +# 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. + +Build\ scheduled=\u0417\u0430\u043f\u043b\u0430\u043d\u043e\u0432\u0430\u043d\u0456 \u0437\u0431\u0456\u0440\u043a\u0438 +delete=\u0412\u0438\u0434\u0430\u043b\u0438\u0442\u0438 {0} +delete.confirm=\u0412\u0438 \u0432\u043f\u0435\u0432\u043d\u0435\u043d\u0456, \u0449\u043e \u0445\u043e\u0447\u0435\u0442\u0435 \u0432\u0438\u0434\u0430\u043b\u0438\u0442\u0438 {0} \u2018{1}\u2019? +Configure=\u041d\u0430\u043b\u0430\u0448\u0442\u0443\u0432\u0430\u043d\u043d\u044f diff --git a/core/src/main/resources/lib/hudson/project/configurable_zh_CN.properties b/core/src/main/resources/lib/hudson/project/configurable_zh_CN.properties new file mode 100644 index 0000000000..4f4ffcb66b --- /dev/null +++ b/core/src/main/resources/lib/hudson/project/configurable_zh_CN.properties @@ -0,0 +1,27 @@ +# The MIT License +# +# Copyright 2014 Jesse Glick. +# +# 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. + +delete=\u5220\u9664 {0} +delete.confirm=\u786e\u8ba4\u5220\u9664 {0} \u2018{1}\u2019? +Configure=\u914d\u7f6e +View\ Configuration=\u67e5\u770b\u914d\u7f6e +Build\ scheduled=\u6784\u5efa\u8ba1\u5212 diff --git a/core/src/main/resources/lib/hudson/project/configurable_zh_TW.properties b/core/src/main/resources/lib/hudson/project/configurable_zh_TW.properties new file mode 100644 index 0000000000..00be1418e9 --- /dev/null +++ b/core/src/main/resources/lib/hudson/project/configurable_zh_TW.properties @@ -0,0 +1,27 @@ +# The MIT License +# +# Copyright 2014 Jesse Glick. +# +# 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. + +delete=\u522a\u9664{0} +delete.confirm=\u60a8\u78ba\u5b9a\u8981\u522a\u9664 {0} \u2018{1}\u2019 \u55ce\uff1f +Build\ scheduled=\u5df2\u6392\u5165\u5efa\u7f6e +Configure=\u7d44\u614b +View\ Configuration=\u6aa2\u8996\u8a2d\u5b9a diff --git a/test/src/test/java/hudson/model/RunParameterDefinitionTest.java b/test/src/test/java/hudson/model/RunParameterDefinitionTest.java index f0b7efe86a..bccd95443f 100644 --- a/test/src/test/java/hudson/model/RunParameterDefinitionTest.java +++ b/test/src/test/java/hudson/model/RunParameterDefinitionTest.java @@ -64,13 +64,13 @@ public class RunParameterDefinitionTest { assertEquals("dir/sub dir/some project", def.getProjectName()); assertEquals(p, def.getProject()); EnvVars env = new EnvVars(); - def.getDefaultParameterValue().buildEnvVars(null, env); + def.getDefaultParameterValue().buildEnvVars((Run) null, env); assertEquals(j.jenkins.getRootUrl() + "job/dir/job/sub%20dir/job/some%20project/3/", env.get("build")); RunParameterValue val = def.createValue(id); assertEquals(build2, val.getRun()); assertEquals("dir/sub dir/some project", val.getJobName()); assertEquals("2", val.getNumber()); - val.buildEnvVars(null, env); + val.buildEnvVars((Run) null, env); assertEquals(j.jenkins.getRootUrl() + "job/dir/job/sub%20dir/job/some%20project/2/", env.get("build")); assertEquals("dir/sub dir/some project", env.get("build.jobName")); assertEquals("dir/sub dir/some project", env.get("build_JOBNAME")); From 7a78a556a52bd72eb9ef00039b1d6a13efec37bf Mon Sep 17 00:00:00 2001 From: Daniel Beck Date: Fri, 7 Mar 2014 22:12:44 +0100 Subject: [PATCH 19/78] [JENKINS-21773] Noting merge of #1149 --- changelog.html | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/changelog.html b/changelog.html index 585cba089c..92b4b60e61 100644 --- a/changelog.html +++ b/changelog.html @@ -55,7 +55,9 @@ Upcoming changes From 78e09522913be9f4318a53b0d40bbde43534423c Mon Sep 17 00:00:00 2001 From: Jesse Glick Date: Fri, 7 Mar 2014 19:22:18 -0800 Subject: [PATCH 20/78] getParameterizedJobMixIn turned out to be unnecessary. --- core/src/main/java/hudson/model/AbstractProject.java | 2 +- .../java/hudson/model/ParametersDefinitionProperty.java | 2 +- .../main/java/jenkins/model/ParameterizedJobMixIn.java | 8 +++----- 3 files changed, 5 insertions(+), 7 deletions(-) diff --git a/core/src/main/java/hudson/model/AbstractProject.java b/core/src/main/java/hudson/model/AbstractProject.java index 12eab720f0..623dfbb932 100644 --- a/core/src/main/java/hudson/model/AbstractProject.java +++ b/core/src/main/java/hudson/model/AbstractProject.java @@ -287,7 +287,7 @@ public abstract class AbstractProject

,R extends A return buildMixIn; } - @Override public synchronized ParameterizedJobMixIn getParameterizedJobMixIn() { + private synchronized ParameterizedJobMixIn getParameterizedJobMixIn() { if (parameterizedJobMixIn == null) { parameterizedJobMixIn = new ParameterizedJobMixIn() { @SuppressWarnings("unchecked") // untypable diff --git a/core/src/main/java/hudson/model/ParametersDefinitionProperty.java b/core/src/main/java/hudson/model/ParametersDefinitionProperty.java index b4e2efbe33..0f1fe83f40 100644 --- a/core/src/main/java/hudson/model/ParametersDefinitionProperty.java +++ b/core/src/main/java/hudson/model/ParametersDefinitionProperty.java @@ -175,7 +175,7 @@ public class ParametersDefinitionProperty extends JobProperty> if (delay==null) delay=new TimeDuration(getJob().getQuietPeriod()); Jenkins.getInstance().getQueue().schedule( - getJob(), delay.getTime(), new ParametersAction(values), getJob().getParameterizedJobMixIn().getBuildCause(req)); + getJob(), delay.getTime(), new ParametersAction(values), ParameterizedJobMixIn.getBuildCause(getJob(), req)); if (requestWantsJson(req)) { rsp.setContentType("application/json"); diff --git a/core/src/main/java/jenkins/model/ParameterizedJobMixIn.java b/core/src/main/java/jenkins/model/ParameterizedJobMixIn.java index 47845f91ea..e754b37a9b 100644 --- a/core/src/main/java/jenkins/model/ParameterizedJobMixIn.java +++ b/core/src/main/java/jenkins/model/ParameterizedJobMixIn.java @@ -171,7 +171,7 @@ public abstract class ParameterizedJobMixIn & Param throw HttpResponses.error(SC_INTERNAL_SERVER_ERROR, new IOException(asJob().getFullName() + " is not buildable")); } - Queue.Item item = Jenkins.getInstance().getQueue().schedule2(asJob(), delay.getTime(), getBuildCause(req)).getItem(); + Queue.Item item = Jenkins.getInstance().getQueue().schedule2(asJob(), delay.getTime(), getBuildCause(asJob(), req)).getItem(); if (item != null) { rsp.sendRedirect(SC_CREATED, req.getContextPath() + '/' + item.getUrl()); } else { @@ -223,10 +223,10 @@ public abstract class ParameterizedJobMixIn & Param * Computes the build cause, using RemoteCause or UserCause as appropriate. */ @Restricted(NoExternalUse.class) - public final CauseAction getBuildCause(StaplerRequest req) { + public static final CauseAction getBuildCause(ParameterizedJob job, StaplerRequest req) { Cause cause; @SuppressWarnings("deprecation") - hudson.model.BuildAuthorizationToken authToken = asJob().getAuthToken(); + hudson.model.BuildAuthorizationToken authToken = job.getAuthToken(); if (authToken != null && authToken.getToken() != null && req.getParameter("token") != null) { // Optional additional cause text when starting via token String causeText = req.getParameter("cause"); @@ -251,8 +251,6 @@ public abstract class ParameterizedJobMixIn & Param */ public interface ParameterizedJob extends hudson.model.Queue.Task { - ParameterizedJobMixIn getParameterizedJobMixIn(); - @SuppressWarnings("deprecation") @CheckForNull hudson.model.BuildAuthorizationToken getAuthToken(); From d0c61b0fa5caad3cb30b1040f3328ecf57347e84 Mon Sep 17 00:00:00 2001 From: Jesse Glick Date: Fri, 7 Mar 2014 19:25:22 -0800 Subject: [PATCH 21/78] ParameterizedJobMixIn is stateless. --- .../java/hudson/model/AbstractProject.java | 18 +++++++----------- .../jenkins/model/ParameterizedJobMixIn.java | 1 + 2 files changed, 8 insertions(+), 11 deletions(-) diff --git a/core/src/main/java/hudson/model/AbstractProject.java b/core/src/main/java/hudson/model/AbstractProject.java index 623dfbb932..8d950f7626 100644 --- a/core/src/main/java/hudson/model/AbstractProject.java +++ b/core/src/main/java/hudson/model/AbstractProject.java @@ -163,7 +163,6 @@ public abstract class AbstractProject

,R extends A private volatile transient SCMRevisionState pollingBaseline = null; private transient LazyBuildMixIn buildMixIn; - private transient ParameterizedJobMixIn parameterizedJobMixIn; /** * All the builds keyed by their build number. @@ -287,16 +286,13 @@ public abstract class AbstractProject

,R extends A return buildMixIn; } - private synchronized ParameterizedJobMixIn getParameterizedJobMixIn() { - if (parameterizedJobMixIn == null) { - parameterizedJobMixIn = new ParameterizedJobMixIn() { - @SuppressWarnings("unchecked") // untypable - @Override protected P asJob() { - return (P) AbstractProject.this; - } - }; - } - return parameterizedJobMixIn; + private ParameterizedJobMixIn getParameterizedJobMixIn() { + return new ParameterizedJobMixIn() { + @SuppressWarnings("unchecked") // untypable + @Override protected P asJob() { + return (P) AbstractProject.this; + } + }; } @Override diff --git a/core/src/main/java/jenkins/model/ParameterizedJobMixIn.java b/core/src/main/java/jenkins/model/ParameterizedJobMixIn.java index e754b37a9b..c3d8b3cb9e 100644 --- a/core/src/main/java/jenkins/model/ParameterizedJobMixIn.java +++ b/core/src/main/java/jenkins/model/ParameterizedJobMixIn.java @@ -61,6 +61,7 @@ import org.kohsuke.stapler.interceptor.RequirePOST; /** * Allows a {@link Job} to make use of {@link ParametersDefinitionProperty} and be scheduled in various ways. + * Stateless so there is no need to keep an instance of it in a field. * @since TODO */ @SuppressWarnings("unchecked") // AbstractItem.getParent does not correctly override; scheduleBuild2 inherently untypable From d1b713a4d86a846af2305705e42de8f0709b19ce Mon Sep 17 00:00:00 2001 From: Jesse Glick Date: Fri, 7 Mar 2014 19:35:25 -0800 Subject: [PATCH 22/78] Renaming the newly introduced method avoids the need for an ambiguous overload. --- .../java/hudson/model/BooleanParameterValue.java | 2 +- .../main/java/hudson/model/FileParameterValue.java | 2 +- .../main/java/hudson/model/JobParameterValue.java | 2 +- core/src/main/java/hudson/model/ParameterValue.java | 12 ++++++------ .../src/main/java/hudson/model/ParametersAction.java | 2 +- .../java/hudson/model/PasswordParameterValue.java | 2 +- .../main/java/hudson/model/RunParameterValue.java | 2 +- .../main/java/hudson/model/StringParameterValue.java | 2 +- .../hudson/model/RunParameterDefinitionTest.java | 4 ++-- 9 files changed, 15 insertions(+), 15 deletions(-) diff --git a/core/src/main/java/hudson/model/BooleanParameterValue.java b/core/src/main/java/hudson/model/BooleanParameterValue.java index fd2742c893..0fd4e513f4 100644 --- a/core/src/main/java/hudson/model/BooleanParameterValue.java +++ b/core/src/main/java/hudson/model/BooleanParameterValue.java @@ -52,7 +52,7 @@ public class BooleanParameterValue extends ParameterValue { * Exposes the name/value as an environment variable. */ @Override - public void buildEnvVars(Run build, EnvVars env) { + public void buildEnvironment(Run build, EnvVars env) { env.put(name,Boolean.toString(value)); env.put(name.toUpperCase(Locale.ENGLISH),Boolean.toString(value)); // backward compatibility pre 1.345 } diff --git a/core/src/main/java/hudson/model/FileParameterValue.java b/core/src/main/java/hudson/model/FileParameterValue.java index 647af7ac14..08d2b7b11a 100644 --- a/core/src/main/java/hudson/model/FileParameterValue.java +++ b/core/src/main/java/hudson/model/FileParameterValue.java @@ -100,7 +100,7 @@ public class FileParameterValue extends ParameterValue { * Exposes the originalFileName as an environment variable. */ @Override - public void buildEnvVars(Run build, EnvVars env) { + public void buildEnvironment(Run build, EnvVars env) { env.put(name,originalFileName); } diff --git a/core/src/main/java/hudson/model/JobParameterValue.java b/core/src/main/java/hudson/model/JobParameterValue.java index 5dd0df9145..16d25e3110 100644 --- a/core/src/main/java/hudson/model/JobParameterValue.java +++ b/core/src/main/java/hudson/model/JobParameterValue.java @@ -41,7 +41,7 @@ public class JobParameterValue extends ParameterValue { * Exposes the name/value as an environment variable. */ @Override - public void buildEnvVars(Run build, EnvVars env) { + public void buildEnvironment(Run build, EnvVars env) { // TODO: check with Tom if this is really what he had in mind env.put(name,job.toString()); env.put(name.toUpperCase(Locale.ENGLISH),job.toString()); // backward compatibility pre 1.345 diff --git a/core/src/main/java/hudson/model/ParameterValue.java b/core/src/main/java/hudson/model/ParameterValue.java index baf37aec60..f2fbd16a85 100644 --- a/core/src/main/java/hudson/model/ParameterValue.java +++ b/core/src/main/java/hudson/model/ParameterValue.java @@ -129,9 +129,9 @@ public abstract class ParameterValue implements Serializable { */ public void buildEnvVars(AbstractBuild build, Map env) { if (env instanceof EnvVars) { - if (Util.isOverridden(ParameterValue.class, getClass(), "buildEnvVars", Run.class, EnvVars.class)) { - // if the subtype already derives buildEnvVars(Run, Map), then delegate to it - buildEnvVars((Run) build, (EnvVars) env); + if (Util.isOverridden(ParameterValue.class, getClass(), "buildEnvironment", Run.class, EnvVars.class)) { + // if the subtype already derives buildEnvironment, then delegate to it + buildEnvironment(build, (EnvVars) env); } else if (Util.isOverridden(ParameterValue.class, getClass(), "buildEnvVars", AbstractBuild.class, EnvVars.class)) { buildEnvVars(build, (EnvVars) env); } @@ -142,8 +142,8 @@ public abstract class ParameterValue implements Serializable { /** @deprecated Use {@link #buildEnvVars(Run, EnvVars)} instead. */ @Deprecated public void buildEnvVars(AbstractBuild build, EnvVars env) { - if (Util.isOverridden(ParameterValue.class, getClass(), "buildEnvVars", Run.class, EnvVars.class)) { - buildEnvVars((Run) build, env); + if (Util.isOverridden(ParameterValue.class, getClass(), "buildEnvironment", Run.class, EnvVars.class)) { + buildEnvironment(build, env); } else { // for backward compatibility buildEnvVars(build,(Map)env); @@ -168,7 +168,7 @@ public abstract class ParameterValue implements Serializable { * The build for which this parameter is being used. Never null. * @since TODO */ - public void buildEnvVars(Run build, EnvVars env) { + public void buildEnvironment(Run build, EnvVars env) { if (build instanceof AbstractBuild) { buildEnvVars((AbstractBuild) build, env); } diff --git a/core/src/main/java/hudson/model/ParametersAction.java b/core/src/main/java/hudson/model/ParametersAction.java index dd48b14334..396c796691 100644 --- a/core/src/main/java/hudson/model/ParametersAction.java +++ b/core/src/main/java/hudson/model/ParametersAction.java @@ -82,7 +82,7 @@ public class ParametersAction implements Action, Iterable, Queue public void buildEnvVars(AbstractBuild build, EnvVars env) { for (ParameterValue p : parameters) - p.buildEnvVars((Run) build, env); + p.buildEnvironment(build, env); } // TODO do we need an EnvironmentContributingAction variant that takes Run so this can implement it? diff --git a/core/src/main/java/hudson/model/PasswordParameterValue.java b/core/src/main/java/hudson/model/PasswordParameterValue.java index 3d7d4f012f..d7d917ee48 100644 --- a/core/src/main/java/hudson/model/PasswordParameterValue.java +++ b/core/src/main/java/hudson/model/PasswordParameterValue.java @@ -49,7 +49,7 @@ public class PasswordParameterValue extends ParameterValue { } @Override - public void buildEnvVars(Run build, EnvVars env) { + public void buildEnvironment(Run build, EnvVars env) { String v = Secret.toString(value); env.put(name, v); env.put(name.toUpperCase(Locale.ENGLISH),v); // backward compatibility pre 1.345 diff --git a/core/src/main/java/hudson/model/RunParameterValue.java b/core/src/main/java/hudson/model/RunParameterValue.java index ded35aa9e6..caa3fa5987 100644 --- a/core/src/main/java/hudson/model/RunParameterValue.java +++ b/core/src/main/java/hudson/model/RunParameterValue.java @@ -68,7 +68,7 @@ public class RunParameterValue extends ParameterValue { * Exposes the name/value as an environment variable. */ @Override - public void buildEnvVars(Run build, EnvVars env) { + public void buildEnvironment(Run build, EnvVars env) { Run run = getRun(); String value = Jenkins.getInstance().getRootUrl() + run.getUrl(); diff --git a/core/src/main/java/hudson/model/StringParameterValue.java b/core/src/main/java/hudson/model/StringParameterValue.java index c9f4ee3312..74b2a525ac 100644 --- a/core/src/main/java/hudson/model/StringParameterValue.java +++ b/core/src/main/java/hudson/model/StringParameterValue.java @@ -52,7 +52,7 @@ public class StringParameterValue extends ParameterValue { * Exposes the name/value as an environment variable. */ @Override - public void buildEnvVars(Run build, EnvVars env) { + public void buildEnvironment(Run build, EnvVars env) { env.put(name,value); env.put(name.toUpperCase(Locale.ENGLISH),value); // backward compatibility pre 1.345 } diff --git a/test/src/test/java/hudson/model/RunParameterDefinitionTest.java b/test/src/test/java/hudson/model/RunParameterDefinitionTest.java index bccd95443f..4a2ae37e77 100644 --- a/test/src/test/java/hudson/model/RunParameterDefinitionTest.java +++ b/test/src/test/java/hudson/model/RunParameterDefinitionTest.java @@ -64,13 +64,13 @@ public class RunParameterDefinitionTest { assertEquals("dir/sub dir/some project", def.getProjectName()); assertEquals(p, def.getProject()); EnvVars env = new EnvVars(); - def.getDefaultParameterValue().buildEnvVars((Run) null, env); + def.getDefaultParameterValue().buildEnvironment(null, env); assertEquals(j.jenkins.getRootUrl() + "job/dir/job/sub%20dir/job/some%20project/3/", env.get("build")); RunParameterValue val = def.createValue(id); assertEquals(build2, val.getRun()); assertEquals("dir/sub dir/some project", val.getJobName()); assertEquals("2", val.getNumber()); - val.buildEnvVars((Run) null, env); + val.buildEnvironment(null, env); assertEquals(j.jenkins.getRootUrl() + "job/dir/job/sub%20dir/job/some%20project/2/", env.get("build")); assertEquals("dir/sub dir/some project", env.get("build.jobName")); assertEquals("dir/sub dir/some project", env.get("build_JOBNAME")); From 5b7ece6630e52cc32d1ac740fa48bb74f963935d Mon Sep 17 00:00:00 2001 From: Jesse Glick Date: Fri, 7 Mar 2014 19:38:44 -0800 Subject: [PATCH 23/78] Restore getJobActions(AbstractProject) for compatibility. --- .../main/java/hudson/model/ParametersDefinitionProperty.java | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/core/src/main/java/hudson/model/ParametersDefinitionProperty.java b/core/src/main/java/hudson/model/ParametersDefinitionProperty.java index 0f1fe83f40..8cf4eed223 100644 --- a/core/src/main/java/hudson/model/ParametersDefinitionProperty.java +++ b/core/src/main/java/hudson/model/ParametersDefinitionProperty.java @@ -109,6 +109,11 @@ public class ParametersDefinitionProperty extends JobProperty> return Collections.singleton(this); } + @Deprecated + public Collection getJobActions(AbstractProject job) { + return getJobActions((Job) job); + } + @Deprecated public AbstractProject getProject() { return (AbstractProject) owner; From 410ad80730b2825111bb5cf86d6638d236070592 Mon Sep 17 00:00:00 2001 From: Daniel Beck Date: Sat, 8 Mar 2014 16:34:04 +0100 Subject: [PATCH 24/78] Fix terminology used in BuildTrigger conditions If the result needs to be SUCCESS, it needs to be called 'stable', not 'successful' -- the latter is UNSTABLE or better. References: - PermalinkProjectAction (lastStableBuild for SUCCESS, lastSuccessfulBuild for UNSTABLE or better) - Last Successful list view column (includes unstable builds), Last Stable column (doesn't) --- core/src/main/resources/hudson/tasks/BuildTrigger/config.jelly | 2 +- .../resources/hudson/tasks/BuildTrigger/config_de.properties | 1 - .../resources/hudson/tasks/BuildTrigger/config_es.properties | 1 - .../resources/hudson/tasks/BuildTrigger/config_fr.properties | 1 - .../resources/hudson/tasks/BuildTrigger/config_it.properties | 1 - .../resources/hudson/tasks/BuildTrigger/config_ja.properties | 1 - .../resources/hudson/tasks/BuildTrigger/config_ru.properties | 1 - .../resources/hudson/tasks/BuildTrigger/config_zh_TW.properties | 1 - 8 files changed, 1 insertion(+), 8 deletions(-) diff --git a/core/src/main/resources/hudson/tasks/BuildTrigger/config.jelly b/core/src/main/resources/hudson/tasks/BuildTrigger/config.jelly index 3e0f31d68c..4ff3c11354 100644 --- a/core/src/main/resources/hudson/tasks/BuildTrigger/config.jelly +++ b/core/src/main/resources/hudson/tasks/BuildTrigger/config.jelly @@ -33,7 +33,7 @@ THE SOFTWARE. + title="${%Trigger only if build is stable}" value="SUCCESS"/> Date: Sat, 8 Mar 2014 17:17:12 +0100 Subject: [PATCH 25/78] Improvements to the UpstreamCause * Use model-links with context menu * Show the display name of the linked job * If the build isn't available, but the job is, still link to the job --- .../Cause/UpstreamCause/description.jelly | 22 ++++++++++++++----- .../UpstreamCause/description.properties | 3 ++- .../UpstreamCause/description_cs.properties | 3 ++- .../UpstreamCause/description_da.properties | 3 ++- .../UpstreamCause/description_de.properties | 3 ++- .../UpstreamCause/description_es.properties | 3 ++- .../UpstreamCause/description_fi.properties | 3 ++- .../UpstreamCause/description_fr.properties | 3 ++- .../UpstreamCause/description_ja.properties | 3 ++- .../UpstreamCause/description_lv.properties | 3 ++- .../UpstreamCause/description_nl.properties | 3 ++- .../UpstreamCause/description_pl.properties | 3 ++- .../description_pt_BR.properties | 3 ++- .../UpstreamCause/description_ru.properties | 3 ++- .../UpstreamCause/description_sk.properties | 3 ++- .../description_sv_SE.properties | 3 ++- .../UpstreamCause/description_uk.properties | 3 ++- .../description_zh_CN.properties | 3 ++- .../description_zh_TW.properties | 3 ++- 19 files changed, 53 insertions(+), 23 deletions(-) diff --git a/core/src/main/resources/hudson/model/Cause/UpstreamCause/description.jelly b/core/src/main/resources/hudson/model/Cause/UpstreamCause/description.jelly index da21e43253..f751d68745 100644 --- a/core/src/main/resources/hudson/model/Cause/UpstreamCause/description.jelly +++ b/core/src/main/resources/hudson/model/Cause/UpstreamCause/description.jelly @@ -24,11 +24,23 @@ THE SOFTWARE. - + + + + + + + + + + + + + + + + +

    diff --git a/core/src/main/resources/hudson/model/Cause/UpstreamCause/description.properties b/core/src/main/resources/hudson/model/Cause/UpstreamCause/description.properties index 1702cffa2d..6465016a40 100644 --- a/core/src/main/resources/hudson/model/Cause/UpstreamCause/description.properties +++ b/core/src/main/resources/hudson/model/Cause/UpstreamCause/description.properties @@ -20,5 +20,6 @@ # OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN # THE SOFTWARE. -started_by_project=Started by upstream project {0} build number {1} +started_by_project=Started by upstream project {0} build number {1} +started_by_project_with_deleted_build=Started by upstream project {0} build number {1} caused_by=originally caused by: diff --git a/core/src/main/resources/hudson/model/Cause/UpstreamCause/description_cs.properties b/core/src/main/resources/hudson/model/Cause/UpstreamCause/description_cs.properties index 765f77ec8e..6dadacc8d5 100644 --- a/core/src/main/resources/hudson/model/Cause/UpstreamCause/description_cs.properties +++ b/core/src/main/resources/hudson/model/Cause/UpstreamCause/description_cs.properties @@ -1,3 +1,4 @@ # This file is under the MIT License by authors -started_by_project=Spu\u0161t\u011Bno nad\u0159azen\u00FDm projektem {0} build \u010D\u00EDslo {1} +started_by_project=Spu\u0161t\u011Bno nad\u0159azen\u00FDm projektem {0} build \u010D\u00EDslo {1} +started_by_project_with_deleted_build=Spu\u0161t\u011Bno nad\u0159azen\u00FDm projektem {0} build \u010D\u00EDslo {1} diff --git a/core/src/main/resources/hudson/model/Cause/UpstreamCause/description_da.properties b/core/src/main/resources/hudson/model/Cause/UpstreamCause/description_da.properties index 544ac6bad5..d5d6abbe7e 100644 --- a/core/src/main/resources/hudson/model/Cause/UpstreamCause/description_da.properties +++ b/core/src/main/resources/hudson/model/Cause/UpstreamCause/description_da.properties @@ -20,4 +20,5 @@ # OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN # THE SOFTWARE. -started_by_project=Startet af upstream projekt {0} byg nummer {1} +started_by_project=Startet af upstream projekt {0} byg nummer {1} +started_by_project_with_deleted_build=Startet af upstream projekt {0} byg nummer {1} diff --git a/core/src/main/resources/hudson/model/Cause/UpstreamCause/description_de.properties b/core/src/main/resources/hudson/model/Cause/UpstreamCause/description_de.properties index 1bb4deba17..e06ec4c0fa 100644 --- a/core/src/main/resources/hudson/model/Cause/UpstreamCause/description_de.properties +++ b/core/src/main/resources/hudson/model/Cause/UpstreamCause/description_de.properties @@ -21,5 +21,6 @@ # THE SOFTWARE. caused_by=urspr\u00FCnglich ausgel\u00F6st durch: -started_by_project=Gestartet durch vorgelagertes Projekt {0}, Build {1} +started_by_project=Gestartet durch vorgelagertes Projekt {0}, Build {1} +started_by_project_with_deleted_build=Gestartet durch vorgelagertes Projekt {0}, Build {1} diff --git a/core/src/main/resources/hudson/model/Cause/UpstreamCause/description_es.properties b/core/src/main/resources/hudson/model/Cause/UpstreamCause/description_es.properties index b274651aa1..7dd9d5530e 100644 --- a/core/src/main/resources/hudson/model/Cause/UpstreamCause/description_es.properties +++ b/core/src/main/resources/hudson/model/Cause/UpstreamCause/description_es.properties @@ -21,4 +21,5 @@ # THE SOFTWARE. -started_by_project=Lanzado por la ejecuci\u00F3n n\u00FAmero {1} del proyecto padre\: {0} +started_by_project=Lanzado por la ejecuci\u00F3n n\u00FAmero {1} del proyecto padre\: {0} +started_by_project_with_deleted_build=Lanzado por la ejecuci\u00F3n n\u00FAmero {1} del proyecto padre\: {0} diff --git a/core/src/main/resources/hudson/model/Cause/UpstreamCause/description_fi.properties b/core/src/main/resources/hudson/model/Cause/UpstreamCause/description_fi.properties index 8817486edb..9cff3e9b65 100644 --- a/core/src/main/resources/hudson/model/Cause/UpstreamCause/description_fi.properties +++ b/core/src/main/resources/hudson/model/Cause/UpstreamCause/description_fi.properties @@ -20,4 +20,5 @@ # OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN # THE SOFTWARE. -started_by_project=K\u00E4ynnist\u00E4j\u00E4 yl\u00E4virran projekti {0} k\u00E4\u00E4nn\u00F6snumero {1} +started_by_project=K\u00E4ynnist\u00E4j\u00E4 yl\u00E4virran projekti {0} k\u00E4\u00E4nn\u00F6snumero {1} +started_by_project_with_deleted_build=K\u00E4ynnist\u00E4j\u00E4 yl\u00E4virran projekti {0} k\u00E4\u00E4nn\u00F6snumero {1} diff --git a/core/src/main/resources/hudson/model/Cause/UpstreamCause/description_fr.properties b/core/src/main/resources/hudson/model/Cause/UpstreamCause/description_fr.properties index 845ada15a1..7f46cd410c 100644 --- a/core/src/main/resources/hudson/model/Cause/UpstreamCause/description_fr.properties +++ b/core/src/main/resources/hudson/model/Cause/UpstreamCause/description_fr.properties @@ -21,5 +21,6 @@ # THE SOFTWARE. caused_by=Originellement lanc\u00E9 par: -started_by_project=Lanc\u00E9 par le projet amont {0} avec le num\u00E9ro de construction {1} +started_by_project=Lanc\u00E9 par le projet amont {0} avec le num\u00E9ro de construction {1} +started_by_project_with_deleted_build=Lanc\u00E9 par le projet amont {0} avec le num\u00E9ro de construction {1} diff --git a/core/src/main/resources/hudson/model/Cause/UpstreamCause/description_ja.properties b/core/src/main/resources/hudson/model/Cause/UpstreamCause/description_ja.properties index 8cddc292f2..7631f49ad6 100644 --- a/core/src/main/resources/hudson/model/Cause/UpstreamCause/description_ja.properties +++ b/core/src/main/resources/hudson/model/Cause/UpstreamCause/description_ja.properties @@ -20,5 +20,6 @@ # OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN # THE SOFTWARE. -started_by_project=\u4e0a\u6d41\u30d7\u30ed\u30b8\u30a7\u30af\u30c8{0}\u306e#{1}\u304c\u5b9f\u884c +started_by_project=\u4e0a\u6d41\u30d7\u30ed\u30b8\u30a7\u30af\u30c8{0}\u306e#{1}\u304c\u5b9f\u884c +started_by_project_with_deleted_build=\u4e0a\u6d41\u30d7\u30ed\u30b8\u30a7\u30af\u30c8{0}\u306e#{1}\u304c\u5b9f\u884c caused_by=\u5143\u306e\u539f\u56e0: \ No newline at end of file diff --git a/core/src/main/resources/hudson/model/Cause/UpstreamCause/description_lv.properties b/core/src/main/resources/hudson/model/Cause/UpstreamCause/description_lv.properties index 84e30925ff..d6eb00c13e 100644 --- a/core/src/main/resources/hudson/model/Cause/UpstreamCause/description_lv.properties +++ b/core/src/main/resources/hudson/model/Cause/UpstreamCause/description_lv.properties @@ -1,4 +1,5 @@ # This file is under the MIT License by authors caused_by=s\u0101kotn\u0113ji izrais\u012Bjis: -started_by_project=S\u0101kts no aug\u0161upstraumes projekta {0} b\u016Bv\u0113juma {1} +started_by_project=S\u0101kts no aug\u0161upstraumes projekta {0} b\u016Bv\u0113juma {1} +started_by_project_with_deleted_build=S\u0101kts no aug\u0161upstraumes projekta {0} b\u016Bv\u0113juma {1} diff --git a/core/src/main/resources/hudson/model/Cause/UpstreamCause/description_nl.properties b/core/src/main/resources/hudson/model/Cause/UpstreamCause/description_nl.properties index 7790e9864f..8fffede350 100644 --- a/core/src/main/resources/hudson/model/Cause/UpstreamCause/description_nl.properties +++ b/core/src/main/resources/hudson/model/Cause/UpstreamCause/description_nl.properties @@ -1,4 +1,5 @@ # This file is under the MIT License by authors caused_by=oorspronkelijk veroorzaakt door: -started_by_project=Gestart door stroomopwaarts project {0}, bouwpoging {1} +started_by_project=Gestart door stroomopwaarts project {0}, bouwpoging {1} +started_by_project_with_deleted_build=Gestart door stroomopwaarts project {0}, bouwpoging {1} diff --git a/core/src/main/resources/hudson/model/Cause/UpstreamCause/description_pl.properties b/core/src/main/resources/hudson/model/Cause/UpstreamCause/description_pl.properties index 3f7e182c85..ca975f6e8e 100644 --- a/core/src/main/resources/hudson/model/Cause/UpstreamCause/description_pl.properties +++ b/core/src/main/resources/hudson/model/Cause/UpstreamCause/description_pl.properties @@ -20,5 +20,6 @@ # OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN # THE SOFTWARE. -started_by_project=Wystartowany przez projekt nadrz\u0119dny {0} o numerze {1} +started_by_project=Wystartowany przez projekt nadrz\u0119dny {0} o numerze {1} +started_by_project_with_deleted_build=Wystartowany przez projekt nadrz\u0119dny {0} o numerze {1} caused_by=Pierwotnie spowodowany przez: diff --git a/core/src/main/resources/hudson/model/Cause/UpstreamCause/description_pt_BR.properties b/core/src/main/resources/hudson/model/Cause/UpstreamCause/description_pt_BR.properties index 6a45a43d52..bcd1781af9 100644 --- a/core/src/main/resources/hudson/model/Cause/UpstreamCause/description_pt_BR.properties +++ b/core/src/main/resources/hudson/model/Cause/UpstreamCause/description_pt_BR.properties @@ -22,4 +22,5 @@ # Started by upstream project {0} build number {1} caused_by=Criado por originalidade de: -started_by_project=Iniciado pelo build {1} do projeto {0} +started_by_project=Iniciado pelo build {1} do projeto {0} +started_by_project_with_deleted_build=Iniciado pelo build {1} do projeto {0} diff --git a/core/src/main/resources/hudson/model/Cause/UpstreamCause/description_ru.properties b/core/src/main/resources/hudson/model/Cause/UpstreamCause/description_ru.properties index b780a5ccda..d3ebf3a40b 100644 --- a/core/src/main/resources/hudson/model/Cause/UpstreamCause/description_ru.properties +++ b/core/src/main/resources/hudson/model/Cause/UpstreamCause/description_ru.properties @@ -1,4 +1,5 @@ # This file is under the MIT License by authors caused_by=\u043F\u0435\u0440\u0432\u043E\u043D\u0430\u0447\u0430\u043B\u044C\u043D\u043E \u0437\u0430\u043F\u0443\u0449\u0435\u043D\u0430: -started_by_project=\u0412\u044B\u0437\u0432\u0430\u043D \u0432\u043E\u0441\u0445\u043E\u0434\u044F\u0449\u0438\u043C \u043F\u0440\u043E\u0435\u043A\u0442\u043E\u043C {0}, \u0441\u0431\u043E\u0440\u043A\u0430 \u043D\u043E\u043C\u0435\u0440 {1} +started_by_project=\u0412\u044B\u0437\u0432\u0430\u043D \u0432\u043E\u0441\u0445\u043E\u0434\u044F\u0449\u0438\u043C \u043F\u0440\u043E\u0435\u043A\u0442\u043E\u043C {0}, \u0441\u0431\u043E\u0440\u043A\u0430 \u043D\u043E\u043C\u0435\u0440 {1} +started_by_project_with_deleted_build=\u0412\u044B\u0437\u0432\u0430\u043D \u0432\u043E\u0441\u0445\u043E\u0434\u044F\u0449\u0438\u043C \u043F\u0440\u043E\u0435\u043A\u0442\u043E\u043C {0}, \u0441\u0431\u043E\u0440\u043A\u0430 \u043D\u043E\u043C\u0435\u0440 {1} diff --git a/core/src/main/resources/hudson/model/Cause/UpstreamCause/description_sk.properties b/core/src/main/resources/hudson/model/Cause/UpstreamCause/description_sk.properties index af1048289d..2027b4fb26 100644 --- a/core/src/main/resources/hudson/model/Cause/UpstreamCause/description_sk.properties +++ b/core/src/main/resources/hudson/model/Cause/UpstreamCause/description_sk.properties @@ -1,4 +1,5 @@ # This file is under the MIT License by authors caused_by=p\u00F4vodn\u00E1 pr\u00ED\u010Dina: -started_by_project=Na\u0161tartovan\u00E9 upstream projektom {0} \u010D\u00EDslo zostavenia {1} +started_by_project=Na\u0161tartovan\u00E9 upstream projektom {0} \u010D\u00EDslo zostavenia {1} +started_by_project_with_deleted_build=Na\u0161tartovan\u00E9 upstream projektom {0} \u010D\u00EDslo zostavenia {1} diff --git a/core/src/main/resources/hudson/model/Cause/UpstreamCause/description_sv_SE.properties b/core/src/main/resources/hudson/model/Cause/UpstreamCause/description_sv_SE.properties index 546f4647a6..19a14d946d 100644 --- a/core/src/main/resources/hudson/model/Cause/UpstreamCause/description_sv_SE.properties +++ b/core/src/main/resources/hudson/model/Cause/UpstreamCause/description_sv_SE.properties @@ -1,4 +1,5 @@ # This file is under the MIT License by authors caused_by=ursprungligen p\u00E5 grund av: -started_by_project=Startad av projekt uppstr\u00F6ms {0} byggnummer {1} +started_by_project=Startad av projekt uppstr\u00F6ms {0} byggnummer {1} +started_by_project_with_deleted_build=Startad av projekt uppstr\u00F6ms {0} byggnummer {1} diff --git a/core/src/main/resources/hudson/model/Cause/UpstreamCause/description_uk.properties b/core/src/main/resources/hudson/model/Cause/UpstreamCause/description_uk.properties index cfe86aa6af..a137decaa7 100644 --- a/core/src/main/resources/hudson/model/Cause/UpstreamCause/description_uk.properties +++ b/core/src/main/resources/hudson/model/Cause/UpstreamCause/description_uk.properties @@ -20,4 +20,5 @@ # OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN # THE SOFTWARE. -started_by_project=\u0417\u0430\u043F\u0443\u0449\u0435\u043D\u043E \u043A\u0435\u0440\u0456\u0432\u043D\u0438\u043C \u043F\u0440\u043E\u0435\u043A\u0442\u043E\u043C {0}, \u043F\u043E\u0431\u0443\u0434\u043E\u0432\u0430 \u043D\u043E\u043C\u0435\u0440 {1} +started_by_project=\u0417\u0430\u043F\u0443\u0449\u0435\u043D\u043E \u043A\u0435\u0440\u0456\u0432\u043D\u0438\u043C \u043F\u0440\u043E\u0435\u043A\u0442\u043E\u043C {0}, \u043F\u043E\u0431\u0443\u0434\u043E\u0432\u0430 \u043D\u043E\u043C\u0435\u0440 {1} +started_by_project_with_deleted_build=\u0417\u0430\u043F\u0443\u0449\u0435\u043D\u043E \u043A\u0435\u0440\u0456\u0432\u043D\u0438\u043C \u043F\u0440\u043E\u0435\u043A\u0442\u043E\u043C {0}, \u043F\u043E\u0431\u0443\u0434\u043E\u0432\u0430 \u043D\u043E\u043C\u0435\u0440 {1} diff --git a/core/src/main/resources/hudson/model/Cause/UpstreamCause/description_zh_CN.properties b/core/src/main/resources/hudson/model/Cause/UpstreamCause/description_zh_CN.properties index b90ffb3fc5..3c316130de 100644 --- a/core/src/main/resources/hudson/model/Cause/UpstreamCause/description_zh_CN.properties +++ b/core/src/main/resources/hudson/model/Cause/UpstreamCause/description_zh_CN.properties @@ -1,4 +1,5 @@ # This file is under the MIT License by authors caused_by=\u89E6\u53D1\u6784\u5EFA -started_by_project=\u7531\u4E0A\u6E38\u9879\u76EE {0} \u6784\u5EFA\u53F7 {1} +started_by_project=\u7531\u4E0A\u6E38\u9879\u76EE {0} \u6784\u5EFA\u53F7 {1} +started_by_project_with_deleted_build=\u7531\u4E0A\u6E38\u9879\u76EE {0} \u6784\u5EFA\u53F7 {1} diff --git a/core/src/main/resources/hudson/model/Cause/UpstreamCause/description_zh_TW.properties b/core/src/main/resources/hudson/model/Cause/UpstreamCause/description_zh_TW.properties index d7861edc8f..c9e7e445a3 100644 --- a/core/src/main/resources/hudson/model/Cause/UpstreamCause/description_zh_TW.properties +++ b/core/src/main/resources/hudson/model/Cause/UpstreamCause/description_zh_TW.properties @@ -20,5 +20,6 @@ # OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN # THE SOFTWARE. -started_by_project=\u7531\u4e0a\u6e38\u5c08\u6848 {0} \u7684\u7b2c {1} \u6b21\u5efa\u7f6e\u6240\u89f8\u767c +started_by_project=\u7531\u4e0a\u6e38\u5c08\u6848 {0} \u7684\u7b2c {1} \u6b21\u5efa\u7f6e\u6240\u89f8\u767c +started_by_project_with_deleted_build=\u7531\u4e0a\u6e38\u5c08\u6848 {0} \u7684\u7b2c {1} \u6b21\u5efa\u7f6e\u6240\u89f8\u767c caused_by=\u8d77\u56e0: From 55eb7957696cd964800c4f2735585b75205c7ec4 Mon Sep 17 00:00:00 2001 From: Kohsuke Kawaguchi Date: Sun, 9 Mar 2014 22:51:50 -0700 Subject: [PATCH 26/78] [maven-release-plugin] prepare release jenkins-1.554 --- cli/pom.xml | 2 +- core/pom.xml | 2 +- plugins/pom.xml | 8 ++++---- pom.xml | 2 +- test/pom.xml | 2 +- war/pom.xml | 2 +- 6 files changed, 9 insertions(+), 9 deletions(-) diff --git a/cli/pom.xml b/cli/pom.xml index ce3173d6e2..fe1bf1d662 100644 --- a/cli/pom.xml +++ b/cli/pom.xml @@ -5,7 +5,7 @@ pom org.jenkins-ci.main - 1.554-SNAPSHOT + 1.554 cli diff --git a/core/pom.xml b/core/pom.xml index fbebee0786..f4b623a001 100644 --- a/core/pom.xml +++ b/core/pom.xml @@ -29,7 +29,7 @@ THE SOFTWARE. org.jenkins-ci.main pom - 1.554-SNAPSHOT + 1.554 ../pom.xml diff --git a/plugins/pom.xml b/plugins/pom.xml index d1042a2454..65155ca2e7 100644 --- a/plugins/pom.xml +++ b/plugins/pom.xml @@ -11,7 +11,7 @@ org.jenkins-ci.plugins plugin Jenkins plugin POM - 1.554-SNAPSHOT + 1.554 pom +

    What's new in 1.554 (2014/03/09)

    • Archiving of symlinks as artifacts did not work in some cases. @@ -70,7 +73,6 @@ Upcoming changes Slow rendering of directories with many entries in remote workspaces. (issue 21780)
    -

    What's new in 1.553 (2014/03/02)

    • From 76498deaec95b6e613bff8b93551c7f9a38cf55b Mon Sep 17 00:00:00 2001 From: Kohsuke Kawaguchi Date: Mon, 10 Mar 2014 07:42:18 -0700 Subject: [PATCH 29/78] updated changelog as a part of the release --- debian/debian/changelog | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/debian/debian/changelog b/debian/debian/changelog index e94e020934..cb6812fdd2 100644 --- a/debian/debian/changelog +++ b/debian/debian/changelog @@ -1,3 +1,9 @@ +jenkins (1.554) unstable; urgency=low + + * See http://jenkins-ci.org/changelog for more details. + + -- Kohsuke Kawaguchi Mon, 10 Mar 2014 07:26:41 -0700 + jenkins (1.553) unstable; urgency=low * See http://jenkins-ci.org/changelog for more details. From 4253e75c2c4a9667c9b6a95a90ab31a2cdcd4b17 Mon Sep 17 00:00:00 2001 From: Kohsuke Kawaguchi Date: Mon, 10 Mar 2014 07:46:43 -0700 Subject: [PATCH 30/78] creating an RC branch --- changelog.html | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/changelog.html b/changelog.html index 5ec185220c..a4006513d2 100644 --- a/changelog.html +++ b/changelog.html @@ -55,16 +55,18 @@ Upcoming changes

      What's new in 1.554 (2014/03/09)

        From b0f00aa7dac6263b295efe89c2e5e80b514ed611 Mon Sep 17 00:00:00 2001 From: Kohsuke Kawaguchi Date: Mon, 10 Mar 2014 07:46:48 -0700 Subject: [PATCH 31/78] the trunk is toward 1.556-SNAPSHOT --- cli/pom.xml | 2 +- core/pom.xml | 2 +- plugins/pom.xml | 8 ++++---- pom.xml | 2 +- test/pom.xml | 2 +- war/pom.xml | 2 +- 6 files changed, 9 insertions(+), 9 deletions(-) diff --git a/cli/pom.xml b/cli/pom.xml index bf92e10e31..e82d87c8d9 100644 --- a/cli/pom.xml +++ b/cli/pom.xml @@ -5,7 +5,7 @@ pom org.jenkins-ci.main - 1.555-SNAPSHOT + 1.556-SNAPSHOT cli diff --git a/core/pom.xml b/core/pom.xml index d760dce28a..b67f0644a5 100644 --- a/core/pom.xml +++ b/core/pom.xml @@ -29,7 +29,7 @@ THE SOFTWARE. org.jenkins-ci.main pom - 1.555-SNAPSHOT + 1.556-SNAPSHOT ../pom.xml diff --git a/plugins/pom.xml b/plugins/pom.xml index bee7e510f4..96de7845f2 100644 --- a/plugins/pom.xml +++ b/plugins/pom.xml @@ -11,7 +11,7 @@ org.jenkins-ci.plugins plugin Jenkins plugin POM - 1.555-SNAPSHOT + 1.556-SNAPSHOT pom

        What's new in 1.554 (2014/03/09)

        From 6aa5ea8c7225c6726abb9affb22966df778e6ea4 Mon Sep 17 00:00:00 2001 From: Jesse Glick Date: Mon, 10 Mar 2014 14:29:52 -0400 Subject: [PATCH 33/78] =?UTF-8?q?The=20new=20mixin=20should=20also=20handl?= =?UTF-8?q?e=20Trigger=E2=80=99s.=20(Left=20the=20upstream=20pseudo-trigge?= =?UTF-8?q?r=20out=20of=20this,=20as=20it=20is=20pretty=20hackish=20and=20?= =?UTF-8?q?might=20not=20generalize=20well=E2=80=94requires=20Publisher?= =?UTF-8?q?=E2=80=99s=20to=20make=20any=20sense.)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- core/src/main/java/hudson/model/AbstractProject.java | 2 +- core/src/main/java/hudson/triggers/Trigger.java | 3 ++- .../java/jenkins/model/ParameterizedJobMixIn.java | 12 +++++++++++- .../lib/hudson/project/config-trigger.jelly | 2 +- 4 files changed, 15 insertions(+), 4 deletions(-) diff --git a/core/src/main/java/hudson/model/AbstractProject.java b/core/src/main/java/hudson/model/AbstractProject.java index 8d950f7626..d4da800276 100644 --- a/core/src/main/java/hudson/model/AbstractProject.java +++ b/core/src/main/java/hudson/model/AbstractProject.java @@ -1594,7 +1594,7 @@ public abstract class AbstractProject

        ,R extends A } @SuppressWarnings("unchecked") - public Map> getTriggers() { + @Override public Map> getTriggers() { return triggers().toMap(); } diff --git a/core/src/main/java/hudson/triggers/Trigger.java b/core/src/main/java/hudson/triggers/Trigger.java index 51b7bffbe3..e75f70eec1 100644 --- a/core/src/main/java/hudson/triggers/Trigger.java +++ b/core/src/main/java/hudson/triggers/Trigger.java @@ -59,6 +59,7 @@ import antlr.ANTLRException; import javax.annotation.CheckForNull; import edu.umd.cs.findbugs.annotations.SuppressWarnings; import hudson.model.Items; +import jenkins.model.ParameterizedJobMixIn; /** * Triggers a {@link Build}. @@ -246,7 +247,7 @@ public abstract class Trigger implements Describable> } // Process all triggers, except SCMTriggers when synchronousPolling is set - for (AbstractProject p : inst.getAllItems(AbstractProject.class)) { + for (ParameterizedJobMixIn.ParameterizedJob p : inst.getAllItems(ParameterizedJobMixIn.ParameterizedJob.class)) { for (Trigger t : p.getTriggers().values()) { if (! (t instanceof SCMTrigger && scmd.synchronousPolling)) { LOGGER.fine("cron checking "+p.getName()); diff --git a/core/src/main/java/jenkins/model/ParameterizedJobMixIn.java b/core/src/main/java/jenkins/model/ParameterizedJobMixIn.java index c3d8b3cb9e..cc262d1577 100644 --- a/core/src/main/java/jenkins/model/ParameterizedJobMixIn.java +++ b/core/src/main/java/jenkins/model/ParameterizedJobMixIn.java @@ -40,12 +40,15 @@ import hudson.model.Queue; import hudson.model.Run; import hudson.model.queue.QueueTaskFuture; import hudson.search.SearchIndexBuilder; +import hudson.triggers.Trigger; +import hudson.triggers.TriggerDescriptor; import hudson.views.BuildButtonColumn; import java.io.IOException; import java.util.ArrayList; import java.util.Arrays; import java.util.Collections; import java.util.List; +import java.util.Map; import javax.annotation.CheckForNull; import javax.servlet.ServletException; import static javax.servlet.http.HttpServletResponse.SC_CREATED; @@ -250,7 +253,7 @@ public abstract class ParameterizedJobMixIn & Param /** * Marker for job using this mixin. */ - public interface ParameterizedJob extends hudson.model.Queue.Task { + public interface ParameterizedJob extends hudson.model.Queue.Task, hudson.model.Item { @SuppressWarnings("deprecation") @CheckForNull hudson.model.BuildAuthorizationToken getAuthToken(); @@ -259,6 +262,13 @@ public abstract class ParameterizedJobMixIn & Param String getBuildNowText(); + /** + * Gets currently configured triggers. + * You may use {@code } to configure them. + * @return a map from trigger kind to instance + */ + Map> getTriggers(); + } } diff --git a/core/src/main/resources/lib/hudson/project/config-trigger.jelly b/core/src/main/resources/lib/hudson/project/config-trigger.jelly index 5da3902382..7e9b188ece 100644 --- a/core/src/main/resources/lib/hudson/project/config-trigger.jelly +++ b/core/src/main/resources/lib/hudson/project/config-trigger.jelly @@ -23,7 +23,7 @@ THE SOFTWARE. --> From 01e35fc9a6ad42e436b4b11acfb6517344022ccb Mon Sep 17 00:00:00 2001 From: christ66 Date: Mon, 10 Mar 2014 12:17:18 -0700 Subject: [PATCH 34/78] Expose the computer runs and timestamp to api. --- core/src/main/java/hudson/model/Computer.java | 1 + core/src/main/java/hudson/model/Run.java | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/core/src/main/java/hudson/model/Computer.java b/core/src/main/java/hudson/model/Computer.java index 43fa1c37c2..245661efe8 100644 --- a/core/src/main/java/hudson/model/Computer.java +++ b/core/src/main/java/hudson/model/Computer.java @@ -635,6 +635,7 @@ public /*transient*/ abstract class Computer extends Actionable implements Acces return (node != null) ? node.getSelfLabel().getTiedJobs() : Collections.EMPTY_LIST; } + @Exported public RunList getBuilds() { return new RunList(Jenkins.getInstance().getAllItems(Job.class)).node(getNode()); } diff --git a/core/src/main/java/hudson/model/Run.java b/core/src/main/java/hudson/model/Run.java index b8540ebfea..222324c74e 100644 --- a/core/src/main/java/hudson/model/Run.java +++ b/core/src/main/java/hudson/model/Run.java @@ -587,7 +587,7 @@ public abstract class Run ,RunT extends Run Date: Mon, 10 Mar 2014 22:12:12 +0100 Subject: [PATCH 35/78] Test PrivateKeyProvider --- .../hudson/cli/PrivateKeyProviderTest.java | 140 ++++++++++++++++++ cli/src/test/resources/hudson/cli/.ssh/id_dsa | 12 ++ .../test/resources/hudson/cli/.ssh/id_dsa.pub | 1 + cli/src/test/resources/hudson/cli/.ssh/id_rsa | 27 ++++ .../test/resources/hudson/cli/.ssh/id_rsa.pub | 1 + 5 files changed, 181 insertions(+) create mode 100644 cli/src/test/java/hudson/cli/PrivateKeyProviderTest.java create mode 100644 cli/src/test/resources/hudson/cli/.ssh/id_dsa create mode 100644 cli/src/test/resources/hudson/cli/.ssh/id_dsa.pub create mode 100644 cli/src/test/resources/hudson/cli/.ssh/id_rsa create mode 100644 cli/src/test/resources/hudson/cli/.ssh/id_rsa.pub diff --git a/cli/src/test/java/hudson/cli/PrivateKeyProviderTest.java b/cli/src/test/java/hudson/cli/PrivateKeyProviderTest.java new file mode 100644 index 0000000000..376b1fa815 --- /dev/null +++ b/cli/src/test/java/hudson/cli/PrivateKeyProviderTest.java @@ -0,0 +1,140 @@ +/* + * The MIT License + * + * Copyright (c) 2014 Red Hat, 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. + */ +package hudson.cli; + +import static org.mockito.Mockito.verify; +import static org.powermock.api.mockito.PowerMockito.doReturn; +import static org.powermock.api.mockito.PowerMockito.mock; +import static org.powermock.api.mockito.PowerMockito.mockStatic; +import static org.powermock.api.mockito.PowerMockito.whenNew; + +import java.io.File; +import java.io.IOException; +import java.net.URISyntaxException; +import java.net.URL; +import java.security.GeneralSecurityException; +import java.security.Key; +import java.security.KeyPair; +import java.util.Arrays; + +import org.hamcrest.Description; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.mockito.ArgumentMatcher; +import org.mockito.Mockito; +import org.powermock.core.classloader.annotations.PrepareForTest; +import org.powermock.modules.junit4.PowerMockRunner; + +@RunWith(PowerMockRunner.class) +@PrepareForTest(CLI.class) // When mocking new operator caller has to be @PreparedForTest, not class itself +public class PrivateKeyProviderTest { + + @Test + public void specifyKeysExplicitly() throws Exception { + final CLI cli = fakeCLI(); + + final File dsaKey = keyFile(".ssh/id_dsa"); + final File rsaKey = keyFile(".ssh/id_rsa"); + + run("-i", dsaKey.getAbsolutePath(), "-i", rsaKey.getAbsolutePath(), "-s", "http://example.com"); + + verify(cli).authenticate(withKeyPairs( + keyPair(dsaKey), + keyPair(rsaKey) + )); + } + + @Test + public void useDefaultKeyLocations() throws Exception { + final CLI cli = fakeCLI(); + + final File rsaKey = keyFile(".ssh/id_rsa"); + final File dsaKey = keyFile(".ssh/id_dsa"); + + fakeHome(); + run("-s", "http://example.com"); + + verify(cli).authenticate(withKeyPairs( + keyPair(rsaKey), + keyPair(dsaKey) + )); + } + + private CLI fakeCLI() throws Exception { + final CLI cli = mock(CLI.class); + + final CLIConnectionFactory factory = mock(CLIConnectionFactory.class, Mockito.CALLS_REAL_METHODS); + factory.jenkins = new URL("http://example.com"); + doReturn(cli).when(factory).connect(); + + mockStatic(CLIConnectionFactory.class); + whenNew(CLIConnectionFactory.class).withNoArguments().thenReturn(factory); + + return cli; + } + + private void fakeHome() throws URISyntaxException { + final File home = new File(this.getClass().getResource(".ssh").toURI()).getParentFile(); + System.setProperty("user.home", home.getAbsolutePath()); + } + + private int run(String... args) throws Exception { + return CLI._main(args); + } + + private File keyFile(String name) throws URISyntaxException { + return new File(this.getClass().getResource(name).toURI()); + } + + private KeyPair keyPair(File file) throws IOException, GeneralSecurityException { + return PrivateKeyProvider.loadKey(file, null); + } + + private Iterable withKeyPairs(final KeyPair... expected) { + return Mockito.argThat(new ArgumentMatcher>() { + @Override public void describeTo(Description description) { + description.appendText(Arrays.asList(expected).toString()); + } + + @Override public boolean matches(Object argument) { + if (!(argument instanceof Iterable)) throw new IllegalArgumentException("Not an instance of Iterrable"); + + @SuppressWarnings("unchecked") + final Iterable actual = (Iterable) argument; + int i = 0; + for (KeyPair akp: actual) { + if (!eq(expected[i].getPublic(), akp.getPublic())) return false; + if (!eq(expected[i].getPrivate(), akp.getPrivate())) return false; + i++; + } + + return i == expected.length; + } + + private boolean eq(final Key expected, final Key actual) { + return Arrays.equals(expected.getEncoded(), actual.getEncoded()); + } + }); + } +} diff --git a/cli/src/test/resources/hudson/cli/.ssh/id_dsa b/cli/src/test/resources/hudson/cli/.ssh/id_dsa new file mode 100644 index 0000000000..be556daa6d --- /dev/null +++ b/cli/src/test/resources/hudson/cli/.ssh/id_dsa @@ -0,0 +1,12 @@ +-----BEGIN DSA PRIVATE KEY----- +MIIBugIBAAKBgQCA9mMzB1O52hpObIyaJXgFJQUmc1HV0NEJXsFFGh8U2l0Tkgv4 +fp3MWadiAMmc5H1ot4KQLXl7SwU7dHCCFcGcfQiOjeD5rWeZuHoPAJSDMilcJGE3 +Xo2C+wlescTByEgRRA16vdSlNaDJXKVxq9Wr59G8P4JC6/5EvpeypgYdTQIVAMTf +aC0O2EGLnJrNBsUdc1s+iUp9AoGAZA7pZYPMJHJWTanJb2DlWHn/QM63jfh38N6W +ERzmQQks6QdS7UkFlg9cbVGUtn0Yz2SfX3VKiMXNMkAdGD8loBcJS5w6oMMU7rcj +lldRQ63+fMgdVZYMF5bchC6RhQeGZQ8Imf2iFF28SsE4bi+K12HYgIO5bFxPFUTH +WSWsMLcCgYBgHJ90ZLU400axB5P0qw/0s4arPD0g53Vzi/Y2h5TJr3KPF2sEIbAc +2gpFEzUNY0hvH6REKJ+VPPUvlH6ieaXomW8pSGjv4SdxZhJRrDe+Ac/xQse1QdYx +uWJzpVm3cIGfqLxmQnrklnutI/1F62VZQlq9vjiZL7ir/00vdUTYHwIUUkttGGgl +a0rWLzPTPF4X4lZfFhk= +-----END DSA PRIVATE KEY----- diff --git a/cli/src/test/resources/hudson/cli/.ssh/id_dsa.pub b/cli/src/test/resources/hudson/cli/.ssh/id_dsa.pub new file mode 100644 index 0000000000..4a42a84572 --- /dev/null +++ b/cli/src/test/resources/hudson/cli/.ssh/id_dsa.pub @@ -0,0 +1 @@ +ssh-dss AAAAB3NzaC1kc3MAAACBAID2YzMHU7naGk5sjJoleAUlBSZzUdXQ0QlewUUaHxTaXROSC/h+ncxZp2IAyZzkfWi3gpAteXtLBTt0cIIVwZx9CI6N4PmtZ5m4eg8AlIMyKVwkYTdejYL7CV6xxMHISBFEDXq91KU1oMlcpXGr1avn0bw/gkLr/kS+l7KmBh1NAAAAFQDE32gtDthBi5yazQbFHXNbPolKfQAAAIBkDullg8wkclZNqclvYOVYef9AzreN+Hfw3pYRHOZBCSzpB1LtSQWWD1xtUZS2fRjPZJ9fdUqIxc0yQB0YPyWgFwlLnDqgwxTutyOWV1FDrf58yB1VlgwXltyELpGFB4ZlDwiZ/aIUXbxKwThuL4rXYdiAg7lsXE8VRMdZJawwtwAAAIBgHJ90ZLU400axB5P0qw/0s4arPD0g53Vzi/Y2h5TJr3KPF2sEIbAc2gpFEzUNY0hvH6REKJ+VPPUvlH6ieaXomW8pSGjv4SdxZhJRrDe+Ac/xQse1QdYxuWJzpVm3cIGfqLxmQnrklnutI/1F62VZQlq9vjiZL7ir/00vdUTYHw== ogondza@localhost.localdomain diff --git a/cli/src/test/resources/hudson/cli/.ssh/id_rsa b/cli/src/test/resources/hudson/cli/.ssh/id_rsa new file mode 100644 index 0000000000..ee2ad6b569 --- /dev/null +++ b/cli/src/test/resources/hudson/cli/.ssh/id_rsa @@ -0,0 +1,27 @@ +-----BEGIN RSA PRIVATE KEY----- +MIIEpAIBAAKCAQEAyTqwFqp5Ww2Tr/52D7hhdOwgzYGBUqxrOFopa+kjNEL1Yqwb ++mApUWZ+D3zN9PurhUcVUfeYVXiYWFJ0kG72HIJawL/0BR5oYxRJfumK8Z/sAzAL +xdhc5O5twETrr9gU3cxtvF5oJNP0I9HickAOeC+ZNpiDIIblrhvxXl/QwqrR+/Gv +Nb8TApj+rxXEfNp+N69iGnnxzWn1FeKeOAWpwoBAxZNoqBQAFacF7xfQnoygyekC +xk+ts2O5Zzv8iJ10sVf+x2Q79rxAtsc0xOGhZbBAzbmFTz0PE4iWuo/Vo1c6mM7u +/dam+FxB2NqPNw7W+4eiCnEVkiQZlrxmuGvK7wIDAQABAoIBACml1+QZDFzoBnUa +eVzvkFwesvtVnmp5/QcAwinvarXaVedCL9g2JtcOG3EhJ49YtzsyZxs7329xMja1 +eiKalJ157UaPc/XLQVegT0XRGEzCCJrwSr979F39awGsQgt28XqmYN/nui5FH/Z5 +7iAvWc9OKqu+DQWiZc8PQXmC4zYmvhGQ8vKx44RSqlWCjd9IqBVhpE5gxpI/SmCx +umUNNtoH0hBWr+MsVHzr6UUrC3a99+7bB4We8XMXXFLzbTUSgiYFmK+NxPs/Fux/ +IAyXAMbDw2HeqZ7g4kTaf4cvmVOwhh4zlvB4p7j301LdO1jmvs9z0fn/QJcTpVM7 +ISMKwAECgYEA/uKVdmOKTk3dKzKRFXtWJjqypOXakoX+25lUcVv2PXYRr8Sln9jC +A13fbhvwq+FqbdnNlB23ag5niCVLfUpB1DYYP5jd4lU8D6HZQiHlmokB6nLT9NIW +iTcG88E58Bta/l1Ue5Yn+LqluBC4i289wFbH1kZyxQ565s5dJEv9uAECgYEAyhwF +ZOqTK2lZe5uuN4owVLQaYFj9fsdFHULzlK/UAtkG1gCJhjBmwSEpZFFMH6WgwHk5 +SHJEom0uB4qRv8gQcxl9OSiDsp56ymr0NBhlPVXWr6IzLotLy5XBC1muqvYYlj7E +kHgSet/h8RUM/FeEiwOFHDU2DkMb8Qx1hfMdAu8CgYBSEsYL9CuB4WK5WTQMlcV8 +0+PYY0dJbSpOrgXZ5sHYsp8pWQn3+cUnbl/WxdpujkxGCR9AdX0tAmxmE5RGSNX/ +rleKiv/PtKB9bCFYQS/83ecnBkioCcpF7tknPm4YmcZoJ8dfcE94sSlRpti11WEu +AQOiRNcKCwqaLZMib/HIAQKBgQCdiOffeERMYypfgcJzAiCX9WZV0SeOCS7jFwub +ys17hsSgS/zl/pYpVXrY+dFXHZfGTvcKdB7xaB6nvCfND9lajfSgd+bndEYLvwAo +Fxfajizv64LvdZ4XytuUyEuwcHBLtBMs9Jqa8iU/8AOWMXVbkdvQV92RkleWNPrp +9MyZOwKBgQD9x8MnX5LVBfQKuL9qX6l9Da06EyMkzfz3obKn9AAJ3Xj9+45TNPJu +HnZyvJWesl1vDjXQTm+PVkdyE0WQgoiVX+wxno0hsoly5Uqb5EYHtTUrZzRpkyLK +1VmtDxT5D8gorUgn6crzk4PKaxRkPfAimZdlkQm6iOtuR3kqn5BtIQ== +-----END RSA PRIVATE KEY----- diff --git a/cli/src/test/resources/hudson/cli/.ssh/id_rsa.pub b/cli/src/test/resources/hudson/cli/.ssh/id_rsa.pub new file mode 100644 index 0000000000..91f8ff7180 --- /dev/null +++ b/cli/src/test/resources/hudson/cli/.ssh/id_rsa.pub @@ -0,0 +1 @@ +ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQDJOrAWqnlbDZOv/nYPuGF07CDNgYFSrGs4Wilr6SM0QvVirBv6YClRZn4PfM30+6uFRxVR95hVeJhYUnSQbvYcglrAv/QFHmhjFEl+6Yrxn+wDMAvF2Fzk7m3AROuv2BTdzG28Xmgk0/Qj0eJyQA54L5k2mIMghuWuG/FeX9DCqtH78a81vxMCmP6vFcR82n43r2IaefHNafUV4p44BanCgEDFk2ioFAAVpwXvF9CejKDJ6QLGT62zY7lnO/yInXSxV/7HZDv2vEC2xzTE4aFlsEDNuYVPPQ8TiJa6j9WjVzqYzu791qb4XEHY2o83Dtb7h6IKcRWSJBmWvGa4a8rv your_email@example.com From dd27df680507c73d84db3799054e7d475334e272 Mon Sep 17 00:00:00 2001 From: christ66 Date: Mon, 10 Mar 2014 17:54:47 -0700 Subject: [PATCH 36/78] Add project name and result for run api --- core/src/main/java/hudson/model/Run.java | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/core/src/main/java/hudson/model/Run.java b/core/src/main/java/hudson/model/Run.java index 222324c74e..2c6bbae038 100644 --- a/core/src/main/java/hudson/model/Run.java +++ b/core/src/main/java/hudson/model/Run.java @@ -420,7 +420,7 @@ public abstract class Run ,RunT extends Run,RunT extends Run Date: Tue, 11 Mar 2014 07:47:05 +0100 Subject: [PATCH 37/78] Switch to java.util.logging on few places --- .../security/ExceptionTranslationFilter.java | 30 +++++++------------ .../java/hudson/util/io/ZipArchiverTest.java | 8 ++--- 2 files changed, 14 insertions(+), 24 deletions(-) diff --git a/core/src/main/java/jenkins/security/ExceptionTranslationFilter.java b/core/src/main/java/jenkins/security/ExceptionTranslationFilter.java index 73c03e54a2..aaa7154176 100644 --- a/core/src/main/java/jenkins/security/ExceptionTranslationFilter.java +++ b/core/src/main/java/jenkins/security/ExceptionTranslationFilter.java @@ -28,8 +28,6 @@ import org.acegisecurity.ui.AuthenticationEntryPoint; import org.acegisecurity.ui.savedrequest.SavedRequest; import org.acegisecurity.util.PortResolver; import org.acegisecurity.util.PortResolverImpl; -import org.apache.commons.logging.Log; -import org.apache.commons.logging.LogFactory; import org.springframework.beans.factory.InitializingBean; import org.springframework.util.Assert; @@ -42,6 +40,8 @@ import javax.servlet.ServletResponse; import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletResponse; import java.io.IOException; +import java.util.logging.Level; +import java.util.logging.Logger; /** * Handles any AccessDeniedException and AuthenticationException thrown within the @@ -85,7 +85,7 @@ public class ExceptionTranslationFilter implements Filter, InitializingBean { //~ Static fields/initializers ===================================================================================== - private static final Log logger = LogFactory.getLog(ExceptionTranslationFilter.class); + private static final Logger LOGGER = Logger.getLogger(ExceptionTranslationFilter.class.getName()); //~ Instance fields ================================================================================================ @@ -116,9 +116,7 @@ public class ExceptionTranslationFilter implements Filter, InitializingBean { try { chain.doFilter(request, response); - if (logger.isDebugEnabled()) { - logger.debug("Chain processed normally"); - } + LOGGER.finer("Chain processed normally"); } catch (AuthenticationException ex) { handleException(request, response, chain, ex); @@ -155,27 +153,21 @@ public class ExceptionTranslationFilter implements Filter, InitializingBean { private void handleException(ServletRequest request, ServletResponse response, FilterChain chain, AcegiSecurityException exception) throws IOException, ServletException { if (exception instanceof AuthenticationException) { - if (logger.isDebugEnabled()) { - logger.debug("Authentication exception occurred; redirecting to authentication entry point", exception); - } + LOGGER.log(Level.FINER, "Authentication exception occurred; redirecting to authentication entry point", exception); sendStartAuthentication(request, response, chain, (AuthenticationException) exception); } else if (exception instanceof AccessDeniedException) { if (authenticationTrustResolver.isAnonymous(SecurityContextHolder.getContext().getAuthentication())) { - if (logger.isDebugEnabled()) { - logger.debug("Access is denied (user is anonymous); redirecting to authentication entry point", - exception); - } + LOGGER.log(Level.FINER, "Access is denied (user is anonymous); redirecting to authentication entry point", + exception); sendStartAuthentication(request, response, chain, new InsufficientAuthenticationException( "Full authentication is required to access this resource",exception)); } else { - if (logger.isDebugEnabled()) { - logger.debug("Access is denied (user is not anonymous); delegating to AccessDeniedHandler", - exception); - } + LOGGER.log(Level.FINER, "Access is denied (user is not anonymous); delegating to AccessDeniedHandler", + exception); accessDeniedHandler.handle(request, response, (AccessDeniedException) exception); } @@ -205,9 +197,7 @@ public class ExceptionTranslationFilter implements Filter, InitializingBean { SavedRequest savedRequest = new SavedRequest(httpRequest, portResolver); - if (logger.isDebugEnabled()) { - logger.debug("Authentication entry point being called; SavedRequest added to Session: " + savedRequest); - } + LOGGER.finer("Authentication entry point being called; SavedRequest added to Session: " + savedRequest); if (createSessionAllowed) { // Store the HTTP request itself. Used by AbstractProcessingFilter diff --git a/core/src/test/java/hudson/util/io/ZipArchiverTest.java b/core/src/test/java/hudson/util/io/ZipArchiverTest.java index d30adf9a23..650f1c9723 100644 --- a/core/src/test/java/hudson/util/io/ZipArchiverTest.java +++ b/core/src/test/java/hudson/util/io/ZipArchiverTest.java @@ -9,14 +9,14 @@ import java.io.FileOutputStream; import java.io.IOException; import java.util.Enumeration; +import java.util.logging.Level; +import java.util.logging.Logger; import java.util.zip.ZipFile; import java.util.zip.ZipEntry; -import org.apache.commons.logging.LogFactory; -import org.apache.commons.logging.Log; public class ZipArchiverTest extends TestCase { - private final Log logger = LogFactory.getLog(getClass()); + private static final Logger LOGGER = Logger.getLogger(ZipArchiverTest.class.getName()); private File tmpDir; @@ -103,7 +103,7 @@ public class ZipArchiverTest extends TestCase { * @param cause the root cause of the failure */ private final void fail(final String msg, final Throwable cause) { - logger.error(msg, cause); + LOGGER.log(Level.SEVERE, msg, cause); fail(msg); } From c3df857cf0176f760664d33fe5d0099dabef4827 Mon Sep 17 00:00:00 2001 From: Jesse Glick Date: Tue, 11 Mar 2014 10:10:18 -0400 Subject: [PATCH 38/78] Replaced job field with asJob(). --- .../java/hudson/model/AbstractProject.java | 6 +++- .../jenkins/model/lazy/LazyBuildMixIn.java | 33 ++++++++----------- 2 files changed, 19 insertions(+), 20 deletions(-) diff --git a/core/src/main/java/hudson/model/AbstractProject.java b/core/src/main/java/hudson/model/AbstractProject.java index d4da800276..f71d2a9f33 100644 --- a/core/src/main/java/hudson/model/AbstractProject.java +++ b/core/src/main/java/hudson/model/AbstractProject.java @@ -275,7 +275,11 @@ public abstract class AbstractProject

        ,R extends A } private LazyBuildMixIn createBuildMixIn() { - return new LazyBuildMixIn(this) { + return new LazyBuildMixIn() { + @SuppressWarnings("unchecked") // untypable + @Override protected P asJob() { + return (P) AbstractProject.this; + } @Override protected Class getBuildClass() { return AbstractProject.this.getBuildClass(); } diff --git a/core/src/main/java/jenkins/model/lazy/LazyBuildMixIn.java b/core/src/main/java/jenkins/model/lazy/LazyBuildMixIn.java index 6891770d71..6b7844617b 100644 --- a/core/src/main/java/jenkins/model/lazy/LazyBuildMixIn.java +++ b/core/src/main/java/jenkins/model/lazy/LazyBuildMixIn.java @@ -29,7 +29,7 @@ import hudson.model.AbstractItem; import hudson.model.Item; import hudson.model.ItemGroup; import hudson.model.Job; -import hudson.model.Queue.Task; +import hudson.model.Queue; import hudson.model.Run; import hudson.model.RunMap; import hudson.model.listeners.ItemListener; @@ -53,12 +53,11 @@ import org.kohsuke.accmod.restrictions.DoNotUse; *

        Should be kept in a {@code transient} field in the job. * @since TODO */ -public abstract class LazyBuildMixIn

        ,R extends Run> { +@SuppressWarnings({"unchecked", "rawtypes"}) +public abstract class LazyBuildMixIn

        & Queue.Task & LazyBuildMixIn.LazyLoadingJob, R extends Run> { private static final Logger LOGGER = Logger.getLogger(LazyBuildMixIn.class.getName()); - private final Job job; - @SuppressWarnings("deprecation") // [JENKINS-15156] builds accessed before onLoad or onCreatedFromScratch called private @Nonnull RunMap builds = new RunMap(); @@ -66,15 +65,12 @@ public abstract class LazyBuildMixIn

        ,R extends Run> { private long lastBuildStartTime; /** - * Initializes this mixin based on a job. + * Initializes this mixin. * Call this from a constructor and {@link AbstractItem#onLoad} to make sure it is always initialized. - * @param job the owning job (should be of type {@code P} and assignable to {@link Task} and {@link LazyLoadingJob}) */ - public LazyBuildMixIn(Job job) { - Task.class.cast(job); - LazyLoadingJob.class.cast(job); - this.job = job; - } + protected LazyBuildMixIn() {} + + protected abstract P asJob(); /** * Gets the raw model. @@ -89,7 +85,7 @@ public abstract class LazyBuildMixIn

        ,R extends Run> { * Same as {@link #getRunMap} but suitable for {@link Job#_getRuns}. */ public final RunMap _getRuns() { - assert builds.baseDirInitialized() : "neither onCreatedFromScratch nor onLoad called on " + job + " yet"; + assert builds.baseDirInitialized() : "neither onCreatedFromScratch nor onLoad called on " + asJob() + " yet"; return builds; } @@ -117,7 +113,7 @@ public abstract class LazyBuildMixIn

        ,R extends Run> { LOGGER.log(Level.WARNING, "failed to look up " + name + " in " + parent, x); current = null; } - if (current != null && current.getClass() == job.getClass()) { + if (current != null && current.getClass() == asJob().getClass()) { currentBuilds = (RunMap) ((LazyLoadingJob) current).getLazyBuildMixIn().builds; } } @@ -133,7 +129,7 @@ public abstract class LazyBuildMixIn

        ,R extends Run> { } private RunMap createBuildRunMap() { - return new RunMap(job.getBuildDir(), new RunMap.Constructor() { + return new RunMap(asJob().getBuildDir(), new RunMap.Constructor() { @Override public R create(File dir) throws IOException { return loadBuild(dir); } @@ -154,7 +150,7 @@ public abstract class LazyBuildMixIn

        ,R extends Run> { */ public R loadBuild(File dir) throws IOException { try { - return getBuildClass().getConstructor(job.getClass(), File.class).newInstance(job, dir); + return getBuildClass().getConstructor(asJob().getClass(), File.class).newInstance(asJob(), dir); } catch (InstantiationException e) { throw new Error(e); } catch (IllegalAccessException e) { @@ -185,7 +181,7 @@ public abstract class LazyBuildMixIn

        ,R extends Run> { } lastBuildStartTime = System.currentTimeMillis(); try { - R lastBuild = getBuildClass().getConstructor(job.getClass()).newInstance(job); + R lastBuild = getBuildClass().getConstructor(asJob().getClass()).newInstance(asJob()); builds.put(lastBuild); return lastBuild; } catch (InstantiationException e) { @@ -218,7 +214,7 @@ public abstract class LazyBuildMixIn

        ,R extends Run> { */ public final void removeRun(R run) { if (!builds.remove(run)) { - LOGGER.log(Level.WARNING, "{0} did not contain {1} to begin with", new Object[] {job, run}); + LOGGER.log(Level.WARNING, "{0} did not contain {1} to begin with", new Object[] {asJob(), run}); } } @@ -267,9 +263,8 @@ public abstract class LazyBuildMixIn

        ,R extends Run> { /** * Suitable for {@link Job#createHistoryWidget}. */ - @SuppressWarnings({"unchecked", "rawtypes"}) public final HistoryWidget createHistoryWidget() { - return new BuildHistoryWidget((Task) job, builds, Job.HISTORY_ADAPTER); + return new BuildHistoryWidget(asJob(), builds, Job.HISTORY_ADAPTER); } /** From 8f23ee87a34b756b240b904691bd7f5826ae50b5 Mon Sep 17 00:00:00 2001 From: Jesse Glick Date: Tue, 11 Mar 2014 10:14:46 -0400 Subject: [PATCH 39/78] Renamed type variables for consistency with the names used in Job/Run. --- .../jenkins/model/lazy/LazyBuildMixIn.java | 46 +++++++++---------- 1 file changed, 23 insertions(+), 23 deletions(-) diff --git a/core/src/main/java/jenkins/model/lazy/LazyBuildMixIn.java b/core/src/main/java/jenkins/model/lazy/LazyBuildMixIn.java index 6b7844617b..305d537b9b 100644 --- a/core/src/main/java/jenkins/model/lazy/LazyBuildMixIn.java +++ b/core/src/main/java/jenkins/model/lazy/LazyBuildMixIn.java @@ -54,12 +54,12 @@ import org.kohsuke.accmod.restrictions.DoNotUse; * @since TODO */ @SuppressWarnings({"unchecked", "rawtypes"}) -public abstract class LazyBuildMixIn

        & Queue.Task & LazyBuildMixIn.LazyLoadingJob, R extends Run> { +public abstract class LazyBuildMixIn & Queue.Task & LazyBuildMixIn.LazyLoadingJob, RunT extends Run> { private static final Logger LOGGER = Logger.getLogger(LazyBuildMixIn.class.getName()); @SuppressWarnings("deprecation") // [JENKINS-15156] builds accessed before onLoad or onCreatedFromScratch called - private @Nonnull RunMap builds = new RunMap(); + private @Nonnull RunMap builds = new RunMap(); // keep track of the previous time we started a build private long lastBuildStartTime; @@ -70,21 +70,21 @@ public abstract class LazyBuildMixIn

        & Queue.Task & LazyBuild */ protected LazyBuildMixIn() {} - protected abstract P asJob(); + protected abstract JobT asJob(); /** * Gets the raw model. * Normally should not be called as such. * Note that the initial value is replaced during {@link #onCreatedFromScratch} or {@link #onLoad}. */ - public final @Nonnull RunMap getRunMap() { + public final @Nonnull RunMap getRunMap() { return builds; } /** * Same as {@link #getRunMap} but suitable for {@link Job#_getRuns}. */ - public final RunMap _getRuns() { + public final RunMap _getRuns() { assert builds.baseDirInitialized() : "neither onCreatedFromScratch nor onLoad called on " + asJob() + " yet"; return builds; } @@ -101,8 +101,8 @@ public abstract class LazyBuildMixIn

        & Queue.Task & LazyBuild */ @SuppressWarnings("unchecked") public void onLoad(ItemGroup parent, String name) throws IOException { - RunMap _builds = createBuildRunMap(); - RunMap currentBuilds = this.builds; + RunMap _builds = createBuildRunMap(); + RunMap currentBuilds = this.builds; if (parent != null) { // are we overwriting what currently exist? // this is primarily when Jenkins is getting reloaded @@ -114,12 +114,12 @@ public abstract class LazyBuildMixIn

        & Queue.Task & LazyBuild current = null; } if (current != null && current.getClass() == asJob().getClass()) { - currentBuilds = (RunMap) ((LazyLoadingJob) current).getLazyBuildMixIn().builds; + currentBuilds = (RunMap) ((LazyLoadingJob) current).getLazyBuildMixIn().builds; } } if (currentBuilds != null) { // if we are reloading, keep all those that are still building intact - for (R r : currentBuilds.getLoadedBuilds().values()) { + for (RunT r : currentBuilds.getLoadedBuilds().values()) { if (r.isBuilding()) { _builds.put(r); } @@ -128,9 +128,9 @@ public abstract class LazyBuildMixIn

        & Queue.Task & LazyBuild this.builds = _builds; } - private RunMap createBuildRunMap() { - return new RunMap(asJob().getBuildDir(), new RunMap.Constructor() { - @Override public R create(File dir) throws IOException { + private RunMap createBuildRunMap() { + return new RunMap(asJob().getBuildDir(), new RunMap.Constructor() { + @Override public RunT create(File dir) throws IOException { return loadBuild(dir); } }); @@ -142,13 +142,13 @@ public abstract class LazyBuildMixIn

        & Queue.Task & LazyBuild * one taking the project type ({@code P}); * and one taking {@code P}, then {@link File}. */ - protected abstract Class getBuildClass(); + protected abstract Class getBuildClass(); /** * Loads an existing build record from disk. * The default implementation just calls the ({@link Job}, {@link File}) constructor of {@link #getBuildClass}. */ - public R loadBuild(File dir) throws IOException { + public RunT loadBuild(File dir) throws IOException { try { return getBuildClass().getConstructor(asJob().getClass(), File.class).newInstance(asJob(), dir); } catch (InstantiationException e) { @@ -169,7 +169,7 @@ public abstract class LazyBuildMixIn

        & Queue.Task & LazyBuild */ @SuppressWarnings("SleepWhileHoldingLock") @edu.umd.cs.findbugs.annotations.SuppressWarnings("SWL_SLEEP_WITH_LOCK_HELD") - public final synchronized R newBuild() throws IOException { + public final synchronized RunT 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; @@ -181,7 +181,7 @@ public abstract class LazyBuildMixIn

        & Queue.Task & LazyBuild } lastBuildStartTime = System.currentTimeMillis(); try { - R lastBuild = getBuildClass().getConstructor(asJob().getClass()).newInstance(asJob()); + RunT lastBuild = getBuildClass().getConstructor(asJob().getClass()).newInstance(asJob()); builds.put(lastBuild); return lastBuild; } catch (InstantiationException e) { @@ -212,7 +212,7 @@ public abstract class LazyBuildMixIn

        & Queue.Task & LazyBuild /** * Suitable for {@link Job#removeRun}. */ - public final void removeRun(R run) { + public final void removeRun(RunT run) { if (!builds.remove(run)) { LOGGER.log(Level.WARNING, "{0} did not contain {1} to begin with", new Object[] {asJob(), run}); } @@ -221,42 +221,42 @@ public abstract class LazyBuildMixIn

        & Queue.Task & LazyBuild /** * Suitable for {@link Job#getBuild}. */ - public final R getBuild(String id) { + public final RunT getBuild(String id) { return builds.getById(id); } /** * Suitable for {@link Job#getBuildByNumber}. */ - public final R getBuildByNumber(int n) { + public final RunT getBuildByNumber(int n) { return builds.getByNumber(n); } /** * Suitable for {@link Job#getFirstBuild}. */ - public final R getFirstBuild() { + public final RunT getFirstBuild() { return builds.oldestBuild(); } /** * Suitable for {@link Job#getLastBuild}. */ - public final @CheckForNull R getLastBuild() { + public final @CheckForNull RunT getLastBuild() { return builds.newestBuild(); } /** * Suitable for {@link Job#getNearestBuild}. */ - public final R getNearestBuild(int n) { + public final RunT getNearestBuild(int n) { return builds.search(n, AbstractLazyLoadRunMap.Direction.ASC); } /** * Suitable for {@link Job#getNearestOldBuild}. */ - public final R getNearestOldBuild(int n) { + public final RunT getNearestOldBuild(int n) { return builds.search(n, AbstractLazyLoadRunMap.Direction.DESC); } From b39a779444c10cf73b9ab511c66a79c2bdd40073 Mon Sep 17 00:00:00 2001 From: Jesse Glick Date: Tue, 11 Mar 2014 11:11:21 -0400 Subject: [PATCH 40/78] Introduced RunMixIn so that Run itself does not have to deal with the details. --- .../main/java/hudson/model/AbstractBuild.java | 30 ++- .../java/hudson/model/AbstractProject.java | 2 +- core/src/main/java/hudson/model/Run.java | 174 +++++------------- core/src/main/java/hudson/model/RunMap.java | 3 +- .../jenkins/model/lazy/LazyBuildMixIn.java | 144 ++++++++++++++- 5 files changed, 210 insertions(+), 143 deletions(-) diff --git a/core/src/main/java/hudson/model/AbstractBuild.java b/core/src/main/java/hudson/model/AbstractBuild.java index 5ab752b727..1c829dc42a 100644 --- a/core/src/main/java/hudson/model/AbstractBuild.java +++ b/core/src/main/java/hudson/model/AbstractBuild.java @@ -89,6 +89,8 @@ import javax.annotation.CheckForNull; import org.kohsuke.stapler.interceptor.RequirePOST; import static java.util.logging.Level.WARNING; +import jenkins.model.lazy.BuildReference; +import jenkins.model.lazy.LazyBuildMixIn; /** * Base implementation of {@link Run}s that build software. @@ -98,7 +100,7 @@ import static java.util.logging.Level.WARNING; * @author Kohsuke Kawaguchi * @see AbstractProject */ -public abstract class AbstractBuild

        ,R extends AbstractBuild> extends Run implements Queue.Executable { +public abstract class AbstractBuild

        ,R extends AbstractBuild> extends Run implements Queue.Executable, LazyBuildMixIn.LazyLoadingRun { /** * Set if we want the blame information to flow from upstream to downstream build. @@ -154,6 +156,8 @@ public abstract class AbstractBuild

        ,R extends Abs */ protected transient List buildEnvironments; + private transient LazyBuildMixIn.RunMixIn runMixIn; + protected AbstractBuild(P job) throws IOException { super(job); } @@ -170,15 +174,33 @@ public abstract class AbstractBuild

        ,R extends Abs return getParent(); } - // Just here so that we do not get e.g. NoSuchMethodError: hudson.maven.MavenModuleSetBuild.getNextBuild()Lhudson/model/AbstractBuild; from getModuleLastBuilds + @Override public final synchronized LazyBuildMixIn.RunMixIn getRunMixIn() { + if (runMixIn == null) { + runMixIn = new LazyBuildMixIn.RunMixIn() { + @Override protected R asRun() { + return _this(); + } + }; + } + return runMixIn; + } + + @Override protected final BuildReference createReference() { + return getRunMixIn().createReference(); + } + + @Override protected final void dropLinks() { + getRunMixIn().dropLinks(); + } + @Override public R getPreviousBuild() { - return super.getPreviousBuild(); + return getRunMixIn().getPreviousBuild(); } @Override public R getNextBuild() { - return super.getNextBuild(); + return getRunMixIn().getNextBuild(); } /** diff --git a/core/src/main/java/hudson/model/AbstractProject.java b/core/src/main/java/hudson/model/AbstractProject.java index f71d2a9f33..a34f874bf3 100644 --- a/core/src/main/java/hudson/model/AbstractProject.java +++ b/core/src/main/java/hudson/model/AbstractProject.java @@ -143,7 +143,7 @@ import org.kohsuke.stapler.interceptor.RequirePOST; * @see AbstractBuild */ @SuppressWarnings("rawtypes") -public abstract class AbstractProject

        ,R extends AbstractBuild> extends Job implements BuildableItem, ModelObjectWithChildren, LazyBuildMixIn.LazyLoadingJob, ParameterizedJobMixIn.ParameterizedJob { +public abstract class AbstractProject

        ,R extends AbstractBuild> extends Job implements BuildableItem, ModelObjectWithChildren, LazyBuildMixIn.LazyLoadingJob, ParameterizedJobMixIn.ParameterizedJob { /** * {@link SCM} associated with the project. diff --git a/core/src/main/java/hudson/model/Run.java b/core/src/main/java/hudson/model/Run.java index b39a019ef7..2449c61c73 100644 --- a/core/src/main/java/hudson/model/Run.java +++ b/core/src/main/java/hudson/model/Run.java @@ -27,29 +27,32 @@ */ package hudson.model; -import hudson.console.ConsoleLogFilter; -import hudson.Functions; +import com.jcraft.jzlib.GZIPInputStream; +import com.thoughtworks.xstream.XStream; import hudson.AbortException; import hudson.BulkChange; import hudson.EnvVars; import hudson.ExtensionPoint; import hudson.FeedAdapter; +import hudson.Functions; import hudson.Util; import hudson.XmlFile; import hudson.cli.declarative.CLIMethod; import hudson.console.AnnotatedLargeText; +import hudson.console.ConsoleLogFilter; import hudson.console.ConsoleNote; import hudson.matrix.MatrixBuild; import hudson.matrix.MatrixRun; import hudson.model.Descriptor.FormException; +import hudson.model.Run.RunExecution; import hudson.model.listeners.RunListener; import hudson.model.listeners.SaveableListener; -import hudson.security.PermissionScope; import hudson.search.SearchIndexBuilder; import hudson.security.ACL; import hudson.security.AccessControlled; import hudson.security.Permission; import hudson.security.PermissionGroup; +import hudson.security.PermissionScope; import hudson.tasks.BuildWrapper; import hudson.tasks.test.AbstractTestResultAction; import hudson.util.FlushProofOutputStream; @@ -57,15 +60,18 @@ import hudson.util.FormApply; import hudson.util.LogTaskListener; import hudson.util.ProcessTree; import hudson.util.XStream2; - import java.io.BufferedReader; +import java.io.ByteArrayInputStream; import java.io.File; import java.io.FileInputStream; +import java.io.FileOutputStream; import java.io.IOException; import java.io.InputStream; import java.io.InputStreamReader; +import java.io.OutputStream; import java.io.PrintWriter; import java.io.Reader; +import java.io.StringWriter; import java.io.Writer; import java.nio.charset.Charset; import java.text.DateFormat; @@ -79,23 +85,31 @@ import java.util.Comparator; import java.util.Date; import java.util.GregorianCalendar; import java.util.HashMap; +import java.util.HashSet; import java.util.LinkedHashMap; import java.util.LinkedList; import java.util.List; import java.util.Locale; import java.util.Map; import java.util.Set; -import java.util.HashSet; import java.util.logging.Level; +import static java.util.logging.Level.*; import java.util.logging.Logger; -import com.jcraft.jzlib.GZIPInputStream; - +import javax.annotation.CheckForNull; +import javax.annotation.Nonnull; import javax.servlet.ServletException; import javax.servlet.http.HttpServletResponse; - +import jenkins.model.ArtifactManager; +import jenkins.model.ArtifactManagerConfiguration; +import jenkins.model.ArtifactManagerFactory; import jenkins.model.BuildDiscarder; import jenkins.model.Jenkins; import jenkins.model.JenkinsLocationConfiguration; +import jenkins.model.PeepholePermalink; +import jenkins.model.RunAction2; +import jenkins.model.StandardArtifactManager; +import jenkins.model.lazy.BuildReference; +import jenkins.util.VirtualFile; import jenkins.util.io.OnMaster; import net.sf.json.JSONObject; import org.apache.commons.io.IOUtils; @@ -105,30 +119,8 @@ import org.kohsuke.accmod.restrictions.NoExternalUse; import org.kohsuke.stapler.*; import org.kohsuke.stapler.export.Exported; import org.kohsuke.stapler.export.ExportedBean; - -import com.thoughtworks.xstream.XStream; -import hudson.model.Run.RunExecution; -import java.io.ByteArrayInputStream; import org.kohsuke.stapler.interceptor.RequirePOST; -import java.io.FileOutputStream; -import java.io.OutputStream; - -import java.io.StringWriter; -import static java.util.logging.Level.*; -import javax.annotation.CheckForNull; -import javax.annotation.Nonnull; -import jenkins.model.ArtifactManager; -import jenkins.model.ArtifactManagerConfiguration; -import jenkins.model.ArtifactManagerFactory; -import jenkins.model.PeepholePermalink; -import jenkins.model.StandardArtifactManager; -import jenkins.model.RunAction2; -import jenkins.model.lazy.AbstractLazyLoadRunMap; -import jenkins.model.lazy.BuildReference; -import jenkins.model.lazy.LazyBuildMixIn; -import jenkins.util.VirtualFile; - /** * A particular execution of {@link Job}. * @@ -172,21 +164,6 @@ public abstract class Run ,RunT extends Run - * Some {@link Run}s do lazy-loading, so we don't use - * {@link #previousBuild} and {@link #nextBuild}, and instead use these - * fields and point to {@link #selfReference} (or {@link #none}) of adjacent builds. - */ - private volatile transient BuildReference previousBuildR, nextBuildR; - - @SuppressWarnings({"unchecked", "rawtypes"}) private static final BuildReference NONE = new BuildReference("NONE", null); - @SuppressWarnings("unchecked") private BuildReference none() {return NONE;} - - /*package*/ final transient BuildReference selfReference; - /** * Pointer to the next younger build in progress. This data structure is lazily updated, * so it may point to the build that's already completed. This pointer is set to 'this' @@ -320,7 +297,6 @@ public abstract class Run ,RunT extends Run(getId(), _this()); } /** @@ -791,72 +767,33 @@ public abstract class Run ,RunT extends Run createReference() { + return new BuildReference(getId(), _this()); } /** * Called by {@link RunMap} to drop bi-directional links in preparation for * deleting a build. + * @see jenkins.model.lazy.LazyBuildMixIn.RunMixIn#dropLinks + * @since TODO */ - @SuppressWarnings({"unchecked", "rawtypes"}) - /*package*/ final void dropLinks() { + protected void dropLinks() { if(nextBuild!=null) nextBuild.previousBuild = previousBuild; if(previousBuild!=null) previousBuild.nextBuild = nextBuild; - if (isLazy()) { - if (nextBuildR != null) { - Run nb = nextBuildR.get(); - if (nb != null) { - nb.previousBuildR = previousBuildR; - } - } - if (previousBuildR != null) { - Run pb = previousBuildR.get(); - if (pb != null) { - pb.nextBuildR = nextBuildR; - } - } - } } - @SuppressWarnings({"unchecked", "rawtypes"}) - public /* ought to be final */ RunT getPreviousBuild() { - if (!isLazy()) { - return previousBuild; - } - while (true) { - BuildReference r = previousBuildR; // capture the value once - - if (r == null) { - // having two neighbors pointing to each other is important to make RunMap.removeValue work - JobT _parent = getParent(); - if (_parent == null) { - throw new IllegalStateException("no parent for " + number); - } - Run pb = ((LazyBuildMixIn.LazyLoadingJob) _parent).getLazyBuildMixIn()._getRuns().search(number - 1, AbstractLazyLoadRunMap.Direction.DESC); - if (pb != null) { - pb.nextBuildR = selfReference; // establish bi-di link - this.previousBuildR = pb.selfReference; - return (RunT) pb; - } else { - this.previousBuildR = none(); - return null; - } - } - if (r == none()) { - return null; - } - - RunT referent = r.get(); - if (referent != null) { - return referent; - } - - // the reference points to a GC-ed object, drop the reference and do it again - this.previousBuildR = null; - } + /** + * @see jenkins.model.lazy.LazyBuildMixIn.RunMixIn#getPreviousBuild + */ + public RunT getPreviousBuild() { + return previousBuild; } /** @@ -977,38 +914,11 @@ public abstract class Run ,RunT extends Run r = nextBuildR; // capture the value once - - if (r == null) { - // having two neighbors pointing to each other is important to make RunMap.removeValue work - Run nb = ((LazyBuildMixIn.LazyLoadingJob) getParent()).getLazyBuildMixIn()._getRuns().search(number + 1, AbstractLazyLoadRunMap.Direction.ASC); - if (nb != null) { - nb.previousBuildR = selfReference; // establish bi-di link - this.nextBuildR = nb.selfReference; - return (RunT) nb; - } else { - this.nextBuildR = none(); - return null; - } - } - if (r == none()) { - return null; - } - - RunT referent = r.get(); - if (referent != null) { - return referent; - } - - // the reference points to a GC-ed object, drop the reference and do it again - this.nextBuildR = null; - } + /** + * @see jenkins.model.lazy.LazyBuildMixIn.RunMixIn#getNextBuild + */ + public RunT getNextBuild() { + return nextBuild; } /** diff --git a/core/src/main/java/hudson/model/RunMap.java b/core/src/main/java/hudson/model/RunMap.java index 9d4d272fb5..f4acb2a410 100644 --- a/core/src/main/java/hudson/model/RunMap.java +++ b/core/src/main/java/hudson/model/RunMap.java @@ -182,8 +182,7 @@ public final class RunMap> extends AbstractLazyLoadRunMap */ @Override protected BuildReference createReference(R r) { - if (r.isLazy()) return r.selfReference; - else return super.createReference(r); + return r.createReference(); } @Override diff --git a/core/src/main/java/jenkins/model/lazy/LazyBuildMixIn.java b/core/src/main/java/jenkins/model/lazy/LazyBuildMixIn.java index 305d537b9b..3d83cdaeda 100644 --- a/core/src/main/java/jenkins/model/lazy/LazyBuildMixIn.java +++ b/core/src/main/java/jenkins/model/lazy/LazyBuildMixIn.java @@ -53,8 +53,8 @@ import org.kohsuke.accmod.restrictions.DoNotUse; *

        Should be kept in a {@code transient} field in the job. * @since TODO */ -@SuppressWarnings({"unchecked", "rawtypes"}) -public abstract class LazyBuildMixIn & Queue.Task & LazyBuildMixIn.LazyLoadingJob, RunT extends Run> { +@SuppressWarnings({"unchecked", "rawtypes"}) // BuildHistoryWidget, and AbstractItem.getParent +public abstract class LazyBuildMixIn & Queue.Task & LazyBuildMixIn.LazyLoadingJob, RunT extends Run & LazyBuildMixIn.LazyLoadingRun> { private static final Logger LOGGER = Logger.getLogger(LazyBuildMixIn.class.getName()); @@ -270,8 +270,144 @@ public abstract class LazyBuildMixIn & Queue.Task & /** * Marker for a {@link Job} which uses this mixin. */ - public interface LazyLoadingJob { - LazyBuildMixIn getLazyBuildMixIn(); + public interface LazyLoadingJob & Queue.Task & LazyBuildMixIn.LazyLoadingJob, RunT extends Run & LazyLoadingRun> { + LazyBuildMixIn getLazyBuildMixIn(); + } + + public interface LazyLoadingRun & Queue.Task & LazyBuildMixIn.LazyLoadingJob, RunT extends Run & LazyLoadingRun> { + RunMixIn getRunMixIn(); + } + + /** + * Accompanying helper for the run type. + * Stateful but should be held in a {@code transient} field. + */ + public static abstract class RunMixIn & Queue.Task & LazyBuildMixIn.LazyLoadingJob, RunT extends Run & LazyLoadingRun> { + + /** + * Pointers to form bi-directional link between adjacent runs using + * {@link LazyBuildMixIn}. + * + *

        + * Some {@link Run}s do lazy-loading, so we don't use + * {@link #previousBuild} and {@link #nextBuild}, and instead use these + * fields and point to {@link #selfReference} (or {@link #none}) of + * adjacent builds. + */ + private volatile BuildReference previousBuildR, nextBuildR; + + @SuppressWarnings({"unchecked", "rawtypes"}) + private static final BuildReference NONE = new BuildReference("NONE", null); + + @SuppressWarnings("unchecked") + private BuildReference none() { + return NONE; + } + + private BuildReference selfReference; + + protected RunMixIn() {} + + protected abstract RunT asRun(); + + /** + * To implement {@link Run#createReference}. + */ + public final synchronized BuildReference createReference() { + if (selfReference == null) { + selfReference = new BuildReference(asRun().getId(), asRun()); + } + return selfReference; + } + + /** + * To implement {@link Run#dropLinks}. + */ + public final void dropLinks() { + if (nextBuildR != null) { + RunT nb = nextBuildR.get(); + if (nb != null) { + nb.getRunMixIn().previousBuildR = previousBuildR; + } + } + if (previousBuildR != null) { + RunT pb = previousBuildR.get(); + if (pb != null) { + pb.getRunMixIn().nextBuildR = nextBuildR; + } + } + } + + /** + * To implement {@link Run#getPreviousBuild}. + */ + public final RunT getPreviousBuild() { + while (true) { + BuildReference r = previousBuildR; // capture the value once + + if (r == null) { + // having two neighbors pointing to each other is important to make RunMap.removeValue work + JobT _parent = asRun().getParent(); + if (_parent == null) { + throw new IllegalStateException("no parent for " + asRun().number); + } + RunT pb = _parent.getLazyBuildMixIn()._getRuns().search(asRun().number - 1, AbstractLazyLoadRunMap.Direction.DESC); + if (pb != null) { + pb.getRunMixIn().nextBuildR = createReference(); // establish bi-di link + this.previousBuildR = pb.getRunMixIn().createReference(); + return pb; + } else { + this.previousBuildR = none(); + return null; + } + } + if (r == none()) { + return null; + } + + RunT referent = r.get(); + if (referent != null) { + return referent; + } + + // the reference points to a GC-ed object, drop the reference and do it again + this.previousBuildR = null; + } + } + + /** + * To implement {@link Run#getNextBuild}. + */ + public final RunT getNextBuild() { + while (true) { + BuildReference r = nextBuildR; // capture the value once + + if (r == null) { + // having two neighbors pointing to each other is important to make RunMap.removeValue work + RunT nb = asRun().getParent().getLazyBuildMixIn()._getRuns().search(asRun().number + 1, AbstractLazyLoadRunMap.Direction.ASC); + if (nb != null) { + nb.getRunMixIn().previousBuildR = createReference(); // establish bi-di link + this.nextBuildR = nb.getRunMixIn().createReference(); + return nb; + } else { + this.nextBuildR = none(); + return null; + } + } + if (r == none()) { + return null; + } + + RunT referent = r.get(); + if (referent != null) { + return referent; + } + + // the reference points to a GC-ed object, drop the reference and do it again + this.nextBuildR = null; + } + } + } @Restricted(DoNotUse.class) From 5b81675c6d555c24dec194246425c2e538e9df83 Mon Sep 17 00:00:00 2001 From: Kohsuke Kawaguchi Date: Tue, 11 Mar 2014 09:22:13 -0700 Subject: [PATCH 41/78] added a convenience method --- core/src/main/java/hudson/EnvVars.java | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/core/src/main/java/hudson/EnvVars.java b/core/src/main/java/hudson/EnvVars.java index b8600a5ddf..af8362eeb9 100644 --- a/core/src/main/java/hudson/EnvVars.java +++ b/core/src/main/java/hudson/EnvVars.java @@ -356,6 +356,14 @@ public class EnvVars extends TreeMap { if (value==null) throw new IllegalArgumentException("Null value not allowed as an environment variable: "+key); return super.put(key,value); } + + /** + * Add a key/value but only if the value is not-null. Otherwise no-op. + */ + public void putIfNotNull(String key, String value) { + if (value!=null) + put(key,value); + } /** * Takes a string that looks like "a=b" and adds that to this map. From 816f9d02e6058d807f04a2b560f95ee5b17deefc Mon Sep 17 00:00:00 2001 From: Kohsuke Kawaguchi Date: Tue, 11 Mar 2014 10:08:06 -0700 Subject: [PATCH 42/78] Using the latest and greatest --- core/pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/core/pom.xml b/core/pom.xml index b67f0644a5..9caa7c5457 100644 --- a/core/pom.xml +++ b/core/pom.xml @@ -469,7 +469,7 @@ THE SOFTWARE. org.jvnet.winp winp - 1.16 + 1.17 org.jenkins-ci From fb0ad71b719f4a49e21492273c3f3a03035b92fa Mon Sep 17 00:00:00 2001 From: Jesse Glick Date: Tue, 11 Mar 2014 14:15:26 -0400 Subject: [PATCH 43/78] =?UTF-8?q?Ensure=20that=20resolveDependencyJar=20wo?= =?UTF-8?q?rks=20for=20NetBeans=20compile-on-save=20(and=20possibly=20othe?= =?UTF-8?q?r=20IDE=E2=80=99s=20similar=20features)=20even=20when=20plugin?= =?UTF-8?q?=20dependencies=20are=20snapshots=20(possibly=20in=20the=20reac?= =?UTF-8?q?tor).?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../org/jvnet/hudson/test/JenkinsRule.java | 26 ++++++++++++++++--- 1 file changed, 23 insertions(+), 3 deletions(-) diff --git a/test/src/main/java/org/jvnet/hudson/test/JenkinsRule.java b/test/src/main/java/org/jvnet/hudson/test/JenkinsRule.java index fa01b7709a..980d7a4088 100644 --- a/test/src/main/java/org/jvnet/hudson/test/JenkinsRule.java +++ b/test/src/main/java/org/jvnet/hudson/test/JenkinsRule.java @@ -1585,7 +1585,7 @@ public class JenkinsRule implements TestRule, MethodRule, RootAction { System.err.println("cannot resolve optional dependency " + dep + " of " + shortName + "; skipping"); continue; } - throw new IOException("Could not resolve " + dep); + throw new IOException("Could not resolve " + dep + " in " + System.getProperty("java.class.path")); } File dst = new File(home, "plugins/" + artifactId + ".jpi"); @@ -1597,7 +1597,7 @@ public class JenkinsRule implements TestRule, MethodRule, RootAction { } } - private File resolveDependencyJar(MavenEmbedder embedder, String artifactId, String version) throws Exception { + private @CheckForNull File resolveDependencyJar(MavenEmbedder embedder, String artifactId, String version) throws Exception { // try to locate it from manifest Enumeration manifests = getClass().getClassLoader().getResources("META-INF/MANIFEST.MF"); while (manifests.hasMoreElements()) { @@ -1610,6 +1610,26 @@ public class JenkinsRule implements TestRule, MethodRule, RootAction { return Which.jarFile(manifest); } + // For snapshot plugin dependencies, an IDE may have replaced ~/.m2/repository/…/${artifactId}.hpi with …/${artifactId}-plugin/target/classes/ + // which unfortunately lacks META-INF/MANIFEST.MF so try to find index.jelly (which every plugin should include) and thus the ${artifactId}.hpi: + Enumeration jellies = getClass().getClassLoader().getResources("index.jelly"); + while (jellies.hasMoreElements()) { + URL jellyU = jellies.nextElement(); + if (jellyU.getProtocol().equals("file")) { + File jellyF = new File(jellyU.toURI()); + File classes = jellyF.getParentFile(); + if (classes.getName().equals("classes")) { + File target = classes.getParentFile(); + if (target.getName().equals("target")) { + File hpi = new File(target, artifactId + ".hpi"); + if (hpi.isFile()) { + return hpi; + } + } + } + } + } + // need to search multiple group IDs // TODO: extend manifest to include groupID:artifactID:version Exception resolutionError=null; @@ -1642,7 +1662,7 @@ public class JenkinsRule implements TestRule, MethodRule, RootAction { throw new Exception("Failed to resolve plugin: "+artifactId+" version "+version,resolutionError); } - private File resolvePluginFile(MavenEmbedder embedder, String artifactId, String version, String groupId, String type) + private @CheckForNull File resolvePluginFile(MavenEmbedder embedder, String artifactId, String version, String groupId, String type) throws MavenEmbedderException, ComponentLookupException, AbstractArtifactResolutionException { final Artifact jpi = embedder.createArtifact(groupId, artifactId, version, "compile"/*doesn't matter*/, type); embedder.resolve(jpi, Arrays.asList(embedder.createRepository("http://maven.glassfish.org/content/groups/public/","repo")),embedder.getLocalRepository()); From 967a9aae5c699f274c90ab2278b88778c2364252 Mon Sep 17 00:00:00 2001 From: Jesse Glick Date: Tue, 11 Mar 2014 14:21:10 -0400 Subject: [PATCH 44/78] Revert "Using the latest and greatest" This reverts commit 816f9d02e6058d807f04a2b560f95ee5b17deefc. --- core/pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/core/pom.xml b/core/pom.xml index 9caa7c5457..b67f0644a5 100644 --- a/core/pom.xml +++ b/core/pom.xml @@ -469,7 +469,7 @@ THE SOFTWARE. org.jvnet.winp winp - 1.17 + 1.16 org.jenkins-ci From 3b477a62ed0aa2a5486969ccbf1e161a538cd6b2 Mon Sep 17 00:00:00 2001 From: Kohsuke Kawaguchi Date: Tue, 11 Mar 2014 11:42:31 -0700 Subject: [PATCH 45/78] Revert "Using the latest and greatest" This reverts commit 816f9d02e6058d807f04a2b560f95ee5b17deefc. --- core/pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/core/pom.xml b/core/pom.xml index 9caa7c5457..b67f0644a5 100644 --- a/core/pom.xml +++ b/core/pom.xml @@ -469,7 +469,7 @@ THE SOFTWARE. org.jvnet.winp winp - 1.17 + 1.16 org.jenkins-ci From 2dbd6eca7f8c19222a04f68b548d54a163883ba0 Mon Sep 17 00:00:00 2001 From: Kohsuke Kawaguchi Date: Tue, 11 Mar 2014 12:17:11 -0700 Subject: [PATCH 46/78] [JENKINS-11643] An unexpected failure in processing remember me cookie should be handled gracefully. In particular, possibly problematic cookie should be removed, or else the browser will keep bombarding the server with the same cookie, and will never be able to get through. It's much better to just drop the cookie. --- changelog.html | 3 + .../TokenBasedRememberMeServices2.java | 11 ++ .../TokenBasedRememberMeServices2Test.groovy | 131 ++++++++++++++++++ 3 files changed, 145 insertions(+) create mode 100644 test/src/test/groovy/hudson/security/TokenBasedRememberMeServices2Test.groovy diff --git a/changelog.html b/changelog.html index 1487f139cb..e732f5ba65 100644 --- a/changelog.html +++ b/changelog.html @@ -63,6 +63,9 @@ Upcoming changes

        diff --git a/core/src/main/java/hudson/model/AbstractItem.java b/core/src/main/java/hudson/model/AbstractItem.java index 20f21850db..200095f500 100644 --- a/core/src/main/java/hudson/model/AbstractItem.java +++ b/core/src/main/java/hudson/model/AbstractItem.java @@ -586,6 +586,7 @@ public abstract class AbstractItem extends Actionable implements Item, HttpDelet } // try to reflect the changes by reloading + doReload(); new XmlFile(Items.XSTREAM, out.getTemporaryFile()).unmarshal(this); Items.whileUpdatingByXml(new Callable() { @Override public Void call() throws IOException { @@ -603,6 +604,34 @@ public abstract class AbstractItem extends Actionable implements Item, HttpDelet } } + /** + * Reloads this job from the disk. + * + * Exposed through CLI as well. + * + * TODO: think about exposing this to UI + * + * @since 1.556 + */ + @CLIMethod(name="reload-job") + @RequirePOST + public void doReload() throws IOException { + checkPermission(CONFIGURE); + + // try to reflect the changes by reloading + getConfigFile().unmarshal(this); + Items.whileUpdatingByXml(new Callable() { + @Override + public Void call() throws IOException { + onLoad(getParent(), getRootDir().getName()); + return null; + } + }); + Jenkins.getInstance().rebuildDependencyGraphAsync(); + + SaveableListener.fireOnChange(this, getConfigFile()); + } + /* (non-Javadoc) * @see hudson.model.AbstractModelObject#getSearchName() diff --git a/core/src/main/resources/hudson/model/Messages.properties b/core/src/main/resources/hudson/model/Messages.properties index 83fd5f48d9..9a99586380 100644 --- a/core/src/main/resources/hudson/model/Messages.properties +++ b/core/src/main/resources/hudson/model/Messages.properties @@ -91,6 +91,7 @@ BallColor.Unstable=Unstable CLI.clear-queue.shortDescription=Clears the build queue. CLI.delete-job.shortDescription=Deletes a job. +CLI.reload-job.shortDescription=Reloads this job from disk. CLI.disable-job.shortDescription=Disables a job. CLI.enable-job.shortDescription=Enables a job. CLI.delete-node.shortDescription=Deletes a node. diff --git a/test/src/test/groovy/hudson/model/AbstractItemTest.groovy b/test/src/test/groovy/hudson/model/AbstractItemTest.groovy new file mode 100644 index 0000000000..8c7cbe8ef4 --- /dev/null +++ b/test/src/test/groovy/hudson/model/AbstractItemTest.groovy @@ -0,0 +1,42 @@ +package hudson.model + +import org.junit.Rule +import org.junit.Test +import org.jvnet.hudson.test.JenkinsRule + +/** + * + * + * @author Kohsuke Kawaguchi + */ +class AbstractItemTest { + @Rule + public JenkinsRule j = new JenkinsRule() + + /** + * Tests the reload functionality + */ + @Test + void reload() { + def jenkins = j.jenkins; + def p = jenkins.createProject(FreeStyleProject.class,"foo"); + p.description = "Hello World"; + + def b = j.assertBuildStatusSuccess(p.scheduleBuild2(0)) + b.description = "This is my build" + + // update on disk representation + def f = p.configFile.file + f.text = f.text.replaceAll("Hello World","Good Evening"); + + // reload away + p.doReload() + + assert p.description == "Good Evening"; + + def b2 = p.getBuildByNumber(1) + + assert !b.is(b2); // should be different object + assert b.description == b2.description // but should have the same properties + } +} From 80b1cf9f8bf1cab8199df46f3fdeab706fe6d8c4 Mon Sep 17 00:00:00 2001 From: Kohsuke Kawaguchi Date: Wed, 12 Mar 2014 20:56:27 -0700 Subject: [PATCH 59/78] Remember Me option doesn't always show. --- test/src/main/java/org/jvnet/hudson/test/JenkinsRule.java | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/test/src/main/java/org/jvnet/hudson/test/JenkinsRule.java b/test/src/main/java/org/jvnet/hudson/test/JenkinsRule.java index 57a6740608..d8cb0e006b 100644 --- a/test/src/main/java/org/jvnet/hudson/test/JenkinsRule.java +++ b/test/src/main/java/org/jvnet/hudson/test/JenkinsRule.java @@ -27,6 +27,7 @@ package org.jvnet.hudson.test; import com.gargoylesoftware.htmlunit.AjaxController; import com.gargoylesoftware.htmlunit.BrowserVersion; import com.gargoylesoftware.htmlunit.DefaultCssErrorHandler; +import com.gargoylesoftware.htmlunit.ElementNotFoundException; import com.gargoylesoftware.htmlunit.FailingHttpStatusCodeException; import com.gargoylesoftware.htmlunit.Page; import com.gargoylesoftware.htmlunit.WebRequestSettings; @@ -1819,7 +1820,12 @@ public class JenkinsRule implements TestRule, MethodRule, RootAction { HtmlForm form = page.getFormByName("login"); form.getInputByName("j_username").setValueAttribute(username); form.getInputByName("j_password").setValueAttribute(password); - form.getInputByName("remember_me").setChecked(rememberMe); + try { + form.getInputByName("remember_me").setChecked(rememberMe); + } catch (ElementNotFoundException e) { + // remember me not available is OK so long as the caller didn't ask for it + assert !rememberMe; + } form.submit(null); return this; } From ddf391cfec05521683735a2ba6853b3b638f2f35 Mon Sep 17 00:00:00 2001 From: Kohsuke Kawaguchi Date: Thu, 13 Mar 2014 12:44:07 -0700 Subject: [PATCH 60/78] Updating test to fix failures. Now that User.impersonate() actually checks if the user is valid, User.get("user").impersonate() is expected to fail. Use a DummySecurityRealm to make this user a valid user. --- test/src/test/java/hudson/model/ComputerConfigDotXmlTest.java | 2 ++ 1 file changed, 2 insertions(+) diff --git a/test/src/test/java/hudson/model/ComputerConfigDotXmlTest.java b/test/src/test/java/hudson/model/ComputerConfigDotXmlTest.java index e2f17f8d34..30677a1535 100644 --- a/test/src/test/java/hudson/model/ComputerConfigDotXmlTest.java +++ b/test/src/test/java/hudson/model/ComputerConfigDotXmlTest.java @@ -48,6 +48,7 @@ import org.junit.Before; import org.junit.Rule; import org.junit.Test; import org.jvnet.hudson.test.JenkinsRule; +import org.jvnet.hudson.test.JenkinsRule.DummySecurityRealm; import org.kohsuke.stapler.StaplerRequest; import org.kohsuke.stapler.StaplerResponse; import org.mockito.Mock; @@ -71,6 +72,7 @@ public class ComputerConfigDotXmlTest { MockitoAnnotations.initMocks(this); computer = spy(rule.createSlave().toComputer()); + rule.jenkins.setSecurityRealm(rule.createDummySecurityRealm()); oldSecurityContext = ACL.impersonate(User.get("user").impersonate()); } From e400bc7d94635840f3c266e2a53b34195b5bc7e3 Mon Sep 17 00:00:00 2001 From: Kohsuke Kawaguchi Date: Thu, 13 Mar 2014 12:48:11 -0700 Subject: [PATCH 61/78] Working toward fixing regressions. So far none of them are real regressions but just that I needed to update tets --- test/src/test/java/hudson/model/MyViewTest.java | 6 ++++++ test/src/test/java/hudson/model/NodeTest.java | 4 +++- 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/test/src/test/java/hudson/model/MyViewTest.java b/test/src/test/java/hudson/model/MyViewTest.java index d2cc2a7be0..3efa4e9ed0 100644 --- a/test/src/test/java/hudson/model/MyViewTest.java +++ b/test/src/test/java/hudson/model/MyViewTest.java @@ -23,6 +23,7 @@ */ package hudson.model; +import org.junit.Before; import org.junit.Test; import org.jvnet.hudson.test.JenkinsRule.WebClient; import com.gargoylesoftware.htmlunit.html.HtmlForm; @@ -42,6 +43,11 @@ public class MyViewTest { @Rule public JenkinsRule rule = new JenkinsRule(); + + @Before + public void setup() { + rule.jenkins.setSecurityRealm(rule.createDummySecurityRealm()); + } @Test public void testContains() throws IOException, Exception{ diff --git a/test/src/test/java/hudson/model/NodeTest.java b/test/src/test/java/hudson/model/NodeTest.java index 8d61e74ac0..c24d45913d 100644 --- a/test/src/test/java/hudson/model/NodeTest.java +++ b/test/src/test/java/hudson/model/NodeTest.java @@ -72,7 +72,8 @@ public class NodeTest { @Before public void before(){ addDynamicLabel = false; - notTake = false; + notTake = false; + j.jenkins.setSecurityRealm(j.createDummySecurityRealm()); } @Test @@ -209,6 +210,7 @@ public class NodeTest { HudsonPrivateSecurityRealm realm = new HudsonPrivateSecurityRealm(false); j.jenkins.setSecurityRealm(realm); User user = User.get("John Smith"); + SecurityContextHolder.getContext().setAuthentication(user.impersonate()); assertFalse("Current user should not have permission read.", node.hasPermission(Permission.READ)); auth.add(Computer.CONFIGURE, user.getId()); From 664f7e34005d83779371c6f0ebb31dd281012406 Mon Sep 17 00:00:00 2001 From: Kohsuke Kawaguchi Date: Thu, 13 Mar 2014 13:31:04 -0700 Subject: [PATCH 62/78] More test fixes --- test/src/test/java/hudson/model/NodeTest.java | 3 +-- test/src/test/java/hudson/model/ProjectTest.java | 4 ++-- test/src/test/java/hudson/model/UserTest.java | 4 ++-- 3 files changed, 5 insertions(+), 6 deletions(-) diff --git a/test/src/test/java/hudson/model/NodeTest.java b/test/src/test/java/hudson/model/NodeTest.java index c24d45913d..7dd06ace79 100644 --- a/test/src/test/java/hudson/model/NodeTest.java +++ b/test/src/test/java/hudson/model/NodeTest.java @@ -209,8 +209,7 @@ public class NodeTest { j.jenkins.setCrumbIssuer(null); HudsonPrivateSecurityRealm realm = new HudsonPrivateSecurityRealm(false); j.jenkins.setSecurityRealm(realm); - User user = User.get("John Smith"); - + User user = realm.createAccount("John Smith","abcdef"); SecurityContextHolder.getContext().setAuthentication(user.impersonate()); assertFalse("Current user should not have permission read.", node.hasPermission(Permission.READ)); auth.add(Computer.CONFIGURE, user.getId()); diff --git a/test/src/test/java/hudson/model/ProjectTest.java b/test/src/test/java/hudson/model/ProjectTest.java index 3bd48e4972..8cabb8dffd 100644 --- a/test/src/test/java/hudson/model/ProjectTest.java +++ b/test/src/test/java/hudson/model/ProjectTest.java @@ -492,14 +492,14 @@ public class ProjectTest { @Test public void testDoCancelQueue() throws Exception{ - User user = User.get("John Smith", true, Collections.emptyMap()); FreeStyleProject project = j.createFreeStyleProject("project"); GlobalMatrixAuthorizationStrategy auth = new GlobalMatrixAuthorizationStrategy(); j.jenkins.setAuthorizationStrategy(auth); j.jenkins.setCrumbIssuer(null); HudsonPrivateSecurityRealm realm = new HudsonPrivateSecurityRealm(false); j.jenkins.setSecurityRealm(realm); - SecurityContextHolder.getContext().setAuthentication(user.impersonate()); + User user = realm.createAccount("John Smith", "password"); + SecurityContextHolder.getContext().setAuthentication(user.impersonate()); try{ project.doCancelQueue(null, null); fail("User should not have permission to build project"); diff --git a/test/src/test/java/hudson/model/UserTest.java b/test/src/test/java/hudson/model/UserTest.java index a8f37057a4..3f91ecb473 100644 --- a/test/src/test/java/hudson/model/UserTest.java +++ b/test/src/test/java/hudson/model/UserTest.java @@ -404,8 +404,8 @@ public class UserTest { j.jenkins.setCrumbIssuer(null); HudsonPrivateSecurityRealm realm = new HudsonPrivateSecurityRealm(false); j.jenkins.setSecurityRealm(realm); - User user = User.get("John Smith"); - User user2 = User.get("John Smith2"); + User user = realm.createAccount("John Smith","password"); + User user2 = realm.createAccount("John Smith2","password"); user2.save(); SecurityContextHolder.getContext().setAuthentication(user.impersonate()); assertFalse("User should not be able delete because he does not have administer permission.", user2.canDelete()); From c25c223ace2e882f155adc3c7fc3f0911a724d43 Mon Sep 17 00:00:00 2001 From: phoenix384 Date: Thu, 13 Mar 2014 22:25:53 +0100 Subject: [PATCH 63/78] Added some missing German translations --- .../src/main/resources/hudson/model/Messages_de.properties | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/core/src/main/resources/hudson/model/Messages_de.properties b/core/src/main/resources/hudson/model/Messages_de.properties index 047ed8f2a7..0fc6b0305f 100644 --- a/core/src/main/resources/hudson/model/Messages_de.properties +++ b/core/src/main/resources/hudson/model/Messages_de.properties @@ -22,14 +22,20 @@ AbstractBuild.BuildingRemotely=Baue auf Slave {0} AbstractBuild.BuildingOnMaster=Baue auf Master +AbstractBuild_Building=Baue +AbstractBuild.BuildingInWorkspace=\ in Arbeitsbereich {0} AbstractBuild.KeptBecause=zur\u00fcckbehalten wegen {0} AbstractItem.NoSuchJobExists=Job ''{0}'' existiert nicht. Meinten Sie vielleicht ''{1}''? +AbstractItem.Pronoun=Element AbstractProject.NewBuildForWorkspace=Plane einen neuen Build, um einen Arbeitsbereich anzulegen. AbstractProject.Pronoun=Projekt AbstractProject.Aborted=Abgebrochen AbstractProject.BuildInProgress=Build #{0} ist bereits in Arbeit{1} +AbstractProject.BuildNow=Jetzt bauen +AbstractProject.build_with_parameters=Bauen mit Parametern AbstractProject.UpstreamBuildInProgress=Vorgelagertes Projekt {0} ist bereits in Arbeit. +AbstractProject.DownstreamBuildInProgress=Nachgelagertes Projekt {0} ist bereits in Arbeit. AbstractProject.Disabled=Build deaktiviert AbstractProject.ETA=\ (ETA:{0}) AbstractProject.NoSCM=Kein SCM @@ -66,6 +72,7 @@ BallColor.Aborted=Abgebrochen BallColor.Disabled=Deaktiviert BallColor.Failed=Fehlgeschlagen BallColor.InProgress=In Arbeit +BallColor.NotBuilt=Nicht gebaut BallColor.Pending=Bevorstehend BallColor.Success=Erfolgreich BallColor.Unstable=Instabil From 5827f6069d93f2aaaf0c5f25c85ac0330abb03e4 Mon Sep 17 00:00:00 2001 From: phoenix384 Date: Thu, 13 Mar 2014 22:32:41 +0100 Subject: [PATCH 64/78] Added some missing German translations --- core/src/main/resources/hudson/model/Messages_de.properties | 1 - 1 file changed, 1 deletion(-) diff --git a/core/src/main/resources/hudson/model/Messages_de.properties b/core/src/main/resources/hudson/model/Messages_de.properties index 0fc6b0305f..d4e314b22a 100644 --- a/core/src/main/resources/hudson/model/Messages_de.properties +++ b/core/src/main/resources/hudson/model/Messages_de.properties @@ -315,5 +315,4 @@ Cause.UserIdCause.ShortDescription=Gestartet durch Benutzer {0} Cause.RemoteCause.ShortDescription=Gestartet durch entfernten Rechner {0} Cause.RemoteCause.ShortDescriptionWithNote=Gestartet durch entfernten Rechner {0} mit Hinweis: {1} -AbstractProject.BuildNow=Jetzt bauen ManageJenkinsAction.DisplayName=Jenkins verwalten From 16d0bc3fa98283a49b44ca4ad999990a7f03dbb7 Mon Sep 17 00:00:00 2001 From: Kohsuke Kawaguchi Date: Thu, 13 Mar 2014 15:19:44 -0700 Subject: [PATCH 65/78] More test fixes --- .../hudson/security/TokenBasedRememberMeServices2Test.groovy | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test/src/test/groovy/hudson/security/TokenBasedRememberMeServices2Test.groovy b/test/src/test/groovy/hudson/security/TokenBasedRememberMeServices2Test.groovy index d0b2d61298..92d202a862 100644 --- a/test/src/test/groovy/hudson/security/TokenBasedRememberMeServices2Test.groovy +++ b/test/src/test/groovy/hudson/security/TokenBasedRememberMeServices2Test.groovy @@ -88,7 +88,7 @@ class TokenBasedRememberMeServices2Test { // make sure that the server recorded this failure assert failureInduced - assert logs.find { it.message.contains("intentionally not working")}!=null + assert logs.find { it.message.contains("contained username 'alice' but was not found")}!=null // and the problematic cookie should have been removed assert getRememberMeCookie(wc)==null } From 38ae11209347431d6739f65d61c76d1d6520f3bd Mon Sep 17 00:00:00 2001 From: Kohsuke Kawaguchi Date: Thu, 13 Mar 2014 15:42:25 -0700 Subject: [PATCH 66/78] LastGrantedAuthoritiesProperty was missing a descriptor --- .../LastGrantedAuthoritiesProperty.java | 17 +++++++++++++++++ .../Details/config.jelly | 1 + .../config.groovy | 3 +++ .../LastGrantedAuthoritiesPropertyTest.groovy | 8 ++++++++ 4 files changed, 29 insertions(+) create mode 100644 core/src/main/resources/jenkins/security/LastGrantedAuthoritiesProperty/config.groovy diff --git a/core/src/main/java/jenkins/security/LastGrantedAuthoritiesProperty.java b/core/src/main/java/jenkins/security/LastGrantedAuthoritiesProperty.java index 3ba56b13d4..b13fbaac45 100644 --- a/core/src/main/java/jenkins/security/LastGrantedAuthoritiesProperty.java +++ b/core/src/main/java/jenkins/security/LastGrantedAuthoritiesProperty.java @@ -4,6 +4,7 @@ import hudson.Extension; import hudson.model.Descriptor.FormException; import hudson.model.User; import hudson.model.UserProperty; +import hudson.model.UserPropertyDescriptor; import hudson.security.SecurityRealm; import jenkins.model.Jenkins; import net.sf.json.JSONObject; @@ -143,5 +144,21 @@ public class LastGrantedAuthoritiesProperty extends UserProperty { } } + @Extension + public static final class DescriptorImpl extends UserPropertyDescriptor { + public String getDisplayName() { + return null; // not visible + } + + @Override + public LastGrantedAuthoritiesProperty newInstance(StaplerRequest req, JSONObject formData) throws FormException { + return new LastGrantedAuthoritiesProperty(); + } + + public UserProperty newInstance(User user) { + return null; + } + } + private static final Logger LOGGER = Logger.getLogger(LastGrantedAuthoritiesProperty.class.getName()); } diff --git a/core/src/main/resources/hudson/security/HudsonPrivateSecurityRealm/Details/config.jelly b/core/src/main/resources/hudson/security/HudsonPrivateSecurityRealm/Details/config.jelly index f97a4c9e9e..e6447b2814 100644 --- a/core/src/main/resources/hudson/security/HudsonPrivateSecurityRealm/Details/config.jelly +++ b/core/src/main/resources/hudson/security/HudsonPrivateSecurityRealm/Details/config.jelly @@ -26,6 +26,7 @@ THE SOFTWARE. + ${instance} : ${instance!=null} : ${instance.class} diff --git a/core/src/main/resources/jenkins/security/LastGrantedAuthoritiesProperty/config.groovy b/core/src/main/resources/jenkins/security/LastGrantedAuthoritiesProperty/config.groovy new file mode 100644 index 0000000000..c86755ba16 --- /dev/null +++ b/core/src/main/resources/jenkins/security/LastGrantedAuthoritiesProperty/config.groovy @@ -0,0 +1,3 @@ +package jenkins.security.LastGrantedAuthoritiesProperty; + +// nothing to configure here \ No newline at end of file diff --git a/test/src/test/java/jenkins/security/LastGrantedAuthoritiesPropertyTest.groovy b/test/src/test/java/jenkins/security/LastGrantedAuthoritiesPropertyTest.groovy index fdf5e446ce..23b2e6a09e 100644 --- a/test/src/test/java/jenkins/security/LastGrantedAuthoritiesPropertyTest.groovy +++ b/test/src/test/java/jenkins/security/LastGrantedAuthoritiesPropertyTest.groovy @@ -37,6 +37,14 @@ class LastGrantedAuthoritiesPropertyTest { assertAuthorities(p,"authenticated:alice:development:us") assertAuthorities(u.impersonate(),"authenticated:alice:development:us") + // visiting the configuration page shouldn't change authorities + def pg = wc.goTo("user/alice/configure"); + j.submit(pg.getFormByName("config")); + + p = u.getProperty(LastGrantedAuthoritiesProperty.class) + assertAuthorities(p,"authenticated:alice:development:us") + assertAuthorities(u.impersonate(),"authenticated:alice:development:us") + // change should be reflected right away wc.login("alice","alice:development:uk") p = u.getProperty(LastGrantedAuthoritiesProperty.class) From 28710f78744ca8405a9d77fa21d94408694225fa Mon Sep 17 00:00:00 2001 From: Jesse Glick Date: Fri, 14 Mar 2014 09:57:05 -0400 Subject: [PATCH 67/78] Reverting #1154 (superseding #1159). There seems to be no way to export this over the REST API without incurring serious performance penalties. --- core/src/main/java/hudson/model/Computer.java | 1 - core/src/main/java/hudson/model/Run.java | 9 ++------- 2 files changed, 2 insertions(+), 8 deletions(-) diff --git a/core/src/main/java/hudson/model/Computer.java b/core/src/main/java/hudson/model/Computer.java index 245661efe8..43fa1c37c2 100644 --- a/core/src/main/java/hudson/model/Computer.java +++ b/core/src/main/java/hudson/model/Computer.java @@ -635,7 +635,6 @@ public /*transient*/ abstract class Computer extends Actionable implements Acces return (node != null) ? node.getSelfLabel().getTiedJobs() : Collections.EMPTY_LIST; } - @Exported public RunList getBuilds() { return new RunList(Jenkins.getInstance().getAllItems(Job.class)).node(getNode()); } diff --git a/core/src/main/java/hudson/model/Run.java b/core/src/main/java/hudson/model/Run.java index 2c6bbae038..b8540ebfea 100644 --- a/core/src/main/java/hudson/model/Run.java +++ b/core/src/main/java/hudson/model/Run.java @@ -420,7 +420,7 @@ public abstract class Run ,RunT extends Run,RunT extends Run,RunT extends Run Date: Fri, 14 Mar 2014 09:59:56 -0700 Subject: [PATCH 68/78] Updating tests to fix more regressions --- test/src/test/java/hudson/model/MyViewsPropertyTest.java | 2 ++ 1 file changed, 2 insertions(+) diff --git a/test/src/test/java/hudson/model/MyViewsPropertyTest.java b/test/src/test/java/hudson/model/MyViewsPropertyTest.java index f018ff8d6b..4c94f1bd50 100644 --- a/test/src/test/java/hudson/model/MyViewsPropertyTest.java +++ b/test/src/test/java/hudson/model/MyViewsPropertyTest.java @@ -224,6 +224,7 @@ public class MyViewsPropertyTest { @Test public void testCheckPermission() throws IOException { + rule.jenkins.setSecurityRealm(rule.createDummySecurityRealm()); User user = User.get("User"); User user2 = User.get("User2"); MyViewsProperty property = new MyViewsProperty(Messages.Hudson_ViewName()); @@ -260,6 +261,7 @@ public class MyViewsPropertyTest { @Test public void testHasPermission() throws IOException { + rule.jenkins.setSecurityRealm(rule.createDummySecurityRealm()); User user = User.get("User"); User user2 = User.get("User2"); MyViewsProperty property = new MyViewsProperty(Messages.Hudson_ViewName()); From f04b0e011a94ce6054cef1a21964cbb7ee479282 Mon Sep 17 00:00:00 2001 From: Kohsuke Kawaguchi Date: Fri, 14 Mar 2014 10:16:16 -0700 Subject: [PATCH 69/78] User.impersonate now requires that the user be a valid user. These tests weren't using a SecurityRealm that recognizes these user names --- test/src/test/java/hudson/model/UserTest.java | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/test/src/test/java/hudson/model/UserTest.java b/test/src/test/java/hudson/model/UserTest.java index 3f91ecb473..0177dea736 100644 --- a/test/src/test/java/hudson/model/UserTest.java +++ b/test/src/test/java/hudson/model/UserTest.java @@ -175,6 +175,7 @@ public class UserTest { @Test public void testImpersonateAndCurrent() { + j.jenkins.setSecurityRealm(j.createDummySecurityRealm()); User user = User.get("John Smith"); assertNotSame("User John Smith should not be the current user.", User.current().getId(), user.getId()); SecurityContextHolder.getContext().setAuthentication(user.impersonate()); @@ -379,14 +380,14 @@ public class UserTest { } @Test - public void testHasPermission() { + public void testHasPermission() throws IOException { GlobalMatrixAuthorizationStrategy auth = new GlobalMatrixAuthorizationStrategy(); j.jenkins.setAuthorizationStrategy(auth); j.jenkins.setCrumbIssuer(null); HudsonPrivateSecurityRealm realm = new HudsonPrivateSecurityRealm(false); j.jenkins.setSecurityRealm(realm); - User user = User.get("John Smith"); - User user2 = User.get("John Smith2"); + User user = realm.createAccount("John Smith","password"); + User user2 = realm.createAccount("John Smith2", "password"); SecurityContextHolder.getContext().setAuthentication(user.impersonate()); assertFalse("Current user should not have permission read.", user2.hasPermission(Permission.READ)); assertTrue("Current user should always have permission read to himself.", user.hasPermission(Permission.READ)); From 17c4c1f50785313416203714579018f53f043858 Mon Sep 17 00:00:00 2001 From: Jesse Glick Date: Fri, 14 Mar 2014 13:31:02 -0400 Subject: [PATCH 70/78] [FIXED JENKINS-22131] Merged deconstructing-AbstractProject branch from #1146. --- changelog.html | 3 +++ core/src/main/java/hudson/model/ParameterValue.java | 2 +- core/src/main/java/hudson/model/Run.java | 4 ++-- core/src/main/java/jenkins/model/ParameterizedJobMixIn.java | 2 +- core/src/main/java/jenkins/model/lazy/LazyBuildMixIn.java | 2 +- 5 files changed, 8 insertions(+), 5 deletions(-) diff --git a/changelog.html b/changelog.html index a3d6d426ee..716b3ef651 100644 --- a/changelog.html +++ b/changelog.html @@ -58,6 +58,9 @@ Upcoming changes
      • Access through API token and SSH key login now fully retains group memberships. (issue 20064) +
      • + API changes allowing more flexibility in unusual job types. + (issue 22131)
      • Job can be reloaded individually from disk with "job/FOO/reload" URL or "reload-job" CLI command
      diff --git a/core/src/main/java/hudson/model/ParameterValue.java b/core/src/main/java/hudson/model/ParameterValue.java index f2fbd16a85..d035241638 100644 --- a/core/src/main/java/hudson/model/ParameterValue.java +++ b/core/src/main/java/hudson/model/ParameterValue.java @@ -166,7 +166,7 @@ public abstract class ParameterValue implements Serializable { * never null. * @param build * The build for which this parameter is being used. Never null. - * @since TODO + * @since 1.556 */ public void buildEnvironment(Run build, EnvVars env) { if (build instanceof AbstractBuild) { diff --git a/core/src/main/java/hudson/model/Run.java b/core/src/main/java/hudson/model/Run.java index 2449c61c73..8afa2bf8fc 100644 --- a/core/src/main/java/hudson/model/Run.java +++ b/core/src/main/java/hudson/model/Run.java @@ -770,7 +770,7 @@ public abstract class Run ,RunT extends Run createReference() { return new BuildReference(getId(), _this()); @@ -780,7 +780,7 @@ public abstract class Run ,RunT extends Run & ParameterizedJobMixIn.ParameterizedJob & Queue.Task, RunT extends Run & Queue.Executable> { diff --git a/core/src/main/java/jenkins/model/lazy/LazyBuildMixIn.java b/core/src/main/java/jenkins/model/lazy/LazyBuildMixIn.java index 3d83cdaeda..4538ef6f9e 100644 --- a/core/src/main/java/jenkins/model/lazy/LazyBuildMixIn.java +++ b/core/src/main/java/jenkins/model/lazy/LazyBuildMixIn.java @@ -51,7 +51,7 @@ import org.kohsuke.accmod.restrictions.DoNotUse; * Provides method implementations for some abstract {@link Job} methods, * as well as some methods which are not abstract but which you should override. *

      Should be kept in a {@code transient} field in the job. - * @since TODO + * @since 1.556 */ @SuppressWarnings({"unchecked", "rawtypes"}) // BuildHistoryWidget, and AbstractItem.getParent public abstract class LazyBuildMixIn & Queue.Task & LazyBuildMixIn.LazyLoadingJob, RunT extends Run & LazyBuildMixIn.LazyLoadingRun> { From bd8234cceb89ff300ad6249c5ba6cd8c7d2ce512 Mon Sep 17 00:00:00 2001 From: Kohsuke Kawaguchi Date: Fri, 14 Mar 2014 14:38:39 -0700 Subject: [PATCH 71/78] Fixing a test failure. The intent of this test is to make sure that a floating User object without any storage returns false from canDelete() method. The earlier change made User.impersonate() to actually check if the user is a valid, so to make this test case work where it does "user.impersonate" and "user2.impersonate2", I'm creating valid accounts for these two users. Now what that means is that user2 is no longer a floating flyweight storage-less User, so it breaks the assumption of the "User should not be able to delete because he is not saved." assertion. To make this test case work, I'm introducing the 3rd user that is storage-less, and using it for the test. --- test/src/test/java/hudson/model/UserTest.java | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/test/src/test/java/hudson/model/UserTest.java b/test/src/test/java/hudson/model/UserTest.java index 0177dea736..8e57f81b08 100644 --- a/test/src/test/java/hudson/model/UserTest.java +++ b/test/src/test/java/hudson/model/UserTest.java @@ -408,16 +408,19 @@ public class UserTest { User user = realm.createAccount("John Smith","password"); User user2 = realm.createAccount("John Smith2","password"); user2.save(); + User user3 = User.get("Random Somebody"); + SecurityContextHolder.getContext().setAuthentication(user.impersonate()); assertFalse("User should not be able delete because he does not have administer permission.", user2.canDelete()); auth.add(Jenkins.ADMINISTER, user.getId()); assertTrue("User should be able to delete.", user2.canDelete()); assertFalse("User should not be able to delete because it is current user.", user.canDelete()); + SecurityContextHolder.getContext().setAuthentication(user2.impersonate()); auth.add(Jenkins.ADMINISTER, user2.getId()); - assertFalse("User should not be able to delete because he is not saved.", user.canDelete()); - user.save(); - assertTrue("User should be able to delete.", user.canDelete()); + assertFalse("User should not be able to delete because he is not saved.", user3.canDelete()); + user3.save(); + assertTrue("User should be able to delete.", user3.canDelete()); } @Test From 0db32ecaa123727e8a0761c8335fa5767ec510ae Mon Sep 17 00:00:00 2001 From: Kohsuke Kawaguchi Date: Fri, 14 Mar 2014 14:42:51 -0700 Subject: [PATCH 72/78] Clarifying assertions that they are trying to test. --- test/src/test/java/hudson/model/UserTest.java | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/test/src/test/java/hudson/model/UserTest.java b/test/src/test/java/hudson/model/UserTest.java index 8e57f81b08..2e45014c7f 100644 --- a/test/src/test/java/hudson/model/UserTest.java +++ b/test/src/test/java/hudson/model/UserTest.java @@ -408,19 +408,19 @@ public class UserTest { User user = realm.createAccount("John Smith","password"); User user2 = realm.createAccount("John Smith2","password"); user2.save(); - User user3 = User.get("Random Somebody"); SecurityContextHolder.getContext().setAuthentication(user.impersonate()); - assertFalse("User should not be able delete because he does not have administer permission.", user2.canDelete()); + assertFalse("Ordinary user cannot delete somebody else", user2.canDelete()); auth.add(Jenkins.ADMINISTER, user.getId()); - assertTrue("User should be able to delete.", user2.canDelete()); - assertFalse("User should not be able to delete because it is current user.", user.canDelete()); + assertTrue("Administrator can delete anybody else", user2.canDelete()); + assertFalse("User (even admin) cannot delete himself", user.canDelete()); SecurityContextHolder.getContext().setAuthentication(user2.impersonate()); auth.add(Jenkins.ADMINISTER, user2.getId()); - assertFalse("User should not be able to delete because he is not saved.", user3.canDelete()); + User user3 = User.get("Random Somebody"); + assertFalse("Storage-less temporary user cannot be deleted", user3.canDelete()); user3.save(); - assertTrue("User should be able to delete.", user3.canDelete()); + assertTrue("But once storage is allocated, he can be deleted", user3.canDelete()); } @Test From fed953f01a6705a8ad7174524bcf2ecbe4831e8f Mon Sep 17 00:00:00 2001 From: Kohsuke Kawaguchi Date: Sun, 16 Mar 2014 22:18:25 -0700 Subject: [PATCH 73/78] [maven-release-plugin] prepare release jenkins-1.555 --- cli/pom.xml | 2 +- core/pom.xml | 2 +- plugins/pom.xml | 8 ++++---- pom.xml | 2 +- test/pom.xml | 2 +- war/pom.xml | 2 +- 6 files changed, 9 insertions(+), 9 deletions(-) diff --git a/cli/pom.xml b/cli/pom.xml index bf92e10e31..5582e3fae7 100644 --- a/cli/pom.xml +++ b/cli/pom.xml @@ -5,7 +5,7 @@ pom org.jenkins-ci.main - 1.555-SNAPSHOT + 1.555 cli diff --git a/core/pom.xml b/core/pom.xml index d760dce28a..dda76136c0 100644 --- a/core/pom.xml +++ b/core/pom.xml @@ -29,7 +29,7 @@ THE SOFTWARE. org.jenkins-ci.main pom - 1.555-SNAPSHOT + 1.555 ../pom.xml diff --git a/plugins/pom.xml b/plugins/pom.xml index bee7e510f4..317f62f839 100644 --- a/plugins/pom.xml +++ b/plugins/pom.xml @@ -11,7 +11,7 @@ org.jenkins-ci.plugins plugin Jenkins plugin POM - 1.555-SNAPSHOT + 1.555 pom

      +

      What's new in 1.555 (2014/03/16)

      -

      What's new in 1.554 (2014/03/09)

      • From 192c915768a343e3c7bd02a149d11af06003876a Mon Sep 17 00:00:00 2001 From: Kohsuke Kawaguchi Date: Mon, 17 Mar 2014 00:10:11 -0700 Subject: [PATCH 76/78] updated changelog as a part of the release --- debian/debian/changelog | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/debian/debian/changelog b/debian/debian/changelog index cb6812fdd2..8a93f93083 100644 --- a/debian/debian/changelog +++ b/debian/debian/changelog @@ -1,3 +1,9 @@ +jenkins (1.555) unstable; urgency=low + + * See http://jenkins-ci.org/changelog for more details. + + -- Kohsuke Kawaguchi Sun, 16 Mar 2014 22:43:02 -0700 + jenkins (1.554) unstable; urgency=low * See http://jenkins-ci.org/changelog for more details. From 78760d5b6c1edf95d77053a672563eed38eed520 Mon Sep 17 00:00:00 2001 From: Kohsuke Kawaguchi Date: Mon, 17 Mar 2014 06:40:16 -0700 Subject: [PATCH 77/78] creating an RC branch --- changelog.html | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/changelog.html b/changelog.html index 2fddae956c..a43437a5be 100644 --- a/changelog.html +++ b/changelog.html @@ -54,6 +54,14 @@ Upcoming changes + + + - - -

        What's new in 1.555 (2014/03/16)

          From db4f60303aad0d20272a8ff86fc3ef9fab10bfd2 Mon Sep 17 00:00:00 2001 From: Kohsuke Kawaguchi Date: Mon, 17 Mar 2014 06:40:21 -0700 Subject: [PATCH 78/78] the trunk is toward 1.557-SNAPSHOT --- cli/pom.xml | 2 +- core/pom.xml | 2 +- plugins/pom.xml | 8 ++++---- pom.xml | 2 +- test/pom.xml | 2 +- war/pom.xml | 2 +- 6 files changed, 9 insertions(+), 9 deletions(-) diff --git a/cli/pom.xml b/cli/pom.xml index e82d87c8d9..b888d7aaec 100644 --- a/cli/pom.xml +++ b/cli/pom.xml @@ -5,7 +5,7 @@ pom org.jenkins-ci.main - 1.556-SNAPSHOT + 1.557-SNAPSHOT cli diff --git a/core/pom.xml b/core/pom.xml index 201605e6d4..1f49ef4c6e 100644 --- a/core/pom.xml +++ b/core/pom.xml @@ -29,7 +29,7 @@ THE SOFTWARE. org.jenkins-ci.main pom - 1.556-SNAPSHOT + 1.557-SNAPSHOT ../pom.xml diff --git a/plugins/pom.xml b/plugins/pom.xml index 96de7845f2..eff68aacb3 100644 --- a/plugins/pom.xml +++ b/plugins/pom.xml @@ -11,7 +11,7 @@ org.jenkins-ci.plugins plugin Jenkins plugin POM - 1.556-SNAPSHOT + 1.557-SNAPSHOT pom