ocaml-ci icon indicating copy to clipboard operation
ocaml-ci copied to clipboard

Add additional opam-repository / Dockerfile customization?

Open gpetiot opened this issue 1 year ago • 3 comments

Is there a way to tell ocaml-ci to do opam repository add ... to add another repository to fetch packages from?

gpetiot avatar Feb 27 '24 11:02 gpetiot

Maybe I could reframe this question as: would it be possible to customize the dockerfiles generated by ocaml-ci, here is the kind of workflow I would like to have: https://github.com/tarides/okra/blob/main/.github/workflows/build.yml (the opam-repositories customization is what I mostly need)

gpetiot avatar Mar 21 '24 09:03 gpetiot

This is technically possible, but as OCaml-CI is currently zero-configuration we have no way of getting a user config. This would have to be added in some kind of new .ocamlci file or something.

At the moment we're not actively developing OCaml-CI, but you're free to open a PR if you'd like.

benmandrew avatar Mar 21 '24 11:03 benmandrew

The way to make this happen is to add a new field in opam of dune-project to be able to specify what upstream repository to use. This way that will work both on developer machines and in the CI (so there is no need to create a .ocamlci configuration file - I suggest we resist the urge to do this and fix our other metadata sources first :p)

So, now, the issue is that there is no way to specify extra repositories in opam files. Fortunately, that's something that is being added in the dune pkg command where you would be able to specify with opam-repository to use directly in your dune-project file, so I suspect it might be possible to test this somehow one day in ocaml-ci /cc @leostera and @tmattio

samoht avatar Apr 03 '24 17:04 samoht