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
Nested ClassesModifier and TypeClassDescriptionstatic final classA descriptor for "dotnet tool restore" 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.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 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.booleanDetermines whether multiple projects can be restored in parallel.booleanDetermines whether failed sources should be ignored.booleanDetermines whether HTTP requests should be cached.voidsetAdditionalSource(String additionalSource) Sets the sole additional source to use for the restore.voidsetAdditionalSources(String... additionalSources) Sets the list of additional sources to use for the restore.voidsetAdditionalSourcesString(String additionalSources) Sets the list of additional sources to use for the restore.voidsetConfigfile(String configfile) Sets the NuGet configuration (nuget.config) file to use.voidsetDisableParallel(boolean disableParallel) Determines whether multiple projects can be restored in parallel.voidsetIgnoreFailedSources(boolean ignoreFailedSources) Determines whether failed sources should be ignored.voidsetNoCache(boolean noCache) Determines whether HTTP requests should be cached.voidsetToolManifest(String toolManifest) Sets the path to the manifest file.voidsetVerbosity(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, 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
-
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:
addCommandLineArgumentsin 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
nullwhen 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:
truewhen multiple projects are restored one by one;falseotherwise.
-
setDisableParallel
@DataBoundSetter public void setDisableParallel(boolean disableParallel) Determines whether multiple projects can be restored in parallel.- Parameters:
disableParallel-trueto restore multiple projects one by one;falseotherwise.
-
isIgnoreFailedSources
public boolean isIgnoreFailedSources()Determines whether failed sources should be ignored.- Returns:
truewhen failed sources are ignored;falseotherwise.
-
setIgnoreFailedSources
@DataBoundSetter public void setIgnoreFailedSources(boolean ignoreFailedSources) Determines whether failed sources should be ignored.- Parameters:
ignoreFailedSources-trueto ignore failed sources;falseotherwise.
-
isNoCache
public boolean isNoCache()Determines whether HTTP requests should be cached.- Returns:
truewhen HTTP requests are not cached;falseotherwise.
-
setNoCache
@DataBoundSetter public void setNoCache(boolean noCache) Determines whether HTTP requests should be cached.- Parameters:
noCache-truenot to cache HTTP requests;falseotherwise.
-
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.
-