hudson.plugins.promoted_builds
Class PromotionProcess

java.lang.Object
  extended by hudson.model.AbstractModelObject
      extended by hudson.model.Actionable
          extended by hudson.model.AbstractItem
              extended by hudson.model.Job<P,R>
                  extended by hudson.model.AbstractProject<PromotionProcess,Promotion>
                      extended by hudson.plugins.promoted_builds.PromotionProcess
All Implemented Interfaces:
hudson.ExtensionPoint, hudson.model.BuildableItem, hudson.model.Item, hudson.model.ModelObject, hudson.model.PersistenceRoot, hudson.model.Queue.Task, hudson.model.ResourceActivity, hudson.model.Saveable, hudson.search.SearchableModelObject, hudson.search.SearchItem, hudson.security.AccessControlled, org.kohsuke.stapler.HttpDeletable

public final class PromotionProcess
extends hudson.model.AbstractProject<PromotionProcess,Promotion>
implements hudson.model.Saveable

A dummy AbstractProject to carry out promotion operations.

Author:
Kohsuke Kawaguchi

Nested Class Summary
 
Nested classes/interfaces inherited from interface hudson.ExtensionPoint
hudson.ExtensionPoint.LegacyInstancesAreScopedToHudson
 
Field Summary
 hudson.util.DescribableList<PromotionCondition,PromotionConditionDescriptor> conditions
          PromotionConditions.
 
Fields inherited from class hudson.model.AbstractProject
ABORT, builds, disabled, transientActions, triggers
 
Fields inherited from class hudson.model.Job
HISTORY_ADAPTER, nextBuildNumber, properties
 
Fields inherited from class hudson.model.AbstractItem
description, name
 
Fields inherited from interface hudson.model.Item
BUILD, CONFIGURE, CREATE, DELETE, PERMISSIONS, WORKSPACE
 
Method Summary
protected  void buildDependencyGraph(hudson.model.DependencyGraph graph)
           
 boolean considerPromotion(hudson.model.AbstractBuild<?,?> build)
          Checks if the build is promotable, and if so, promote it.
static java.util.List<hudson.model.Descriptor<? extends hudson.tasks.BuildStep>> getAll()
           
protected  java.lang.Class<Promotion> getBuildClass()
           
 java.util.List<hudson.tasks.BuildStep> getBuildSteps()
           
 hudson.model.AbstractProject<?,?> getOwner()
          Gets the owner AbstractProject that configured JobPropertyImpl as a job property.
 JobPropertyImpl getParent()
           
 hudson.util.DescribableList<hudson.tasks.Publisher,hudson.model.Descriptor<hudson.tasks.Publisher>> getPublishersList()
           
 hudson.model.AbstractProject getRootProject()
          Returns the root project value.
 hudson.FilePath getWorkspace()
           
 boolean isFingerprintConfigured()
           
 boolean isInQueue(hudson.model.AbstractBuild<?,?> build)
           
 Status isMet(hudson.model.AbstractBuild<?,?> build)
          Checks if all the conditions to promote a build is met.
 void promote(hudson.model.AbstractBuild<?,?> build, Status qualification)
          Promote the given build by using the given qualification.
 boolean scheduleBuild()
          Deprecated. You need to be using scheduleBuild(AbstractBuild)
 boolean scheduleBuild(hudson.model.AbstractBuild<?,?> build)
           
 
Methods inherited from class hudson.model.AbstractProject
_getRuns, addProperty, addToList, addTrigger, buildDescribable, buildDescribable, checkAbortPermission, checkout, createExecutable, createHistoryWidget, doBuild, doBuildWithParameters, doCancelQueue, doConfigSubmit, doDisable, doDoWipeOutWorkspace, doEnable, doPolling, doRssChangelog, doWs, findNearest, getActions, getAssignedLabel, getAuthToken, getBuildTriggerUpstreamProjects, getDownstreamProjects, getEstimatedDuration, getHasCustomQuietPeriod, getIconColor, getJDK, getLastBuiltOn, getModuleRoot, getModuleRoots, getProminentActions, getPronoun, getQueueItem, getQuietPeriod, getRelationship, getResourceActivities, getResourceList, getScm, getTransitiveDownstreamProjects, getTransitiveUpstreamProjects, getTrigger, getTriggers, getUpstreamProjects, getWhyBlocked, getWorkspaceResource, hasAbortPermission, hasParticipant, isBuildable, isBuildBlocked, isBuilding, isConfigurable, isDisabled, isInQueue, isParameterized, loadBuild, makeDisabled, makeSearchIndex, newBuild, onLoad, performDelete, pollSCMChanges, removeFromList, removeRun, removeTrigger, scheduleBuild, scheduleBuild, scheduleBuild, scheduleBuild, scheduleBuild2, scheduleBuild2, scheduleBuild2, schedulePolling, setAssignedLabel, setJDK, setScm, submit, updateTransientActions
 
Methods inherited from class hudson.model.Job
assignBuildNumber, doBuildStatus, doBuildTimeGraph, doBuildTimeGraphMap, doConfigDotXml, doDoRename, doRssAll, doRssFailed, getACL, getAllJobs, getAllProperties, getBuild, getBuildByNumber, getBuildDir, getBuildHealth, getBuildHealthReports, getBuilds, getBuildsAsMap, getBuildStatusUrl, getDynamic, getFirstBuild, getLastBuild, getLastCompletedBuild, getLastFailedBuild, getLastStableBuild, getLastSuccessfulBuild, getLogRotator, getNearestBuild, getNearestOldBuild, getNextBuildNumber, getPermalinks, getProperties, getProperty, getWidgets, isKeepDependencies, isNameEditable, logRotate, onCopiedFrom, removeProperty, removeProperty, renameTo, saveNextBuildNumber, setLogRotator, supportsLogRotator, updateNextBuildNumber
 
Methods inherited from class hudson.model.AbstractItem
checkPermission, delete, delete, doDoDelete, doSetName, doSubmitDescription, getAbsoluteUrl, getApi, getConfigFile, getDescription, getDescriptorByName, getDisplayName, getFullDisplayName, getFullName, getName, getRootDir, getSearchUrl, getShortUrl, getUrl, hasPermission, save, setDescription, toString
 
Methods inherited from class hudson.model.Actionable
addAction, getAction, getAction, getActions
 
Methods inherited from class hudson.model.AbstractModelObject
getSearch, getSearchIndex, getSearchName, requirePOST, sendError, sendError, sendError, sendError, sendError
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface hudson.model.Saveable
save
 
Methods inherited from interface hudson.model.Item
getAbsoluteUrl, getAllJobs, getDisplayName, getFullDisplayName, getFullName, getName, getShortUrl, getUrl, onCopiedFrom, save
 
Methods inherited from interface hudson.model.PersistenceRoot
getRootDir
 
Methods inherited from interface hudson.search.SearchableModelObject
getSearch
 
Methods inherited from interface hudson.search.SearchItem
getSearchIndex, getSearchName, getSearchUrl
 
Methods inherited from interface hudson.security.AccessControlled
checkPermission, getACL, hasPermission
 
Methods inherited from interface hudson.model.Queue.Task
getFullDisplayName, getName, getUrl
 
Methods inherited from interface hudson.model.ResourceActivity
getDisplayName
 

Field Detail

conditions

public final hudson.util.DescribableList<PromotionCondition,PromotionConditionDescriptor> conditions
PromotionConditions. All have to be met for a build to be promoted.

Method Detail

getRootProject

public hudson.model.AbstractProject getRootProject()
Returns the root project value.

Overrides:
getRootProject in class hudson.model.AbstractProject<PromotionProcess,Promotion>
Returns:
the root project value.

getParent

public JobPropertyImpl getParent()
Specified by:
getParent in interface hudson.model.Item
Overrides:
getParent in class hudson.model.AbstractItem

getOwner

public hudson.model.AbstractProject<?,?> getOwner()
Gets the owner AbstractProject that configured JobPropertyImpl as a job property.


getWorkspace

public hudson.FilePath getWorkspace()
Specified by:
getWorkspace in class hudson.model.AbstractProject<PromotionProcess,Promotion>

getPublishersList

public hudson.util.DescribableList<hudson.tasks.Publisher,hudson.model.Descriptor<hudson.tasks.Publisher>> getPublishersList()
Specified by:
getPublishersList in class hudson.model.AbstractProject<PromotionProcess,Promotion>

getBuildClass

protected java.lang.Class<Promotion> getBuildClass()
Specified by:
getBuildClass in class hudson.model.AbstractProject<PromotionProcess,Promotion>

getBuildSteps

public java.util.List<hudson.tasks.BuildStep> getBuildSteps()

isMet

public Status isMet(hudson.model.AbstractBuild<?,?> build)
Checks if all the conditions to promote a build is met.

Returns:
null if promotion conditions are not met. otherwise returns a list of badges that record how the promotion happened.

considerPromotion

public boolean considerPromotion(hudson.model.AbstractBuild<?,?> build)
                          throws java.io.IOException
Checks if the build is promotable, and if so, promote it.

Returns:
true if the build was promoted.
Throws:
java.io.IOException

promote

public void promote(hudson.model.AbstractBuild<?,?> build,
                    Status qualification)
             throws java.io.IOException
Promote the given build by using the given qualification.

Throws:
java.io.IOException

scheduleBuild

public boolean scheduleBuild()
Deprecated. You need to be using scheduleBuild(AbstractBuild)

Specified by:
scheduleBuild in interface hudson.model.BuildableItem
Overrides:
scheduleBuild in class hudson.model.AbstractProject<PromotionProcess,Promotion>

scheduleBuild

public boolean scheduleBuild(hudson.model.AbstractBuild<?,?> build)

isInQueue

public boolean isInQueue(hudson.model.AbstractBuild<?,?> build)

isFingerprintConfigured

public boolean isFingerprintConfigured()
Specified by:
isFingerprintConfigured in class hudson.model.AbstractProject<PromotionProcess,Promotion>

buildDependencyGraph

protected void buildDependencyGraph(hudson.model.DependencyGraph graph)
Specified by:
buildDependencyGraph in class hudson.model.AbstractProject<PromotionProcess,Promotion>

getAll

public static java.util.List<hudson.model.Descriptor<? extends hudson.tasks.BuildStep>> getAll()


Copyright © 2009. All Rights Reserved.