I have a GitLab CI runner that runs every time I push the code in my branch. The problem is that I use npm + bower for all the dependencies that I need, but I do not want to download all the dependencies for each test: this is a waste of network and time.
So, I came up with this script. Does it make sense?
touch ~/.bash_profile npm config set prefix ~/npm export PATH="~/npm/bin:$PATH" source ~/.bash_profile npm install rm -f ~/bower/bower.json cp bower.json ~/bower pushd ~/bower bower update bower install popd mkdir bower_components cp -r ~/bower/bower_components bower_components grunt test
Anyway, the problem that I encountered always comes with a timeout with a gazebo:
bower angular-cookies#1.2.16 ECMDERR Failed to execute "git ls-remote --tags --heads git://github.com/angular/bower-angular-cookies.git", exit code of #128 fatal: unable to connect to github.com: github.com[0: 192.30.252.128]: errno=Connection timed out
Also, it did not finish once, so I am not sure, but it seems that it re-downloads all the packages every time.
I tried to search the net but didn’t find anything. Is there a way to achieve what I'm trying to achieve? (Also with a completely different strategy. I also have ssh access for the runner)
source share