title: Jenkins: adding CUSTOM variables for a build
body: <p>Jenkins successfully create build for Android and then uploads to an S3 server. The build contains environment name, version number that is different for each build. These version number, environments are read from POM profiles. An example URL of s3 <a href="http://example.com/android/staging/ABC-Project-v0.1.58-staging-aligned.apk" rel="nofollow">http://example.com/android/staging/ABC-Project-v0.1.58-staging-aligned.apk</a></p>
  
  <p>I get the file name by this </p>
  
  <pre><code>cd $WORKSPACE/target/
  FILE_NAME=$(echo *aligned.apk)
  </code></pre>
  
  <p>So my link will be <code>http://example.com/dev/FILE_NAME</code></p>
  
  <p>But this is only visible in shell script. I want to use this in an email template so that the Software test engineers can access it. I was looking for a way in which I can temporarily assign this value to a variable and then put that in the email template. </p>
  
  <p>Email template is:</p>
  
  
  
  <pre><code>&lt;html&gt;
  &lt;body&gt;
  &lt;h3&gt;$PROJECT_NAME&lt;/h3&gt;
  &lt;h4&gt;Build #$BUILD_NUMBER - $BUILD_STATUS&lt;/h4&gt;
  &lt;h4&gt;${CAUSE}&lt;/h4&gt;
  &lt;h4&gt;$DEFAULT_CONTENT&lt;/h4&gt;
  &lt;h4&gt;Git Branch: ${GIT_BRANCH}&lt;/h4&gt;
  
  Changes since the last build:
  
  ${CHANGES}
  
  &lt;/body&gt;
  &lt;/html&gt; 
  </code></pre>