Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How do I get Travis' build working directory in .travis.yml?

Tags:

travis-ci

When working with the .travis.yml, is there an environment variable that contains the name of the current build directory in Travis-CI? Looking through the docs here I don't see one.

like image 850
emmby Avatar asked Dec 22 '12 21:12

emmby


People also ask

What is Travis_build_dir?

2. Yes, sorry, my answer may not have been totally clear on that: $TRAVIS_BUILD_DIR is the directory that contains your checked-out code (i.e. $TRAVIS_BUILD_DIR/. git exists), and is the working directory when your commands start to run.

What is Travis Yml file?

travis. yml , which is a YAML format text file, to the root directory of the repository. This file specifies the programming language used, the desired building and testing environment (including dependencies which must be installed before the software can be built and tested), and various other parameters.


1 Answers

You probably want $TRAVIS_BUILD_DIR, which is the directory we clone the repository to and cd into afterwards, before running your tests.

like image 180
sarahhodne Avatar answered Sep 26 '22 02:09

sarahhodne