org.jvnet.hudson.tools.versionnumber
Class VersionNumberBuilder
java.lang.Object
hudson.model.AbstractDescribableImpl<hudson.tasks.BuildWrapper>
hudson.tasks.BuildWrapper
org.jvnet.hudson.tools.versionnumber.VersionNumberBuilder
- All Implemented Interfaces:
- hudson.ExtensionPoint, hudson.model.Describable<hudson.tasks.BuildWrapper>
public class VersionNumberBuilder
- extends hudson.tasks.BuildWrapper
Sample Builder.
This build wrapper makes an environment variable with a version number available
to the build. For more information on how the format stream works, see the Version
Number Plugin wiki page.
This plugin keeps track of its version through a VersionNumberAction attached
to the project. Each build that uses this plugin has its own VersionNumberAction,
and this contains the builds today/this month/ this year/ all time. When incrementing
each of these values, unless they're overridden in the configuration the value from
the previous build will be used.
- Author:
- Carl Lischeske - NETFLIX
| Nested classes/interfaces inherited from class hudson.tasks.BuildWrapper |
hudson.tasks.BuildWrapper.Environment |
| Nested classes/interfaces inherited from interface hudson.ExtensionPoint |
hudson.ExtensionPoint.LegacyInstancesAreScopedToHudson |
|
Constructor Summary |
VersionNumberBuilder(String versionNumberString,
String projectStartDate,
String environmentVariableName,
String buildsToday,
String buildsThisMonth,
String buildsThisYear,
String buildsAllTime,
boolean skipFailedBuilds)
|
VersionNumberBuilder(String versionNumberString,
String projectStartDate,
String environmentVariableName,
String buildsToday,
String buildsThisMonth,
String buildsThisYear,
String buildsAllTime,
boolean skipFailedBuilds,
boolean useAsBuildDisplayName)
|
| Methods inherited from class hudson.tasks.BuildWrapper |
all, decorateLauncher, decorateLogger, getProjectAction, getProjectActions, makeBuildVariables, makeSensitiveBuildVariables, preCheckout, setUp |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
DESCRIPTOR
@Extension
public static final VersionNumberBuilder.DescriptorImpl DESCRIPTOR
VersionNumberBuilder
public VersionNumberBuilder(String versionNumberString,
String projectStartDate,
String environmentVariableName,
String buildsToday,
String buildsThisMonth,
String buildsThisYear,
String buildsAllTime,
boolean skipFailedBuilds)
VersionNumberBuilder
@DataBoundConstructor
public VersionNumberBuilder(String versionNumberString,
String projectStartDate,
String environmentVariableName,
String buildsToday,
String buildsThisMonth,
String buildsThisYear,
String buildsAllTime,
boolean skipFailedBuilds,
boolean useAsBuildDisplayName)
getBuildsToday
public String getBuildsToday()
getBuildsThisMonth
public String getBuildsThisMonth()
getBuildsThisYear
public String getBuildsThisYear()
getBuildsAllTime
public String getBuildsAllTime()
getSkipFailedBuilds
public boolean getSkipFailedBuilds()
getVersionNumberString
public String getVersionNumberString()
- We'll use this from the config.jelly.
getProjectStartDate
public String getProjectStartDate()
getEnvironmentVariableName
public String getEnvironmentVariableName()
setUp
public hudson.tasks.BuildWrapper.Environment setUp(hudson.model.AbstractBuild build,
hudson.Launcher launcher,
hudson.model.BuildListener listener)
- Overrides:
setUp in class hudson.tasks.BuildWrapper
getDescriptor
public hudson.tasks.BuildWrapperDescriptor getDescriptor()
- Specified by:
getDescriptor in interface hudson.model.Describable<hudson.tasks.BuildWrapper>- Overrides:
getDescriptor in class hudson.model.AbstractDescribableImpl<hudson.tasks.BuildWrapper>
Copyright © 2004-2011. All Rights Reserved.