microadam / drone-config-changeset-conditional

The Unlicense
65 stars 17 forks source link

Error "cannot find named pipeline" #7

Closed alfonmga closed 4 years ago

alfonmga commented 5 years ago

I'm getting this error when no steps from a pipeline meets changeset condition.

Here's an example .drone.yml file:

kind: pipeline
name: test

platform:
  os: linux
  arch: amd64

steps:
  - name: install_dependencies
    image: node:8.15.0
    volumes:
      - name: cache
        path: /tmp/cache
    commands:
      - node -v
      - npm -v
      - yarn -v
      - yarn install --pure-lockfile --cache-folder /tmp/cache/yarn
    when:
      changeset:
        includes: ["yarn.lock", "package.json", "packages/**"]

  - name: api_test
    image: node:8.15.0
    commands:
      - MONGO_URL=mongodb://mongo:27017/api yarn test:ci:api
    when:
      changeset:
        includes: ["yarn.lock", "package.json", "packages/api/**"]

services:
  - name: mongodb
    image: mongo:3.4.9
    command: [--smallfiles]
    ports:
      - 27017
volumes:
  - name: cache
    host:
      path: /var/lib/cache

trigger:
  branch:
    - develop
    - master
  event:
    - pull_request

~And this is my failed build URL: https://drone.amgaventures.com/AMGAVentures/saas-boilerplate/1269~

alfonmga commented 5 years ago

To be honest I'm not sure at all if this issue is related to drone-config-changeset-conditional or drone.

Anyways a temporal workaround for this issue is to add a dummy step at the end like this one:

  - name: finisher
    image: node:alpine
    commands:
      - echo .