title: Jenkins - How to pass variables to Bitbucket status notify plugin?
body: <p>I am trying to pass variables to Bitbucketstatusnotify plugin but it's not working. I have tried different iterations and using escape characters etc to no avail. Is this even possible ? If yes, how ?</p>
  
  <p>My jenkins pipeline snippet below:</p>
  
  <pre><code>REPO_SLUG = sh(script: "echo ${GIT_URL} | grep -oP '(?&lt;=/).*[^.git]'", returnStdout: true)
  
  // Update Bitbucket commit build status to In Progress  
  bitbucketStatusNotify(buildState: 'INPROGRESS', repoSlug: "${REPO_SLUG}", commitId: "${GIT_COMMIT}")
  
  try {
  
  //build code here
  
  // Update Bitbucket commit build status to Successful  
  bitbucketStatusNotify(buildState: 'SUCCESSFUL', repoSlug: "${REPO_SLUG}", commitId: "${GIT_COMMIT}")
  
  
  } catch (Exception e) {
  
  echo 'Error occured: ' + e
  
  // Update Bitbucket commit build status to Failed  
  bitbucketStatusNotify(buildState: 'FAILED', repoSlug: "${REPO_SLUG}", commitId: "${GIT_COMMIT}")
  
  }
  </code></pre>
  
  <p>Please <strong>note</strong> that GIT_COMMIT is a jenkins environment variable. I tried echo on these variables and see correct values as expected however passing them to this plugin does not seem to be working.</p>