Esempio n. 1
0
 /// <summary>
 /// Create a build
 /// </summary>
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 /// <param name='branch'>
 /// The branch name
 /// </param>
 /// <param name='ownerName'>
 /// The name of the owner
 /// </param>
 /// <param name='appName'>
 /// The name of the application
 /// </param>
 /// <param name='paramsParameter'>
 /// Parameters of the build
 /// </param>
 /// <param name='cancellationToken'>
 /// The cancellation token.
 /// </param>
 public static async Task <Build> CreateAsync(this IBuilds operations, string branch, string ownerName, string appName, BuildParams paramsParameter = default(BuildParams), CancellationToken cancellationToken = default(CancellationToken))
 {
     using (var _result = await operations.CreateWithHttpMessagesAsync(branch, ownerName, appName, paramsParameter, null, cancellationToken).ConfigureAwait(false))
     {
         return(_result.Body);
     }
 }
Esempio n. 2
0
 /// <summary>
 /// Get the build log
 /// </summary>
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 /// <param name='buildId'>
 /// The build ID
 /// </param>
 /// <param name='ownerName'>
 /// The name of the owner
 /// </param>
 /// <param name='appName'>
 /// The name of the application
 /// </param>
 /// <param name='cancellationToken'>
 /// The cancellation token.
 /// </param>
 public static async Task <BuildLog> GetLogAsync(this IBuilds operations, int buildId, string ownerName, string appName, CancellationToken cancellationToken = default(CancellationToken))
 {
     using (var _result = await operations.GetLogWithHttpMessagesAsync(buildId, ownerName, appName, null, cancellationToken).ConfigureAwait(false))
     {
         return(_result.Body);
     }
 }
Esempio n. 3
0
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 /// <param name='build'>
 /// </param>
 /// <param name='cancellationToken'>
 /// The cancellation token.
 /// </param>
 public static async Task <Build> CreateAsync(this IBuilds operations, BuildData build = default(BuildData), CancellationToken cancellationToken = default(CancellationToken))
 {
     using (var _result = await operations.CreateWithHttpMessagesAsync(build, null, cancellationToken).ConfigureAwait(false))
     {
         return(_result.Body);
     }
 }
Esempio n. 4
0
 /// <summary>
 /// Gets the download URI
 /// </summary>
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 /// <param name='buildId'>
 /// The build ID
 /// </param>
 /// <param name='downloadType'>
 /// The download type. Possible values include: 'build', 'symbols', 'logs'
 /// </param>
 /// <param name='ownerName'>
 /// The name of the owner
 /// </param>
 /// <param name='appName'>
 /// The name of the application
 /// </param>
 /// <param name='cancellationToken'>
 /// The cancellation token.
 /// </param>
 public static async Task <DownloadContainer> GetDownloadUriAsync(this IBuilds operations, int buildId, string downloadType, string ownerName, string appName, CancellationToken cancellationToken = default(CancellationToken))
 {
     using (var _result = await operations.GetDownloadUriWithHttpMessagesAsync(buildId, downloadType, ownerName, appName, null, cancellationToken).ConfigureAwait(false))
     {
         return(_result.Body);
     }
 }
Esempio n. 5
0
 /// <summary>
 /// Gets the Xcode versions available to this app
 /// </summary>
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 /// <param name='ownerName'>
 /// The name of the owner
 /// </param>
 /// <param name='appName'>
 /// The name of the application
 /// </param>
 /// <param name='cancellationToken'>
 /// The cancellation token.
 /// </param>
 public static async Task <IList <XcodeVersion> > ListXcodeVersionsAsync(this IBuilds operations, string ownerName, string appName, CancellationToken cancellationToken = default(CancellationToken))
 {
     using (var _result = await operations.ListXcodeVersionsWithHttpMessagesAsync(ownerName, appName, null, cancellationToken).ConfigureAwait(false))
     {
         return(_result.Body);
     }
 }
Esempio n. 6
0
 /// <summary>
 /// The build information for this service
 /// </summary>
 /// This API is meant to be called by humans for debugging
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 /// <param name='cancellationToken'>
 /// The cancellation token.
 /// </param>
 public static async Task <BuildsCurrentResponse> GetBuildsCurrentAsync(this IBuilds operations, CancellationToken cancellationToken = default(CancellationToken))
 {
     using (var _result = await operations.GetBuildsCurrentWithHttpMessagesAsync(null, cancellationToken).ConfigureAwait(false))
     {
         return(_result.Body);
     }
 }
Esempio n. 7
0
 /// <summary>
 /// Distribute a build
 /// </summary>
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 /// <param name='buildId'>
 /// The build ID
 /// </param>
 /// <param name='distributeInfo'>
 /// The distribution details
 /// </param>
 /// <param name='ownerName'>
 /// The name of the owner
 /// </param>
 /// <param name='appName'>
 /// The name of the application
 /// </param>
 /// <param name='cancellationToken'>
 /// The cancellation token.
 /// </param>
 public static async Task <DistributionResponse> DistributeAsync(this IBuilds operations, int buildId, DistributionRequest distributeInfo, string ownerName, string appName, CancellationToken cancellationToken = default(CancellationToken))
 {
     using (var _result = await operations.DistributeWithHttpMessagesAsync(buildId, distributeInfo, ownerName, appName, null, cancellationToken).ConfigureAwait(false))
     {
         return(_result.Body);
     }
 }
Esempio n. 8
0
 /// <summary>
 /// Returns the projects in the repository for the branch, for all toolsets
 /// </summary>
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 /// <param name='branch'>
 /// The branch name
 /// </param>
 /// <param name='os'>
 /// The desired OS for the project scan; normally the same as the app OS.
 /// Possible values include: 'iOS', 'Android', 'Windows', 'macOS'
 /// </param>
 /// <param name='platform'>
 /// The desired platform for the project scan. Possible values include:
 /// 'Objective-C-Swift', 'React-Native', 'Xamarin', 'Java', 'UWP'
 /// </param>
 /// <param name='ownerName'>
 /// The name of the owner
 /// </param>
 /// <param name='appName'>
 /// The name of the application
 /// </param>
 /// <param name='cancellationToken'>
 /// The cancellation token.
 /// </param>
 public static async Task <ToolsetProjects> ListToolsetProjectsAsync(this IBuilds operations, string branch, string os, string platform, string ownerName, string appName, CancellationToken cancellationToken = default(CancellationToken))
 {
     using (var _result = await operations.ListToolsetProjectsWithHttpMessagesAsync(branch, os, platform, ownerName, appName, null, cancellationToken).ConfigureAwait(false))
     {
         return(_result.Body);
     }
 }
Esempio n. 9
0
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 /// <param name='repository'>
 /// </param>
 /// <param name='commit'>
 /// </param>
 /// <param name='buildNumber'>
 /// </param>
 /// <param name='channelId'>
 /// </param>
 /// <param name='notBefore'>
 /// </param>
 /// <param name='notAfter'>
 /// </param>
 /// <param name='loadCollections'>
 /// </param>
 /// <param name='page'>
 /// </param>
 /// <param name='perPage'>
 /// </param>
 /// <param name='cancellationToken'>
 /// The cancellation token.
 /// </param>
 public static async Task <IList <Build> > GetAllBuildsAsync(this IBuilds operations, string repository = default(string), string commit = default(string), string buildNumber = default(string), int?channelId = default(int?), System.DateTimeOffset?notBefore = default(System.DateTimeOffset?), System.DateTimeOffset?notAfter = default(System.DateTimeOffset?), bool?loadCollections = default(bool?), int?page = default(int?), int?perPage = default(int?), CancellationToken cancellationToken = default(CancellationToken))
 {
     using (var _result = await operations.GetAllBuildsWithHttpMessagesAsync(repository, commit, buildNumber, channelId, notBefore, notAfter, loadCollections, page, perPage, null, cancellationToken).ConfigureAwait(false))
     {
         return(_result.Body);
     }
 }
Esempio n. 10
0
 /// <summary>
 /// Application specific build service status
 /// </summary>
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 /// <param name='ownerName'>
 /// The name of the owner
 /// </param>
 /// <param name='appName'>
 /// The name of the application
 /// </param>
 /// <param name='cancellationToken'>
 /// The cancellation token.
 /// </param>
 public static async Task <BuildServiceStatus> GetStatusByAppIdAsync(this IBuilds operations, string ownerName, string appName, CancellationToken cancellationToken = default(CancellationToken))
 {
     using (var _result = await operations.GetStatusByAppIdWithHttpMessagesAsync(ownerName, appName, null, cancellationToken).ConfigureAwait(false))
     {
         return(_result.Body);
     }
 }
Esempio n. 11
0
 /// <summary>
 /// Cancels a build
 /// </summary>
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 /// <param name='buildId'>
 /// The build ID
 /// </param>
 /// <param name='properties'>
 /// </param>
 /// <param name='ownerName'>
 /// The name of the owner
 /// </param>
 /// <param name='appName'>
 /// The name of the application
 /// </param>
 /// <param name='cancellationToken'>
 /// The cancellation token.
 /// </param>
 public static async Task <Build> UpdateAsync(this IBuilds operations, int buildId, BuildPatch properties, string ownerName, string appName, CancellationToken cancellationToken = default(CancellationToken))
 {
     using (var _result = await operations.UpdateWithHttpMessagesAsync(buildId, properties, ownerName, appName, null, cancellationToken).ConfigureAwait(false))
     {
         return(_result.Body);
     }
 }
Esempio n. 12
0
 /// <summary>
 /// Gets the Xamarin SDK bundles available to this app
 /// </summary>
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 /// <param name='ownerName'>
 /// The name of the owner
 /// </param>
 /// <param name='appName'>
 /// The name of the application
 /// </param>
 public static IList <XamarinSDKBundle> ListXamarinSDKBundles(this IBuilds operations, string ownerName, string appName)
 {
     return(operations.ListXamarinSDKBundlesAsync(ownerName, appName).GetAwaiter().GetResult());
 }
Esempio n. 13
0
 public void Execute <TRef>(IBuilds <ICommandMessage> message, Ref <TRef> target) where TRef : IHasID <ID>
 => Execute(new Command(message.Build(), ID.FromRef(Check.NotNull(target, nameof(target)))));
Esempio n. 14
0
 /// <summary>
 /// Cancels a build
 /// </summary>
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 /// <param name='buildId'>
 /// The build ID
 /// </param>
 /// <param name='properties'>
 /// </param>
 /// <param name='ownerName'>
 /// The name of the owner
 /// </param>
 /// <param name='appName'>
 /// The name of the application
 /// </param>
 public static Build Update(this IBuilds operations, int buildId, BuildPatch properties, string ownerName, string appName)
 {
     return(operations.UpdateAsync(buildId, properties, ownerName, appName).GetAwaiter().GetResult());
 }
Esempio n. 15
0
 /// <summary>
 /// Returns the projects in the repository for the branch, for all toolsets
 /// </summary>
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 /// <param name='branch'>
 /// The branch name
 /// </param>
 /// <param name='os'>
 /// The desired OS for the project scan; normally the same as the app OS.
 /// Possible values include: 'iOS', 'Android', 'Windows', 'macOS'
 /// </param>
 /// <param name='platform'>
 /// The desired platform for the project scan. Possible values include:
 /// 'Objective-C-Swift', 'React-Native', 'Xamarin', 'Java', 'UWP'
 /// </param>
 /// <param name='ownerName'>
 /// The name of the owner
 /// </param>
 /// <param name='appName'>
 /// The name of the application
 /// </param>
 public static ToolsetProjects ListToolsetProjects(this IBuilds operations, string branch, string os, string platform, string ownerName, string appName)
 {
     return(operations.ListToolsetProjectsAsync(branch, os, platform, ownerName, appName).GetAwaiter().GetResult());
 }
Esempio n. 16
0
 /// <summary>
 /// Application specific build service status
 /// </summary>
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 /// <param name='ownerName'>
 /// The name of the owner
 /// </param>
 /// <param name='appName'>
 /// The name of the application
 /// </param>
 public static BuildServiceStatus GetStatusByAppId(this IBuilds operations, string ownerName, string appName)
 {
     return(operations.GetStatusByAppIdAsync(ownerName, appName).GetAwaiter().GetResult());
 }
Esempio n. 17
0
 /// <summary>
 /// Public webhook sink
 /// </summary>
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 /// <param name='cancellationToken'>
 /// The cancellation token.
 /// </param>
 public static async Task WebhookAsync(this IBuilds operations, CancellationToken cancellationToken = default(CancellationToken))
 {
     (await operations.WebhookWithHttpMessagesAsync(null, cancellationToken).ConfigureAwait(false)).Dispose();
 }
Esempio n. 18
0
 public static Task Execute(this IServiceProvider services, IBuilds <ICommandMessage> command, ID?targetID = null)
 => services.Execute(new Command(command.Build(), targetID));
Esempio n. 19
0
 public static void Add2QueueByConfigurationAndBranch(this IBuilds source, string configId, string branch)
 {
     source.Add2QueueBuildByBuildConfigId(string.Format("{0}&branchName={1}", configId, branch));
 }
Esempio n. 20
0
 public static Task Execute <TRef>(this IServiceProvider services, IBuilds <ICommandMessage> message, Ref <TRef> target) where TRef : IHasID <ID>
 => services.Execute(new Command(message.Build(), ID.FromRef(Check.NotNull(target, nameof(target)))));
 public void Add <T>(string commandID, Ref <T> target, IBuilds <ICommandMessage> builder) where T : IHasID <ID>
 {
     Add(ID.Parse(commandID), ID.FromRef(target), builder.Build());
 }
Esempio n. 22
0
 /// <summary>
 /// Returns the list of builds for the branch
 /// </summary>
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 /// <param name='branch'>
 /// The branch name
 /// </param>
 /// <param name='ownerName'>
 /// The name of the owner
 /// </param>
 /// <param name='appName'>
 /// The name of the application
 /// </param>
 public static IList <Build> ListByBranch(this IBuilds operations, string branch, string ownerName, string appName)
 {
     return(operations.ListByBranchAsync(branch, ownerName, appName).GetAwaiter().GetResult());
 }
Esempio n. 23
0
 /// <summary>
 /// Returns the build detail for the given build ID
 /// </summary>
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 /// <param name='buildId'>
 /// The build ID
 /// </param>
 /// <param name='ownerName'>
 /// The name of the owner
 /// </param>
 /// <param name='appName'>
 /// The name of the application
 /// </param>
 public static Build Get(this IBuilds operations, int buildId, string ownerName, string appName)
 {
     return(operations.GetAsync(buildId, ownerName, appName).GetAwaiter().GetResult());
 }
 public void Add(string commandID, ID?target, IBuilds <ICommandMessage> builder)
 {
     Add(ID.Parse(commandID), target, builder.Build());
 }
Esempio n. 25
0
 /// <summary>
 /// Gets the Xcode versions available to this app
 /// </summary>
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 /// <param name='ownerName'>
 /// The name of the owner
 /// </param>
 /// <param name='appName'>
 /// The name of the application
 /// </param>
 public static IList <XcodeVersion> ListXcodeVersions(this IBuilds operations, string ownerName, string appName)
 {
     return(operations.ListXcodeVersionsAsync(ownerName, appName).GetAwaiter().GetResult());
 }
Esempio n. 26
0
 public void Execute(IBuilds <ICommandMessage> command, ID?targetID = null)
 => Execute(new Command(command.Build(), targetID));
Esempio n. 27
0
 /// <summary>
 /// Create a build
 /// </summary>
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 /// <param name='branch'>
 /// The branch name
 /// </param>
 /// <param name='ownerName'>
 /// The name of the owner
 /// </param>
 /// <param name='appName'>
 /// The name of the application
 /// </param>
 /// <param name='paramsParameter'>
 /// Parameters of the build
 /// </param>
 public static Build Create(this IBuilds operations, string branch, string ownerName, string appName, BuildParams paramsParameter = default(BuildParams))
 {
     return(operations.CreateAsync(branch, ownerName, appName, paramsParameter).GetAwaiter().GetResult());
 }
Esempio n. 28
0
 /// <summary>
 /// The build information for this service
 /// </summary>
 /// This API is meant to be called by humans for debugging
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 public static BuildsCurrentResponse GetBuildsCurrent(this IBuilds operations)
 {
     return(Task.Factory.StartNew(s => ((IBuilds)s).GetBuildsCurrentAsync(), operations, CancellationToken.None, TaskCreationOptions.None, TaskScheduler.Default).Unwrap().GetAwaiter().GetResult());
 }
Esempio n. 29
0
 /// <summary>
 /// Returns the list of Git branches for this application
 /// </summary>
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 /// <param name='ownerName'>
 /// The name of the owner
 /// </param>
 /// <param name='appName'>
 /// The name of the application
 /// </param>
 public static IList <BranchStatus> ListBranches(this IBuilds operations, string ownerName, string appName)
 {
     return(operations.ListBranchesAsync(ownerName, appName).GetAwaiter().GetResult());
 }
Esempio n. 30
0
 public BuildsController(IRedAlert commonDomain, IBuilds buildsDomain)
 {
     _commonDomain = commonDomain;
     _buildsDomain = buildsDomain;
 }
Esempio n. 31
0
 /// <summary>
 /// Distribute a build
 /// </summary>
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 /// <param name='buildId'>
 /// The build ID
 /// </param>
 /// <param name='distributeInfo'>
 /// The distribution details
 /// </param>
 /// <param name='ownerName'>
 /// The name of the owner
 /// </param>
 /// <param name='appName'>
 /// The name of the application
 /// </param>
 public static DistributionResponse Distribute(this IBuilds operations, int buildId, DistributionRequest distributeInfo, string ownerName, string appName)
 {
     return(operations.DistributeAsync(buildId, distributeInfo, ownerName, appName).GetAwaiter().GetResult());
 }