Skip to content

jquick/pre-hook-buildkite-plugin

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Pre-Hook Commands Buildkite Plugin

This Plugin runs a set of commands as bash script as a pre-hook. This is useful when you use docker-compose on steps to set env's with a pre-hook.

current version v1.2.0

Usage:

steps:
  - plugins:
    - jquick/pre-hook#v1.2.0:
      commands:
        - export MY_ENV=1234
        - |-
          if [[ -z $ENV ]]; than
            export MY_NEW_ENV=456
          fi
steps:
  - plugins:
    - jquick/pre-hook#v1.2.0:
      command: "export MY_ENV=345"
steps:
  - plugins:
    - jquick/pre-hook#v1.2.0:
      script: .buildkite/scripts/set_env

Configuration

command

A string to be ran during the prehook.

commands

An array of strings to be ran during the prehook.

script

A string of script to be ran. It defaults to use BUILDKITE_BUILD_CHECKOUT_PATH as the path prefix:

${BUILDKITE_BUILD_CHECKOUT_PATH}/<my_script_string>

If the path starts with a "/" the checkout path will be omitted.

License

MIT

About

buildkite plugin to run commands as a pre-hook

Topics

Resources

Stars

Watchers

Forks

Packages

No packages published

Languages