public JenkinsArtifactImporter(IJenkinsConnectionInfo connectionInfo, ILogSink logger, IOperationExecutionContext context) { if (context == null) { throw new ArgumentNullException(nameof(context)); } var shim = new BuildMasterContextShim(context); if (shim.ApplicationId == null) { throw new InvalidOperationException("context requires a valid application ID"); } this.ConnectionInfo = connectionInfo ?? throw new ArgumentNullException(nameof(connectionInfo)); this.Logger = logger ?? throw new ArgumentNullException(nameof(logger)); this.Context = shim; }
public JenkinsArtifactImporter(IJenkinsConnectionInfo connectionInfo, ILogger logger, IGenericBuildMasterContext context) { if (connectionInfo == null) { throw new ArgumentNullException(nameof(connectionInfo)); } if (logger == null) { throw new ArgumentNullException(nameof(logger)); } if (context == null) { throw new ArgumentNullException(nameof(context)); } if (context.ApplicationId == null) { throw new InvalidOperationException("context requires a valid application ID"); } this.ConnectionInfo = connectionInfo; this.Logger = logger; this.Context = context; }
public static string GetApiUrl(this IJenkinsConnectionInfo connectionInfo) => GetApiUrl(connectionInfo.ServerUrl);
public JenkinsClient(IJenkinsConnectionInfo config, ILogSink logger = null) { this.config = config; this.logger = logger; }
public static string GetApiUrl(this IJenkinsConnectionInfo connectionInfo) { return(connectionInfo.ServerUrl?.TrimEnd('/') ?? ""); }