Pre and Post build scripts outside of build context
Description
One use-case that we have for Gitlab CI Runners is to use ephemeral VMs that are not docker containers (we need to build things with OS X and Windows for example). For this we are using VMPooler which will destroy a VM once the builds are finished.
We have been attempting to use pre_clone_script
and post_build_script
but because these are part of the build then we have found that requesting the VM to unregister from gitlab and destroy it self quite often leaves the build in a state where it will hang forever.
Could it be possible to have a script that runs after the build is complete which is not connected to the build itself?
Proposal
Links / references
https://gitlab.com/gitlab-org/gitlab-ce/issues/41947#note_69557781