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
  • !9301

Closed
Created May 15, 2015 by Administrator@rootOwner
  • Report abuse
Report abuse

Add Composer Project Service (updated #8768)

  • Overview 108
  • Commits 38
  • Changes 24

Created by: ikappas

composer-service-1

Composer Project Service

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.

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

Operational Modes

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.

Branch / Tag Filters

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

References

This is and updated merge request for:

  1. https://gitlab.com/gitlab-org/gitlab-ce/merge_requests/106
  2. https://github.com/gitlabhq/gitlabhq/pull/8768

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 branch/ tag 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.

Notes

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

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