Skip to content

GitLab

  • Menu
Projects Groups Snippets
    • Loading...
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in
  • G gitlabhq1
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
  • Issues 21
    • Issues 21
    • List
    • Boards
    • Service Desk
    • Milestones
  • Merge requests 12
    • Merge requests 12
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Schedules
  • Deployments
    • Deployments
    • Environments
    • Releases
  • Monitor
    • Monitor
    • Incidents
  • Packages & Registries
    • Packages & Registries
    • Package Registry
    • Infrastructure Registry
  • Analytics
    • Analytics
    • CI/CD
    • Repository
    • Value stream
  • Wiki
    • Wiki
  • Snippets
    • Snippets
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar
  • gpt
  • large_projects
  • gitlabhq1
  • Merge requests
  • !8768

Closed
Created Feb 10, 2015 by Administrator@rootOwner
  • Report abuse
Report abuse

Add Composer Project Service (updated)

  • Overview 73
  • Commits 33
  • Changes 20

Created by: ikappas

This commit adds the per-project option to expose a project as a composer package. It generates and maintains a packages.json file along with a project specific /p/project-{id}.json file (conforming to https://getcomposer.org/doc/05-repositories.md#includes) in the public/ folder, allowing the GitLab install to be used as a Composer repository.

Note: There is a known issue integrating with the GitLab-Omnibus, namely that the public folder is owned by 'root' and GitLab is run as 'git'. The GitLab-Omnibus chef script needs to be updated to allow access to both packages.json and the /p/ folder in the public/ folder

It extends on the original idea providing extended service configuration options that allow to work with packages that do not include a composer.json

It has three operational modes allowing for:

  1. Default: Searches for a composer.json file in the source code root folder and if found exports the package.
  2. Project: Parse project attributes to create a virtual composer.json to use for exporting the package.
  3. Advanced: Parse a custom json string supplied in the service configuration to export the package.

It also has branch / tag filters that allows fine-grained filtering of specific branches/tags to be exposed as composer packages.

In the process of providing a more complex configuration screen i added support for rendering fieldsets, and options in project service configuration along with enabling hints. Also notifications are enabled for Tag/Branch deletion from the gitlab host.

This is and updated merge request for https://gitlab.com/gitlab-org/gitlab-ce/merge_requests/106 working with the latest source code.

Please see feature thread http://feedback.gitlab.com/forums/176466-general/suggestions/5953067-provide-composer-package-repository-support

When a project that has activated the composer service receives a push, the public /packages.json file and project specific json file will be refreshed to include version definitions for the branches and tags as specified in the service configuration in the project's repository.

Assignee
Assign to
Reviewer
Request review from
Time tracking
Source branch: github/fork/ikappas/master