“GNU Make is a tool which controls the generation of executables and other non-source files of a program from the program’s source files.” - gnu.org
Install
I use https://chocolatey.org/ for Windows installs but you can also install by manually downloading the exe.
1 | choco install make |
Examples
The Makefile
then resides in the root of the project source, the docs describe the shape of the make commands.
Docker Compose Local Dependency
- Define in the file the action to carry out, here its
start-local-dependency
, everything to the right are the commands for the action.
1 | start-local-dependency: |
- Run
make start-local-dependency
Define AWS CLI Commands
- Define the action
create-aws-secret
1 | create-aws-secret: |
- Run
make create-aws-secret NAME=foo DESC=bar SEC=secret
Pipeline Use Case
This can be used in a GitHub Actions Workflow to run Component / Intergration tests that require external dependency like my-database
, my-dependancy-api
or my-identity-service
1 | jobs: |