woodpecker-ci / woodpecker

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

Local backend fails when using clone configuration #1931

Closed adamcstephens closed 1 year ago

adamcstephens commented 1 year ago

Component

server

Describe the bug

When using a local backend and specifying a clone configuration, the clone step fails.

This configuration:

clone:
  git:
    image: plugin-git
    settings:
      partial: false
      depth: 20

Generates this error:

Incorrect Usage. flag provided but not defined: -c

NAME:
   git plugin - git plugin
<SNIP>

Looking through the backend led me to try using the constant string. https://github.com/woodpecker-ci/woodpecker/blob/0cf602a1f6b1ef688eabb209e9bd2f5d0f9ce164/pipeline/backend/local/local.go#L131-L139

This does /not/ fail, but the settings are not honored nor supported.

clone:
  git:
    image: docker.io/woodpeckerci/plugin-git:2.0.3
    settings:
      partial: false

System Info

{"source":"https://github.com/woodpecker-ci/woodpecker","version":"next-3158980d"}

Additional context

No response

Validations

adamcstephens commented 1 year ago

SSH backend seems to have the same logic, and I suspect the same lack of support.

6543 commented 1 year ago

With #1958 we dont need to guess if it's a clone step anymore ... the backend get's to know the types then too

anbraten commented 1 year ago

Was this solved by #2017?

6543 commented 1 year ago

Uh most likely but i have to test

6543 commented 1 year ago

yes it is ... but there looks to be a regression ... I'll close this and we can open a new issue if needed ...

6543 commented 1 year ago

also "plugins" as in the example config will be supported by #2239

adamcstephens commented 1 year ago

Thanks! #2239 definitely looks like an improvement :)