Giter Club home page Giter Club logo

trigger-pipeline-action-local's Introduction

Trigger Buildkite Pipeline GitHub Action

A GitHub Action for triggering a build on a Buildkite pipeline.

Features

  • Creates builds in Buildkite pipelines, setting commit, branch, message.
  • Provides the build JSON response and the build URL as outputs for downstream actions.

Usage

Create a Buildkite API Access Token with write_builds scope, and save it to your GitHub repository’s Settings → Secrets. Then you can configure your Actions workflow with the details of the pipeline to be triggered, and the settings for the build.

Configuration Options

Configuration as Input Parameters

The following workflow creates a new Buildkite build to the target pipeline on every commit.

on: [push]

steps:
  - name: Trigger a Buildkite Build
    uses: "buildkite/[email protected]"
    with:
      buildkite_api_access_token: ${{ secrets.TRIGGER_BK_BUILD_TOKEN }} 
      pipeline: "my-org/my-deploy-pipeline"
      branch: "master"
      commit: "HEAD"
      message:  ":github: Triggered from a GitHub Action"
      build_env_vars: '{"TRIGGERED_FROM_GHA": "true"}'
      build_meta_data: '{"FOO": "bar"}'
      ignore_pipeline_branch_filter: true     

Outputs

The following outputs are provided by the action:

Output var Description
url The URL of the Buildkite build.
json The JSON response returned by the Buildkite API.

Development

To run the test workflow, you use act which will run it just as it does on GitHub:

act -n

Testing

To run the tests locally, use the plugin tester (that has everything already installed) by running the Docker command

docker run --rm -ti -v "$PWD":/plugin buildkite/plugin-tester:v4.0.0

Contributing

  • Fork this repository
  • Create a new branch for your work
  • Push up any changes to your branch, and open a pull request. Don't feel it needs to be perfect — incomplete work is totally fine. We'd love to help get it ready for merging.

Releasing

  • Create a new GitHub release. The version numbers in the readme will be automatically updated.

Roadmap

  • Add a WAIT option for waiting for the Buildkite build to finish.
  • Support other properties available in the Buildkite Builds REST API, such as environment variables and meta-data.

Contributions welcome! ❤️

trigger-pipeline-action-local's People

Contributors

lizrabuya avatar toolmantim avatar james2791 avatar enricomi avatar fredr avatar toote avatar boomper-bot[bot] avatar jeremy avatar ticky avatar karensawrey avatar pauldthomson avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.