提交 634f7923 编写于 作者: K kohsuke

Merged revisions 18490-18493,18500,18532-18533,18535,18539 via svnmerge from

https://www.dev.java.net/svn/hudson/branches/rc

........
  r18490 | kohsuke | 2009-05-27 15:24:36 -0700 (Wed, 27 May 2009) | 1 line
  
  adding a defensive check, as NodePrivisioner/Cloud makes it easy to end up adding the same Node twice
........
  r18491 | kohsuke | 2009-05-27 15:24:46 -0700 (Wed, 27 May 2009) | 1 line
  
  doc improvement
........
  r18492 | kohsuke | 2009-05-27 15:25:43 -0700 (Wed, 27 May 2009) | 1 line
  
  defensive check
........
  r18493 | kohsuke | 2009-05-27 15:26:15 -0700 (Wed, 27 May 2009) | 2 lines
  
  - improved logging
  - adding the resulting Node to the node list to avoid a Node to disappear
........
  r18500 | kohsuke | 2009-05-27 18:15:49 -0700 (Wed, 27 May 2009) | 1 line
  
  relaxing the form validation error given the tool auto installation support
........
  r18532 | kohsuke | 2009-05-28 11:45:14 -0700 (Thu, 28 May 2009) | 1 line
  
  changed the way permalinks are pushed
........
  r18533 | kohsuke | 2009-05-28 11:56:45 -0700 (Thu, 28 May 2009) | 1 line
  
  [maven-release-plugin] prepare release hudson-1_308
........
  r18535 | kohsuke | 2009-05-28 11:57:07 -0700 (Thu, 28 May 2009) | 1 line
  
  [maven-release-plugin] prepare for next development iteration
........
  r18539 | kohsuke | 2009-05-28 12:37:43 -0700 (Thu, 28 May 2009) | 1 line
  
  updated changelog as a part of the release
........


git-svn-id: https://hudson.dev.java.net/svn/hudson/trunk/hudson/main@18549 71c3de6d-444a-0410-be80-ed276b4c234a
上级 eaf12a04
......@@ -4,7 +4,7 @@
<parent>
<artifactId>pom</artifactId>
<groupId>org.jvnet.hudson.main</groupId>
<version>1.308-SNAPSHOT</version>
<version>1.309-SNAPSHOT</version>
</parent>
<artifactId>cli</artifactId>
<name>Hudson CLI</name>
......
......@@ -27,7 +27,7 @@ THE SOFTWARE.
<parent>
<groupId>org.jvnet.hudson.main</groupId>
<artifactId>pom</artifactId>
<version>1.308-SNAPSHOT</version>
<version>1.309-SNAPSHOT</version>
<relativePath>../pom.xml</relativePath>
</parent>
......
......@@ -1346,8 +1346,10 @@ public final class Hudson extends Node implements ItemGroup<TopLevelItem>, Stapl
* Adds one more {@link Node} to Hudson.
*/
public synchronized void addNode(Node n) throws IOException {
if(n==null) throw new IllegalArgumentException();
ArrayList<Node> nl = new ArrayList<Node>(this.slaves);
nl.add(n);
if(!nl.contains(n)) // defensive check
nl.add(n);
setNodes(nl);
}
......
......@@ -174,6 +174,10 @@ public final class JDK extends ToolInstallation implements NodeSpecific<JDK>, En
if(value.exists() && !value.isDirectory())
return FormValidation.error(Messages.Hudson_NotADirectory(value));
if(!value.exists())
// no such directory yet. perhaps it's meant to be created?
return FormValidation.ok();
File toolsJar = new File(value,"lib/tools.jar");
File mac = new File(value,"lib/dt.jar");
if(!toolsJar.exists() && !mac.exists())
......
......@@ -108,7 +108,10 @@ public abstract class Cloud extends AbstractModelObject implements ExtensionPoin
*
* @return
* {@link PlannedNode}s that represent asynchronous {@link Node}
* launch operations. Can be empty but must not be null.
* provisioning operations. Can be empty but must not be null.
* {@link NodeProvisioner} will be responsible for adding the resulting {@link Node}
* into Hudson via {@link Hudson#addNode(Node)}, so a {@link Cloud} implementation
* just needs to create a new node object.
*/
public abstract Collection<PlannedNode> provision(Label label, int excessWorkload);
......
......@@ -31,8 +31,6 @@ import hudson.model.Label;
import hudson.model.PeriodicWork;
import static hudson.model.LoadStatistics.DECAY;
import hudson.model.MultiStageTimeSeries.TimeScale;
import hudson.triggers.SafeTimerTask;
import hudson.triggers.Trigger;
import hudson.Extension;
import java.util.concurrent.Future;
......@@ -43,6 +41,7 @@ import java.util.ArrayList;
import java.util.Iterator;
import java.util.logging.Logger;
import java.util.logging.Level;
import java.io.IOException;
/**
* Uses the {@link LoadStatistics} and determines when we need to allocate
......@@ -107,13 +106,15 @@ public class NodeProvisioner {
for (Iterator<PlannedNode> itr = pendingLaunches.iterator(); itr.hasNext();) {
PlannedNode f = itr.next();
if(f.future.isDone()) {
LOGGER.info(f.displayName+" provisioning completed. We have now "+hudson.getComputers().length+" computer(s)");
try {
f.future.get();
hudson.addNode(f.future.get());
LOGGER.info(f.displayName+" provisioning successfully completed. We have now "+hudson.getComputers().length+" computer(s)");
} catch (InterruptedException e) {
throw new AssertionError(e); // since we confirmed that the future is already done
} catch (ExecutionException e) {
LOGGER.log(Level.WARNING, "Provisioned slave failed to launch",e.getCause());
LOGGER.log(Level.WARNING, "Provisioned slave "+f.displayName+" failed to launch",e.getCause());
} catch (IOException e) {
LOGGER.log(Level.WARNING, "Provisioned slave "+f.displayName+" failed to launch",e);
}
itr.remove();
} else
......
......@@ -29,14 +29,7 @@ import hudson.Extension;
import hudson.FilePath;
import hudson.Launcher;
import hudson.Util;
import hudson.model.AbstractBuild;
import hudson.model.AbstractProject;
import hudson.model.BuildListener;
import hudson.model.Computer;
import hudson.model.EnvironmentSpecific;
import hudson.model.Hudson;
import hudson.model.Node;
import hudson.model.TaskListener;
import hudson.model.*;
import hudson.remoting.Callable;
import hudson.slaves.NodeSpecific;
import hudson.tools.ToolDescriptor;
......@@ -428,9 +421,13 @@ public class Ant extends Builder {
if(!Hudson.getInstance().hasPermission(Hudson.ADMINISTER))
return FormValidation.ok();
if(!value.isDirectory())
if(value.exists() && !value.isDirectory())
return FormValidation.error(Messages.Ant_NotADirectory(value));
if(!value.exists())
// no such directory yet. perhaps it's meant to be created?
return FormValidation.ok();
File antJar = new File(value,"lib/ant.jar");
if(!antJar.exists())
return FormValidation.error(Messages.Ant_NotAntDirectory(value));
......
......@@ -456,9 +456,13 @@ public class Maven extends Builder {
if(value.getPath().equals(""))
return FormValidation.error(Messages.Maven_MavenHomeRequired());
if(!value.isDirectory())
if(value.exists() && !value.isDirectory())
return FormValidation.error(Messages.Maven_NotADirectory(value));
if(!value.exists())
// no such directory yet. perhaps it's meant to be created?
return FormValidation.ok();
File maven1File = new File(value,MAVEN_1_INSTALLATION_COMMON_FILE);
File maven2File = new File(value,MAVEN_2_INSTALLATION_COMMON_FILE);
......
hudson (1.308) unstable; urgency=low
* See http://hudson.dev.java.net/changelog.html for more details.
-- Kohsuke Kawaguchi <kk@kohsuke.org> Thu, 28 May 2009 12:39:20 -0700
hudson (1.307) unstable; urgency=low
* See http://hudson.dev.java.net/changelog.html for more details.
......
......@@ -27,7 +27,7 @@ THE SOFTWARE.
<parent>
<groupId>org.jvnet.hudson.main</groupId>
<artifactId>pom</artifactId>
<version>1.308-SNAPSHOT</version>
<version>1.309-SNAPSHOT</version>
<relativePath>../pom.xml</relativePath>
</parent>
......
......@@ -27,7 +27,7 @@ THE SOFTWARE.
<parent>
<groupId>org.jvnet.hudson.main</groupId>
<artifactId>pom</artifactId>
<version>1.308-SNAPSHOT</version>
<version>1.309-SNAPSHOT</version>
<relativePath>../pom.xml</relativePath>
</parent>
......
......@@ -27,7 +27,7 @@ THE SOFTWARE.
<parent>
<groupId>org.jvnet.hudson.main</groupId>
<artifactId>pom</artifactId>
<version>1.308-SNAPSHOT</version>
<version>1.309-SNAPSHOT</version>
</parent>
<artifactId>maven-plugin</artifactId>
......
......@@ -33,7 +33,7 @@ THE SOFTWARE.
<groupId>org.jvnet.hudson.main</groupId>
<artifactId>pom</artifactId>
<version>1.308-SNAPSHOT</version>
<version>1.309-SNAPSHOT</version>
<packaging>pom</packaging>
<name>Hudson main module</name>
......
......@@ -68,8 +68,9 @@ perl -p -i.bak -e "s|https://.+hudson\.jar|$jarUrl|" $WWW/hudson.jnlp
cp $WWW/hudson.jnlp $WWW/$id.jnlp
# push the permalink
echo "Redirect 302 /latest/hudson.war $warUrl" > /tmp/latest.htaccess
scp /tmp/latest.htaccess hudson.gotdns.com:/home/kohsuke/public_html_hudson/latest/.htaccess
echo "Redirect 302 /latest/hudson.war $warUrl" > /tmp/latest.htaccess.war
scp /tmp/latest.htaccess.war hudson.gotdns.com:/home/kohsuke/public_html_hudson/latest/.htaccess.war
ssh hudson.gotdns.com "cd /home/kohsuke/public_html_hudson/latest; cat .htaccess.* > .htaccess"
# update changelog.html
ruby update.changelog.rb $id < $WWW/changelog.html > $WWW/changelog.new
......
......@@ -27,7 +27,7 @@ THE SOFTWARE.
<parent>
<groupId>org.jvnet.hudson.main</groupId>
<artifactId>pom</artifactId>
<version>1.308-SNAPSHOT</version>
<version>1.309-SNAPSHOT</version>
<relativePath>../pom.xml</relativePath>
</parent>
......
......@@ -27,7 +27,7 @@ THE SOFTWARE.
<parent>
<artifactId>pom</artifactId>
<groupId>org.jvnet.hudson.main</groupId>
<version>1.308-SNAPSHOT</version>
<version>1.309-SNAPSHOT</version>
</parent>
<modelVersion>4.0.0</modelVersion>
<groupId>org.jvnet.hudson.main</groupId>
......
......@@ -27,7 +27,7 @@ THE SOFTWARE.
<parent>
<groupId>org.jvnet.hudson.main</groupId>
<artifactId>pom</artifactId>
<version>1.308-SNAPSHOT</version>
<version>1.309-SNAPSHOT</version>
<relativePath>../pom.xml</relativePath>
</parent>
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册