Version information
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
Add this module to your Puppetfile:
mod 'call-buildkite_agent', '0.2.2'
Learn more about managing modules with a PuppetfileDocumentation
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:
- Installs
buildkite-agent
from GitHub release tarball - Manages Buildkite Agent config files and settings
- Manages Buildkite Agent user LaunchAgents
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:
- Fork this repository
- Make changes
- 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
- Triggered when a SemVer-style tag is pushed on any branch
- Run all PDK validations against this repository
- Run
pdk build
to build the module package - Publish module package to the Puppet Forge using the Forge API
FORGE_API_KEY
must be set as a GitHub Actions encrypted secret
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 thebuildkite_agent
classBUILDKITE_AGENT_TOKEN
must be provided as a GitHub Actions encrypted secret
- Install Serverspec gem
- Run Serverspec tests
Dependencies
- puppet/archive (>= 4.4.0 < 5.0.0)
- puppetlabs/stdlib (>= 6.2.0 < 7.0.0)
- call/facts (>= 0.1.0 < 2.0.0)