Skip to content

Latest commit

 

History

History
54 lines (39 loc) · 1.98 KB

File metadata and controls

54 lines (39 loc) · 1.98 KB

LinearB Cycle Time Buildkite Plugin

A Buildkite plugin to capture and record the time at which code changes are deployed to production. This data is posted to the linearB API and ensures accurate deploy time metrics are reported for teams and projects.

LinearB cycle time docs can be found here.

Example Usage

Add the following to your pipeline.yaml:

  - label: "linearB: record the time of deployment"
    command: bin/ci_noop
    plugins:
      - cultureamp/linearb-cycle-time#v1.1.2: ~

Keep in mind that you only want to call the linearB API once and your pipeline may include multiple production deploys (US, EU). You will likely need to restrict when this plugin executes. This will depend on how the pipeline has been structured but may include branch and/or step dependencies as illustrated below:

  - label: "linearB: record the time of deployment"
    depends_on: 
      - prod_us_deployed
      - prod_eu_deployed
    command: bin/ci_noop
    branches: [main]
    plugins:
      - cultureamp/linearb-cycle-time#v1.1.2: ~

Modifying the default values (likely not required for most users)

To record the time at which code is deployed, the linearB API requires the following properties:

  • an api key
  • event time (epoch)
  • sha
  • repo url (in the format https://github.com/org/repo.git)

Whilst the plugin is able to pull these values from Buildkite environment variables and a default parameter store location, should it be required, these values can be overridden as follows:

  - label: "linearB: record the time of deployment"
    command: bin/ci_noop
    plugins:
      - cultureamp/linearb-cycle-time#v1.1.2:
          api_key_ssm_param_name: "foo/bar/key"
          repo: "https://github.com/org/repo.git"
          sha: "abcdef..."