1
0
Fork 0
mirror of https://github.com/Luzifer/github-masswatch.git synced 2024-12-22 11:01:16 +00:00

Added solution for Jenkins build with Docker container

This commit is contained in:
Knut Ahlers 2015-06-03 23:59:00 +02:00
parent f1fb340e11
commit d622fa5d3d

View file

@ -44,3 +44,23 @@ Luzifer/alfred-pwdgen
Subscribing to Luzifer/alfred-fold...
Subscribing to Luzifer/alfred-pwdgen...
```
## Advanced: Auto-Watch repos using Jenkins
Given you have a running Jenkins instance you either can let it clone this repository and put your watch commands into the build-script or if your Jenkins does not understand Ruby but is able to execute Docker containers you could use this script to auto-watch repositories:
```bash
#!/bin/bash
GHTOKEN=<mytoken>
echo "cd /scripts/" > ./build.sh
echo "bundle install" >> ./build.sh
echo "bundle exec ruby watch.rb watch '^YourOrg/someprefix' --token=$GHTOKEN" >> ./build.sh
echo "bundle exec ruby watch.rb watch '^Luzifer/' --token=$GHTOKEN" >> ./build.sh
docker pull ruby:2.1
docker run --rm -v ${PWD}:/scripts ruby:2.1 bash /scripts/build.sh
```
For this you also let Jenkins clone this repository and then put that script into the build commands. The tool will now run in a ruby container which is disposed afterwards.