Skip to content

Instantly share code, notes, and snippets.

@craigiswayne
Created June 8, 2018 12:44
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save craigiswayne/d639b89cec0014a434838504bb114b2c to your computer and use it in GitHub Desktop.
Save craigiswayne/d639b89cec0014a434838504bb114b2c to your computer and use it in GitHub Desktop.
How i tried to test my Travis Build Locally (for PHP)

How i tried to test my Travis Build Locally (for PHP)

TLDR; didn't work

docker run --name travis-debug -dit travisci/ci-garnet:packer-1512502276-986baf0 /sbin/init
docker exec -it travis-debug bash -l

From inside the docker container

su - travis
cd ~/builds
git clone https://github.com/travis-ci/travis-build.git
gem install travis bundler
travis version
ln -s ~/builds/travis-build ~/.travis/travis-build
bundle install --gemfile ~/.travis/travis-build/Gemfile
cd ~/builds/travis-build
bundler binstubs travis
cd ~/builds
git clone https://github.com/username/repo-name.git
cd repo-name
~/.travis/travis-build/bin/travis compile > ci.sh
bash ci.sh

Result:

There was an error in the .travis.yml file from which we could not recover.

Unfortunately, we do not know much about this error.

Please review https://docs.travis-ci.com
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment