Is the git reference exposed to the imported Travis Shared Build Configs?


I currently maintain which has several scripts that be added to a .travis.yml file, such as which is added by doing:

  - eval "$(curl -fsSL"

I am considering putting the above into a node-install.yml file that can then be imported via:

  - bevry/awesome-travis:node-install.yml@c91c9d5eef34ecb0e92029667fd5052640225fa3

However, it would be frustrating for me to have to update bevry/awesome-travis:node-install.yml on every single update with the latest commit hash.

I could omit the commit information, but that would be dangerous to the stability of people’s CI builds.

It would be nice if merging provided an environment variable that is replaced on merge, something like:

  - eval "$(curl -fsSL$TRAVIS_CONFIG_REFERENCE/scripts/node-install.bash)"

Such that doing

  - bevry/awesome-travis:node-install.yml@c91c9d5eef34ecb0e92029667fd5052640225fa3

Replaces $TRAVIS_CONFIG_REFERENCE with c91c9d5eef34ecb0e92029667fd5052640225fa3 on merge.


  - bevry/awesome-travis:node-install.yml@master

Replaces $TRAVIS_CONFIG_REFERENCE with master on merge.

Not a good idea. Because you can’t import parts of a list section, only insert or replace it in full – and such a command is likely to be only a part of an install/script section’s logic.

1 Like