BuildkiteUtils.jl

BuildkiteUtils is a collection of utility functions when running jobs on Buildkite.

Build meta-data

BuildkiteUtils.METADATAConstant
BuildkiteUtils.METADATA

A dict-like object for setting and getting build meta-data

x = BuildkiteUtils.METADATA[key]   # get meta-data
BuildkiteUtils.METADATA[key] = val # set meta-data
keys(BuildkiteUtils.METADATA)      # list of meta-data keys
haskey(BuildkiteUtils.METADATA)    # check if key exists

Artifacts

BuildkiteUtils.artifact_downloadFunction
BuildkiteUtils.artifact_download(pattern::AbstractString, destination::AbstractString=".";
   [step,] [build])

Download all artifacts matching pattern to destination.

Optional keyword arguments

  • step will limit to artifacts in a given step (either the key or the step ID),
  • build allows downloading artifact from a given build ID.
BuildkiteUtils.artifact_searchFunction
BuildkiteUtils.artifact_search(pattern::AbstractString; [step,] [build])

List all uploaded artifacts matching pattern.

Optional keyword arguments

  • step will limit to artifacts in a given step (either the key or the step ID),
  • build allows downloading artifact from a given build ID.

Annotations

BuildkiteUtils.annotateFunction
BuildkiteUtils.annotate(data; context=nothing, style=nothing, append=false)

Annotates the current build with data: this is a Markdown-formatted string.

  • context: a unique identifier for a given annotation. The default will use the default context.
  • style: one of
    • nothing (default style)
    • "success"
    • "info"
    • "warning"
    • "error"
  • append: if true, will add to the existing annotation with the same context, otherwise will replace it.

See buildkite-agent annotate for more information.