# Azure DevOps Pipelines

Zirkul Jobs can be easily executed from Azure DevOps in several ways we'll be covering here.

### Service Hooks

Azure DevOps has a functionality called Service Hooks that can be used for calling webhooks under specific conditions.

This can be configured in the section "Project settings \ Service hooks"

<figure><img src="/files/YHAvxr7DngEQgBHk32n2" alt=""><figcaption></figcaption></figure>

Click in the "+" icon for adding a new service, select "Web hook" from the list and click "Next":

<figure><img src="/files/3rwPMYjwmdVb2FslJsTU" alt=""><figcaption></figcaption></figure>

Select the options of your preference for the trigger settings and click "Next":

<figure><img src="/files/yq8u1CIITqoL0qqp63Nh" alt=""><figcaption></figcaption></figure>

In the section "Action", add the full URL for [calling the webhook in Zirkul ](/devsecops/running-jobs.md#webhook-calls)and provide the API Key information in the HTTP headers section:

<figure><img src="/files/yVM39t18SVCUlQozo6no" alt=""><figcaption></figcaption></figure>

Click "Test" for making sure everything's configured correctly

<figure><img src="/files/xSFYK2AaUZzFTovhzXYQ" alt=""><figcaption></figcaption></figure>

With this approach, the webhook is going to be called automatically every time the conditions are met.

### Webhook call from Pipelines

You can also call the webhook directly from your pipeline, the API Key can be stored in an encrypted variable for avoiding hardcoding any secrets in your YAML files and prevent leakage in log entries.

In the pipeline configuration you can add a variable for your API Key as follows:

<figure><img src="/files/u4IAR6cTK0tvPPciCtoY" alt=""><figcaption></figcaption></figure>

Make sure the "lock" icon is closed for storing the secret with encryption.

Then in your pipeline tasks you can add a command line script for [running the webhook call](/devsecops/running-jobs.md#webhook-calls) replacing the API Key with the variable:

<figure><img src="/files/49sYcinSX0yYmAiueE7R" alt=""><figcaption></figcaption></figure>

For calling the variable use the format: `$(variable_name)`

Test your pipeline and you should see something like this:

<figure><img src="/files/ma5M4DWXKZOhxp2gfaEr" alt=""><figcaption></figcaption></figure>

*Note the secret is being protected.*


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.zirkul.com/devsecops/azure-devops-pipelines.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
