I’m not sure what i’m doing wrong here, any help would be greatly appreciated.
Building a pipeline where certain events (like deployments) happen on tags. I’m using drone exec to test said pipeline and i can’t seem to be able to trigger any steps on tag events.
First is that your pipeline steps are limited to master and feature/* branches. A Tag is a pointer to a commit sha and has no formal association with a branch. Your steps will therefore never execute for a branch. Consider the following modification:
i think i figure out what my problem is: drone exec seems to be evaluating one single pipeline and in my case i have two of them. if i pass --pipeline Deploy to docker exec the execution is as expected.
i honestly expected that drone exec behaves similar to a drone agent in case of multiple pipelines and it will execute the first one that matches the criteria. doesn’t seem to be the case. is it by design or a bug?
doesn’t seem to be the case. is it by design or a bug?
It is by design
i honestly expected that drone exec behaves similar to a drone agent in case of multiple pipelines and it will execute the first one that matches the criteria.
It does. the agent only executes the named pipeline that the server tells it to execute. In this way the CLI behaves the same.
i see, thank you so much for the info. if you don’t mind me asking: how does the server figures out which pipeline to run?
i’m pretty sure in our setup we don’t have anything that we configure to pick the right pipeline so there must be something somewhere that figures out which pipeline to execute. all our services have multiple pipelines in a single .drone.yml
Drone has an internal fifo queue of scheduled pipelines. The server assigns a single named pipeline to an agent based on availability, and the agent then executes the named pipeline.
hmm…i don’t think we are talking about the same thing here. how does the named pipeline gets picked? or maybe i should ask: how does the server knows which named pipeline to send to the agent?
above i have two named pipelines in the same file and i definitely don’t pick which one to run, something is doing that.
if you look at my example i have two pipelines: one named Build which triggers by a push to certain branch names and one named Deploy that is triggered by a tag. so something decides…oh, the event i received from the hook is a tag event…let me see which pipeline would match event: tag AND the tag name matches"…that piece. makes sense?