code: public static boolean distributeAndCheckResponse(DistributionBuilder distributionBuilder, ArtifactoryBuildInfoClient client, TaskListener listener,
                                                       String buildName, String buildNumber, boolean dryRun) throws IOException {
          // do a dry run first
          listener.getLogger().println("Performing dry run distribution (no changes are made during dry run) ...");
          if (!distribute(distributionBuilder, client, listener, buildName, buildNumber, true)) {
              return false;
          }
          listener.getLogger().println("Dry run finished successfully");
          if (!dryRun) {
              listener.getLogger().println("Performing distribution ...");
              if (!distribute(distributionBuilder, client, listener, buildName, buildNumber, false)) {
                  return false;
              }
              listener.getLogger().println("Distribution completed successfully!");
          }
          return true;
      }
docs: Two stage distribution, dry run and actual promotion to verify correctness.
  
  @param distributionBuilder
  @param client
  @param listener
  @param buildName
  @param buildNumber
  @throws IOException