Azure DevOps Pipelines
Last updated
Last updated
Zirkul Jobs can be easily executed from Azure DevOps in several ways we'll be covering here.
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"
Click in the "+" icon for adding a new service, select "Web hook" from the list and click "Next":
Select the options of your preference for the trigger settings and click "Next":
In the section "Action", add the full URL for calling the webhook in Zirkul and provide the API Key information in the HTTP headers section:
Click "Test" for making sure everything's configured correctly
With this approach, the webhook is going to be called automatically every time the conditions are met.
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:
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 replacing the API Key with the variable:
For calling the variable use the format: $(variable_name)
Test your pipeline and you should see something like this:
Note the secret is being protected.