Build config validation: does not cascade environment variables to jobs

Prior to using build config validation, this config successfully passed the environment variable defined at the upper scope to the included'd jobs. Relevant sections of the config:

env: DEBUG=True
jobs:
  include:
   - name: "Unit tests"
     ... # build logs here would show export DEBUG=True
   - name: "Integration tests"
     ... # build logs here would show export DEBUG=True

However, when I turned enable build config validation, this is no longer case. https://travis-ci.org/UAlbertaALTLab/cree-intelligent-dictionary/jobs/613683467#L210

Is this a bug in the new config validation, or a bug in my .travis.yml?

I am also facing the same issuse.Variables are not getting resolved.
I have configured RELEASE_TAG in the travis.yml as .
env:

  • RELEASE_TAG=“release-$TRAVIS_BUILD_NUMBER”

But still the value is not resolved in $ git tag -f $RELEASE_TAG. If I hardcode the value for $RELEASE_TAG its working fine.

https://travis-ci.org/Rijosam/pal-tracker-distributed/jobs/613624388

Hello, there.

I believe


should fix this issue. Please try again (a new build, not a re-run), and report the results.

Thank you.

Is this a bug in the new config validation, or a bug in my .travis.yml ?

In a way, both :smiley:

According to our documentation, as the intention is not to expand the rows in env into a separate job in the matrix, but set these env vars to all jobs, this would be the right way to specify this:

env:
  global: DEBUG=True

However, our system has forever had an oddity (or bug, depending how you view it) that picked the first variable from env into each job specified in jobs.include. For other matrix expansion keys, such as os or language runtime versions (e.g. rvm, node_js etc) this makes sense, but not for env.

This oddity has indeed not been ported to the component that now runs the Build Config Validation feature due to an oversight, and so clearly, this was also a bug in our system, too.

Sorry for the inconvenience.

Yep, that fixed it! https://travis-ci.org/UAlbertaALTLab/cree-intelligent-dictionary/builds/614217325

Thanks, Sven! I understand the issue now. I appreciate the quick fix, but I appreciate even more knowing to correct way to propagate envvars to all jobs. :smiley:

This is working correctly on this build: https://travis-ci.org/UAlbertaALTLab/cree-intelligent-dictionary/builds/614220613

2 Likes