title: How to send environment variables using curl
body: <p>I am trying to use slack to notify when a build is complete or if a build fails on GitlabCI. What I also wanna be able to do is append a predefined environment variable $GITLAB_CI_COMMIT_TITLE so along with the build  notification I also know which build with what commit has completed/failed</p>
  
  <p>In short,</p>
  
  <p><strong>This works</strong></p>
  
  <pre><code>"curl -X POST -H 'Content-type: application/json' --data '{\"text\":\" Client Staging build complete. \n\"}'
  https://hooks.slack.com/services/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"
  </code></pre>
  
  <p><strong>But this doesnt</strong></p>
  
  <pre><code>"curl -X POST -H 'Content-type: application/json' --data-binary '{
        "'"$CI_COMMIT_TITLE"'" \n\"}'
  </code></pre>
  
  <p>The second command works, but it doesnt export the value of the variable, I just see '$CI_COMMIT_TITLE' in the slack notification.</p>
  
  <p>What am I doing wrong? Any help will be greatly appreciated! Thank you!</p>