Just a quick post to alert you all to a new minor release of Bamboo Server.
Bamboo Server 6.9.0
See Bamboo Server 6.9.0 release notes for more information on this minor release.
Released on May 23, 2019
Just a quick post to alert you all to a new minor release of Bamboo Server.
Bamboo Server 6.9.0
See Bamboo Server 6.9.0 release notes for more information on this minor release.
Released on May 23, 2019
Hi, the release notes are looking pretty good especially the YAML version 2 is highly appreciated!
One question - is it with the new yaml finally to build multiple variants of the same job? In our case we have large code base with all variants in it which are selected at compile time e.g. VARIANT=101 but beside this with the same build instruction. I can generate the yaml files via an external script Bitburg would be good if this is an supported feature.
Thanks and have a nice evening!
Best regards
Oliver
Hello @oliver.zabel! Thanks for reaching out!
Yes, it is possible to build multiple variants of the same job. From your comment I did not quite get how is your idea of selecting the variant at compile time, but I can give you an example of how can it look like in the Specs YAML 2.0.
You may create as many files as you want with different job variants:
# job-variant-101.yaml
tasks:
# All the tasks for this job
# Some more configuration for the job
And on the bamboo.yaml
file you would use them via the new !include
tag:
---
version: 2
plan:
project-key: SATURN
key: ST
name: Work plan
stages:
-
Primary:
- The building job
The building job: !include job-variant-101.yaml
With this, your The building job
would include the definitions from the job-variant-101.yaml
.
Does it help you?
Hi, thank you for your reply! i was looking like have a list in the yaml-file like a variable
Ok, so you need these three variants to be run or not? What would this script do?
Hi,
at the moment we have one job, which builds all variants. The build script loops through it and reports in the log which variant failed (if any). This works, but don’t like it really. So my idea was to have this kind of variable which i need to adjust in case of a new variant and then all variants would be build in its on job, so that i can see exactly which variant failed without looking into the log-file.
A sample script which i have in mind could use your approche and just add a new file and add it to the bamboo.yaml
The building job: !include job-variant-101.yaml
---
The building job: !include job-variant-102.yaml
...
With my idea of a variable it could look like:
- variants: [101, 102, 103]
stages:
-
Primary:
- The building job !each:variants
something like that.
Thank you!
Oh I see!
So maybe this would help you think about it:
---
version: 2
# ... Plan definitions
stages:
-
# Add your new jobs here
Primary: [101, 102, 103, XYZ]
# Add a new line here
XYZ: !include job-variant-XYZ.yaml
101: !include job-variant-101.yaml
102: !include job-variant-102.yaml
103: !include job-variant-103.yaml
It would not be as straightforward as simply adding a new number of variant, as you also need to include the line including it, but it would get away from your script (or any other custom solution). What do you think? Tell me if that will work for you
Hi, thanks! i will give it a try and give feedback!