make it possible to acquire the build lock on a step

make it possible to acquire the build lock on a step and release the
build once all steps finished