I am not sure this question can be answered without knowing where the bottlenecks are. Which steps or commands are taking a long time? How long are they taking?
I’m facing another problem. I want the tests to only run when there is new commit inside master and development branch. I looked at the docs and I tried to use the when with branch and event but it doesn’t work for me.
I also tried to add them in all steps inside my pipeline (restore-cache, build and rebuild-cache) but when I push non-master-non-development branch, Drone still get triggered and I can see the clone, postgres and redis running in the Drone web UI (the orange bars).
How to completely skip the entire pipeline when I push to non-master/non-development branch? In other words, how to not invoke Drone when I push new commits to my code repo ie feature/report?
also, when claiming things don’t work, please provide example configuration. It is very difficult to provide support when we are not provided steps and samples to reproduce.
Can you please clarify what is working and what is not working? It would help if I better understand what is working for you, so we can focus on what isn’t working.
Can you clarify what this means? When you say “tests” didn’t run, do you mean the pipeline didn’t run? A specific step in your pipeline didn’t run? Or a specific command didn’t run?
What I meant was, after add branches: [master, development] like below, the tests (pipeline) only get triggered after I push code to master or development branch (which is what I want and solved now):
What is not working now is, the tests (pipeline) didn’t get triggered after I submit Pull Request (PR) and set the target branch for that PR to master or development branch. I tried to add when block like this…:
redis:
...
when:
event: [push, pull_request, tag]
…in all blocks (restore-cache:, build:, rebuild-cache:, postgres: and redis:) but it didn’t work for me. I also tried to make it like this…:
Yes, what I meant by ‘tests’ is my ‘pipeline’. All steps inside my pipeline didn’t run. I really appreciate your help so that I can trigger the entire pipeline when:
master get new commit(s)
development get new commit(s)
someone submit a PR and set the target branch to master or development