Starting framework

This commit is contained in:
Ethan Chiu
2020-07-10 14:33:12 -04:00
parent 747addfca6
commit a4cc13e36f
4 changed files with 65 additions and 48 deletions
@@ -264,14 +264,13 @@ namespace GitHub.DistributedTask.Pipelines.ObjectTemplating
return result;
}
//Note: originally was List<Step> but we need to change to List<ActionStep> to use the "Inputs" attribute
internal static List<ActionStep> ConvertToSteps(
internal static List<Step> ConvertToSteps(
TemplateContext context,
TemplateToken steps)
{
var stepsSequence = steps.AssertSequence($"job {PipelineTemplateConstants.Steps}");
var result = new List<ActionStep>();
var result = new List<Step>();
foreach (var stepsItem in stepsSequence)
{
var step = ConvertToStep(context, stepsItem);
@@ -287,7 +286,7 @@ namespace GitHub.DistributedTask.Pipelines.ObjectTemplating
return result;
}
private static ActionStep ConvertToStep(
private static Step ConvertToStep(
TemplateContext context,
TemplateToken stepsItem)
{
@@ -159,11 +159,11 @@ namespace GitHub.DistributedTask.Pipelines.ObjectTemplating
return result;
}
// Change to return a variety of steps.
public List<ActionStep> LoadCompositeSteps(
// TODO: Change to return a variety of steps.
public List<Step> LoadCompositeSteps(
TemplateToken token)
{
var result = default(List<ActionStep>);
var result = default(List<Step>);
if (token != null && token.Type != TokenType.Null)
{
var context = CreateContext(null, null, setMissingContext: false);