Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -284,7 +284,7 @@ public PipelineYmlSchema(ConcourseModel models, GithubInfoProvider github) {
addProp(task, "caches", f.yseq(cache));
addProp(task, "outputs", f.yseq(t_output));
addProp(task, "run", t_command).isRequired(true);
addProp(task, "params", t_string_params);
addProp(task, "params", t_params);
task.require(Constraints.schemaContextAware((DynamicSchemaContext dc) -> {
LanguageId languageId = dc.getDocument().getLanguageId();
if (LanguageId.CONCOURSE_PIPELINE.equals(languageId)) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -495,7 +495,7 @@ public void taskStepHovers() throws Exception {
editor.assertHoverContains("tags", "Any step can be directed at a pool of workers");
editor.assertHoverContains("timeout", "amount of time to limit the step's execution");
}

@Test
public void taskVarsReconcile() throws Exception {
Editor editor;
Expand Down Expand Up @@ -3441,6 +3441,34 @@ public void gotoResourceTypeDefinition() throws Exception {
);
}

@Test
public void taskWithYamlParams() throws Exception {
Editor editor;

editor = harness.newEditor(LanguageId.CONCOURSE_TASK,
"---\n" +
"platform: linux\n" +
"image_resource:\n" +
" type: docker-image\n" +
" source:\n" +
" repository: czero/platform-automation\n" +
"params:\n" +
" DEBUG: false\n" +
" VCENTER_URL: \n" +
" VCENTER_INSECURE: true\n" +
" NODE_COUNT: 4\n" +
" IDRAC_IPS:\n" +
" - 1.1.1.1\n" +
" - 2.2.2.2\n" +
"inputs:\n" +
" - name: pipeline\n" +
"run:\n" +
" path: pipeline/tasks/re-image-hosts/task.sh\n"

);
editor.assertProblems(/*NONE*/);
}

@Test public void reconcileTaskFileToplevelProperties() throws Exception {
Editor editor;

Expand Down