GitXplorerGitXplorer
m

drone-config-changeset-conditional

public
65 stars
16 forks
16 issues

Commits

List of commits on branch master.
Unverified
d2c1c4c113ce32e48317012a00fdf3fa30b53107

fix(#31): preserve skipped steps to avoid Drone DAG reference errors

kkdnutrien committed 3 years ago
Unverified
1a1155e13fdb68a656133496d318321c1a119821

Update to octokit

committed 4 years ago
Unverified
ac8527560024bb41d6e30f0003f858502298f226

Merge branch 'master' of github.com:microadam/drone-config-changeset-conditional

committed 5 years ago
Unverified
83e5a44dc59df55fc85e23bfe7e1eb03541f2ee1

Switch to token based auth

committed 5 years ago
Verified
b36a4454a56963ba62984e2f63b5dd3fcf36b2c8

Create LICENSE

committed 5 years ago
Verified
f4ddff67b5b78f3360de6190c35ee6bb4ff42308

Merge pull request #16 from meltwater/update-yaml-module

committed 5 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.