GitXplorerGitXplorer
m

drone-config-changeset-conditional

public
65 stars
16 forks
16 issues

Commits

List of commits on branch master.
Verified
37345343f63fb1c791cf905089dc82a442bce297

Merge pull request #35 from Agrium/master

mmicroadam committed 3 years ago
Unverified
0a986121af6a3a1311e91fd8e0f8c67593b10ef0

fix: add missing @octokit/rest dependency

kkdnutrien committed 3 years ago
Verified
4c52173a914e1219ef2c60727cca3d8d1ca8458f

Merge pull request #32 from kdnutrien/issue-31-preserve-skipped-steps

mmicroadam committed 3 years ago
Unverified
455305dae7d14c1ecea651fcff4de91fd1a57591

fix: spacing

kkdnutrien committed 3 years ago
Unverified
567ff8f96911604f36234da2285abb2a79b83c10

fix: case where no changeset was defined

kkdnutrien committed 3 years ago
Unverified
51aa1fdf421a0dc54bfd10954ec7cb627f1655ca

fix: simplify

kkdnutrien committed 3 years ago

README

The README file for this repository.

Drone Config Plugin - Changeset Conditional

This implements the ability to have steps / pipelines only execute when certain files have changed, using the following additional YAML syntax:

kind: pipeline
name: default

steps:
- name: frontend
   image: node
   commands:
     - cd app
     - npm run test
   when:
      changeset:
        includes: [ **/**.js, **/**.css, **/**.html ]

trigger:
  changeset:
    includes: [ **/**.go ]

This plugin is compatible with the Drone Config Plugin Pipeline

Installation

PLEASE NOTE: At the moment it supports only github.com installations.

Generate a GitHub access token with repo permission. This token is used to fetch the .drone.yml file and details of the files changed.

Generate a shared secret key. This key is used to secure communication between the server and agents. The secret should be 32 bytes.

$ openssl rand -hex 16
558f3eacbfd5928157cbfe34823ab921

Run the container somewhere where the drone server can reach it:

docker run \
  -p ${PLUGIN_PORT}:3000 \
  -e PLUGIN_SECRET=558f3eacbfd5928157cbfe34823ab921 \
  -e GITHUB_TOKEN=GITHUB8168c98304b \
  --name drone-changeset-conditional \
  -detach=true \
  microadam/drone-config-plugin-changeset-conditional

Update your drone server with information about the plugin:

-e DRONE_YAML_ENDPOINT=http://${PLUGIN_HOST}:${PLUGIN_PORT}
-e DRONE_YAML_SECRET=558f3eacbfd5928157cbfe34823ab921

See the official docs for extra information on installing a Configuration Provider Plugin.

Pattern Matching

This uses the Glob module under the hood, so supports all pattern matching syntaxes of this module.