woodpecker-ci / woodpecker

Woodpecker is a simple, yet powerful CI/CD engine with great extensibility.
https://woodpecker-ci.org
Apache License 2.0
4.07k stars 351 forks source link

Do not run clone step if no pipeline step will run #778

Open qwerty287 opened 2 years ago

qwerty287 commented 2 years ago

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

6543 commented 2 years ago

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

xuecanlong commented 2 years ago

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

qwerty287 commented 2 years ago

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

xuecanlong commented 2 years ago

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

qwerty287 commented 2 years ago

That's what this issue is for.

6543 commented 2 years ago

reopend by e2e094cfda87becedf7a37d6077fabea2c97ebb5 because of #931

Powersource commented 4 months ago

Still getting this

runiq commented 2 weeks ago

Still getting this here too.