Concourse: support for 'groups' attribute

This commit is contained in:
Kris De Volder
2016-12-21 19:00:26 -08:00
parent 9fd2026b7e
commit 078bad08e4
6 changed files with 76 additions and 1 deletions

View File

@@ -172,14 +172,21 @@ public class PipelineYmlSchema implements YamlSchema {
prop(job, "plan", f.yseq(step));
YType resource_type_def = f.ybean("ResourceTypeDef",
//TODO: This way of initializing the props doesn't attach descriptions!
f.yprop("name", t_ne_string),
f.yprop("type", t_image_type),
f.yprop("source", t_any)
);
YBeanType group = f.ybean("Group");
prop(group, "name", t_ne_string);
prop(group, "resources", f.yseq(resourceName));
prop(group, "jobs", f.yseq(jobName));
prop(TOPLEVEL_TYPE, "resources", f.yseq(resource));
prop(TOPLEVEL_TYPE, "jobs", f.yseq(job));
prop(TOPLEVEL_TYPE, "resource_types", f.yseq(resource_type_def));
prop(TOPLEVEL_TYPE, "groups", f.yseq(group));
}

View File

@@ -0,0 +1 @@
*Optional.* A list of jobs that should appear in this group. A job may appear in multiple groups. Neighbours of jobs in the current group will also appear on the same page in order to give context of the location of the group in the pipeline.

View File

@@ -0,0 +1 @@
*Required.* The name of the group. This should be short and simple as it will be used as the tab name for navigation.

View File

@@ -0,0 +1 @@
*Optional.* A list of resources that should appear in this group. Resources that are inputs or outputs of jobs in the group are automatically added; they do not have to be explicitly listed here.

View File

@@ -0,0 +1,21 @@
Splitting up your pipeline into sections.
A pipeline may optionally contain a section called `groups`. As more resources and jobs are added to a pipeline it can become difficult to navigate. Pipeline groups allow you to group jobs together under a header and have them show on different tabs in the user interface. Groups have no functional effect on your pipeline.
A simple grouping for the pipeline above may look like:
groups:
- name: tests
jobs:
- controller-mysql
- controller-postgres
- worker
- integration
- name: deploy
jobs:
- deploy
This would display two tabs at the top of the home page: "tests" and "deploy". Once you have added groups to your pipeline then all jobs must be in a group otherwise they will not be visible.
For a real world example of how groups can be used to simplify navigation and provide logical grouping, see the groups used at the top of the page in the [Concourse pipeline](https://ci.concourse.ci/).