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

when.status:failure doesn't work across workflows (runs_on:failure) #4355

Open
3 tasks done
zc-devs opened this issue Nov 11, 2024 · 1 comment
Open
3 tasks done

when.status:failure doesn't work across workflows (runs_on:failure) #4355

zc-devs opened this issue Nov 11, 2024 · 1 comment
Labels
bug Something isn't working

Comments

@zc-devs
Copy link
Contributor

zc-devs commented Nov 11, 2024

Component

server

Describe the bug

Step with when.status: [failure] doesn't run on failed pipeline, instead runs step with when.status: [success].

Steps to reproduce

  1. Woodpecker + some Forge
  2. Make a pipeline
# build.yaml
skip_clone: true
steps:
  build:
    image: alpine
    commands:
      - echo 'Building the app'
      - exit 1 # 0 - success, 1 - fail
# notifications.yaml
skip_clone: true
depends_on: [build]
runs_on: [success, failure]
steps:
  fail-notification:
    when:
      - status: [failure]
    image: alpine
    commands:
      - echo 'Build failed'
  success-notification:
    when:
      - status: [success]
    image: alpine
    commands:
      - echo 'Build succeed'
  1. Run manually and get wrong step execution
    Screenshot 2024-11-11 1

Expected behavior

  1. fail-notification step runs
  2. success-notification skips

System Info

WP `next-f87e80381b`, `2.7.1`, Gitea, Postgres 16

Additional context

#4337 (comment)

Validations

  • 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]
@zc-devs zc-devs added the bug Something isn't working label Nov 11, 2024
@pat-s
Copy link
Contributor

pat-s commented Nov 18, 2024

It works within a pipeline but not across, hence the title should likely be updated to include this condition/detail.

@zc-devs zc-devs changed the title when.status:failure doesn't work when.status:failure doesn't work across workflows (runs_on: failure) Nov 19, 2024
@zc-devs zc-devs changed the title when.status:failure doesn't work across workflows (runs_on: failure) when.status:failure doesn't work across workflows (runs_on:failure) Nov 19, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants