Coder Social home page Coder Social logo

Comments (6)

Leen15 avatar Leen15 commented on August 24, 2024 2

The same here.
The slack message arrives empty in slack and all the pipelines are failing.

from drone-slack.

donny-dont avatar donny-dont commented on August 24, 2024

@Leen15 are you using since as well or is this something different? The type changed from int64 to time.Time.

from drone-slack.

Leen15 avatar Leen15 commented on August 24, 2024

@donny-dont I'm using this plugin configured as follow:

---
kind: pipeline
name: notify-pipeline-start

steps:
  - name: slack
    image: plugins/slack
    settings:
      webhook:
        from_secret: SLACK_WEBHOOK
      channel:
        from_secret: SLACK_CHANNEL
      link_names: true
      # template source: https://gist.github.com/wzulfikar/e9064862d17467ed36b81d2f2c17389a
      template: >
        {{#if build.pull }}
          *Build started*: {{ repo.owner }}/{{ repo.name }} - <https://github.com/{{ repo.owner }}/{{ repo.name }}/pull/{{ build.pull }}|Pull Request #{{ build.pull }}>
        {{else}}
          *Build started: {{ repo.owner }}/{{ repo.name }} - Build #{{ build.number }}* (type: `{{ build.event }}`)
        {{/if}}
        Commit: <https://github.com/{{ repo.owner }}/{{ repo.name }}/commit/{{ build.commit }}|{{ truncate build.commit 8 }}>
        Branch: <https://github.com/{{ repo.owner }}/{{ repo.name }}/commits/{{ build.branch }}|{{ build.branch }}>
        Author: {{ build.author }}
        <{{ build.link }}|Visit build page ↗>

---
kind: pipeline
name: notify-pipeline-end

steps:
  - name: slack
    image: plugins/slack
    settings:
      webhook:
        from_secret: SLACK_WEBHOOK
      channel:
        from_secret: SLACK_CHANNEL
      link_names: true
      template: >
        {{#if build.pull }}
          *{{#success build.status}}✔{{ else }}✘{{/success}} {{ uppercasefirst build.status }}*: {{ repo.owner }}/{{ repo.name }} - <https://github.com/{{ repo.owner }}/{{ repo.name }}/pull/{{ build.pull }}|Pull Request #{{ build.pull }}>
        {{else}}
          *{{#success build.status}}✔{{ else }}✘{{/success}} {{ uppercasefirst build.status }}: {{ repo.owner }}/{{ repo.name }} - Build #{{ build.number }}* (type: `{{ build.event }}`)
        {{/if}}
        Commit: <https://github.com/{{ repo.owner }}/{{ repo.name }}/commit/{{ build.commit }}|{{ truncate build.commit 8 }}>
        Branch: <https://github.com/{{ repo.owner }}/{{ repo.name }}/commits/{{ build.branch }}|{{ build.branch }}>
        Author: {{ build.author }}
        Duration: {{ since build.created }}
        <{{ build.link }}|Visit build page ↗>

The "notify-pipeline-start" output is:

time="2020-09-17T14:45:27Z" level=info msg="sending message" channel="#********" username=

The "notify-pipeline-end" output is:

time="2020-09-17T14:48:00Z" level=error msg="execution failed: could not create template message: Evaluation error: Helper since called with argument 0 with type time.Time but it should be int64\nCurrent node:\n\tPath{Original:'build.created', Pos:726}"

I have the same steps in most of our repositories so every pipeline is failing due to this issue.

In slack it arrives an empty message (I think for the start step, nothing for the end step):

image

from drone-slack.

donny-dont avatar donny-dont commented on August 24, 2024

K thanks both of you we'll add those to a set of tests to make sure stuff doesn't break next time we try and reland this.

from drone-slack.

masterkain avatar masterkain commented on August 24, 2024

is this released? still getting empty messages in mattermost. thanks

from drone-slack.

andyfcx avatar andyfcx commented on August 24, 2024

I encountered no response in slack channel, but the drone status shows success

from drone-slack.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.