A cookiecutter template to create new Crucibuild Agents in Go following best practices.
The template scaffolds a project with a minimal implementation of a Crucibuild agent, including:
- the agent manifest
- a Makefile managing the project build:
- installation of the all necessary go dependencies
- code generation of the static resources using go-resources
- check of Go sources for errors and warnings using gometalinter
- built of the agent
- TravisCI integration.
The following must be installed and available:
Install cookiecutter using the following command line:
$ pip install cookiecutter
alternatively you can install cookiecutter with homebrew
:
$ brew install cookiecutter
To create a new Crucibuild agent, just run cookiecutter
with this template by typing:
$ cookiecutter https://github.com/crucibuild/cookiecutter-agent-go
You'll be prompted for various configuration options (see cookiecutter.json
for the full list).
Finally, enter the project and take a look around:
$ cd <agent-name>
$ ls
You can build the agent using the make command:
$ make