Class DeleteOrPush

All Implemented Interfaces:
ExtensionPoint, Describable<Builder>, BuildStep, SimpleBuildStep
Direct Known Subclasses:
Delete, Push

public class DeleteOrPush extends NuGetCommand
A build step to run "dotnet nuget delete" or "dotnet nuget push".
  • Constructor Details

    • DeleteOrPush

      public DeleteOrPush()
      Creates a new build step to run "dotnet nuget delete" or "dotnet nuget push".
    • DeleteOrPush

      public DeleteOrPush(@NonNull String subCommand)
      Creates a new build step to run "dotnet nuget delete" or "dotnet nuget push".
      Parameters:
      subCommand - The specific subcommand to run (i.e. delete or push).
  • Method Details

    • addCommandLineArguments

      protected void addCommandLineArguments(@NonNull DotNetArguments args) throws AbortException
      Adds command line arguments for this .NET NuGet delete or push command invocation.

      This adds:

      1. Any arguments added by NuGetCommand.addCommandLineArguments(DotNetArguments).
      2. --api-key xxx, if an API key was specified via setApiKeyId(String).
      3. --no-service-endpoint, if requested via setNoServiceEndpoint(boolean).
      4. --source xxx, if a source was specified via setSource(String).
      Overrides:
      addCommandLineArguments in class NuGetCommand
      Parameters:
      args - The current set of arguments.
      Throws:
      AbortException - When something goes wrong.
    • getApiKeyId

      @CheckForNull public String getApiKeyId()
      Gets the package server API key to use.
      Returns:
      The package server API key to use.
    • setApiKeyId

      @DataBoundSetter public void setApiKeyId(@CheckForNull String apiKeyId)
      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 if api/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 if api/v2/package should be appended to * it.
    • getSource

      public String getSource()
      Sets the package source to use.
      Returns:
      The package source to use.
    • setSource

      @DataBoundSetter public void setSource(String source)
      Sets the package source to use.
      Parameters:
      source - The package source to use.