Git Repo

Git Repo artifacts are references to Git repositories that are hosted by a Git hosting service.

The Git Repo artifact is available in version 1.17 or later.

They are consumed by stages that need multiple files to produce an output, such as the Bake (Manifest) stage when using the Kustomize template renderer. Unlike other artifact implementations, the Git Repo artifact works with any Git hosting service as long as the repository can be cloned using the Git CLI.

Git Repo artifact in the UI

The pipeline UI exposes the following fields for the Git Repo artifact:

FieldExplanation
AccountA Git Repo artifact account.
URLHTTP or SSH URL of your Git repository. Use HTTP for artifact accounts configured to use a username and password, and use the SSH URL format for accounts configured to use the SSH private key.
BranchName of the branch to check out. Default is master.
Sub Path (Optional)Relative path of files within the repository to fetch. If set, only files this path will be available to stages consuming this artifact.

In a trigger

Work to support Git Repo artifacts in triggers is currently underway.

In a pipeline stage

When configuring the “Bake (Manifest)” stage, you can use a Git Repo artifact as an expected artifact.

Configure a Bake (Manifest) stage to use a Git Repo artifact.

Configure a Bake (Manifest) stage to use a Git Repo artifact.

Git Repo artifact in a pipeline definition

FieldExplanation
typeAlways git/repo.
referenceHTTPS or SSH URL of your Git repository. Use HTTPS for artifact accounts configured to use a username and password, and use the SSH URL format for accounts configured to use an SSH private key.
versionName of the branch to check out. Default is master.
metadata.subPathRelative path of files within the repository to fetch. If set, only files in this path are available to stages consuming this artifact.

Artifact accounts using an SSH private key for authentication.

  1. {
  2. "type": "git/repo",
  3. "reference": "git@github.com:spinnaker/spinnaker.github.io",
  4. "version": "feat-123"
  5. }

Artifact accounts using a username and password or token for authentication.

  1. {
  2. "type": "git/repo",
  3. "reference": "https://github.com/spinnaker/spinnaker.github.io",
  4. "version": "feat-123"
  5. }

When checking out an explicit sub path within repository.

  1. {
  2. "type": "git/repo",
  3. "reference": "https://github.com/spinnaker/spinnaker.github.io",
  4. "version": "feat-123",
  5. "metadata" : {
  6. "subPath": "reference/artifacts/types"
  7. }
  8. }

Last modified July 1, 2021: docs(fix): fix internal links (#98) (d74c3a4)