Skip to content

Creates GitHub Deployment before/after a Buildkite step is executed.

License

Notifications You must be signed in to change notification settings

visfleet/github-deployment-buildkite-plugin

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

30 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

GitHub Deployment Buildkite Plugin

Creates GitHub Deployment before/after a Buildkite step is executed.

Example

Add the following to your pipeline.yml:

steps:
  - command: echo 'Deploy preview created'
    plugins:
      - ailohq/github-deployment#v1.0.10:
          username-env: GITHUB_USERNAME
          token-env: GITHUB_TOKEN
          ref: v1.0.0
          environment: qa
          environment_url: https://dev.ailo.io
          production_environment: false
          transient_environment: false

Configuration

Many of the configuration options are passed to the GitHub deployment API requests. See the deployment API docs for additional details.

username-env (Optional, string)

Name of environment variable for your GitHub username. Default: GITHUB_USERNAME.

token-env (Optional, string)

Name of environment variable for your GitHub token which should contain repo_deployment permissions. Default: GITHUB_TOKEN.

ref (Optional, string)

The ref to deploy. This can be a branch, tag, or SHA. Default: current git commit SHA hash.

environment (Optional, string)

Name for the target deployment environment (e.g., production, staging, qa). Default: production.

environment_url (Optional, string)

URL for accessing your environment.

If you don't know your environment_url during pipeline creation, you can use Buildkite meta-data to set the environment url in your command:

buildkite-agent meta-data set "environment_url" "https://www.google.com"

production_environment (Optional, boolean)

Specifies if the given environment is one that end-users directly interact with. Default: true when environment is production or prod and false otherwise.

transient_environment (Optional, boolean)

Specifies if the given environment is specific to the deployment and will no longer exist at some point in the future. Default: false.

Developing

To lint the plugin.yml file:

docker-compose run --rm lint

To run the tests:

docker-compose run --rm -e GITHUB_USERNAME=trunkbot -e GITHUB_TOKEN=abc123 tests

Releasing

Bump the version in README example and publish it as a git tag.

About

Creates GitHub Deployment before/after a Buildkite step is executed.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 4

  •  
  •  
  •  
  •  

Languages