I hve a gitlab private project for a composer package that is published to its package registry via pipeline.
Now I want to use satis to create my repository and publish it to gitlab pages in order to make the private package available, so i made a new project and created the following pipeline.
Problem is, pipeline works correctly and my custom repository is published to pages BUT it is empty: by web-browsing it seems that no package is available.
Running commands locally gives no error, but actually no dist folder is created in satis build directory.
Package latest version is present in both the project releases and package registry.
Just for the sake of test, using a wrong group id in satis.json lead to the error
The "https://gitlab.com/api/v4/group/<wrong-group-id>/-/packages/composer/packages.json" file could not be downloaded (HTTP/2 404 ):
{"message":"404 Group Not Found"}
so I suppose that bot the group id and auth credentials used are working correctly, i.e. no "silent error" is happening during pipeline execution.
satis.json
{
"repositories": [
{
"type": "composer",
"url": "https://gitlab.com/api/v4/group/<group-id>/-/packages/composer/"
}
],
"require-all": true,
"archive": {
"directory": "dist",
"format": "zip",
"skip-dev": true
}
}
.gitlab-ci.yml
stages:
- build
pages:
stage: build
image: composer:2
before_script:
- composer install
- composer config -g gitlab-oauth.gitlab.com ${PERSONAL_ACCESS_TOKEN}
script:
- composer satis:build satis.json ./public
artifacts:
paths:
- public
Ok, changing the
satis.jsonentry for the repository in following way solved the problem, now every version of my package is downloaded to localdistfolder and the web ui list them all.