Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/ongr-io/ongr-travis-tools
A tool to restart ONGR Github organisation travis CI jobs
https://github.com/ongr-io/ongr-travis-tools
Last synced: about 1 month ago
JSON representation
A tool to restart ONGR Github organisation travis CI jobs
- Host: GitHub
- URL: https://github.com/ongr-io/ongr-travis-tools
- Owner: ongr-io
- License: mit
- Created: 2015-10-15T13:15:33.000Z (about 9 years ago)
- Default Branch: master
- Last Pushed: 2016-01-13T12:56:02.000Z (almost 9 years ago)
- Last Synced: 2024-10-29T18:47:23.574Z (about 2 months ago)
- Language: Shell
- Size: 3.91 KB
- Stars: 0
- Watchers: 11
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
ongr-travis-tools
-------
The aim of this project is to restart your organization travis CI builds nightly. In case of ONGR, this is useful since symfony bundles depend on each other. This script should be ran as a cronjob once per day. It firstly triggers restarts on all latest travis CI builds for all organization repos (not merges or forks). After this is done, it triggers restarts on the remaining failed or errored builds.
##InstallationThe script depends on the [TravisCI command-line tool](https://github.com/travis-ci/travis.rb). Installation instructions can be found [here](https://github.com/travis-ci/travis.rb#installation). After you've installed travis gem successfully, you need to authenticate against a github account which has access rights to your github organization in order to restart travis CI builds. There are a few methods for doing [this](https://github.com/travis-ci/travis.rb#login). Perhaps the laziest one is with `travis login --auto`. For this to work, you need to add your [GitHub token](https://help.github.com/articles/creating-an-access-token-for-command-line-use/) to your `~/.github-oauth-token` file first.
## Usage
The script has to be added as a cronjob to repeat once every 24hours. In order for it to work, you need to add your $PATH to the crontab. The script should be added as follows:```
* * * * * /bin/sh //travis-tools.sh >> //logfile 2>&1
```Here's a working example, assuming you created a separate user to run this cron:
```
$ crontab -l -u travis-tools
<...>
# For more information see the manual pages of crontab(5) and cron(8)
#
# m h dom mon dow command
PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games
00 23 * * * /bin/bash /home/travis-tools/travis-tools.sh ongr-io >> /home/travis-tools/travis.log 2>&1
```## Troubleshooting
* If you are receiving an error while installing travis similar to this: `ERROR: Error installing travis: ERROR: Failed to build gem native extension.` Check out [this section](https://github.com/travis-ci/travis.rb#troubleshooting).
* If you notice the cronjob is not working, try to run the script manually or check your system's cron log (e.g.`/var/log/syslog` `/var/log/cron`).
* If the script returned errors, they should be found in the logfile you defined in your cronjob.##License
MIT - see the accompanying [LICENSE](https://github.com/ongr-io/ongr-travis-tools/blob/master/LICENSE) file for details.