Forge Home

buildkite_agent

A Puppet module to manage Buildkite Agent on macOS.

4,384 downloads

2,193 latest version

5.0 quality score

We run a couple of automated
scans to help you access a
module's quality. Each module is
given a score based on how well
the author has formatted their
code and documentation and
modules are also checked for
malware using VirusTotal.

Please note, the information below
is for guidance only and neither of
these methods should be considered
an endorsement by Puppet.

Version information

  • 0.2.2 (latest)
  • 0.2.1
  • 0.2.0
  • 0.1.15
  • 0.1.13
  • 0.1.12
  • 0.1.1
  • 0.1.0
released Apr 28th 2020
This version is compatible with:
  • Puppet Enterprise 2019.8.x, 2019.7.x, 2019.5.x, 2019.4.x, 2019.3.x, 2019.2.x, 2019.1.x, 2019.0.x, 2018.1.x, 2017.3.x, 2017.2.x, 2016.4.x
  • Puppet >= 4.10.0 < 7.0.0

Start using this module

  • r10k or Code Manager
  • Bolt
  • Manual installation
  • Direct download

Add this module to your Puppetfile:

mod 'call-buildkite_agent', '0.2.2'
Learn more about managing modules with a Puppetfile

Add this module to your Bolt project:

bolt module add call-buildkite_agent
Learn more about using this module with an existing project

Manually install this module globally with Puppet module tool:

puppet module install call-buildkite_agent --version 0.2.2

Direct download is not typically how you would use a Puppet module to manage your infrastructure, but you may want to download the module in order to inspect the code.

Download

Documentation

call/buildkite_agent — version 0.2.2 Apr 28th 2020

buildkite_agent

A Puppet module to manage Buildkite Agent on macOS.

Table of Contents

Description

Buildkite Agent (buildkite-agent) is a small Go binary that runs Buildkite jobs.

The buildkite_agent Puppet module:

Classes and defined types use default parameter values sourced from Buildkite's macOS agent documentation.

This module currently supports macOS only.

Setup

Beginning with buildkite_agent

Setting the token parameter is the only requirement to get up and running.

  • In-manifest

    class { 'buildkite_agent':
      token => '757613ad20dfaf9b7b4b37d0b4ed4b6c',
    }
    
  • Standalone

    sudo puppet module install call-buildkite_agent && \
    sudo puppet apply -e "class {'buildkite_agent': token => '757613ad20dfaf9b7b4b37d0b4ed4b6c'}"
    

Replace the value for token with your Buildkite Agent Token.

Usage

To run a single Buildkite Agent with the default LaunchAgent label of com.buildkite.buildkite-agent-primary, use the examples above.

:bulb: The buildkite_agent::config::user and buildkite_agent::service::user parameters use the primary_user custom fact, included with this module, as the default value.

Limitations

This module only supports macOS, and has only been tested on macOS Catalina (10.15).

Development

This module is developed using the Puppet Development Kit (PDK).

To contribute:

  1. Fork this repository
  2. Make changes
  3. Create a pull request

Testing

This module is tested using the following steps:

  • Install puppet-agent and this module in a GitHub Actions macOS environment
  • Run puppet apply (2x) to check that desired state is configured and maintained
  • Validate configuration with Serverspec tests (located in the test/ directory)

GitHub Actions macOS virtual environments are hosted on MacStadium and contain some preconfigured software.

GitHub Actions

Two GitHub Actions workflows are used in the development and publishing of this module. GitHub Actions workflows are located in the .github/workflows/ directory .

  • forge_publish.yml
  • macos_qa.yml
    • Triggered on every push
    • Install puppet-agent-6 from package at downloads.puppet.com/mac/puppet6/10.14/x86_64/
    • Build the module package from source with tar
    • Install the module with sudo puppet module install
    • Run puppet apply -e (2x) to execute inline code declaring the buildkite_agent class
      • BUILDKITE_AGENT_TOKEN must be provided as a GitHub Actions encrypted secret
    • Install Serverspec gem
    • Run Serverspec tests