Class Restore
java.lang.Object
hudson.tasks.BuildStepCompatibilityLayer
hudson.tasks.Builder
io.jenkins.plugins.dotnet.commands.Command
io.jenkins.plugins.dotnet.commands.tool.ToolCommand
io.jenkins.plugins.dotnet.commands.tool.Restore
- All Implemented Interfaces:
ExtensionPoint
,Describable<Builder>
,BuildStep
,SimpleBuildStep
A build step to run "
dotnet tool restore
", restoring local tools as described in a tool manifest.-
Nested Class Summary
Modifier and TypeClassDescriptionstatic final class
A descriptor for "dotnet tool restore
" 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.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.Gets the sole additional source to use for the restore.String[]
Gets the list of additional sources to use for the restore.Gets the list of additional sources to use for the restore.Gets the NuGet configuration (nuget.config) file to use.Gets the path to the manifest file.Gets the verbosity to use for the command.boolean
Determines whether multiple projects can be restored in parallel.boolean
Determines whether failed sources should be ignored.boolean
Determines whether HTTP requests should be cached.void
setAdditionalSource
(String additionalSource) Sets the sole additional source to use for the restore.void
setAdditionalSources
(String... additionalSources) Sets the list of additional sources to use for the restore.void
setAdditionalSourcesString
(String additionalSources) Sets the list of additional sources to use for the restore.void
setConfigfile
(String configfile) Sets the NuGet configuration (nuget.config) file to use.void
setDisableParallel
(boolean disableParallel) Determines whether multiple projects can be restored in parallel.void
setIgnoreFailedSources
(boolean ignoreFailedSources) Determines whether failed sources should be ignored.void
setNoCache
(boolean noCache) Determines whether HTTP requests should be cached.void
setToolManifest
(String toolManifest) Sets the path to the manifest file.void
setVerbosity
(String verbosity) Sets the verbosity to use for the command.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
-
Restore
@DataBoundConstructor public Restore()Creates a new "dotnet tool restore
" build step.
-
-
Method Details
-
addCommandLineArguments
Adds command line arguments for this "dotnet nuget push
" invocation.This adds:
- Any arguments added by
ToolCommand.addCommandLineArguments(DotNetArguments)
. -
--add-source xxx
, for each source specified viasetAdditionalSource(String)
,setAdditionalSources(String...)
orsetAdditionalSourcesString(String)
. --configfile xxx
, if a config file was specified viasetConfigfile(String)
.--disable-parallel
, if requested viasetDisableParallel(boolean)
.--ignore-failed-sources
, if requested viasetIgnoreFailedSources(boolean)
.--no-cache
, if requested viasetNoCache(boolean)
.--tool-manifest xxx
, if a tool manifest was specified viasetToolManifest(String)
.-v:xxx
, if a verbosity has been specified viasetVerbosity(String)
.
- Overrides:
addCommandLineArguments
in classToolCommand
- Parameters:
args
- The current set of arguments.- Throws:
AbortException
- When something goes wrong.
- Any arguments added by
-
getAdditionalSource
Gets the sole additional source to use for the restore.- Returns:
- The sole additional source to use for the restore, or
null
when there is not exactly one additional source set.
-
setAdditionalSource
Sets the sole additional source to use for the restore.To set more than one, use
setAdditionalSources(String...)
instead.- Parameters:
additionalSource
- The sole additional source to use for the restore.
-
getAdditionalSources
Gets the list of additional sources to use for the restore.- Returns:
- The list of additional sources to use for the restore.
-
setAdditionalSources
Sets the list of additional sources to use for the restore.- Parameters:
additionalSources
- The list of additional sources to use for the restore.
-
getAdditionalSourcesString
Gets the list of additional sources to use for the restore.- Returns:
- The list of additional sources to use for the restore.
-
setAdditionalSourcesString
Sets the list of additional sources to use for the restore.- Parameters:
additionalSources
- The list of additional sources to use for the restore.
-
getConfigfile
Gets the NuGet configuration (nuget.config) file to use.- Returns:
- The NuGet configuration (nuget.config) file to use.
-
setConfigfile
Sets the NuGet configuration (nuget.config) file to use.- Parameters:
configfile
- The NuGet configuration (nuget.config) file to use.
-
isDisableParallel
public boolean isDisableParallel()Determines whether multiple projects can be restored in parallel.- Returns:
true
when multiple projects are restored one by one;false
otherwise.
-
setDisableParallel
@DataBoundSetter public void setDisableParallel(boolean disableParallel) Determines whether multiple projects can be restored in parallel.- Parameters:
disableParallel
-true
to restore multiple projects one by one;false
otherwise.
-
isIgnoreFailedSources
public boolean isIgnoreFailedSources()Determines whether failed sources should be ignored.- Returns:
true
when failed sources are ignored;false
otherwise.
-
setIgnoreFailedSources
@DataBoundSetter public void setIgnoreFailedSources(boolean ignoreFailedSources) Determines whether failed sources should be ignored.- Parameters:
ignoreFailedSources
-true
to ignore failed sources;false
otherwise.
-
isNoCache
public boolean isNoCache()Determines whether HTTP requests should be cached.- Returns:
true
when HTTP requests are not cached;false
otherwise.
-
setNoCache
@DataBoundSetter public void setNoCache(boolean noCache) Determines whether HTTP requests should be cached.- Parameters:
noCache
-true
not to cache HTTP requests;false
otherwise.
-
getToolManifest
Gets the path to the manifest file.- Returns:
- The path to the manifest file.
-
setToolManifest
Sets the path to the manifest file.- Parameters:
toolManifest
- The path to the manifest file.
-
getVerbosity
Gets the verbosity to use for the command.- Returns:
- The verbosity to use for the command.
-
setVerbosity
Sets the verbosity to use for the command.- Parameters:
verbosity
- The verbosity to use for the command.
-