Skip to content
This repository has been archived by the owner on Nov 28, 2023. It is now read-only.

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

ailohq/git-tag-buildkite-plugin

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

29 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:
      - ailohq/git-tag#v1.0.16:
          version: "v1.0.0-prod"

With all options customized:

steps:
  - command: make
    plugins:
      - ailohq/git-tag#v1.0.16:
          version: "v1.0.0-prod"
          message: "Release to $ENV [$BUILDKITE_BUILD_NUMBER]"
          githubtoken_env: GITHUB_TOKEN
          reponame: ailohq/my-repo-name
          release: true
          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_env (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
    
  • reponame (optional, but required if you want releases)

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

  • release (optional, defaults to true)

    Should a GitHub release be created?

  • 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

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • Shell 100.0%