I’m on Travis Enterprise and I want to conditionally run some jobs depending on the kind of build, in particular, I want to include additional jobs when the event that triggers the CI is the push of a tag.
Looking at the documentation (here about env variables and here about conditions), I was able to do that by using a condition like:
if: tag IS present
and it works fine, but I would like to define a new environment variable like IS_BUILDING_A_TAG
that is true
when building a tag and false
otherwise so that I could rewrite the previous condition like:
if: env(IS_BUILDING_A_TAG)
I tried with:
env:
- BUILDING_A_TAG=tag IS present
but I get the error invalid env var
on Travis. Can’t find any docs on this. @Montana, any clue?