Refactor app initialization
What does this MR do?
Refactorizes the way how application is initialized.
Why was this MR needed?
Several reasons:
- Move binaries sources (
main
package) tocmd/[binnary-name]/main.go
, which is the pattern commonly used for Go apps, - Move code parts common for
gitlab-runner/main.go
andgitlab-runner-helper/main.go
to one place:app
package. - Move some code related to application initialization from
helpers/cli
to theapp
package. This is a next step in decomposing the big, messedhelpers/
package in more structured and domain oriented parts. - Prepare a hooks mechanism in
app
package, to simplify the initialization of apps.
Are there points in the code the reviewer needs to double check?
Built on top of !1020 (merged) so needs to wait for it to be merged This is done
Does this MR meet the acceptance criteria?
-
Documentation created/updated -
Added tests for this feature/bug -
In case of conflicts with master
- branch was rebased
What are the relevant issue numbers?
Closes #4302
Edited by Wayne Haber