Class Push
- All Implemented Interfaces:
ExtensionPoint
,Describable<Builder>
,BuildStep
,SimpleBuildStep
A build step to run "
dotnet nuget push
", pushing a package to a server and publishing it.-
Nested Class Summary
Modifier and TypeClassDescriptionstatic final class
A descriptor for "dotnet nuget push
" 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.nuget.NuGetCommand
forceEnglishOutput
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 nuget push
" invocation.getRoot()
Gets the project to push packages for.Gets the symbol server API key to use.Gets the symbol server URL.Gets the timeout for pushing to a server, in seconds.boolean
Indicates whether buffering should be disabled when pushing to an HTTP(S) source.boolean
Indicates whether symbols will not get pushed even when present.boolean
Indicates whether duplicates (409 Conflict responses) should be treated as warnings when pushing multiple packages to an HTTP(S) source, allowing the push to continue.void
setDisableBuffering
(boolean disableBuffering) Determine whether buffering should be disabled when pushing to an HTTP(S) source.void
setNoSymbols
(boolean noSymbols) Determine whether symbols will not get pushed even when present.void
Sets the project to push packages for.void
setSkipDuplicate
(boolean skipDuplicate) Determine whether duplicates (409 Conflict responses) should be treated as warnings when pushing multiple packages to an HTTP(S) source, allowing the push to continue.void
setSymbolApiKeyId
(String symbolApiKeyId) Sets the symbol server API key to use.void
setSymbolSource
(String symbolSource) Sets the symbol server URL.void
setTimeout
(Integer timeout) Sets the timeout for pushing to a server, in seconds.Methods inherited from class io.jenkins.plugins.dotnet.commands.nuget.DeleteOrPush
getApiKeyId, getSource, isNoServiceEndpoint, setApiKeyId, setNoServiceEndpoint, setSource
Methods inherited from class io.jenkins.plugins.dotnet.commands.nuget.NuGetCommand
isForceEnglishOutput, setForceEnglishOutput
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
-
Push
@DataBoundConstructor public Push()Creates a new "dotnet nuget push
" build step.
-
-
Method Details
-
addCommandLineArguments
Adds command line arguments for this "dotnet nuget push
" invocation.This adds:
- Any arguments added by
DeleteOrPush.addCommandLineArguments(DotNetArguments)
. - The package file path specified via
setRoot(String)
. --disable-buffering
, if requested viasetDisableBuffering(boolean)
.--no-symbols
, if requested viasetNoSymbols(boolean)
.--skip-duplicate
, if requested viasetSkipDuplicate(boolean)
.--symbol-api-key xxx
, if an API key was specified viasetSymbolApiKeyId(String)
.--symbol-source xxx
, if a symbol source was specified viasetSymbolSource(String)
.--timeout nnn
, if a timeout was specified viasetTimeout(Integer)
.
- Overrides:
addCommandLineArguments
in classDeleteOrPush
- Parameters:
args
- The current set of arguments.- Throws:
AbortException
- When something goes wrong.
- Any arguments added by
-
isDisableBuffering
public boolean isDisableBuffering()Indicates whether buffering should be disabled when pushing to an HTTP(S) source.- Returns:
true
when buffering should be disabled when pushing to an HTTP(S) source;false
otherwise.
-
setDisableBuffering
@DataBoundSetter public void setDisableBuffering(boolean disableBuffering) Determine whether buffering should be disabled when pushing to an HTTP(S) source.- Parameters:
disableBuffering
-true
to disable buffering when pushing to an HTTP(S) source;false
otherwise.
-
isNoSymbols
public boolean isNoSymbols()Indicates whether symbols will not get pushed even when present.- Returns:
true
when symbols should not get pushed, even when present;false
otherwise.
-
setNoSymbols
@DataBoundSetter public void setNoSymbols(boolean noSymbols) Determine whether symbols will not get pushed even when present.- Parameters:
noSymbols
-true
not to push symbols, even when present;false
otherwise.
-
getRoot
Gets the project to push packages for.- Returns:
- The project to push packages for.
-
setRoot
Sets the project to push packages for.- Parameters:
root
- The project to push packages for.
-
isSkipDuplicate
public boolean isSkipDuplicate()Indicates whether duplicates (409 Conflict responses) should be treated as warnings when pushing multiple packages to an HTTP(S) source, allowing the push to continue.- Returns:
true
when duplicates should be treated as warnings when pushing multiple packages;false
otherwise.
-
setSkipDuplicate
@DataBoundSetter public void setSkipDuplicate(boolean skipDuplicate) Determine whether duplicates (409 Conflict responses) should be treated as warnings when pushing multiple packages to an HTTP(S) source, allowing the push to continue.- Parameters:
skipDuplicate
-true
to treat duplicates as warnings when pushing multiple packages;false
otherwise.
-
getSymbolApiKeyId
Gets the symbol server API key to use.- Returns:
- The symbol server API key to use.
-
setSymbolApiKeyId
Sets the symbol server API key to use.- Parameters:
symbolApiKeyId
- The symbol server API key to use.
-
getSymbolSource
Gets the symbol server URL.- Returns:
- The symbol server URL.
-
setSymbolSource
Sets the symbol server URL.- Parameters:
symbolSource
- The symbol server URL.
-
getTimeout
Gets the timeout for pushing to a server, in seconds.- Returns:
- The timeout for pushing to a server, in seconds.
-
setTimeout
Sets the timeout for pushing to a server, in seconds.- Parameters:
timeout
- The timeout for pushing to a server, in seconds.
-