title: Jenkins Pipeline Evaluation Step with slackSend
body: <blockquote>
    <p>I'm trying to do an evaluation inside a configFileProvider block,
    inside a step block, inside a pipeline, Here is the full code.</p>
  </blockquote>
  
  <p>.</p>
  
  <pre><code>pipeline {
  agent any
  environment {
      GIT_CREDS = credentials('GIT')
      }
  
  stages {
      stage ('Load Repos') {
      steps {
          cleanWs notFailBuild: true
          sh """
          env
          git clone "https://$GIT_CREDS@$GIT_URL
          git clone "https://$GIT_CREDS@$CONTENT_URL_SHORT"
          """
      }
      }
  
      stage ('Run Content Build Script') {
      steps {
          slackSend channel: 'notif', message: "Started Content Build and Validate for ${env.CONTENT_GIT_REPO} for Repository ${env.CONTENT_GIT_URL} by ${env.JOB_NAME} (&lt;${env.BUILD_URL}|Open&gt;)", tokenCredentialId: '&lt;Token&gt;'
          configFileProvider(
          [configFile(fileId: '605dae22-d459-4c9a-8d3c-f88d305195aa', variable: 'script')]) {
              sh(returnStatus: true, script: """python3.6 $script""")
              if (returnStatus != 0) {
                  currentBuild.result = 'FAILED'
                  slackSend channel: SLACK_CHANNEL, message: "Content Build and Validate FAILED for ${env.CONTENT_GIT_REPO} for Repository ${env.CONTENT_GIT_URL} by ${env.JOB_NAME} (&lt;${env.BUILD_URL}|Open&gt;)", color: 'warning', tokenCredentialId: 'slack-token'
              }
              else {
                  slackSend channel: SLACK_CHANNEL, message: "Content Build and Validate Succeded for ${env.CONTENT_GIT_REPO} for Repository ${env.CONTENT_GIT_URL} by ${env.JOB_NAME} (&lt;${env.BUILD_URL}|Open&gt;)", color: 'success', tokenCredentialId: 'slack-token'
              }
          }
      }
      }
  </code></pre>
  
  <blockquote>
    <p>The block I'm interested in is:</p>
  </blockquote>
  
  <pre><code>configFileProvider(
          [configFile(fileId: '605dae22-d459-4c9a-8d3c-f88d305195aa', variable: 'script')]) {
              sh(returnStatus: true, script: """python3.6 $script""")
              if (returnStatus != 0) {
                  currentBuild.result = 'FAILED'
                  slackSend channel: SLACK_CHANNEL, message: "Content Build and Validate FAILED for ${env.CONTENT_GIT_REPO} for Repository ${env.CONTENT_GIT_URL} by ${env.JOB_NAME} (&lt;${env.BUILD_URL}|Open&gt;)", color: 'warning', tokenCredentialId: 'slack-token'
              }
              else {
                  slackSend channel: SLACK_CHANNEL, message: "Content Build and Validate Succeded for ${env.CONTENT_GIT_REPO} for Repository ${env.CONTENT_GIT_URL} by ${env.JOB_NAME} (&lt;${env.BUILD_URL}|Open&gt;)", color: 'success', tokenCredentialId: 'slack-token'
              }
          }
  </code></pre>
  
  <blockquote>
    <p>Basically I want to evaluate the success of the script based on return status and send a slack message based on that. I've tried a few different ways, like trying to set the script run as the evaluation like:</p>
  </blockquote>
  
  <p>if (python3.6 "$script) { ......</p>
  
  <blockquote>
    <p>That Didn't work either, Any Suggestions would be greatly appreciated.</p>
  </blockquote>