Package se.diabol.jenkins.pipeline
Class PipelineVersionContributor
java.lang.Object
hudson.tasks.BuildWrapper
se.diabol.jenkins.pipeline.PipelineVersionContributor
- All Implemented Interfaces:
ExtensionPoint,Describable<BuildWrapper>
Build wrapper of the first job of a pipeline that computes a version from a template and hands it down the chain
as the
PIPELINE_VERSION variable, optionally making it the build's display name.-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic classstatic classCopies the version of the upstream build onto every build it triggers.static classCarries the version on a build; aCauseActionfor the sake of builds recorded by 1.x.static classExposes the version as thePIPELINE_VERSIONbuild variable.Nested classes/interfaces inherited from class hudson.tasks.BuildWrapper
BuildWrapper.EnvironmentNested classes/interfaces inherited from interface hudson.ExtensionPoint
ExtensionPoint.LegacyInstancesAreScopedToHudson -
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionPipelineVersionContributor(boolean updateDisplayName, String versionTemplate) -
Method Summary
Modifier and TypeMethodDescriptionstatic StringgetVersion(Run<?, ?> build) booleansetUp(AbstractBuild build, Launcher launcher, BuildListener listener) Methods inherited from class hudson.tasks.BuildWrapper
all, decorateLauncher, decorateLogger, getProjectAction, getProjectActions, makeBuildVariables, makeSensitiveBuildVariables, preCheckout, setUpMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface hudson.model.Describable
getDescriptor
-
Field Details
-
VERSION_PARAMETER
- See Also:
-
-
Constructor Details
-
PipelineVersionContributor
@DataBoundConstructor public PipelineVersionContributor(boolean updateDisplayName, String versionTemplate)
-
-
Method Details
-
getVersionTemplate
-
isUpdateDisplayName
public boolean isUpdateDisplayName() -
setUp
public BuildWrapper.Environment setUp(AbstractBuild build, Launcher launcher, BuildListener listener) throws IOException, InterruptedException - Overrides:
setUpin classBuildWrapper- Throws:
IOExceptionInterruptedException
-
getVersion
-