Page MenuHomePhabricator

Smarter copies/sharedvolume/default behavior
ClosedPublic

Authored by dduvall on Sep 6 2017, 12:43 AM.
Referenced Files
Unknown Object (File)
Thu, Nov 23, 11:27 PM
Unknown Object (File)
Sun, Nov 12, 6:41 PM
Unknown Object (File)
Thu, Nov 9, 2:01 AM
Unknown Object (File)
Tue, Nov 7, 2:05 PM
Unknown Object (File)
Fri, Nov 3, 8:56 PM
Unknown Object (File)
Oct 27 2023, 7:34 PM
Unknown Object (File)
Oct 4 2023, 8:49 AM
Unknown Object (File)
Sep 16 2023, 11:47 PM
Subscribers
None

Details

Maniphest Tasks
T174623: Ensure application files are not copied for final multi-stage images
Reviewers
thcipriani
mobrovac
hashar
mmodell
Group Reviewers
Release-Engineering-Team
Commits
rGBLBR62066296380d: Smarter copies/sharedvolume/default behavior
Patch without arc
git checkout -b D769 && curl -L https://phabricator.wikimedia.org/D769?download=true | git apply
Summary

Defined new abstract build.Volume and corresponding
docker.DockerVolume instructions.

Refactored compilation of main COPY or VOLUME instruction for
application files to use the new instructions and moved injection of
these instructions out of the compiler and into VariantConfig. The
latter can be smarter about the following cases:

  1. When copies is set, simply depend on artifacts for the application files and do not copy anything from the build host.
  2. When sharedvolume is true, inject a build.Volume instruction for the application working directory.
  3. When neither of the above are set, copy application files from the host.

Fixes T174623
Depends on D768

Test Plan

Run go test ./.... Run blubber blubber.example.yaml production and ensure:

  1. The prep stage has a COPY . . instruction.
  2. The final stage has no COPY . . instruction, only COPY --from=prep instructions.

Diff Detail

Repository
rGBLBR Blubber
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

Restricted Application added a reviewer: Release-Engineering-Team. · View Herald Transcript
Restricted Application added a project: Release-Engineering-Team. · View Herald Transcript
This revision is now accepted and ready to land.Sep 7 2017, 9:00 AM
This revision was automatically updated to reflect the committed changes.