Class Pack
java.lang.Object
hudson.tasks.BuildStepCompatibilityLayer
hudson.tasks.Builder
io.jenkins.plugins.dotnet.commands.Command
io.jenkins.plugins.dotnet.commands.msbuild.MSBuildCommand
io.jenkins.plugins.dotnet.commands.msbuild.Pack
- All Implemented Interfaces:
ExtensionPoint,Describable<Builder>,BuildStep,SimpleBuildStep
A build step to run "
dotnet pack", creating a NuGet package for a project.-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic final classA descriptor for "dotnet pack" build steps.Nested classes/interfaces inherited from interface hudson.tasks.BuildStep
BuildStep.PublisherListNested classes/interfaces inherited from interface hudson.ExtensionPoint
ExtensionPoint.LegacyInstancesAreScopedToHudsonNested classes/interfaces inherited from interface jenkins.tasks.SimpleBuildStep
SimpleBuildStep.LastBuildAction, SimpleBuildStep.LastBuildActionFactory -
Field Summary
Fields inherited from class io.jenkins.plugins.dotnet.commands.msbuild.MSBuildCommand
configuration, nologo, options, outputDirectory, project, properties, verbosityFields inherited from class io.jenkins.plugins.dotnet.commands.Command
sdk, showSdkInfo, shutDownBuildServers, unstableIfErrors, unstableIfWarnings, workDirectoryFields inherited from interface hudson.tasks.BuildStep
BUILDERS, PUBLISHERS -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected voidAdds command line arguments for this "dotnet pack" invocation.Gets the runtime identifier to use.Sets the version suffix to use.booleanisForce()Determines whether dependency resolution should be forced.booleanDetermines whether symbol packages containing source code should be created.booleanDetermines whether symbol packages should be created.booleanDetermines whether a build should be performed before creating the packages.booleanDetermines whether to ignore project-to-project dependencies.booleanDetermines whether an implicit restore should be executed as part of this command.voidsetForce(boolean force) Determines whether dependency resolution should be forced.voidsetIncludeSource(boolean includeSource) Determines whether symbol packages containing source code should be created.voidsetIncludeSymbols(boolean includeSymbols) Determines whether symbol packages should be created.voidsetNoBuild(boolean noBuild) Determines whether a build should be performed before creating the packages.voidsetNoDependencies(boolean noDependencies) Determines whether to ignore project-to-project dependencies.voidsetNoRestore(boolean noRestore) Determines whether an implicit restore should be executed as part of this command.voidsetRuntime(String runtime) Sets the runtime identifier to use.voidsetVersionSuffix(String versionSuffix) Sets the version suffix to use.Methods inherited from class io.jenkins.plugins.dotnet.commands.msbuild.MSBuildCommand
getConfiguration, getOption, getOptions, getOptionsString, getOutputDirectory, getProject, getProperties, getPropertiesString, getVerbosity, isNologo, isShutDownBuildServers, isUnstableIfErrors, isUnstableIfWarnings, setConfiguration, setNologo, setOption, setOptions, setOptionsString, setOutputDirectory, setProject, setProperties, setPropertiesString, setShutDownBuildServers, setUnstableIfErrors, setUnstableIfWarnings, setVerbosityMethods inherited from class io.jenkins.plugins.dotnet.commands.Command
getCharset, getDescriptor, getSdk, getSdkDescriptor, getWorkDirectory, isContinueOnError, isShowSdkInfo, isSpecificSdkVersion, perform, setCharset, setContinueOnError, setSdk, setShowSdkInfo, setSpecificSdkVersion, setWorkDirectoryMethods inherited from class hudson.tasks.Builder
all, getRequiredMonitorService, prebuildMethods inherited from class hudson.tasks.BuildStepCompatibilityLayer
getProjectAction, getProjectAction, getProjectActions, perform, perform, prebuildMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface hudson.tasks.BuildStep
getProjectAction, getProjectActions, getRequiredMonitorService, perform, prebuildMethods inherited from interface jenkins.tasks.SimpleBuildStep
perform, perform, requiresWorkspace
-
Constructor Details
-
Pack
@DataBoundConstructor public Pack()Creates a new "dotnet pack" build step.
-
-
Method Details
-
addCommandLineArguments
Adds command line arguments for this "dotnet pack" invocation.This adds:
- Any arguments added by
MSBuildCommand.addCommandLineArguments(DotNetArguments). --force, if requested viasetForce(boolean).--include-source, if requested viasetIncludeSource(boolean).--include-symbols, if requested viasetIncludeSymbols(boolean).--no-build, if requested viasetNoBuild(boolean).--no-dependencies, if requested viasetNoDependencies(boolean).--no-restore, if requested viasetNoRestore(boolean).-r:xxx, if a runtime identifier has been specified viasetRuntime(String).--version-suffix xxx, if a version suffix has been specified viasetRuntime(String).
- Overrides:
addCommandLineArgumentsin classMSBuildCommand- Parameters:
args- The current set of arguments.
- Any arguments added by
-
isForce
public boolean isForce()Determines whether dependency resolution should be forced.- Returns:
truewhen all dependencies should be resolved even if the last restore was successful;falseotherwise.
-
setForce
@DataBoundSetter public void setForce(boolean force) Determines whether dependency resolution should be forced.- Parameters:
force-trueto resolve all dependencies even if the last restore was successful;falseotherwise.
-
isIncludeSource
public boolean isIncludeSource()Determines whether symbol packages containing source code should be created.- Returns:
truewhen symbol packages are created containing source code;falseotherwise.
-
setIncludeSource
@DataBoundSetter public void setIncludeSource(boolean includeSource) Determines whether symbol packages containing source code should be created.- Parameters:
includeSource-trueto create symbol packages containing source code;falseotherwise.
-
isIncludeSymbols
public boolean isIncludeSymbols()Determines whether symbol packages should be created.- Returns:
truewhen symbol packages are created;falseotherwise.
-
setIncludeSymbols
@DataBoundSetter public void setIncludeSymbols(boolean includeSymbols) Determines whether symbol packages should be created.- Parameters:
includeSymbols-trueto create symbol packages;falseotherwise.
-
isNoBuild
public boolean isNoBuild()Determines whether a build should be performed before creating the packages.- Returns:
truewhen neither a restore nor a build will be performed before creating the packages;falseotherwise.
-
setNoBuild
@DataBoundSetter public void setNoBuild(boolean noBuild) Determines whether a build should be performed before creating the packages.- Parameters:
noBuild-trueto perform neither a restore nor a build before creating the packages;falseotherwise.
-
isNoDependencies
public boolean isNoDependencies()Determines whether to ignore project-to-project dependencies.- Returns:
truewhen project-to-project dependencies are ignored;falseotherwise.
-
setNoDependencies
@DataBoundSetter public void setNoDependencies(boolean noDependencies) Determines whether to ignore project-to-project dependencies.- Parameters:
noDependencies-truewhen project-to-project dependencies should be ignored;falseotherwise.
-
isNoRestore
public boolean isNoRestore()Determines whether an implicit restore should be executed as part of this command.- Returns:
truewhen the implicit restore is disabled;falseotherwise.
-
setNoRestore
@DataBoundSetter public void setNoRestore(boolean noRestore) Determines whether an implicit restore should be executed as part of this command.- Parameters:
noRestore-trueto disable the implicit restore;falseotherwise.
-
getRuntime
Gets the runtime identifier to use.- Returns:
- The runtime identifier to use.
-
setRuntime
Sets the runtime identifier to use.- Parameters:
runtime- The runtime identifier to use.
-
getVersionSuffix
Sets the version suffix to use.- Returns:
- The version suffix to use.
-
setVersionSuffix
Sets the version suffix to use.- Parameters:
versionSuffix- The version suffix to use.
-