Promotion UI silently fails if no pipeline can be triggered

Hi there. First of all, thanks for your great work! I love drone, still finding out new great stuff.

We are probably going to try to automate the entire process In the long run, this will include triggering deployments. As a first step, we want to have some sort of deployment done by drone. Right now, we are using the promotion feature.

What I did. I have two pipelines.

The first one does testing, configuration for triggers look like this:

trigger:
  event:
    - push
    - pr
    - tag

The second one should allow to deploy tagged builds that passed the first pipeline. So I created this trigger configuration for that:

trigger:
  event:
    - promote
  ref:
    - refs/tags/*

This works. I can only promote if a tagged build passes the first pipeline.

I tried to run the promotion from the pipeline that was triggered by the push event. As I wanted, this is not possible. The UI fails silently, though. I can click the promote button and enter stuff, when clicking on ‘submit’ just nothing happens. There is a JS error, so I guess the information on pipelines I could trigger must be in the frontend somewhere. If so, the promotion button should not be active if no promotion can be triggered.

This is the JS error I get:

Bildschirmfoto 2021-02-07 um 14.28.44

not quite … it is the backend, specifically your yaml configuration file that is dynamically fetched and evaluated, that determines whether or not a pipeline can be triggered. If you have a trigger section in your yaml that evaluates to false, and no pipeline executes, a null object is returned to the user interface, hence the stacktrace.

but yes, we should do a better job of handling the null and surfacing why no pipeline executes.