Class Publish
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.Publish
- All Implemented Interfaces:
ExtensionPoint
,Describable<Builder>
,BuildStep
,SimpleBuildStep
A build step to run "
dotnet publish
", publishing a project.-
Nested Class Summary
Modifier and TypeClassDescriptionstatic final class
A descriptor for "dotnet publish
" build steps.Nested classes/interfaces inherited from interface hudson.tasks.BuildStep
BuildStep.PublisherList
Nested classes/interfaces inherited from interface hudson.ExtensionPoint
ExtensionPoint.LegacyInstancesAreScopedToHudson
Nested 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, verbosity
Fields inherited from class io.jenkins.plugins.dotnet.commands.Command
sdk, showSdkInfo, shutDownBuildServers, unstableIfErrors, unstableIfWarnings, workDirectory
Fields inherited from interface hudson.tasks.BuildStep
BUILDERS, PUBLISHERS
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionprotected void
Adds command line arguments for this "dotnet publish
" invocation.Gets the target framework moniker to use.Gets the sole manifest to use.String[]
Gets the manifests to use.Gets the manifests to use.Gets the runtime identifier to use.Determines whether the project should be published self-contained.Sets the version suffix to use.boolean
isForce()
Determines whether dependency resolution should be forced.boolean
Determines whether a build should be performed before publishing.boolean
Determines whether to ignore project-to-project dependencies.boolean
Determines whether an implicit restore should be executed as part of this command.void
setForce
(boolean force) Determines whether dependency resolution should be forced.void
setFramework
(String framework) Sets the target framework moniker to use.void
setManifest
(String manifest) Sets the sole manifest to use.void
setManifests
(String... manifests) Sets the manifests to use.void
setManifestsString
(String manifests) Sets the manifests to use.void
setNoBuild
(boolean noBuild) Determines whether a build should be performed before publishing.void
setNoDependencies
(boolean noDependencies) Determines whether to ignore project-to-project dependencies.void
setNoRestore
(boolean noRestore) Determines whether an implicit restore should be executed as part of this command.void
setRuntime
(String runtime) Sets the runtime identifier to use.void
setSelfContained
(Boolean selfContained) Determines whether the project should be published self-contained.void
setVersionSuffix
(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, setVerbosity
Methods inherited from class io.jenkins.plugins.dotnet.commands.Command
getCharset, getDescriptor, getSdk, getSdkDescriptor, getWorkDirectory, isContinueOnError, isShowSdkInfo, isSpecificSdkVersion, perform, setCharset, setContinueOnError, setSdk, setShowSdkInfo, setSpecificSdkVersion, setWorkDirectory
Methods inherited from class hudson.tasks.Builder
all, getRequiredMonitorService, prebuild
Methods inherited from class hudson.tasks.BuildStepCompatibilityLayer
getProjectAction, getProjectAction, getProjectActions, perform, perform, prebuild
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface hudson.tasks.BuildStep
getProjectAction, getProjectActions, getRequiredMonitorService, perform, prebuild
Methods inherited from interface jenkins.tasks.SimpleBuildStep
perform, perform, requiresWorkspace
-
Constructor Details
-
Publish
@DataBoundConstructor public Publish()Creates a new "dotnet publish
" build step.
-
-
Method Details
-
addCommandLineArguments
Adds command line arguments for this "dotnet publish
" invocation.This adds:
- Any arguments added by
MSBuildCommand.addCommandLineArguments(DotNetArguments)
. --force
, if requested viasetForce(boolean)
.-f:xxx
, if a target framework moniker has been specified viasetFramework(String)
.-
--manifest xxx
for each manifest specified viasetManifest(String)
,setManifests(String...)
orsetManifestsString(String)
. --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)
.--self-contained true/false
, if a value has been specified viasetSelfContained(Boolean)
.--version-suffix xxx
, if a version suffix has been specified viasetRuntime(String)
.
- Overrides:
addCommandLineArguments
in classMSBuildCommand
- Parameters:
args
- The current set of arguments.
- Any arguments added by
-
isForce
public boolean isForce()Determines whether dependency resolution should be forced.- Returns:
true
when all dependencies should be resolved even if the last restore was successful;false
otherwise.
-
setForce
@DataBoundSetter public void setForce(boolean force) Determines whether dependency resolution should be forced.- Parameters:
force
-true
to resolve all dependencies even if the last restore was successful;false
otherwise.
-
getFramework
Gets the target framework moniker to use.- Returns:
- The target framework moniker to use.
-
setFramework
Sets the target framework moniker to use.- Parameters:
framework
- The target framework moniker to use.
-
getManifest
Gets the sole manifest to use.- Returns:
- The sole manifest to use, or
null
when there is not exactly one manifest set.
-
setManifest
Sets the sole manifest to use.To set more than one, use
setManifests(String...)
instead.- Parameters:
manifest
- The sole manifest to use.
-
getManifests
Gets the manifests to use.- Returns:
- The manifests to use.
-
setManifests
Sets the manifests to use.- Parameters:
manifests
- The manifests to use.
-
getManifestsString
Gets the manifests to use.- Returns:
- The manifests to use.
-
setManifestsString
Sets the manifests to use.- Parameters:
manifests
- The manifests to use.
-
isNoBuild
public boolean isNoBuild()Determines whether a build should be performed before publishing.- Returns:
true
when neither a restore nor a build will be performed before publishing;false
otherwise.
-
setNoBuild
@DataBoundSetter public void setNoBuild(boolean noBuild) Determines whether a build should be performed before publishing.- Parameters:
noBuild
-true
to perform neither a restore nor a build before publishing;false
otherwise.
-
isNoDependencies
public boolean isNoDependencies()Determines whether to ignore project-to-project dependencies.- Returns:
true
when project-to-project dependencies are ignored;false
otherwise.
-
setNoDependencies
@DataBoundSetter public void setNoDependencies(boolean noDependencies) Determines whether to ignore project-to-project dependencies.- Parameters:
noDependencies
-true
when project-to-project dependencies should be ignored;false
otherwise.
-
isNoRestore
public boolean isNoRestore()Determines whether an implicit restore should be executed as part of this command.- Returns:
true
when the implicit restore is disabled;false
otherwise.
-
setNoRestore
@DataBoundSetter public void setNoRestore(boolean noRestore) Determines whether an implicit restore should be executed as part of this command.- Parameters:
noRestore
-true
to disable the implicit restore;false
otherwise.
-
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.
-
getSelfContained
Determines whether the project should be published self-contained.- Returns:
null
when the project decides;true
when publishing self-contained;false
otherwise.
-
setSelfContained
Determines whether the project should be published self-contained.- Parameters:
selfContained
-null
to let the project decide;true
to publish self-contained;false
otherwise.
-
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.
-