docs: public static org.jfrog.hudson.ArtifactoryServer prepareArtifactoryServer(String artifactoryServerID,
                                                                                ArtifactoryServer pipelineServer) {
  
          if (artifactoryServerID == null && pipelineServer == null) {
              return null;
          }
          if (artifactoryServerID != null && pipelineServer != null) {
              return null;
          }
          if (pipelineServer != null) {
              CredentialsConfig credentials = pipelineServer.createCredentialsConfig();
  
              return new org.jfrog.hudson.ArtifactoryServer(null, pipelineServer.getUrl(), credentials,
                      credentials, pipelineServer.getConnection().getTimeout(), pipelineServer.isBypassProxy(), pipelineServer.getConnection().getRetry(), pipelineServer.getDeploymentThreads());
          }
          org.jfrog.hudson.ArtifactoryServer server = RepositoriesUtils.getArtifactoryServer(artifactoryServerID, RepositoriesUtils.getArtifactoryServers());
          if (server == null) {
              return null;
          }
          return server;
      }