I have a downstream step after a npm package publish which will trigger linked repositories and my intent was to, within the downstream triggered build, update the npm package MODULE_NAME
and then commit again to the parent repository, which would then trigger a second build on the child repository, with the updated dependency.
The problem is that the downstream plugin is dispatched with the push
event, so it’s really like any other build for the linked repository. I was expecting the downstream plugin to trigger the custom
event, so I could have a separate pipeline only for dealing with those updates.
How would you advise achieving this behaviour without transforming the main pipeline into conditional maze, checking environment variables provided by the plugin?
thanks in advance
# main pipeline
steps
- install
- build
- test
- deploy
trigger:
event: {exclude: [tag, custom]}
---
# downstream pipeline
steps:
- 'npm update $MODULE_NAME'
- git commit -m "build: update $MODULE_NAME dependency"
- git push origin "$DRONE_BRANCH"
trigger:
event: [custom]