-
Notifications
You must be signed in to change notification settings - Fork 3
template formatting
Ronnie76er edited this page Sep 13, 2010
·
2 revisions
[job;1;someurl:8080;somejob]
${color lightgray} [1;fullDisplayName]
[1;result]
[1;culprit]
To start, let’s look at the simple template that is in the archive. The first line:
[job;1;someurl:8080;somejob]
Corresponds to a hudson job. You can have as many jobs as you want. The idea is to only request information from each job once, and then use their pieces to build the output.
Each part of it is separated by semicolons and wrapped in square braces:
The parts
-
job
– a keyword, any job must have the first field calledjob
-
id
– string representing the job that we will use later. In this case, it’s1
, but it could be any string in the world. -
hudson url
– The url where hudson is located. Currently set tosomeurl:8080
-
job name
– The name of the job in Hudson. Currently calledsomejob
Next are the outputs of the jobs, each surrounded in square brackets.
The parts
-
id
– the job id we defined in the jobs section. In this example, they are all @1@’s, which corresponds to the only job we’ve defined. -
field
– Corresponds to the hudson field. You can see which fields are valid on the valid fields page. -
output options
(optional) – Some fields allow output options. Otherwise, it will just print the value of the field. More details are on the valid fields page.