Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

The password to use which matches the username listed above.

 


Access Token as Parameter Authentication

...

Response

Response Variables

These can be used to extracting This field allows you to extract text values from JSON or XML responses and place them into selected configuration variables. To extract values The nodes containing the required values are selected from the JSON and XML responses, JSONpath and XPath can be used. Each has their own syntax for extracting values for nodes within the objects they represent. Below is a list of some of the syntax allowed by each. 

...

Listed below is an example response in JSON and XML.

Code Block
languagejs
{ 
  "messages": {
    "staging": [ 
      { 
        "author"  : "tim_bot",
        "category": "information",
        "message" : "Building..."
      },
      { 
        "author"  : "tim_bot",
        "category": "information",
        "message" : "Testing..."
      },
      { 
        "author"  : "tim_bot",
        "category": "information",
        "message" : "Completed!"
      }
    ],
    "production": [
      { 
        "author"  : "jill_bot",
        "category": "information",
        "message" : "Building..."
      },
      { 
        "author"  : "jill_bot",
        "category": "error",
        "message" : "Build Failed!"
      }
    ]
  }
}
Code Block
languagexml
<?xml version="1.0" encoding="UTF-8" ?>
<messages>
  <staging>
    <author>tim_bot</author>
    <category>information</category>
    <message>Building...</message>
  </staging>
  <staging>
    <author>tim_bot</author>
    <category>information</category>
    <message>Testing...</message>
  </staging>
  <staging>
    <author>tim_bot</author>
    <category>information</category>
    <message>Completed!</message>
  </staging>
  <production>
    <author>jill_bot</author>
    <category>information</category>
    <message>Building...</message>
  </production>
  <production>
    <author>jill_bot</author>
    <category>error</category>
    <message>Build Failed!</message>
  </production>
</messages>

or XML response using the JSONPath and XPath query languages.

The following are XPath and JSONPath examples that could be used on the above responses to extract information your looking for.

...

XML Namespaces

Add any namespaces in the response XML which you are using in you XPath selectors. e.g. x=http://schemas.mycompany.org/default/

...

Check each of the response statuses that would mean the request has been successful. If the request returns a status that is not checked then the build event handler will report an error. If errors are to be treated as failures then the build event handler will fail the build at his point. 


When To Run

You can specify when the build event handler runs by linking it to a Build Event on the When To Run tab.

Build Event

Select the event which triggers the tag action. You can choose one of the following Build Events:

  • On Build Created
  • On Before Build Queued
  • On Before Build Start
  • On After Build Started
  • On Before Stage Start
  • On Sending Stage To Agent
  • On Stage Completed
  • On Build Pending Promotion
  • On Before Build Continue
  • On After Build Continued
  • On Build Stopping
  • On Build Completed

Stage

For stage events, select the stage this applies to, or "(all stages)" to trigger the tagging action for all stages

Build Status

For "On Stage Completed" and "On Build Completed", you can choose to trigger the tagging action when the build is Successful or has Failed. 



...