Skip to content

Git

Overview

Various git functions for use within your pipeline. NOTE: You are fully responsible for usage of this workflow, there is potential to cause bad commits.

Tools Section

Name Type Default Section Description
message String Automatic commit from {{ job_url }} git.commit The message to attach to the commit.
pattern String . git.commit Pattern for the git add command.
author String ${env.GIT_AUTHOR} <${env.GIT_EMAIL}> git.commit Author of this commit.
amend Boolean False git.commit Whether to amend the previous commit.
push Boolean True git.commit Push the commit to git as well.
credentials Map git.commit Credentials to use when pushing to git origin.

Available Methods

commit

Commit and push changes within your pipeline. Generally should be used for generated documentation changes. Use at your own risk.

Name Type Default Description
message String Automatic commit from {{ job_url }} The message to attach to the commit.
pattern String . Pattern for the git add command.
author String ${env.GIT_AUTHOR} <${env.GIT_EMAIL}> Author of this commit in standard git format Name <email@domain.com>.
amend Boolean False Whether to amend the previous commit.
push Boolean True Push the commit to git as well.
credentials Map Credentials to use when pushing to git origin.

commit Example

branches:
  feature:
    steps:
      - git:
          # Simple
          - commit: "Example email from {{ build_url }}"
          # Advanced
          - commit:

Full Example Pipeline

pipelines:
  tools:
    git:
      credentials:
        description: Git credentials
    branches:
      patterns:
        feature: .+
  branches:
    feature:
      steps:
        - custom: # This should be your build process
          - buildPackage:
        - git:
          - commit:
              message: Automatic commit from pipeline.

Additional Resources