8000 Add VCS repository only for private repos by mnocon · Pull Request #13 · ibexa/ci-scripts · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

Add VCS repository only for private repos #13

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
May 24, 2021

Conversation

mnocon
Copy link
Contributor
@mnocon mnocon commented May 24, 2021

When looking at ezsystems/ezplatform-page-builder#757 (a build with 20 dependencies) some issues became visible:

Composer is making a lot of GitHub API calls, which can even go over the API limit
It takes a lot of time to download 20 dependencies.

This PR introduces a new property in the dependencies.json schema: privateRepository.
Example:

    {
        "requirement": "dev-IBX-268-as-editor-i-want-to-see-redesigned-buttons as 2.0.x-dev",
        "repositoryUrl": "https://github.com/ezsystems/ezcommerce-transaction",
        "package": "ezsystems/ezcommerce-transaction",
        "privateRepository": true
    },
    {
        "requirement": "dev-IBX-268-as-editor-i-want-to-see-redesigned-buttons as 3.0.x-dev",
        "repositoryUrl": "https://github.com/ezsystems/ezplatform-admin-ui",
        "package": "ezsystems/ezplatform-admin-ui",
        "privateRepository": false
    },

For public repositories we don't need to add the repository to Composer Repositories, which results in less GitHub API calls:

composer/composer#1314 (comment)
composer/composer#4884 (comment)

For private repositories (where VCS is needed) we set the COMPOSER_NO_INTERACTION variable (https://getcomposer.org/doc/03-cli.md#composer-no-interaction) so that Composer fallbacks to git clone if API limits are exceeded:

composer/composer#4884 (comment)
composer/composer#1314 (comment)

To speed things up I've also changed how the packages are installed:
instead of multiple composer require calls we add the packages with --no-install and then download them in one composer install call.

@micszo micszo merged commit 53c9c47 into 0.1 May 24, 2021
@micszo micszo deleted the dependency-adding-optimisation branch May 24, 2021 09:25
tomaszszopinski pushed a commit that referenced this pull request Feb 15, 2022
* [Rebranding] Move to Ibexa organization

* [Rebranding] Stop using dev branches but 4.0.x-dev
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants
0