Build Summary

Description

This plugin enables you to provide a summary of a build in a pipeline.

Source Code: https://github.com/go-vela/vela-build-summary

Registry: https://hub.docker.com/r/target/vela-build-summary

Usage

NOTE:

Users should refrain from using latest as the tag for the Docker image.

It is recommended to use a semantically versioned tag instead.

Sample of outputting a summary for the current build:

steps:
  - name: build-summary
    image: target/vela-build-summary:latest
    pull: always
    secrets: [ build_summary_token ]

Sample of outputting a summary for an existing build:

steps:
  - name: build-summary
    image: target/vela-build-summary:latest
    pull: always
    secrets: [ build_summary_token ]
    parameters:
+     number: 1

Sample of outputting a summary for an existing build in a different repo:

steps:
  - name: build-summary
    image: target/vela-build-summary:latest
    pull: always
    secrets: [ build_summary_token ]
    parameters:
      number: 1
+     org: octocat
+     repo: hello-world

Secrets

NOTE: Users should refrain from configuring sensitive information in your pipeline in plain text.

Internal

The plugin accepts the following parameters for authentication:

ParameterEnvironment Variable Configuration
tokenPARAMETER_TOKEN, BUILD_SUMMARY_TOKEN

Users can use Vela internal secrets to substitute these sensitive values at runtime:

steps:
  - name: build-summary
    image: target/vela-build-summary:latest
    pull: always
+   secrets: [ build_summary_token ]
-   parameters:
-     token: superSecretToken

This example will add the secret to the build-summary step as an environment variable:

  • BUILD_SUMMARY_TOKEN=<value>

External

The plugin accepts the following files for authentication:

ParameterVolume Configuration
token/vela/parameters/build-summary/token, /vela/secrets/build-summary/token

Users can use Vela external secrets to substitute these sensitive values at runtime:

steps:
  - name: build-summary
    image: target/vela-build-summary:latest
    pull: always
-   parameters:
-     token: superSecretToken

This example will read the secret values in the volume stored at /vela/secrets/

Parameters

NOTE:

The plugin supports reading all parameters via environment variables or files.

Any values set from a file take precedence over values set from the environment.

The following parameters are used to configure the image:

NameDescriptionRequiredDefaultEnvironment Variables
log_levelset the log level for the plugintrueinfoPARAMETER_LOG_LEVEL
BUILD_SUMMARY_LOG_LEVEL
numberset the number for the buildtrueset by VelaPARAMETER_NUMBER
BUILD_SUMMARY_NUMBER
VELA_BUILD_NUMBER
orgset the organization name for the buildtrueset by VelaPARAMETER_ORG
BUILD_SUMMARY_ORG
VELA_REPO_ORG
reposet the repository name for the buildtrueset by VelaPARAMETER_REPO
BUILD_SUMMARY_REPO
VELA_REPO_NAME
serverVela server to communicate withtrueset by VelaPARAMETER_SERVER
BUILD_SUMMARY_SERVER
VELA_ADDR
tokentoken for communication with Velatrueset by VelaPARAMETER_TOKEN
BUILD_SUMMARY_TOKEN
VELA_NETRC_PASSWORD

Template

COMING SOON!

Troubleshooting

You can start troubleshooting this plugin by tuning the level of logs being displayed:

steps:
  - name: build-summary
    image: target/vela-build-summary:latest
    pull: always
    secrets: [ build_summary_token ]
+   parameters:
+     log_level: trace

Below are a list of common problems and how to solve them: