Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Local backend fails when using clone configuration #1931

Closed
5 tasks done
adamcstephens opened this issue Jul 4, 2023 · 7 comments
Closed
5 tasks done

Local backend fails when using clone configuration #1931

adamcstephens opened this issue Jul 4, 2023 · 7 comments
Labels
backend/local bug Something isn't working
Milestone

Comments

@adamcstephens
Copy link

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.

if step.Image == constant.DefaultCloneImage {
// Default clone step
// TODO: use tmp HOME and insert netrc and delete it after clone
env = append(env, "CI_WORKSPACE="+state.workspaceDir)
command = append(command, "plugin-git")
} else {
// Use "image name" as run command
command = append(command, step.Image)
command = append(command, "-c")

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

  • Read the Contributing Guidelines.
  • Read the docs.
  • Check that there isn't already an issue that reports the same bug to avoid creating a duplicate.
  • Checked that the bug isn't fixed in the next version already [https://woodpecker-ci.org/faq#which-version-of-woodpecker-should-i-use]
  • Check that this is a concrete bug. For Q&A join our Discord Chat Server or the Matrix room.
@adamcstephens adamcstephens added the bug Something isn't working label Jul 4, 2023
@adamcstephens
Copy link
Author

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

@6543
Copy link
Member

6543 commented Jul 9, 2023

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
Copy link
Member

anbraten commented Aug 8, 2023

Was this solved by #2017?

@6543
Copy link
Member

6543 commented Aug 8, 2023

Uh most likely but i have to test

@6543
Copy link
Member

6543 commented Aug 17, 2023

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

@6543 6543 closed this as completed Aug 17, 2023
@6543 6543 added this to the 1.1.0 milestone Aug 17, 2023
@6543
Copy link
Member

6543 commented Aug 17, 2023

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

@adamcstephens
Copy link
Author

Thanks! #2239 definitely looks like an improvement :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backend/local bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants