Env: false breaks job

When there is an env: matrix at the top level, jobs: include: get one of the env variables (the first?) in the matrix. It seems unhelpful to do this.
e.g. Lint job in https://travis-ci.org/jayvdb/moban/builds/558230993

Preventing that behaviour requires adding env: {}, as env: false causes the job to be broken.
e.g. https://travis-ci.org/jayvdb/moban/builds/558316189
foo: false works for everything else.

c.f. https://github.com/travis-ci/docs-travis-ci-com/issues/2422 for install: true in the docs, when install: false would be better.

false is a boolean while env: is supposed to be a list (or a string).

You can specify an empty env: to inhibit inheritance.


As to why include: jobs inherit the first entry of the build matrix, that’s something only @BanzaiMan or someone else from Travis staff can answer.

As you point out, env is a matrix axis which will be expanded to create a set of jobs to which jobs.include will add jobs. These additional jobs must also have env values set, but obviously they cannot have an array value for its env value, since it is obviously a wrong thing to do. (Not having any value might work, but I’m afraid that changing the behavior may break many existing builds at this point.)

This behavior is explained in https://docs.travis-ci.com/user/customizing-the-build/#explicitly-included-jobs-inherit-the-first-value-in-the-array

env: false not working is regrettable, though logically consistent. That being said, working around this input seems reasonable.

2 Likes
Imprint