mirror of
https://github.com/actions/runner.git
synced 2025-12-13 19:03:44 +00:00
Compare commits
5 Commits
users/eric
...
v2.160.2
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
8e4c7c9f90 | ||
|
|
ccfe42ea08 | ||
|
|
2247f2e3ea | ||
|
|
81fe044a22 | ||
|
|
3ba55f86a9 |
@@ -2,11 +2,10 @@
|
|||||||
- N/A
|
- N/A
|
||||||
|
|
||||||
## Bugs
|
## Bugs
|
||||||
- Reverted removal of additional fields error and warning fields (#147)
|
- Fixed an issue with Strong Name Validation when running as a service on Windows (#185)
|
||||||
- Actions cache would incorrectly cache the action if the tag was updated (#148)
|
|
||||||
|
|
||||||
## Misc
|
## Misc
|
||||||
- Updated to .NET Core 3.0 (#127)
|
- N/A
|
||||||
|
|
||||||
## Agent Downloads
|
## Agent Downloads
|
||||||
|
|
||||||
|
|||||||
Binary file not shown.
@@ -9,9 +9,8 @@
|
|||||||
<AppDesignerFolder>Properties</AppDesignerFolder>
|
<AppDesignerFolder>Properties</AppDesignerFolder>
|
||||||
<RootNamespace>RunnerService</RootNamespace>
|
<RootNamespace>RunnerService</RootNamespace>
|
||||||
<AssemblyName>RunnerService</AssemblyName>
|
<AssemblyName>RunnerService</AssemblyName>
|
||||||
<SignAssembly>true</SignAssembly>
|
<SignAssembly>false</SignAssembly>
|
||||||
<AssemblyOriginatorKeyFile>FinalPublicKey.snk</AssemblyOriginatorKeyFile>
|
<DelaySign>false</DelaySign>
|
||||||
<DelaySign>true</DelaySign>
|
|
||||||
<TargetFrameworkVersion>v4.5</TargetFrameworkVersion>
|
<TargetFrameworkVersion>v4.5</TargetFrameworkVersion>
|
||||||
<FileAlignment>512</FileAlignment>
|
<FileAlignment>512</FileAlignment>
|
||||||
<AutoGenerateBindingRedirects>true</AutoGenerateBindingRedirects>
|
<AutoGenerateBindingRedirects>true</AutoGenerateBindingRedirects>
|
||||||
@@ -64,7 +63,6 @@
|
|||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<None Include="App.config" />
|
<None Include="App.config" />
|
||||||
<None Include="FinalPublicKey.snk" />
|
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<EmbeddedResource Include="Resource.resx">
|
<EmbeddedResource Include="Resource.resx">
|
||||||
|
|||||||
@@ -73,7 +73,7 @@ namespace GitHub.Runner.Worker
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
// process action command in serialize oreder.
|
// process action command in serialize order.
|
||||||
lock (_commandSerializeLock)
|
lock (_commandSerializeLock)
|
||||||
{
|
{
|
||||||
if (_stopProcessCommand)
|
if (_stopProcessCommand)
|
||||||
@@ -107,32 +107,19 @@ namespace GitHub.Runner.Worker
|
|||||||
}
|
}
|
||||||
else if (_commandExtensions.TryGetValue(actionCommand.Command, out IActionCommandExtension extension))
|
else if (_commandExtensions.TryGetValue(actionCommand.Command, out IActionCommandExtension extension))
|
||||||
{
|
{
|
||||||
bool commandHasBeenOutput = false;
|
if (context.EchoOnActionCommand && !extension.OmitEcho)
|
||||||
|
{
|
||||||
|
context.Output(input);
|
||||||
|
}
|
||||||
|
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
if (context.EchoOnActionCommand)
|
|
||||||
{
|
|
||||||
context.Output(input);
|
|
||||||
context.Debug($"Processing command '{actionCommand.Command}'");
|
|
||||||
commandHasBeenOutput = true;
|
|
||||||
}
|
|
||||||
|
|
||||||
extension.ProcessCommand(context, input, actionCommand);
|
extension.ProcessCommand(context, input, actionCommand);
|
||||||
|
|
||||||
if (context.EchoOnActionCommand)
|
|
||||||
{
|
|
||||||
context.Debug($"Processed command '{actionCommand.Command}' successfully");
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
catch (Exception ex)
|
catch (Exception ex)
|
||||||
{
|
{
|
||||||
if (!commandHasBeenOutput)
|
var commandInformation = extension.OmitEcho ? extension.Command : input;
|
||||||
{
|
context.Error($"Unable to process command '{commandInformation}' successfully.");
|
||||||
context.Output(input);
|
|
||||||
}
|
|
||||||
|
|
||||||
context.Error($"Unable to process command '{input}' successfully.");
|
|
||||||
context.Error(ex);
|
context.Error(ex);
|
||||||
context.CommandResult = TaskResult.Failed;
|
context.CommandResult = TaskResult.Failed;
|
||||||
}
|
}
|
||||||
@@ -151,6 +138,7 @@ namespace GitHub.Runner.Worker
|
|||||||
public interface IActionCommandExtension : IExtension
|
public interface IActionCommandExtension : IExtension
|
||||||
{
|
{
|
||||||
string Command { get; }
|
string Command { get; }
|
||||||
|
bool OmitEcho { get; }
|
||||||
|
|
||||||
void ProcessCommand(IExecutionContext context, string line, ActionCommand command);
|
void ProcessCommand(IExecutionContext context, string line, ActionCommand command);
|
||||||
}
|
}
|
||||||
@@ -158,6 +146,7 @@ namespace GitHub.Runner.Worker
|
|||||||
public sealed class InternalPluginSetRepoPathCommandExtension : RunnerService, IActionCommandExtension
|
public sealed class InternalPluginSetRepoPathCommandExtension : RunnerService, IActionCommandExtension
|
||||||
{
|
{
|
||||||
public string Command => "internal-set-repo-path";
|
public string Command => "internal-set-repo-path";
|
||||||
|
public bool OmitEcho => false;
|
||||||
|
|
||||||
public Type ExtensionType => typeof(IActionCommandExtension);
|
public Type ExtensionType => typeof(IActionCommandExtension);
|
||||||
|
|
||||||
@@ -187,6 +176,7 @@ namespace GitHub.Runner.Worker
|
|||||||
public sealed class SetEnvCommandExtension : RunnerService, IActionCommandExtension
|
public sealed class SetEnvCommandExtension : RunnerService, IActionCommandExtension
|
||||||
{
|
{
|
||||||
public string Command => "set-env";
|
public string Command => "set-env";
|
||||||
|
public bool OmitEcho => false;
|
||||||
|
|
||||||
public Type ExtensionType => typeof(IActionCommandExtension);
|
public Type ExtensionType => typeof(IActionCommandExtension);
|
||||||
|
|
||||||
@@ -211,6 +201,7 @@ namespace GitHub.Runner.Worker
|
|||||||
public sealed class SetOutputCommandExtension : RunnerService, IActionCommandExtension
|
public sealed class SetOutputCommandExtension : RunnerService, IActionCommandExtension
|
||||||
{
|
{
|
||||||
public string Command => "set-output";
|
public string Command => "set-output";
|
||||||
|
public bool OmitEcho => false;
|
||||||
|
|
||||||
public Type ExtensionType => typeof(IActionCommandExtension);
|
public Type ExtensionType => typeof(IActionCommandExtension);
|
||||||
|
|
||||||
@@ -234,6 +225,7 @@ namespace GitHub.Runner.Worker
|
|||||||
public sealed class SaveStateCommandExtension : RunnerService, IActionCommandExtension
|
public sealed class SaveStateCommandExtension : RunnerService, IActionCommandExtension
|
||||||
{
|
{
|
||||||
public string Command => "save-state";
|
public string Command => "save-state";
|
||||||
|
public bool OmitEcho => false;
|
||||||
|
|
||||||
public Type ExtensionType => typeof(IActionCommandExtension);
|
public Type ExtensionType => typeof(IActionCommandExtension);
|
||||||
|
|
||||||
@@ -257,6 +249,7 @@ namespace GitHub.Runner.Worker
|
|||||||
public sealed class AddMaskCommandExtension : RunnerService, IActionCommandExtension
|
public sealed class AddMaskCommandExtension : RunnerService, IActionCommandExtension
|
||||||
{
|
{
|
||||||
public string Command => "add-mask";
|
public string Command => "add-mask";
|
||||||
|
public bool OmitEcho => true;
|
||||||
|
|
||||||
public Type ExtensionType => typeof(IActionCommandExtension);
|
public Type ExtensionType => typeof(IActionCommandExtension);
|
||||||
|
|
||||||
@@ -268,6 +261,11 @@ namespace GitHub.Runner.Worker
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
if (context.EchoOnActionCommand)
|
||||||
|
{
|
||||||
|
context.Output($"::{Command}::***");
|
||||||
|
}
|
||||||
|
|
||||||
HostContext.SecretMasker.AddValue(command.Data);
|
HostContext.SecretMasker.AddValue(command.Data);
|
||||||
Trace.Info($"Add new secret mask with length of {command.Data.Length}");
|
Trace.Info($"Add new secret mask with length of {command.Data.Length}");
|
||||||
}
|
}
|
||||||
@@ -277,6 +275,7 @@ namespace GitHub.Runner.Worker
|
|||||||
public sealed class AddPathCommandExtension : RunnerService, IActionCommandExtension
|
public sealed class AddPathCommandExtension : RunnerService, IActionCommandExtension
|
||||||
{
|
{
|
||||||
public string Command => "add-path";
|
public string Command => "add-path";
|
||||||
|
public bool OmitEcho => false;
|
||||||
|
|
||||||
public Type ExtensionType => typeof(IActionCommandExtension);
|
public Type ExtensionType => typeof(IActionCommandExtension);
|
||||||
|
|
||||||
@@ -291,6 +290,7 @@ namespace GitHub.Runner.Worker
|
|||||||
public sealed class AddMatcherCommandExtension : RunnerService, IActionCommandExtension
|
public sealed class AddMatcherCommandExtension : RunnerService, IActionCommandExtension
|
||||||
{
|
{
|
||||||
public string Command => "add-matcher";
|
public string Command => "add-matcher";
|
||||||
|
public bool OmitEcho => false;
|
||||||
|
|
||||||
public Type ExtensionType => typeof(IActionCommandExtension);
|
public Type ExtensionType => typeof(IActionCommandExtension);
|
||||||
|
|
||||||
@@ -337,6 +337,7 @@ namespace GitHub.Runner.Worker
|
|||||||
public sealed class RemoveMatcherCommandExtension : RunnerService, IActionCommandExtension
|
public sealed class RemoveMatcherCommandExtension : RunnerService, IActionCommandExtension
|
||||||
{
|
{
|
||||||
public string Command => "remove-matcher";
|
public string Command => "remove-matcher";
|
||||||
|
public bool OmitEcho => false;
|
||||||
|
|
||||||
public Type ExtensionType => typeof(IActionCommandExtension);
|
public Type ExtensionType => typeof(IActionCommandExtension);
|
||||||
|
|
||||||
@@ -404,6 +405,7 @@ namespace GitHub.Runner.Worker
|
|||||||
public sealed class DebugCommandExtension : RunnerService, IActionCommandExtension
|
public sealed class DebugCommandExtension : RunnerService, IActionCommandExtension
|
||||||
{
|
{
|
||||||
public string Command => "debug";
|
public string Command => "debug";
|
||||||
|
public bool OmitEcho => true;
|
||||||
|
|
||||||
public Type ExtensionType => typeof(IActionCommandExtension);
|
public Type ExtensionType => typeof(IActionCommandExtension);
|
||||||
|
|
||||||
@@ -431,6 +433,7 @@ namespace GitHub.Runner.Worker
|
|||||||
{
|
{
|
||||||
public abstract IssueType Type { get; }
|
public abstract IssueType Type { get; }
|
||||||
public abstract string Command { get; }
|
public abstract string Command { get; }
|
||||||
|
public bool OmitEcho => true;
|
||||||
|
|
||||||
public Type ExtensionType => typeof(IActionCommandExtension);
|
public Type ExtensionType => typeof(IActionCommandExtension);
|
||||||
|
|
||||||
@@ -510,6 +513,8 @@ namespace GitHub.Runner.Worker
|
|||||||
public abstract class GroupingCommandExtension : RunnerService, IActionCommandExtension
|
public abstract class GroupingCommandExtension : RunnerService, IActionCommandExtension
|
||||||
{
|
{
|
||||||
public abstract string Command { get; }
|
public abstract string Command { get; }
|
||||||
|
public bool OmitEcho => false;
|
||||||
|
|
||||||
public Type ExtensionType => typeof(IActionCommandExtension);
|
public Type ExtensionType => typeof(IActionCommandExtension);
|
||||||
|
|
||||||
public void ProcessCommand(IExecutionContext context, string line, ActionCommand command)
|
public void ProcessCommand(IExecutionContext context, string line, ActionCommand command)
|
||||||
@@ -522,6 +527,7 @@ namespace GitHub.Runner.Worker
|
|||||||
public sealed class EchoCommandExtension : RunnerService, IActionCommandExtension
|
public sealed class EchoCommandExtension : RunnerService, IActionCommandExtension
|
||||||
{
|
{
|
||||||
public string Command => "echo";
|
public string Command => "echo";
|
||||||
|
public bool OmitEcho => false;
|
||||||
|
|
||||||
public Type ExtensionType => typeof(IActionCommandExtension);
|
public Type ExtensionType => typeof(IActionCommandExtension);
|
||||||
|
|
||||||
|
|||||||
@@ -94,7 +94,21 @@ namespace GitHub.Runner.Worker
|
|||||||
{
|
{
|
||||||
postDisplayName = $"Post {this.DisplayName}";
|
postDisplayName = $"Post {this.DisplayName}";
|
||||||
}
|
}
|
||||||
ExecutionContext.RegisterPostJobAction(postDisplayName, handlerData.CleanupCondition, Action);
|
|
||||||
|
var repositoryReference = Action.Reference as RepositoryPathReference;
|
||||||
|
var pathString = string.IsNullOrEmpty(repositoryReference.Path) ? string.Empty : $"/{repositoryReference.Path}";
|
||||||
|
var repoString = string.IsNullOrEmpty(repositoryReference.Ref) ? $"{repositoryReference.Name}{pathString}" :
|
||||||
|
$"{repositoryReference.Name}{pathString}@{repositoryReference.Ref}";
|
||||||
|
|
||||||
|
ExecutionContext.Debug($"Register post job cleanup for action: {repoString}");
|
||||||
|
|
||||||
|
var actionRunner = HostContext.CreateService<IActionRunner>();
|
||||||
|
actionRunner.Action = Action;
|
||||||
|
actionRunner.Stage = ActionRunStage.Post;
|
||||||
|
actionRunner.Condition = handlerData.CleanupCondition;
|
||||||
|
actionRunner.DisplayName = postDisplayName;
|
||||||
|
|
||||||
|
ExecutionContext.RegisterPostJobStep($"{actionRunner.Action.Name}_post", actionRunner);
|
||||||
}
|
}
|
||||||
|
|
||||||
IStepHost stepHost = HostContext.CreateService<IDefaultStepHost>();
|
IStepHost stepHost = HostContext.CreateService<IDefaultStepHost>();
|
||||||
|
|||||||
@@ -11,6 +11,7 @@ using GitHub.Runner.Common;
|
|||||||
using GitHub.Runner.Sdk;
|
using GitHub.Runner.Sdk;
|
||||||
using GitHub.DistributedTask.Pipelines.ContextData;
|
using GitHub.DistributedTask.Pipelines.ContextData;
|
||||||
using Microsoft.Win32;
|
using Microsoft.Win32;
|
||||||
|
using GitHub.DistributedTask.Pipelines.ObjectTemplating;
|
||||||
|
|
||||||
namespace GitHub.Runner.Worker
|
namespace GitHub.Runner.Worker
|
||||||
{
|
{
|
||||||
@@ -38,6 +39,14 @@ namespace GitHub.Runner.Worker
|
|||||||
List<ContainerInfo> containers = data as List<ContainerInfo>;
|
List<ContainerInfo> containers = data as List<ContainerInfo>;
|
||||||
ArgUtil.NotNull(containers, nameof(containers));
|
ArgUtil.NotNull(containers, nameof(containers));
|
||||||
|
|
||||||
|
var postJobStep = new JobExtensionRunner(runAsync: this.StopContainersAsync,
|
||||||
|
condition: $"{PipelineTemplateConstants.Always}()",
|
||||||
|
displayName: "Stop containers",
|
||||||
|
data: data);
|
||||||
|
|
||||||
|
executionContext.Debug($"Register post job cleanup for stoping/deleting containers.");
|
||||||
|
executionContext.RegisterPostJobStep(nameof(StopContainersAsync), postJobStep);
|
||||||
|
|
||||||
// Check whether we are inside a container.
|
// Check whether we are inside a container.
|
||||||
// Our container feature requires to map working directory from host to the container.
|
// Our container feature requires to map working directory from host to the container.
|
||||||
// If we are already inside a container, we will not able to find out the real working direcotry path on the host.
|
// If we are already inside a container, we will not able to find out the real working direcotry path on the host.
|
||||||
|
|||||||
@@ -98,7 +98,7 @@ namespace GitHub.Runner.Worker
|
|||||||
|
|
||||||
// others
|
// others
|
||||||
void ForceTaskComplete();
|
void ForceTaskComplete();
|
||||||
void RegisterPostJobAction(string displayName, string condition, Pipelines.ActionStep action);
|
void RegisterPostJobStep(string refName, IStep step);
|
||||||
}
|
}
|
||||||
|
|
||||||
public sealed class ExecutionContext : RunnerService, IExecutionContext
|
public sealed class ExecutionContext : RunnerService, IExecutionContext
|
||||||
@@ -240,27 +240,10 @@ namespace GitHub.Runner.Worker
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
public void RegisterPostJobAction(string displayName, string condition, Pipelines.ActionStep action)
|
public void RegisterPostJobStep(string refName, IStep step)
|
||||||
{
|
{
|
||||||
if (action.Reference.Type != ActionSourceType.Repository)
|
step.ExecutionContext = Root.CreatePostChild(step.DisplayName, refName, IntraActionState);
|
||||||
{
|
Root.PostJobSteps.Push(step);
|
||||||
throw new NotSupportedException("Only action that has `action.yml` can define post job execution.");
|
|
||||||
}
|
|
||||||
|
|
||||||
var repositoryReference = action.Reference as RepositoryPathReference;
|
|
||||||
var pathString = string.IsNullOrEmpty(repositoryReference.Path) ? string.Empty : $"/{repositoryReference.Path}";
|
|
||||||
var repoString = string.IsNullOrEmpty(repositoryReference.Ref) ? $"{repositoryReference.Name}{pathString}" :
|
|
||||||
$"{repositoryReference.Name}{pathString}@{repositoryReference.Ref}";
|
|
||||||
|
|
||||||
this.Debug($"Register post job cleanup for action: {repoString}");
|
|
||||||
|
|
||||||
var actionRunner = HostContext.CreateService<IActionRunner>();
|
|
||||||
actionRunner.Action = action;
|
|
||||||
actionRunner.Stage = ActionRunStage.Post;
|
|
||||||
actionRunner.Condition = condition;
|
|
||||||
actionRunner.DisplayName = displayName;
|
|
||||||
actionRunner.ExecutionContext = Root.CreatePostChild(displayName, $"{actionRunner.Action.Name}_post", IntraActionState);
|
|
||||||
Root.PostJobSteps.Push(actionRunner);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public IExecutionContext CreateChild(Guid recordId, string displayName, string refName, string scopeName, string contextName, Dictionary<string, string> intraActionState = null, int? recordOrder = null)
|
public IExecutionContext CreateChild(Guid recordId, string displayName, string refName, string scopeName, string contextName, Dictionary<string, string> intraActionState = null, int? recordOrder = null)
|
||||||
|
|||||||
@@ -110,9 +110,7 @@ namespace GitHub.Runner.Worker
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// Build up 3 lists of steps, pre-job, job, post-job
|
// Build up 2 lists of steps, pre-job, job
|
||||||
var postJobStepsBuilder = new Stack<IStep>();
|
|
||||||
|
|
||||||
// Download actions not already in the cache
|
// Download actions not already in the cache
|
||||||
Trace.Info("Downloading actions");
|
Trace.Info("Downloading actions");
|
||||||
var actionManager = HostContext.GetService<IActionManager>();
|
var actionManager = HostContext.GetService<IActionManager>();
|
||||||
@@ -134,10 +132,6 @@ namespace GitHub.Runner.Worker
|
|||||||
condition: $"{PipelineTemplateConstants.Success}()",
|
condition: $"{PipelineTemplateConstants.Success}()",
|
||||||
displayName: "Initialize containers",
|
displayName: "Initialize containers",
|
||||||
data: (object)containers));
|
data: (object)containers));
|
||||||
postJobStepsBuilder.Push(new JobExtensionRunner(runAsync: containerProvider.StopContainersAsync,
|
|
||||||
condition: $"{PipelineTemplateConstants.Always}()",
|
|
||||||
displayName: "Stop containers",
|
|
||||||
data: (object)containers));
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// Add action steps
|
// Add action steps
|
||||||
@@ -187,33 +181,9 @@ namespace GitHub.Runner.Worker
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// Add post-job steps
|
|
||||||
Trace.Info("Adding post-job steps");
|
|
||||||
while (postJobStepsBuilder.Count > 0)
|
|
||||||
{
|
|
||||||
postJobSteps.Add(postJobStepsBuilder.Pop());
|
|
||||||
}
|
|
||||||
|
|
||||||
// Create execution context for post-job steps
|
|
||||||
foreach (var step in postJobSteps)
|
|
||||||
{
|
|
||||||
if (step is JobExtensionRunner)
|
|
||||||
{
|
|
||||||
JobExtensionRunner extensionStep = step as JobExtensionRunner;
|
|
||||||
ArgUtil.NotNull(extensionStep, extensionStep.DisplayName);
|
|
||||||
Guid stepId = Guid.NewGuid();
|
|
||||||
extensionStep.ExecutionContext = jobContext.CreateChild(stepId, extensionStep.DisplayName, stepId.ToString("N"), null, null);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
List<IStep> steps = new List<IStep>();
|
List<IStep> steps = new List<IStep>();
|
||||||
steps.AddRange(preJobSteps);
|
steps.AddRange(preJobSteps);
|
||||||
steps.AddRange(jobSteps);
|
steps.AddRange(jobSteps);
|
||||||
steps.AddRange(postJobSteps);
|
|
||||||
|
|
||||||
// Start agent log plugin host process
|
|
||||||
// var logPlugin = HostContext.GetService<IAgentLogPlugin>();
|
|
||||||
// await logPlugin.StartAsync(context, steps, jobContext.CancellationToken);
|
|
||||||
|
|
||||||
// Prepare for orphan process cleanup
|
// Prepare for orphan process cleanup
|
||||||
_processCleanup = jobContext.Variables.GetBoolean("process.clean") ?? true;
|
_processCleanup = jobContext.Variables.GetBoolean("process.clean") ?? true;
|
||||||
|
|||||||
@@ -206,8 +206,22 @@ namespace GitHub.Runner.Common.Tests.Worker
|
|||||||
var action2 = jobContext.CreateChild(Guid.NewGuid(), "action_2", "action_2", null, null);
|
var action2 = jobContext.CreateChild(Guid.NewGuid(), "action_2", "action_2", null, null);
|
||||||
action2.IntraActionState["state"] = "2";
|
action2.IntraActionState["state"] = "2";
|
||||||
|
|
||||||
action1.RegisterPostJobAction("post1", "always()", new Pipelines.ActionStep() { Name = "post1", DisplayName = "Test 1", Reference = new Pipelines.RepositoryPathReference() { Name = "actions/action" } });
|
|
||||||
action2.RegisterPostJobAction("post2", "always()", new Pipelines.ActionStep() { Name = "post2", DisplayName = "Test 2", Reference = new Pipelines.RepositoryPathReference() { Name = "actions/action" } });
|
var postRunner1 = hc.CreateService<IActionRunner>();
|
||||||
|
postRunner1.Action = new Pipelines.ActionStep() { Name = "post1", DisplayName = "Test 1", Reference = new Pipelines.RepositoryPathReference() { Name = "actions/action" } };
|
||||||
|
postRunner1.Stage = ActionRunStage.Post;
|
||||||
|
postRunner1.Condition = "always()";
|
||||||
|
postRunner1.DisplayName = "post1";
|
||||||
|
|
||||||
|
|
||||||
|
var postRunner2 = hc.CreateService<IActionRunner>();
|
||||||
|
postRunner2.Action = new Pipelines.ActionStep() { Name = "post2", DisplayName = "Test 2", Reference = new Pipelines.RepositoryPathReference() { Name = "actions/action" } };
|
||||||
|
postRunner2.Stage = ActionRunStage.Post;
|
||||||
|
postRunner2.Condition = "always()";
|
||||||
|
postRunner2.DisplayName = "post2";
|
||||||
|
|
||||||
|
action1.RegisterPostJobStep("post1", postRunner1);
|
||||||
|
action2.RegisterPostJobStep("post2", postRunner2);
|
||||||
|
|
||||||
Assert.NotNull(jobContext.JobSteps);
|
Assert.NotNull(jobContext.JobSteps);
|
||||||
Assert.NotNull(jobContext.PostJobSteps);
|
Assert.NotNull(jobContext.PostJobSteps);
|
||||||
|
|||||||
@@ -1 +1 @@
|
|||||||
2.160.0
|
2.160.2
|
||||||
Reference in New Issue
Block a user