satis
satis copied to clipboard
Build and store only dist files? (without VCS)
I was wondering if it is possible to store packages without the vcs reference in Satis.
The use-case for this is having dist files built in CI which contain compiled front-end files which are not available in the Git repository. So installing from source if the dist file is missing or broken makes little sense.
Does anybody have an idea?
yes it is possible. You can add a repository of type "artifact". The url setting then points to the folder where your zip files reside.
@MarWestermann Thank you, but this does not really help.
Each version has it's own artefact and they are currently linked in the composer.json as dist.
There is no folder where all the artefacts reside.
I'm not sure if I completely understand your use case / problem. But I think I had a similar problem so I describe my solution and maybe you can adopt it to your needs:
I also have a CI system which builds composer modules (it zips the module folder) This zip file is then sent to the satis server where is is stored in a folder. This folder is defined in satis as artefact repository. Satis index these zip files automatically and add them to its packages.json. Thereby it uses the version number from composer.json (within zip) as version in its packages.json. The zip files I upload also contain the version number in the filename so I can have different versions of a module.
Now I have a composer repository I can use as dependency in other composer.json files and composer downloads the zip files from satis.
@MarWestermann Thank you for your detailed explanation.
I have a CI server which builds the artifacts and stores them in an artifact repository (Artifactory). Additionally the CI server job modifies the composer.json and modifies the dist section:
"dist": {
"url": "https://someserver/artifactory/some-path/my-package-0.388.0.zip",
"type": "zip"
}
Satis read the composer.json and creates its own storage of the packages but it keep the reference to the git repository as well.
I understood what you are doing. I will look into it.
It looks like using a satis configuration like:
{
"type": "artifact",
"url": "https://someserver/artifactory/some-path/"
},
will not work, as satis will try to interpret the url as a local folder.
Error:
'RecursiveDirectoryIterator::__construct(https://someserver/artifactory/some-path/): failed to open dir: not implemented'.
yes. The difference between our implementations is that satis itself is my artifact repository where I store the artifacts which are being created by CI job. (They are uploaded to the satis server) When a repository has type artifact the url needs to be a local folder where satis can find the zip files. Sorry but I only use satis as artifact repo and have no Idea how to integrate other server / repositories.