/cookiecutter-agent-go

A cookiecutter template to create new Crucibuild Agents in Go following best practices.

Primary LanguageGoApache License 2.0Apache-2.0

cookiecutter-agent-go

Cookiecutter Build Status

A cookiecutter template to create new Crucibuild Agents in Go following best practices.

Features

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.

Installation

Prerequisites

The following must be installed and available:

Project

Install cookiecutter using the following command line:

$ pip install cookiecutter

alternatively you can install cookiecutter with homebrew:

$ brew install cookiecutter

Usage

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