microadam / drone-config-changeset-conditional

The Unlicense
65 stars 16 forks source link

Does it support drone 0.8 configuration? #20

Open sudip-moengage opened 4 years ago

sudip-moengage commented 4 years ago

I am migrating from drone enterprise 1.0 to woodpecker (fork of drone 0.8).

My configuration which is written on 1.0 is working fine. But, when I downgrade to 0.8, drone enterprise and woodpecker both running pipeline even if files which required to be changed to trigger builds are not changed.

drone.yml:

pipeline:
  build:
    image: plugins/ecr
    context: ./helm/
    dockerfile: ./helm/Dockerfile
    repo: account.dkr.ecr.us-east-1.amazonaws.com/sre/tiller-ca
    tags:
      - ${DRONE_COMMIT_SHA:0:8}
      - ${DRONE_COMMIT_BRANCH}
      - latest
    when:
      changeset:
        includes: [ helm/** ]

But this 1.0 configuration works for enterprise:

---
kind: pipeline
name: helm

services:
- name: docker
  image: docker:dind
  privileged: true
  volumes:
  - name: dockersock
    path: /var/run

volumes:
- name: dockersock
  temp: {}

steps:
- name: Helm Tiller CA build
  image: docker:dind
  commands:
    - sleep 10
    - docker build ./helm/
  volumes:
    - name: dockersock
      path: /var/run
  when:
    changeset:
      includes: [ helm/** ]
- name: Helm Tiller CA publish
  image: plugins/ecr
  settings:
    context: ./helm/
    dockerfile: ./helm/Dockerfile
    repo: account.dkr.ecr.us-east-1.amazonaws.com/sre/tiller-ca
    registry: account.dkr.ecr.us-east-1.amazonaws.com
    tags:
      - ${DRONE_COMMIT_SHA:0:8}
      - ${DRONE_COMMIT_BRANCH}
      - latest
  when:
    changeset:
      includes: [ helm/** ]

trigger:
  branch: master
  event: [ push ]

Config-changeset-plugin logs:

Processing...
Files changed: [ '.drone.yml', 'README.md' ]
Processing...
Files changed: [ '.drone.yml', 'README.md' ]
microadam commented 4 years ago

Hello,

This has only ever been tested on drone 1.0+. It seems that it doesn't work on 0.8 at present from your testing. I have no plans to add support for 0.8, but if you are able to make it backwards compatible, then I would be happy to accept a pull request