title: Custom ServerGate Task - "Agent.JobStatus" Does not Resolve
body: <p>I am creating a new Azure DevOps custom task that will RUN ON "ServerGate". I have setup my HttpExecution for this task, and intend to use it for PRE and POST Deployment Approval Gate. When this executes for a Post Deployment Approval Gate, I would like to send the status of the job (i.e. Succeeded, Failed, etc) to my API. I thought I could just use "Agent.JobStatus" variable, but this is not resolving in the ServerGate. </p>
  
  <p>Is there another variable I should use to get access to the status of the current stage (i.e. success?)?</p>
  
  <p>Details on variables for Agent.JobStatus: <a href="https://docs.microsoft.com/en-us/azure/devops/pipelines/build/variables?view=azure-devops&amp;tabs=classic" rel="nofollow noreferrer">https://docs.microsoft.com/en-us/azure/devops/pipelines/build/variables?view=azure-devops&amp;tabs=classic</a></p>
  
  <p>Details on authoring server gates I have been following: <a href="https://github.com/microsoft/azure-pipelines-tasks/blob/master/docs/authoring/servertaskauthoring.md" rel="nofollow noreferrer">https://github.com/microsoft/azure-pipelines-tasks/blob/master/docs/authoring/servertaskauthoring.md</a></p>
  
  <p>Example of my ServerGate:</p>
  
  <pre><code>"execution": {
      "HttpRequest": {
        "Execute": {
          "EndpointId":"",
          "EndpointUrl": "https://my-gate.com/ready",
          "Method": "POST",
          "Body": "{\"status\":\"$(Agent.JobStatus)\", \"name\":\"$(Release.ReleaseName)\"}",
          "Headers":"{\n\"Content-Type\":\"application/json\"\n}",
          "WaitForCompletion":"false",
          "Expression": "eq(root['approved'], 'true')"
        }
      }
    }
  </code></pre>
  
  <p>When this resolves in the output, the status just shows as: "$(Agent.JobStatus)".... while I am able to resolve the "name" into the actual name of the release definition in execution.</p>
  
  <p>I expected to receive the proper status resolving on POST deployment gates to be "Successful", etc as indicated in the documentation noted above.</p>