Is it possible to trigger an azure DevOps pipeline via ADF through web activity?
If not then how to trigger via ADF?
It is not possible to trigger an Azure Devops release pipeline from ADF.
But you can use a logic app to trigger the same and in turn call the logic app through ADF via web activity.
As of this time, however, there isn't an existing function that support Azure Data Factory to trigger Azure DevOps pipeline.
But there is a REST API Runs - Run Pipeline that can queue a pipeline outside the Azure DevOps which may help you.
POST https://dev.azure.com/{organization}/{project}/_apis/pipelines/{pipelineId}/runs?api-version=6.0-preview.1
Here is an example of the request body:
{
"stagesToSkip": [],
"resources": {
"repositories": {
"self": {
"refName": "refs/heads/main"
}
}
},
"variables": {}
}
For data factory, you only can add the pipeline trigger:
When the pipeline runs, the web active will run and call the azure DevOps pipeline. You can use REST API like Jane said. We can not trigger the azure DevOps pipeline directly. There isn't a active can achieve that.
HTH.
Related
I am creating a CI/CD pipeline for my Azure Resources using ARM Template.
In my Arm Template I am using zipdeploy to deploy the code of my azure function.
"resources": [
{
"apiVersion": "2021-02-01",
"type": "extensions",
"name": "zipdeploy",
"dependsOn": [
"[resourceId('Microsoft.Web/sites', variables('functionAppName'))]"
],
"properties": {
"packageUri": "[parameters('packageUri')]"
}
}
]
Basically, I need to specify the packageUri, it needs to be accessed over the internet.
In my Azure Pipeline I am creating a zip package of my function and publishing to Azure pipeline artifacts using dotnet publish
and then I am getting the URL: https://dev.azure.com/ifolor/_apis/resources/Containers/$(Build.ContainerId)/drop?itemPath=drop/myfunction.zip
task: PublishBuildArtifacts#1
Problem:
This URL is private, the Azure function cannot access this artifact
Is it possible to give access permissions to my Azure function from Azure Portal to access the pipeline artifacts from Azure Pipeline?
Pipeline artifact:
Is it possible to give access permissions to my Azure function from Azure Portal to access the pipeline artifacts from Azure Pipeline?
No.
Typically, you don't use an ARM template to deploy your application, you use a continuous delivery pipeline that pushes the changes out to the site, as explained in the documentation.
i.e.
- task: AzureWebApp#1
inputs:
azureSubscription: '<Azure service connection>'
appType: 'webAppLinux'
appName: '<Name of web app>'
package: '$(System.DefaultWorkingDirectory)/**/*.zip'
What I want to do is to generate Azure monitor alerts for Azure DevOps pipeline failures.
We think we may achieve this without having to modify our DevOps YAML pipelines. So we focused on using Azure DevOps Service Hooks to do this by sending the pipeline log data to the log analytics http data API.
I can send the data with Powershell. However I got a forbidden failure when testing the service webhook in Azure DevOps.
So I wonder if there is any missing operations?
enter image description here
I have integrated service now with azure release pipeline but the same need to be integrate with Azure YAML pipeline. Does service now supports YAML pipeline integration to create change ticket.
Possibly need some more clarification but on the surface can you get ServiceNow to call the Azure Pipeline API - Azure Pipeline API
I presume you are already calling the Azure Release API
I am trying to create an azure ci/cd pipeline for my azure data factory in which I have used databricks notebook. Pipeline got created successfully with the ARM template for ADF but I am not able to see any override parameter for databricks workspace URL, that's why i got the same databricks URL in my dev and prod environment.
Can anyone help me to set databricks workspace URL for Dev and prod dynamically?
For anyone facing the same challenge, I just added this code to my arm-template-parameters-definition.json:
"AzureDatabricks": {
"properties": {
"typeProperties": {
"domain": "=",
"existingClusterId":"=",
"accessToken": {
"secretName": "="
}
}
}
}
It will make the parameters explicit to be overriden.
If you are using the default template provided by Microsoft, I inserted the code just under the "ODBC" section factories/linkedServices.
you need to create a token in qa and prod and use that in ur ci cd pipeline..tokens are unique all
over and automatically linked to respective service
Is there a way to run (queue) a specific azure pipeline from the command line or via http web-hook or an API ? I would like to automatically trigger a pipeline without the need to change git or whatever.
You can use the AzureDevOps Rest API
POST:
https://account.visualstudio.com/project/_apis/build/builds?api-version=4.1
Body:
{
"definition": {
"id": number
}
}
Refer my answer here