Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add additional opam-repository / Dockerfile customization? #921

Open
gpetiot opened this issue Feb 27, 2024 · 3 comments
Open

Add additional opam-repository / Dockerfile customization? #921

gpetiot opened this issue Feb 27, 2024 · 3 comments

Comments

@gpetiot
Copy link
Contributor

gpetiot commented Feb 27, 2024

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

@gpetiot
Copy link
Contributor Author

gpetiot commented Mar 21, 2024

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 gpetiot changed the title Packages on additional opam-repository Add additional opam-repository / Dockerfile customization? Mar 21, 2024
@benmandrew
Copy link
Contributor

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.

@samoht
Copy link
Contributor

samoht commented Apr 3, 2024

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants