satis icon indicating copy to clipboard operation
satis copied to clipboard

Could we add an option to make use of a VCS platform built in archives?

Open 7ochem opened this issue 8 years ago • 5 comments

I've had this idea when using Satis together with some private repo's on a Bitbucket Server instance. Bitbucket Server has an archive API just like GitHub or Bitbucket.org.

I've been going through Composer's Vcs driver classes to see how Composer is generating dist URL's for packages hosted on GitHub or Bitbucket.org and it seemed to me we could do the very same with Satis (see for instance dist URL generation of the GitHub driver).

I would suggest to add an option to the build command to indicate to use archive API's where possible, so Satis will generate a dist section with a reference to the zip or tar of the package on the platform. When using it in combination with the archive option, local archives would still be generated for platforms that do not have/support an archive API.

Additionally it would be great to have a Bitbucket Server driver of course (or a possibility to hook in your own drivers).

I am aware that this issue/feature request is a duplicate of issue #196, but this one covers all VCS platforms that have an archive API, not only GitHub.

7ochem avatar Aug 24 '16 07:08 7ochem

Regarding a Bitbucket Server driver, this should be a feature request on composer itself, as this is where VCS drivers are living.

stof avatar Aug 24 '16 08:08 stof

@stof , i do not agree, IMHO i have this central package repository, this is my first and only responsible authority to fetch any packages in my domain. Th package it self can come from various sources. I would configure my Satis to hold any package as zip archive for download - thats fine - but a waste of resources - because most of the origins for packages can provide the zip archive themself.

So it would be nice if i can stay with my central (domain) package repository and don't care about where a originated from.

So i would expect a feature in Satis to utilize the origins API to zip archive and pass them through or redirect the download to them.

CybotTM avatar Dec 13 '17 09:12 CybotTM

@CybotTM your reply makes no sense at all given the context.

alcohol avatar Dec 13 '17 09:12 alcohol

@CybotTM Satis does use upstream archives URLs when you don't configure it to generate its own ones. The issue here is that Composer does not have support for using archives from a bitbucket server repository (because it has no special handling for bitbucket server, and so uses the generic git driver, and so cannot have bitbucket-server-specific features like identifying the archive URL).

Satis itself does not implement any logic about getting the package info. It just relies on Composer to do that This is why I said it should be a feature request on Composer.

stof avatar Dec 13 '17 10:12 stof

@alcohol , thanks ... helpful

@stof , yes, i was confused, thanks for clarifying, i had the same discussion internally meanwhile. Sorry for the noise.

CybotTM avatar Dec 13 '17 12:12 CybotTM