woodpecker icon indicating copy to clipboard operation
woodpecker copied to clipboard

Do not run clone step if no pipeline step will run

Open qwerty287 opened this issue 3 years ago • 8 comments

Clear and concise description of the problem

Woodpecker clones the repository for every pipeline, even if no step will run. Woodpecker's own CI is doing this every time on PRs, e.g. https://ci.woodpecker-ci.org/woodpecker-ci/woodpecker/build/2025/22 clones the repo, but no steps will run.

Suggested solution

To save time and resources (#772), it would be good to just skip the step and hide the pipeline in the UI or even skip the pipeline completely.

Alternative

You could use a custom clone step that only runs on some conditions.

Additional context

For an example, see https://ci.woodpecker-ci.org/woodpecker-ci/woodpecker/build/2025/22

Validations

  • [X] Read the Contributing Guidelines.
  • [X] Read the docs.
  • [X] Check that there isn't already an issue that request the same feature to avoid creating a duplicate.

qwerty287 avatar Feb 14 '22 16:02 qwerty287

we have to handle the case that the pipeline should still be reported as "successfull" even if nothing will run ... as it would do now

6543 avatar Feb 14 '22 17:02 6543

we have to handle the case that the pipeline should still be reported as "successfull" even if nothing will run ... as it would do now

but if we skip clone, and no pipeline step, what will report? i support if no pipeline step then skip clone

xuecanlong avatar Mar 31 '22 02:03 xuecanlong

A proper implementation would report a "success" state back (it is successful, so this should be reported back to the forges).

qwerty287 avatar Mar 31 '22 05:03 qwerty287

A proper implementation would report a "success" state back (it is successful, so this should be reported back to the forges).

but why we don't skip clone, just report success. for this case, clone isn't necessary

xuecanlong avatar Mar 31 '22 05:03 xuecanlong

That's what this issue is for.

qwerty287 avatar Mar 31 '22 05:03 qwerty287

reopend by e2e094cfda87becedf7a37d6077fabea2c97ebb5 because of #931

6543 avatar May 20 '22 03:05 6543

Still getting this

Powersource avatar Apr 14 '24 14:04 Powersource

Still getting this here too.

runiq avatar Aug 21 '24 16:08 runiq