Defining pipeline steps that require cleanup

10 views
Skip to first unread message

Simon Richter

unread,
Feb 21, 2020, 6:33:31 AM2/21/20
to jenkins...@googlegroups.com
Hi,

I'm thinking about optimizing artifact transfer between builds by using WIM
files instead of single file transfers.

Building would work by mounting an empty writeable WIM file over an output
directory, having the build process install into this directory, then
unmount and optimize the WIM file before declaring it as an artifact.
Artifact consumers would mount the file read-only.

Obviously, if something goes wrong, the file needs to be unmounted
regardless, so I wonder how I'd set up an, ideally declarative, pipeline
that mounts an image that is then available to a block of steps, and
unmounted afterwards using a method that depends on the current build
status.

As an additional complication, making the pipeline resumable would require
something like automatically unmounting images when execution is stopped
after the current step, and remounting if it should continue.

Can this be done, or will I have to extend the actual Jenkins program for
that?

Simon
Reply all
Reply to author
Forward
0 new messages