Skip to content

Interpolation in attachment text doesn't work #25

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

Closed
analytically opened this issue Feb 14, 2017 · 5 comments
Closed

Interpolation in attachment text doesn't work #25

analytically opened this issue Feb 14, 2017 · 5 comments
Assignees

Comments

@analytically
Copy link

No description provided.

@flightofthunder
Copy link

flightofthunder commented Feb 15, 2017

I'm having this issue too. Doing something like this:

attachments:
  - color: '#99ccff'
    text: |
      $ATC_EXTERNAL_URL/teams/$BUILD_TEAM_NAME/pipelines/$BUILD_PIPELINE_NAME/jobs/$BUILD_JOB_NAME/builds/$BUILD_NAME

will output the string verbatim, whereas I would expect it to interpret the metadata variables.

@jhunt
Copy link
Contributor

jhunt commented Feb 22, 2017

I will take a look at this tonight, @analytically

@analytically
Copy link
Author

Thanks!

jhunt added a commit that referenced this issue Feb 22, 2017
Fixes #25.

The gist of this change is to iterate over the attachments, pulling out
the `text' field and eval/printfing it, and then merging them back
together using jq's `*' operator.  This may not be the right way to do
this.  This may not be the best way to do this, but it does seem to
work, and that's got to count for something.
@jhunt jhunt closed this as completed in #27 Feb 23, 2017
jhunt added a commit that referenced this issue Feb 23, 2017
Fixes #25.

The gist of this change is to iterate over the attachments, pulling out
the `text' field and eval/printfing it, and then merging them back
together using jq's `*' operator.  This may not be the right way to do
this.  This may not be the best way to do this, but it does seem to
work, and that's got to count for something.
@shedali
Copy link

shedali commented Mar 15, 2017

This works great - interpolation of values in the fields array would also be useful.

@jagregory
Copy link

+1 for the fields array too.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants