Skip to content

A Buildkite plugin to commit and push changed files to a git repository

License

Notifications You must be signed in to change notification settings

thedyrt/git-commit-buildkite-plugin

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

15 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Git Commit Buildkite Plugin

A Buildkite plugin to commit and push the results of a command to a git repository.

Build status

Example

With no options, commits all changed/added files to $BUILDKITE_BRANCH and pushes to origin with a commit message like Build #4:

steps:
  - command: make
    plugins:
      - thedyrt/git-commit#v0.3.0: ~

With all options customized:

steps:
  - command: make
    plugins:
      - thedyrt/git-commit#v0.3.0:
          add: app/
          branch: my-branch
          create-branch: true
          message: "Updated data [$BUILDKITE_BUILD_NUMBER]"
          remote: upstream
          user:
            name: Reid
            email: [email protected]

Configuration

  • add (optional, defaults to .)

    A pathspec that will be passed to git add -A to add changed files.

  • branch (optional, defaults to $BUILDKITE_BRANCH)

    The branch where changes will be committed. Since Buildkite runs builds in a detached HEAD state, this plugin will fetch and checkout the given branch prior to committing. Unless we're creating a new branch. See create-branch below.

  • create-branch (optional, defaults to false)

    When set to true the branch will be created, rather than fetched from the remote.

  • message (optional, defaults to Build #${BUILDKITE_BUILD_NUMBER})

    The commit message

  • remote (optional, defaults to origin)

    The git remote where changes will be pushed.

  • user.email (optional)

    If given, will configure the git user email for the repo.

  • user.name (optional)

    If given, will configure the git user name for the repo.

Tests / Linting

To run the tests of this plugin, run

docker-compose run --rm tests

To run the Buildkite Plugin Linter, run

docker-compose run --rm lint

License

MIT (see LICENSE)

About

A Buildkite plugin to commit and push changed files to a git repository

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Contributors 4

  •  
  •  
  •  
  •  

Languages