Esempio n. 1
0
        internal override async Task <int> RunAsync(CancellationToken cancellationToken)
        {
            var context = await Context
                          .WithAzureLogon()
                          .BuildAsync(cancellationToken);

            var  instance  = context.Naming.Instance(Instance, ResourceGroup);
            var  instances = new AggregatorInstances(context.Azure, context.Logger, context.Naming);
            bool ok        = await instances.StreamLogsAsync(instance, cancellationToken);

            return(ok ? ExitCodes.Success : ExitCodes.Failure);
        }
Esempio n. 2
0
        internal override async Task <int> RunAsync(CancellationToken cancellationToken)
        {
            var context = await Context
                          .WithAzureLogon()
                          .BuildAsync(cancellationToken);

            var  instance  = new InstanceName(Instance, ResourceGroup);
            var  instances = new AggregatorInstances(context.Azure, context.Logger);
            bool ok        = await instances.StreamLogsAsync(instance, cancellationToken);

            return(ok ? 0 : 1);
        }
Esempio n. 3
0
        internal override async Task <int> RunAsync(CancellationToken cancellationToken)
        {
            var context = await Context
                          .WithAzureLogon()
                          .WithDevOpsLogon()
                          .BuildAsync(cancellationToken);

            var instance  = new InstanceName(Instance, ResourceGroup);
            var instances = new AggregatorInstances(context.Azure, context.Logger);
            var boards    = new Boards(context.Devops, context.Logger);

            var streamTask = instances.StreamLogsAsync(instance, lastLinePattern: this.LastLinePattern, cancellationToken: cancellationToken);
            int id         = await boards.CreateWorkItemAsync(this.Project, this.Title, cancellationToken);

            streamTask.Wait(cancellationToken);
            return(id > 0 ? 0 : 1);
        }