mirror of
https://github.com/Luzifer/github-masswatch.git
synced 2024-12-22 19:11:17 +00:00
Added solution for Jenkins build with Docker container
This commit is contained in:
parent
f1fb340e11
commit
d622fa5d3d
1 changed files with 20 additions and 0 deletions
20
README.md
20
README.md
|
@ -44,3 +44,23 @@ Luzifer/alfred-pwdgen
|
||||||
Subscribing to Luzifer/alfred-fold...
|
Subscribing to Luzifer/alfred-fold...
|
||||||
Subscribing to Luzifer/alfred-pwdgen...
|
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.
|
||||||
|
|
Loading…
Reference in a new issue