Description
At the moment, we update the base Docker images once a week, and this brings in the latest opam-repository changes. However, it would be good to be able to test against new releases immediately.
The problem with doing opam update
before each job is that we would lose the benefits of caching, because the layer hash would be different each time.
Some options:
-
If opam could extract from a repository just the information it needed, we could throw away the repository and just keep that. Then repository changes would invalidate the cache only if something we needed changed. There doesn't seem to be any way to do that, though.
-
We could add a configuration file where the user specifies the mimimum repository commit they need. e.g.
(ocaml-ci (minimum-opam-commit abcd123e))
If the repository doesn't contain that commit then we update to it.