Open a-zen opened 2 years ago
I also already had that error. On my side it happened after I changed the git tree (commit amend / rebase, basically something which needs a force push). When did it occur to you? Does it happen on a regular basis?
I'm not sure if we should handle this error gracefully, since something is off with this particular CI run.
You also can deal with it by adding failure: ignore
to the pipeline step where you run owncloudci/drone-skip-pipeline
. I would prefer this over never raising an error.
@wkloucek thank you for your reply. I can reproduce the issue by simply creating a new branch and push it. Afterwards the drone plugin will fail with the following error, or the before sha is empty. Maybe this is caused by my git server. I'm using gitea for this.
I implemented a solution for this but to be honest I don't like it very much:
https://github.com/a-zen/drone-skip-pipeline/commit/add81794048c710b063efbe57abd297153a87e53
I will consider adding the failure: ignore
like you suggested. That seems to be more straight forward.
@a-zen are you working with forks when this happens? (we had some problem in our CI where we just clone the fork, which didn't include the DRONE_COMMIT_BEFORE commit)
@wkloucek no I'm branching in the same repository. But I used your solution with the failure ignore to get my pipeline working. I'm ok with closing this issue. :-)
Hi,
when I create a new branch from the mainline and trigger the pipeline, the first time the plugin fails with the following error message:
I think in this case the pipeline shouldn't be skipped as it seems the changed files can't be determined.