Bug: Unexpected token "punctuation" of value "|" #6

Closed
opened 2024-02-05 20:32:11 +01:00 by philipkozeny · 2 comments

the latest version of the plugin seems to always fail with

ERROR - Syntax error
Unexpected token "punctuation" of value "|" ("name" expected) in "__string_template__9d11e62afcdab69dfe74bb9d54711f51" at line 1.

here is the config I use:

  mail:
    image: deblan/woodpecker-email
    settings:
      from:
        from_secret: email_user
      from.name:
        from_secret: email_user
      host:
        from_secret: email_host
      username:
        from_secret: email_user
      password:
        from_secret: email_password
      evaluate: 'CI_STEP_STATUS == "failure" || CI_PREV_PIPELINE_STATUS == "failure"'
    when:
      - status: [ success, failure ]
      - event: [push, pull_request, tag, deployment, cron, manual]

thanks

the latest version of the plugin seems to always fail with ``` ERROR - Syntax error Unexpected token "punctuation" of value "|" ("name" expected) in "__string_template__9d11e62afcdab69dfe74bb9d54711f51" at line 1. ``` here is the config I use: ``` mail: image: deblan/woodpecker-email settings: from: from_secret: email_user from.name: from_secret: email_user host: from_secret: email_host username: from_secret: email_user password: from_secret: email_password evaluate: 'CI_STEP_STATUS == "failure" || CI_PREV_PIPELINE_STATUS == "failure"' when: - status: [ success, failure ] - event: [push, pull_request, tag, deployment, cron, manual] ``` thanks
Owner

The plugin has been refactored with another language and so the evaluation syntax changed. Replace || with or.

You have to change:

The plugin has been refactored with another language and so the evaluation syntax changed. Replace `||` with `or`. You have to change: - the way to specify the mail server: https://gitnet.fr/deblan/woodpecker-email/src/branch/develop/DOCS.md#settings - variables: https://gitnet.fr/deblan/woodpecker-email/src/branch/develop/DOCS.md#evaluation-and-content
Author

Thanks for the quick update!

Thanks for the quick update!
Sign in to join this conversation.
No milestone
No project
No assignees
2 participants
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference: deblan/woodpecker-email#6
No description provided.