git - Travis CI running on Docker Image - Switch to last comited branch -
i'm working on operating systems, , want use travis ci continuous integration. basically, os can perform bunch of kernel tests on boot, , want them run @ every push.
however, setup environment bit complex, , i'm using docker image want application run on docker image, tavis ci's example doing: https://docs.travis-ci.com/user/docker/
as can see in dockefile of example: https://github.com/travis-ci/docker-sinatra/blob/master/dockerfile , repo clonned inside image, , soin travis ci's configuration file (https://github.com/travis-ci/docker-sinatra/blob/master/.travis.yml), have run "make".
this easy because project single branch project, me want tests operated lastest comitted branch (the 1 triggered travis's build).
which solution think can use this? using environment variables on travis ci pass docker image , checkout branch passed parameter? there not more "classy options"?
i think both docker file , .travis.yml files not necessary there wip. thank you.
to branch last committed can use shell script this:
git branch --sort=-committerdate | awk -f " " /*/'{print $2}'
the awk
command cleaning output branch
command branch name returned.
you can use result of above git checkout
switch last updated branch before make
command.
Comments
Post a Comment