Skip to content

Commit

Permalink
[vscode-concourse] Add team attribute to set_pipiline step
Browse files Browse the repository at this point in the history
  • Loading branch information
BoykoAlex committed Jan 25, 2024
1 parent d845ef5 commit 48fcde8
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 2 deletions.
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*******************************************************************************
* Copyright (c) 2016, 2023 Pivotal, Inc.
* Copyright (c) 2016, 2024 Pivotal, Inc.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
Expand Down Expand Up @@ -406,6 +406,7 @@ public PipelineYmlSchema(ConcourseModel models, GithubInfoProvider github) {
addProp(setPipelineStep, "instance_vars", t_params);
addProp(setPipelineStep, "vars", t_params);
addProp(setPipelineStep, "var_files", t_strings);
addProp(setPipelineStep, "team", t_ne_string);

YBeanType loadVarStep = f.ybean("LoadVarStep");
addProp(loadVarStep, "load_var", t_identifier);
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
*Optional* By default, the `set_pipeline` step sets the pipeline for the same **team** that is running the build.

The `team` attribute can be used to specify another team.

Only the `main` **team** is allowed to set another team's pipeline. Any `team` other than the `main` **team** using the team attribute will error, unless they reference their own team.
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*******************************************************************************
* Copyright (c) 2016, 2023 Pivotal, Inc.
* Copyright (c) 2016, 2024 Pivotal, Inc.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
Expand Down Expand Up @@ -672,13 +672,15 @@ void setPipelineStepHovers() throws Exception {
" var_files:\n" +
" - my-repo/ci/dev.yml\n" +
" vars:\n" +
" team: my-team\n" +
" text: \"Hello World!\"\n"
);

editor.assertHoverContains("file", "The path to the pipeline's configuration file.");
editor.assertHoverContains("instance_vars", "A map of instance vars used to identify");
editor.assertHoverContains("var_files", "files that will be passed to the pipeline config in the same manner as the --load-vars-from flag");
editor.assertHoverContains("vars", 2, "A map of template variables to pass to the pipeline config.");
editor.assertHoverContains("team", "By default, the `set_pipeline` step sets the pipeline for the same **team** that is running the build");
}

@Test
Expand Down

0 comments on commit 48fcde8

Please sign in to comment.