You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When using Scuba to emulate a CI runner, the hooks may perform expensive operations. For example, a .gitlab-ci.ymlbefore_script may run commands to install packages via apt. Running these hooks every time the user runs scuba would be unacceptable to the user.
One alternative would be to manually perform the installation, and push the resulting image to your image repository.
Instead, Scuba could run the hooks just once, and commit the resulting container to an image, which Scuba will use for all subsequent invocations.
This is no small task; caching is difficult. However, it would behave similar to the way docker build caches intermediate layers. We could hash the hook scripts, and use that as a key to refer to the cached image.
Additional difficulties might include things that are done by the hooks that don't affect the filesystem. I'm not sure what this might be, but these hooks would still need executed, even if we're running a cached image. This might require adding an additional flag to the hooks, or adding a separate top-level key.
The text was updated successfully, but these errors were encountered:
When using Scuba to emulate a CI runner, the hooks may perform expensive operations. For example, a
.gitlab-ci.yml
before_script
may run commands to install packages viaapt
. Running these hooks every time the user runsscuba
would be unacceptable to the user.One alternative would be to manually perform the installation, and push the resulting image to your image repository.
Instead, Scuba could run the hooks just once, and
commit
the resulting container to an image, which Scuba will use for all subsequent invocations.This is no small task; caching is difficult. However, it would behave similar to the way
docker build
caches intermediate layers. We could hash the hook scripts, and use that as a key to refer to the cached image.Additional difficulties might include things that are done by the hooks that don't affect the filesystem. I'm not sure what this might be, but these hooks would still need executed, even if we're running a cached image. This might require adding an additional flag to the hooks, or adding a separate top-level key.
The text was updated successfully, but these errors were encountered: