Azure DevOps : I want to add a task in my pipeline that can copy some files from my Azure Repo into an On premise VM. Any leads? - azure-devops

I have a requirement to create an Azure DevOps pipeline that can copy files from my Azure Repo to a path on an On-premise VM (a SQL server to be precise). Could anyone advise on how to get started on this?

You would need to add a checkout task to the pipeline. You would define the repo as a source and then add a step to checkout the repo. Here's some documentation concerning checking out multiple repos using yaml that should get you started

Related

Azure DevOps see included commits in build

we are using Azure Pipelines to build and deploy various projects. We are using Enterprise Github service connection as our git repository source which we are using as part of the build pipelines that are running on on-prem AzureDevops build agent. We are then using on-prem hosted DevOps agents to deploy the service on our on-prem servers.
If we trigger a build we then receive an email notification about all the new commits which are included in the build. Is the same information (what commits are part of the build) included somewhere in the Azure DevOps UI? I was not able to find it and it's really difficult to then determine what I'm actually deploying our various environments as I'm not always the one who triggers each build.
Thanks

How do i automate Databricks notebook from Azure Devops

I am having all my codes in Azure Databricks notebook. I want to automate execution of my notebook using azure devops.
I have linked my Databricks Repos with Azure Repos. Created a build pipeline to create artifact of my code. In release pipeline.
I was able to deploy my code to lower environment(Here same Databricks workspace where I have my code).
But I was not able to execute/Run notebook directly from Azure Devops.
How do I deploy code from my lower environment to higher environment(Prod Server) Databricks workspace.
To deploy code to higher environment Is it same as deploying to lower environment. Just changing details of workspace.
Like Databricks Token, Workspace URL, etc.
You need to create release pipeline and push your code to GIT repo. Follow this Microsoft documentation for details -
https://learn.microsoft.com/en-us/azure/databricks/dev-tools/ci-cd/ci-cd-azure-devops#:~:text=The%20release%20pipeline%20deploys%20the,Pipelines%20menu%20and%20click%20Releases.
This demo shows how to do that. The steps include:
Testing
Update checkout at Databricks workspace - for example, you may have a separate checkout for testing. You can do that via Repos REST API, or via databricks-cli (databricks repos update command)
Triggering execution of tests by using the Nutter library
Reporting testing results to DevOps
Release
If tests are successful, you can push updates to staging/production environment - this could be done via DevOps Release pipelines
You can use the same Repos REST API or databricks-cli to update checkout in staging/production

Kibana Dashboard version control?

I am using Azure DevOps for my source control. I am creating Kibana Dashboard and wondering if it can be source control as well using Azure DevOps. My idea is:
Create Repo in Azure DevOps.
Write automated script(code) so it saves current Kibana Dashboard Saved Object into Azure DevOps.
In this way, I have old Dashboard in the repo. Has anyone done this? It doesn't have to be Azure DevOps, if you have any experience with it, please share with me. I am new to version control.
(https://docs.logz.io/api/cookbook/backing-up-kibana-objects-to-github.html < this was using github)
Kibana Dashboard version control?
The first thing to point out is that Azure devops is not a version control tool. It provides developer services to support teams to plan work, collaborate on code development, and build and deploy applications. Developers can work in the cloud using Azure DevOps Services or on-premises using Azure DevOps Server.
And Azure repo supports two types of version control methods: Git (distributed) and Team Foundation Version Control (TFVC):
What is source control?
You could set the version control type when you create the project:
After that, we could get the URL of the repo is also a git repo:
Git in Visual Studio and Azure DevOps is standard Git, github is the same.
So, that document also applies to azure devops, we just need to replace the github repo link to the azure devops repo link.
In this way, I have old Dashboard in the repo. Has anyone done this?
If you have old Dashboard in the azure devops repo, just clone the old json files to the local and update the json files and push it to the azure devops by git command line. Or you could modify the json files in the azure devops repo UI directly.
So, for the azure devops, you just need to make sure the Version control of your repo is git, and then you can handle azure repo like git.

GitHub checks change the repo it builds on in Azure DevOps

Apparently someone was using another repo in Azure DevOps to build a repo in GitHub.
He no longer works here and I have to change this. I do a Pull Request and it builds on another repo. But it does build in the correct repo once I merge the code to master.
The reason I need to change it is that it looks like its building from a YAML that is old and not sure which one.
How do I change where GitHub checks build for a PR? Is it only by removing the build in that other repo?
You could find required Azure DevOps pipeline in GitHub - Repo -Settings - Branches-Branches protection rule - Require status checks to pass before merging
According to the pipeline name, you could find corresponding YAML file in Azure DevOps Project - Repo. Check if this pipeline locates at the wrong repo of Azure DevOps side.
You could directly change the right pipelines if they are listed in GitHub side. Otherwise, you may have to reconfigure GitHub-Azure DevOps Service connection through Azure Pipeline extension.

How to trigger Azure DevOps pipeline when pushing commits to bitbucket custom server?

My company's repository hosted on bitbucket custom server which can be only accessed from intranet.
Therefore, I setup a self-host agent for Azure DevOps and this agent could do a git pull and build and release too.
It works and the problem is I have to manually click RUN pipeline to start, and somehow when I pushing commits to my bitbucket custom server it doesn't trigger the Azure DevOps to kick off a build or release.
Is there some other options I could let it automatically triggers the Azure pipeline to run? Webhooks or Hooks?
I afraid Azure devops pipeline cannot be automatically triggered from a bitbucket custom server. For azure devops server cannot communicate to the bitbucket server hosted in your intranet.
Webhooks or Hooks cannot trigger a build in azure devops pipeline either. Azure devops doesnot have this feature yet. There is an open issue about this.
Currently you might have to trigger your pipeline manually, or create an azure function as mentioned in above link to trigger your pipeline automatically.
Below are some documents about azure function you may find helpful:
Develop Azure Functions using Visual Studio
Continuous deployment for Azure Functions
Azure Functions HTTP trigger:The HTTP trigger lets you invoke a function with an HTTP request.
Best approach to call web api from azure function
Trigger Azure Pipelines build via API