I'm trying to print some information using echo in my .travis.yml file, but I don't see anything in the log.
My .travis.yml file:
before_install:
- echo $TRAVIS_COMMIT
- echo $TRAVIS_TAG
- echo $TRAVIS_BRANCH
- echo $TRAVIS_BUILD_NUMBER
- echo $TRAVIS_REPO_SLUG
My output:

Travis CI collapses the output for each phase except for the script phase.
If you print to the console with echo in the script phase, your output will be displayed.
If you print to the console in any other phase, you will need to expand the output for that phase to see your content.
Using this .travis.yml config:
script:
- echo $TRAVIS_COMMIT
- echo $TRAVIS_TAG
- echo $TRAVIS_BRANCH
- echo $TRAVIS_BUILD_NUMBER
- echo $TRAVIS_REPO_SLUG
Yields this output:

Similarly to this SO question, you have to click the arrow on the left to see the output.
Check out this answer from the other question: 
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With