cloudfoundry-community / slack-notification-resource

Concourse CI resource for sending notifications to Slack.
MIT License
75 stars 82 forks source link

TEXT_FILE_CONTENT not interpolated in attachment text #38

Closed adamwg closed 6 years ago

adamwg commented 7 years ago

I have a task that looks like this:

  put: notify-slack
  params:
    text_file: metadata/github_link
    text: "*success*"
    attachments:
      - text: "Job <$ATC_EXTERNAL_URL/teams/$BUILD_TEAM_NAME/pipelines/$BUILD_PIPELINE_NAME/jobs/$BUILD_JOB_NAME|$BUILD_JOB_NAME> for $TEXT_FILE_CONTENT (<$ATC_EXTERNAL_URL/builds/$BUILD_ID|Details>)"
        color: "good"

A previous task generates the metadata/github_link file. I've verified that it is there and looks as expected in the notify-slack container.

In builds on August 1 the attachment text was getting interpolated as expected. In builds this week the ATC_* variables are being interpolated correctly, but TEXT_FILE_CONTENT ends up empty - i.e., the resulting attachment text looks like:

Job build for (Details)

I haven't changed anything in my pipeline config in the meantime, so I believe this is a recently-introduced bug in the slack-notification-resource.

jhunt commented 6 years ago

Is this addressed by #39 (now merged)?

adamwg commented 6 years ago

Yes, just tested the latest :edge image and it appears to be working. Thanks!

adamwg commented 6 years ago

@jhunt Would it be possible to tag a release with this fix? I'm a little wary of using the :edge tag, but afaik it's the only one with the fix. Thanks!

jhunt commented 6 years ago

Will do

jhunt commented 6 years ago

1.3.1 should be good to go @adamwg

adamwg commented 6 years ago

Thanks! I'll update our pipelines to 1.3.1 when I have a moment.