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 353 forks source link

Fix clone-image recognition for netrc inject filter #1948

Closed 6543 closed 1 year ago

6543 commented 1 year ago

repo settings -> disable Only inject netrc credentials into trusted containers ...

that filter is currently bit broken :/ (it does not recognice the custom clone as "trusted" one atm)

version: cef135eba5f21a3e4ad429f9af51f535ce907372

TOFIX: we need to let custom clone steps that use the trusted images and are used as plugin still access the netrc by default!!!

lonix1 commented 1 year ago

My use case, for reference.

I want to specify plugins' versions for reproducible builds, instead of relying on the implicit "latest".

So I added an explicit clone step:

clone:
  git:
    image: woodpeckerci/plugin-git:2.0.3

steps:
  build:
    # ...

But it fails:

fatal: could not read Username for 'https://gitea.example.com/': No such device or address

windsource commented 1 year ago

Will also fix #1928.

6543 commented 1 year ago

Duplicate of #1928 i would say 😅

6543 commented 1 year ago

Also dublicate to #1837

lonix1 commented 1 year ago

I just tried the latest image and this now works, so thank you for fixing it!

Only difference is before it was logged as "clone", but now it's logged as "git". A little weird but no biggie.

EDIT: Not an issue for me, but maybe it matters to other people who are expecting "clone" for some scripting or something.

6543 commented 1 year ago

well if you do:

clone:
  clone:
    image: woodpeckerci/plugin-git:2.0.3

steps:
  build:
    # ...

now it's named "clone"