-
-
Notifications
You must be signed in to change notification settings - Fork 382
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
Global when does not work together with global branches filter [solved] #1941
Comments
witch forge do you use? |
gitea |
I just tried the latest version |
this is strange I tested this config and it does exactly what I expect: when:
branch: main
steps:
echo:
image: bash
commands: echo ja I get a pipeline on |
what event did you use as trigger? (mine was a push) |
Sorry I just test it 10 different ways until I found the problem, and it's me. when:
event: push
branch: master # <--- I thought the error referred to this
path: "src/*"
steps:
build:
image: alpine
commands:
- echo 'hello world'
branches: master # <--- but it actually referred to this!!! I think I was looking at the stable and next versions of the docs at the same time! The one is from the old stable and the other is from the next. Again apologies! 🙏 The "next" version becoming stable is really needed. I'm wathicng that milestone daily! :-) |
I think the problem is somestimes when clicking links in the docs, if I'm not careful it redirects to the wrong version. Easy to get confused. I will keep an eye on that and report anything weird. |
Interesting point though, that is was deprecated. I assume there is no replacement for "global when with branch". |
tldr: global when was introduced in next (upcomming v1.0.0) and do deprecate the old global branches filter ... there is a "migration" running to make transition smoth: woodpecker/pipeline/frontend/yaml/parse.go Lines 20 to 30 in 45319b2
but you should not use the old and the new ways at the same time ... dont expect magic :D |
No of course not, it wasn't an expectation of magic... it was stupidity on my part! I discovered the issue BTW, when you go to the docs it always opens the stable version by default. So I have some browser tabs showing stable and some showing next. It's easy to get mixed up, BUT, I should have known better! |
#1855 will fix that |
Component
server
Describe the bug
The docs show an example of a global when with
branch
condition:When I tried that, I get an error:
System Info
version "next-b616a822a0-alpine"
Additional context
No response
Validations
next
version already [https://woodpecker-ci.org/faq#which-version-of-woodpecker-should-i-use]The text was updated successfully, but these errors were encountered: