Skip to content

A plugin for buildkite which will tag the current repo/version with a tag

License

Notifications You must be signed in to change notification settings

tendnz/git-tag-buildkite-plugin

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

14 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Git Tag Buildkite Plugin

A Buildkite plugin to tag the current head with a version and push it to the repo. Also makes a release in Github if you provide the right details

Based heavily on Git Commit.

Example

With no options, tags the $BUILDKITE_BRANCH and pushes the tags, with a commit message like Build #4:

steps:
  - command: make
    plugins:
      - tendnz/git-tag#v1.0.7:
          version: "v1.0.0-prod" 

With all options customized:

steps:
  - command: make
    plugins:
      - tendnz/git-tag#v1.0.7:
          version: "v1.0.0-prod"
          message: "Release to $ENV [$BUILDKITE_BUILD_NUMBER]"
          githubtoken: $MY_GITHUB_TOKEN
          reponame: tendnz/my-repo-name
          prerelease: true
          user:
            - name: Bob Monkey
            - email: [email protected]

Configuration

  • version (required))

    A tag to use in git tag $VERSION

  • message (optional, defaults to $BUILDKITE_ORGANIZATION_SLUG/$BUILDKITE_PIPELINE_SLUG: Build $BUILDKITE_BUILD_NUMBER for $BUILDKITE_BRANCH")

    The commit message

  • githubtoken (optional, required to enable releases)

    If provided, this will attempt to make a release. Load your token into your ENV (as per all secrets) then use

      githubtoken: $YOUR_ENV_NAME
    

    DONT put it into the YML!

  • reponame (optional, but required if you want releases)

    The name of the repo, eg tendnz/my-reop-name

  • prerelease (optional, defaults to false)

    Mark this as a prerelease or not.

  • draft (optional, defaults to false)

    Mark this as a draft or not.

  • 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 plugin for buildkite which will tag the current repo/version with a tag

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages