Skip to content

Instantly share code, notes, and snippets.

@daveed
Last active June 19, 2018 02:32
Show Gist options
  • Save daveed/781e79a7b3df426ee44d4f887da7bbe6 to your computer and use it in GitHub Desktop.
Save daveed/781e79a7b3df426ee44d4f887da7bbe6 to your computer and use it in GitHub Desktop.

How to run your Travis CI Elixir builds locally with Docker

Make sure you have Docker installed.

Pull the Travis Erlang image docker run --name travis-debug -dit travisci/ci-erlang:packer-1494865151 /sbin/init

Execute the container docker exec -it travis-debug -u travis bash -l

Upgrade Ruby

rvm install 2.3.0
rvm use 2.3.0

Install Travis build

cd ~/builds
git clone https://github.com/travis-ci/travis-build.git
cd travis-build
gem install bundler
gem install travis
travis
bundle install
bundler add travis
bundler binstubs travis
ln -s `pwd` ~/.travis/travis-build

Add your SSH key to GitHub

ssh-keygen -t rsa -b 4096 -C "your-github-email@example.com"
cat ~/.ssh/id_rsa.pub

Pull the git repository

cd ~/builds
git clone --depth=50 --branch=cb/execute_async https://github.com/carl-al/wallaby.git
cd wallaby

Convert the .travis.yml to shell script

~/.travis/travis-build/bin/travis compile > travis.sh

Run it

./travis.sh

Note: Elixir seems to not be supported at the moment and the compilation to shell script currently breaks as elixir is considered an illegal value for the key language.


sources

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment