Add support for after_script
This brings support for after_script. The amount of changes is quite large, but in order to implement that I needed to make Executor more dumber that it was in fact moving some of the executor code up to Build. Build is now responsible for executing build plan, the plan is run with help of executor. This is how the logic supposed to be.
During all this refactoring I did fix our famous call :buildscript
issue. Right now all steps of build plan are executed as separate commands. This makes it simpler to track what and where is happening.
The introduced changes will allow us to easily add artifacts for failed builds. This will also make the plugin system super-easy to implement.
Test builds:
- https://gitlab-ci-multi-runner-downloads.s3.amazonaws.com/finally-script/binaries/gitlab-ci-multi-runner-linux-386
- https://gitlab-ci-multi-runner-downloads.s3.amazonaws.com/finally-script/binaries/gitlab-ci-multi-runner-linux-amd64
- https://gitlab-ci-multi-runner-downloads.s3.amazonaws.com/finally-script/binaries/gitlab-ci-multi-runner-linux-arm
- https://gitlab-ci-multi-runner-downloads.s3.amazonaws.com/finally-script/binaries/gitlab-ci-multi-runner-darwin-386
- https://gitlab-ci-multi-runner-downloads.s3.amazonaws.com/finally-script/binaries/gitlab-ci-multi-runner-darwin-amd64
- https://gitlab-ci-multi-runner-downloads.s3.amazonaws.com/finally-script/binaries/gitlab-ci-multi-runner-windows-386.exe
- https://gitlab-ci-multi-runner-downloads.s3.amazonaws.com/finally-script/binaries/gitlab-ci-multi-runner-windows-amd64.exe
- https://gitlab-ci-multi-runner-downloads.s3.amazonaws.com/finally-script/binaries/gitlab-ci-multi-runner-freebsd-386
- https://gitlab-ci-multi-runner-downloads.s3.amazonaws.com/finally-script/binaries/gitlab-ci-multi-runner-freebsd-amd64
- https://gitlab-ci-multi-runner-downloads.s3.amazonaws.com/finally-script/binaries/gitlab-ci-multi-runner-freebsd-arm
cc @tmaczukin