moodle-plugin-ci
moodle-plugin-ci copied to clipboard
Build fails during initialisation process
I'm not sure what is going on, but I'm hitting this:
$ moodle-plugin-ci install
4/7 [================>-----------] 57% 9 secs [Install dependencies]
[Symfony\Component\Process\Exception\ProcessFailedException]
The command "composer install --no-interaction --prefer-dist" failed.
Exit Code: 1(General error)
Working directory: /home/travis/build/moodle
Output:
================
Error Output:
================
Loading composer repositories with package information
Failed to clone the [email protected]:moodlehq/moodle-behat-extension.git repository, try running in interactive mode so that you can enter your GitHub credentials
[RuntimeException]
Failed to execute git clone --mirror '[email protected]:moodlehq/moodle-behat-extension.git' '/home/travis/.composer/cache/vcs/git-github.com-moodlehq-moodle-behat-extension.git/'
install [--prefer-source] [--prefer-dist] [--dry-run] [--dev] [--no-dev] [--no-custom-installers] [--no-autoloader] [--no-scripts] [--no-progress] [--no-suggest] [-v|vv|vvv|--verbose] [-o|--optimize-autoloader] [-a|--classmap-authoritative] [--apcu-autoloader] [--ignore-platform-reqs] [--] [<packages>]...
install [--moodle MOODLE] [--data DATA] [--repo REPO] [--branch BRANCH] [--plugin PLUGIN] [--db-type DB-TYPE] [--db-user DB-USER] [--db-pass DB-PASS] [--db-name DB-NAME] [--db-host DB-HOST] [--not-paths NOT-PATHS] [--not-names NOT-NAMES] [--extra-plugins EXTRA-PLUGINS]
The command "moodle-plugin-ci install" failed and exited with 1 during .
Your build has been stopped.
Would that be that there are too many requests coming from Travis? Or is it the branch?
This particular failure happened on 2.7 and 2.8 with PHP 5.4, but I've noticed it happening with other combinations.
Full build: https://travis-ci.org/FMCorz/moodle-block_xp/builds/273875512
I've seen this too, and only with older Moodle releases (pre 3.0 I think). This might be related to MDL-50732; with the VCS upstream specified prefer-dist doesn't failover correctly and you hit the GitHub credentials limit.
I tried removing --prefer-dist
and the same error occurred. Maybe something changed with the new Trusty image?
I couldn't find anything helpful, so you will likely have to do something like this: https://github.com/moodle/moodle/blob/master/.travis.yml#L99
That way Composer can authenticate with GitHub and get around any API rate limits.
I still get this error. Are there any other workarounds?
Could you have a look at this? https://travis-ci.org/elearningsoftware/moodle-mod_journal/jobs/482905389 I'm looking for another workaround as the one @polothy added is not working for me. Any help would be greatly appreciated!
Have you tried adding a GitHub API token?
https://github.com/moodle/moodle/blob/0e1e1e5586a1f43c951d9a399243220a3ccf882c/.travis.yml#L98
https://getcomposer.org/doc/articles/troubleshooting.md#api-rate-limit-and-oauth-tokens
Looking at your build log, looks like you did. I assume you added GITHUB_APITOKEN
to your Travis settings for the project.
Sorry for the late reply. Yes, I've added GITHUB_APITOKEN to travis settings. I still have this issue. Any ideas?