Skip to content

build.link shows commit, not build #73

Description

@sebphi

Hi! Sorry in advance if this is not the right place.

We use drone-email successfully with woodpecker (replacement for drone) and the email which is sent on e.g. failure contains a link to the commit that supposedly caused the failure. However, the email text says Failed build #xxx and it would make more sense to me if the link actually lead to the build (often enough, it's not the commit causing the fail, but something else in our build chain).

If i see that right, the template uses build.link and that is set by the environment variable DRONE_BUILD_LINK which already contains the erroneous link (found out by an echo command in a build step). Is there something that can be done within the notify step to set DRONE_BUILD_LINK to the proper value? Here is what that step looks like atm:

  notify:
    image: docker-proxy/drillster/drone-email
    pull: true
    settings:
      host: mail.domain
      from: woodpecker@domain
      username: mailsender
      password:
        from_secret: email_password
      recipients:
      - woodpecker@domain
      starttls: true
    when:
      event: [push, pull_request]
      status:
      - failure
      - success

I have tried commands and environment so far, to no avail.

Or is this something which would need to be fixed in woodpecker (or somewhere else)?

Thanks in advance,

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions