Skip to content
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

subject text not picking up variables. #6

Open
mrmcmuffinz opened this issue Mar 22, 2017 · 1 comment
Open

subject text not picking up variables. #6

mrmcmuffinz opened this issue Mar 22, 2017 · 1 comment

Comments

@mrmcmuffinz
Copy link

mrmcmuffinz commented Mar 22, 2017

Scenario

Trying to send email after task completion for on_success and on_failure but the subject_text is not being constructed properly.

Code

- put: send-email
    params:
      to_file: email-message/to_file.txt
      subject_text: Concourse CI $BUILD_PIPELINE_NAME Failure
      body: slack-message/slack.message.txt

Even if I encapsulate the subject_text with double quotes to represent it as a string the variables are still not being evaluated. Any idea why this is the case?

@mdomke
Copy link
Owner

mdomke commented Mar 26, 2017

Variable substitution is in Jinja template syntax, so you usually would write

Concourse CI {{ BUILD_PIPELINE_NAME }} Failure

Since I didn't implement the subject_text and body_text configuration values myself I don't know how this interferes with the {{parameters}}-syntax of concourse itself. Maybe @knifhen can shed some light on this. I would have to try that out myself. I hope I could point you into the right direction. Feel free to share your findings ;-)

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

2 participants