-
Notifications
You must be signed in to change notification settings - Fork 18.9k
Closed
Labels
Description
Problem Statement
The organization of build scripts in hack/ has remained largely unchanged for a long time. This repo has undergone significant changes and the build scripts could use a refresh.
Goals
- remove
hack/make.shso that scripts can be executed directly without a driver - keep a clear distinction between libraries (currently files prefixed with
.) and "task scripts" - group the scripts by high level operation (build, test, release, etc)
- remove anything that is no longer used
- support upcoming changes to the repo, (Rename binaries to moby-* #34226 and Completing the Moby transition #35115)
Proposal
- remove
hack/make.sh, and move everything out ofhack/maketo a new location underhack - any setup logic in
hack/make.shwill move to a library underhack/liborhack/<category>/lib
Structure:
hack
|--- ci # CI container entrypoints, one script per CI build (already exists)
|--- run # scripts for running the daemon (ex dind, hack/make/run)
|--- release # scripts for releasing new versions (ex: generate-authors.sh)
|--- build # scripts for building the binaries (hack/make/binary*, hack/make/cross)
`--- generate # generate code (generate-swagger-api.sh, hack/make/.go-autogen)
|--- test # scripts for running test suites (hack/test already exists)
|--- validate # scripts for validating code, linting, etc (already exists)
|--- deps # installing dependencies, (vendor.sh, and hack/dockerfile/)
|--- libs
Anything in libs should only define functions, nothing should run when sourced. Each directory can also have a libs directory for anything that is not general enough to be at the top level
(hack/integration-cli-on-swarm/ could be moved back to contrib/ since it's mostly go code, or would be under hack/test/integration-cli-on-swarm/)
Reactions are currently unavailable