Class DeleteOrPush
java.lang.Object
hudson.tasks.BuildStepCompatibilityLayer
hudson.tasks.Builder
io.jenkins.plugins.dotnet.commands.Command
io.jenkins.plugins.dotnet.commands.nuget.NuGetCommand
io.jenkins.plugins.dotnet.commands.nuget.DeleteOrPush
- All Implemented Interfaces:
ExtensionPoint
,Describable<Builder>
,BuildStep
,SimpleBuildStep
A build step to run "
dotnet nuget delete
" or "dotnet nuget push
".-
Nested Class Summary
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
ConstructorDescriptionCreates a new build step to run "dotnet nuget delete
" or "dotnet nuget push
".DeleteOrPush
(String subCommand) Creates a new build step to run "dotnet nuget delete
" or "dotnet nuget push
". -
Method Summary
Modifier and TypeMethodDescriptionprotected void
Adds command line arguments for this .NET NuGetdelete
orpush
command invocation.Gets the package server API key to use.Sets the package source to use.boolean
Indicates whether the service endpoint (api/v2/package
) should be added to the configured package source URL.void
setApiKeyId
(String apiKeyId) Sets the package server API key to use.void
setNoServiceEndpoint
(boolean noServiceEndpoint) Sets whether the service endpoint (api/v2/package
) should be added to the configured package source URL.void
Sets the package source to use.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
-
DeleteOrPush
public DeleteOrPush()Creates a new build step to run "dotnet nuget delete
" or "dotnet nuget push
". -
DeleteOrPush
Creates a new build step to run "dotnet nuget delete
" or "dotnet nuget push
".- Parameters:
subCommand
- The specific subcommand to run (i.e.delete
orpush
).
-
-
Method Details
-
addCommandLineArguments
Adds command line arguments for this .NET NuGetdelete
orpush
command invocation.This adds:
- Any arguments added by
NuGetCommand.addCommandLineArguments(DotNetArguments)
. --api-key xxx
, if an API key was specified viasetApiKeyId(String)
.--no-service-endpoint
, if requested viasetNoServiceEndpoint(boolean)
.--source xxx
, if a source was specified viasetSource(String)
.
- Overrides:
addCommandLineArguments
in classNuGetCommand
- Parameters:
args
- The current set of arguments.- Throws:
AbortException
- When something goes wrong.
- Any arguments added by
-
getApiKeyId
Gets the package server API key to use.- Returns:
- The package server API key to use.
-
setApiKeyId
Sets the package server API key to use.- Parameters:
apiKeyId
- The package server API key to use.
-
isNoServiceEndpoint
public boolean isNoServiceEndpoint()Indicates whether the service endpoint (api/v2/package
) should be added to the configured package source URL.- Returns:
true
if the package source URL will be used as-is;false
ifapi/v2/package
will be appended to it.
-
setNoServiceEndpoint
@DataBoundSetter public void setNoServiceEndpoint(boolean noServiceEndpoint) Sets whether the service endpoint (api/v2/package
) should be added to the configured package source URL.- Parameters:
noServiceEndpoint
-true
if the package source URL should be used as-is;false
ifapi/v2/package
should be appended to * it.
-
getSource
Sets the package source to use.- Returns:
- The package source to use.
-
setSource
Sets the package source to use.- Parameters:
source
- The package source to use.
-