Skip to content

Commit b68bf48

Browse files
authored
Merge pull request #387 from z4ce/master
Fix concourse task schema
2 parents 180b48c + d6ed8c6 commit b68bf48

File tree

2 files changed

+30
-2
lines changed

2 files changed

+30
-2
lines changed

headless-services/concourse-language-server/src/main/java/org/springframework/ide/vscode/concourse/PipelineYmlSchema.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -284,7 +284,7 @@ public PipelineYmlSchema(ConcourseModel models, GithubInfoProvider github) {
284284
addProp(task, "caches", f.yseq(cache));
285285
addProp(task, "outputs", f.yseq(t_output));
286286
addProp(task, "run", t_command).isRequired(true);
287-
addProp(task, "params", t_string_params);
287+
addProp(task, "params", t_params);
288288
task.require(Constraints.schemaContextAware((DynamicSchemaContext dc) -> {
289289
LanguageId languageId = dc.getDocument().getLanguageId();
290290
if (LanguageId.CONCOURSE_PIPELINE.equals(languageId)) {

headless-services/concourse-language-server/src/test/java/org/springframework/ide/vscode/concourse/ConcourseEditorTest.java

Lines changed: 29 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -495,7 +495,7 @@ public void taskStepHovers() throws Exception {
495495
editor.assertHoverContains("tags", "Any step can be directed at a pool of workers");
496496
editor.assertHoverContains("timeout", "amount of time to limit the step's execution");
497497
}
498-
498+
499499
@Test
500500
public void taskVarsReconcile() throws Exception {
501501
Editor editor;
@@ -3485,6 +3485,34 @@ public void gotoResourceTypeDefinition() throws Exception {
34853485
);
34863486
}
34873487

3488+
@Test
3489+
public void taskWithYamlParams() throws Exception {
3490+
Editor editor;
3491+
3492+
editor = harness.newEditor(LanguageId.CONCOURSE_TASK,
3493+
"---\n" +
3494+
"platform: linux\n" +
3495+
"image_resource:\n" +
3496+
" type: docker-image\n" +
3497+
" source:\n" +
3498+
" repository: czero/platform-automation\n" +
3499+
"params:\n" +
3500+
" DEBUG: false\n" +
3501+
" VCENTER_URL: \n" +
3502+
" VCENTER_INSECURE: true\n" +
3503+
" NODE_COUNT: 4\n" +
3504+
" IDRAC_IPS:\n" +
3505+
" - 1.1.1.1\n" +
3506+
" - 2.2.2.2\n" +
3507+
"inputs:\n" +
3508+
" - name: pipeline\n" +
3509+
"run:\n" +
3510+
" path: pipeline/tasks/re-image-hosts/task.sh\n"
3511+
3512+
);
3513+
editor.assertProblems(/*NONE*/);
3514+
}
3515+
34883516
@Test public void reconcileTaskFileToplevelProperties() throws Exception {
34893517
Editor editor;
34903518

0 commit comments

Comments
 (0)