-
Notifications
You must be signed in to change notification settings - Fork 766
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
stage_executor: re-use all possible layers from cache for squashed bu…
…ilds Re-use all the layers from cache for squashed case and commit as late as possible Current implementation of marking for re-use of cache `commits` on every `stage` when used with `--squashed` however we should try to re-use as many layers are possible if `--layers` is specified and `commit` only on `last instruction` of `last stage` to perform final squash. Also treat all other layers as if they are being written for regular build and write them cache. Signed-off-by: Aditya Rajan <arajan@redhat.com>
- Loading branch information
Showing
3 changed files
with
49 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
# Following stage must be picked from cache | ||
FROM busybox as one | ||
RUN echo hello | ||
RUN echo hello > world | ||
|
||
# Following stage must be picked from cache except last instruction | ||
FROM busybox as two | ||
RUN echo hello1 | ||
RUN echo helloworld |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters