-
Notifications
You must be signed in to change notification settings - Fork 75
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #4 from emsa23/master
Adding Different Queue Sorting Strategies and Strategies to assign Priorities to Jobs.
- Loading branch information
Showing
50 changed files
with
2,747 additions
and
102 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,94 +1,82 @@ | ||
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd"> | ||
<modelVersion>4.0.0</modelVersion> | ||
<parent> | ||
<groupId>org.jvnet.hudson.plugins</groupId> | ||
<artifactId>plugin</artifactId> | ||
<version>1.343</version><!-- which version of Hudson is this plugin built against? --> | ||
<relativePath>../pom.xml</relativePath> | ||
</parent> | ||
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" | ||
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd"> | ||
<modelVersion>4.0.0</modelVersion> | ||
<parent> | ||
<groupId>org.jenkins-ci.plugins</groupId> | ||
<artifactId>plugin</artifactId> | ||
<version>1.520</version> | ||
</parent> | ||
<artifactId>PrioritySorter</artifactId> | ||
<version>2.0-SNAPSHOT</version> | ||
<packaging>hpi</packaging> | ||
<name>Jenkins Priority Sorter Plugin</name> | ||
<description>This plugin allows for the build queue to be sorted based on pre-assigned priorities for each job.</description> | ||
<url>https://wiki.jenkins-ci.org/display/JENKINS/Priority+Sorter+Plugin</url> | ||
|
||
<groupId>hudson.queueSorter</groupId> | ||
<artifactId>PrioritySorter</artifactId> | ||
<version>1.4-SNAPSHOT</version> | ||
<packaging>hpi</packaging> | ||
<name>Priority Sorter</name> | ||
<description>This plugin allows for the build queue to be sorted based on pre-assigned priorities for each job.</description> | ||
<url>http://wiki.hudson-ci.org/display/HUDSON/Priority+Sorter+Plugin</url> | ||
<licenses> | ||
<license> | ||
<name>MIT</name> | ||
<url>http://www.opensource.org/licenses/mit-license.php</url> | ||
<comments> | ||
Copyright 2013- Magnus Sandberg. All rights reserved. | ||
Copyright 2010- Brad Larson. All rights reserved. | ||
</comments> | ||
</license> | ||
</licenses> | ||
|
||
<licenses> | ||
<license> | ||
<name>MIT</name> | ||
<url>http://www.opensource.org/licenses/mit-license.php</url> | ||
<comments>Copyright 2010 Brad Larson. All rights reserved.</comments> | ||
</license> | ||
</licenses> | ||
<developers> | ||
<developer> | ||
<id>emsa23</id> | ||
<name>Magnus Sandberg</name> | ||
<email>[email protected]</email> | ||
<roles> | ||
<role>developer</role> | ||
<role>maintainer</role> | ||
</roles> | ||
<timezone>CET</timezone> | ||
</developer> | ||
<developer> | ||
<id>bklarson</id> | ||
<name>Brad Larson</name> | ||
<email>[email protected]</email> | ||
<roles> | ||
<role>developer</role> | ||
<role>retired maintainer</role> | ||
</roles> | ||
<timezone>-6</timezone> | ||
</developer> | ||
</developers> | ||
|
||
<developers> | ||
<developer> | ||
<id>bklarson</id> | ||
<name>Brad Larson</name> | ||
<email>[email protected]</email> | ||
<roles> | ||
<role>developer</role> | ||
<role>maintainer</role> | ||
</roles> | ||
<timezone>-6</timezone> | ||
</developer> | ||
</developers> | ||
<build> | ||
<plugins> | ||
<plugin> | ||
<groupId>org.jenkins-ci.tools</groupId> | ||
<artifactId>maven-hpi-plugin</artifactId> | ||
<version>1.96</version> | ||
<extensions>true</extensions> | ||
</plugin> | ||
</plugins> | ||
</build> | ||
|
||
<!-- get every artifact through maven.glassfish.org, which proxies all the artifacts that we need --> | ||
<repositories> | ||
<repository> | ||
<id>repo.jenkins-ci.org</id> | ||
<url>http://repo.jenkins-ci.org/public/</url> | ||
</repository> | ||
</repositories> | ||
|
||
<pluginRepositories> | ||
<pluginRepository> | ||
<id>repo.jenkins-ci.org</id> | ||
<url>http://repo.jenkins-ci.org/public/</url> | ||
</pluginRepository> | ||
</pluginRepositories> | ||
<repositories> | ||
<repository> | ||
<id>repo.jenkins-ci.org</id> | ||
<url>http://repo.jenkins-ci.org/public/</url> | ||
</repository> | ||
</repositories> | ||
|
||
<build> | ||
<plugins> | ||
<plugin> | ||
<groupId>org.apache.maven.plugins</groupId> | ||
<artifactId>maven-release-plugin</artifactId> | ||
<version>2.0</version> | ||
<dependencies> | ||
<dependency> | ||
<groupId>org.apache.maven.scm</groupId> | ||
<artifactId>maven-scm-provider-gitexe</artifactId> | ||
<version>1.3</version> | ||
</dependency> | ||
</dependencies> | ||
<configuration> | ||
<goals>deploy</goals> | ||
</configuration> | ||
</plugin> | ||
</plugins> | ||
<extensions> | ||
<extension> | ||
<groupId>org.jvnet.wagon-svn</groupId> | ||
<artifactId>wagon-svn</artifactId> | ||
<version>1.9</version> | ||
</extension> | ||
</extensions> | ||
</build> | ||
|
||
<scm> | ||
<connection>scm:git:git://github.com/jenkinsci/priority-sorter-plugin.git</connection> | ||
<developerConnection>scm:git:[email protected]:jenkinsci/priority-sorter-plugin.git</developerConnection> | ||
<url>http://github.com/jenkinsci/priority-sorter-plugin</url> | ||
</scm> | ||
|
||
<distributionManagement> | ||
<repository> | ||
<id>java.net-m2-repository</id> | ||
<url>http://maven.jenkins-ci.org:8081/content/repositories/releases/</url> | ||
</repository> | ||
</distributionManagement> | ||
<pluginRepositories> | ||
<pluginRepository> | ||
<id>repo.jenkins-ci.org</id> | ||
<url>http://repo.jenkins-ci.org/public/</url> | ||
</pluginRepository> | ||
</pluginRepositories> | ||
|
||
<distributionManagement> | ||
<repository> | ||
<id>maven.jenkins-ci.org</id> | ||
<url>http://maven.jenkins-ci.org:8081/content/repositories/releases/</url> | ||
</repository> | ||
</distributionManagement> | ||
</project> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
69 changes: 69 additions & 0 deletions
69
src/main/java/jenkins/advancedqueue/ActualAdvancedQueueSorterJobProperty.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,69 @@ | ||
/* | ||
* The MIT License | ||
* | ||
* Copyright (c) 2013, Magnus Sandberg | ||
* | ||
* 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.advancedqueue; | ||
|
||
import hudson.Extension; | ||
import hudson.model.JobProperty; | ||
import hudson.model.JobPropertyDescriptor; | ||
import hudson.model.AbstractProject; | ||
|
||
import org.kohsuke.stapler.DataBoundConstructor; | ||
|
||
/** | ||
* @author Magnus Sandberg | ||
* @since 2.0 | ||
*/ | ||
public class ActualAdvancedQueueSorterJobProperty extends | ||
JobProperty<AbstractProject<?, ?>> { | ||
|
||
private int priority; | ||
|
||
@DataBoundConstructor | ||
public ActualAdvancedQueueSorterJobProperty(int priority) { | ||
this.priority = priority; | ||
} | ||
|
||
public int getPriority() { | ||
return priority; | ||
} | ||
|
||
public void setPriority(int priority) { | ||
this.priority = priority; | ||
} | ||
|
||
@Override | ||
public DescriptorImpl getDescriptor() { | ||
return (DescriptorImpl) super.getDescriptor(); | ||
} | ||
|
||
@Extension | ||
public static final class DescriptorImpl extends JobPropertyDescriptor { | ||
|
||
@Override | ||
public String getDisplayName() { | ||
return Messages.ActualAdvancedQueueSorterJobProperty_displayName(); | ||
} | ||
|
||
} | ||
} |
Oops, something went wrong.