|
|
|
|
|
by 0xbadcafebee
197 days ago
|
|
For complex logic I don't rely on the CI system; I've been burned too many times. I shell out to an external program and have it return an output variable, and I just do "if $foo = y then blah" in the CI's DSL (and I keep those tests to a minimum; rather have more separate jobs than one complex job). Often I will put everything in a dedicated build tool (Make or similar) so I can run it from my laptop or CI, and any change to logic only happens in one place. It's adding an abstraction, but the end result is I write the CI job once and never touch it again. For flexibility I add parameters to the CI job. |
|
I do that too, until my complex logic belongs to the CI system and nowhere else.
As an example:
I wouldn't be able to express all this in YAML.[0] other "nightly tests" run at 1, 3, 4 etc.
[1] this is mapped in the configuration file too.
[2] this is internal to Jenkins
[3] same
[4] this involves finding the "responsible person," so a lot of API calls