I'm trying to run a pipeline with that will collect information about
List of repos
Branches of each repo
Latest Commit
Author of the commit
I've gone through the docsaz repos but I'm unable to execute it because I'm trying to do it via SYSTEM_ACCESSTOKEN
Thanks in advance...
Related
There is one public source repo in github where all the source code is present. There is another github repo of mine which has some configuration files.
I want to run some tests of source repo using the configuration file present in my github repo using Azure pipeline task.
How can I checkout to source repo of github first and then do initial setup like build in that repo? And after that copy configuration files from my another github repo to the source repo directory and run tests of source repo.
I want to do these steps in Azure yaml pipelines as from azure release pipelines not all the artifacts are accessible.
Checking out multiple repos is possible, also with GitHub as a source, but don't forget to setup a GitHub service connection.
More info and options about this see: https://learn.microsoft.com/en-us/azure/devops/pipelines/repos/multi-repo-checkout?view=azure-devops#specify-multiple-repositories
Since you want the GitHub repo to trigger the Azure DevOps pipeline, please check out the feature that is available since October 2022:
https://learn.microsoft.com/en-us/azure/devops/pipelines/ecosystems/github-actions?view=azure-devops
Good morning,
I would like create a new branch from devel to create the branch of production, only using a task in azure devops, is it possible? I'm searching in marketplace if exists any good option.
Thanks for the help!
If you mean just to add some pipeline task, no. But you may consider using of:
Git commands: Run Git commands in a script.
Rest API: Create/Update/Delete a ref by repositoryId, Get started sample
AZ commands: az repos ref create
I have my code in a Azure DevOps repos., and use Azure Databricks to execute and develop my code.
I am using the Repos functionality in Databricks where I can connect to my code repos, commit and push code to my branch in DevOps.
When creating a new branch from Databricks it is created with no problem, and I can see in DevOps that the branch is created with me as owner.
I am though having a problem when committing/pushing my changes from the Databricks interface. My pushes show up in DevOps without any user, and just shows a empty user.
Has anybody experienced this, and have a fix for it ?
This was a know issue by Databricks. I've reach out to them and they have a fix on the way.
I was trying to have a full change from the commit to the pull-request/review process in a Azure DevOps repo with Visual Studio Code.
All good till the point where I have to create a Pull Request.
I didn't find an embedded way to do it.
There is a plugin Pull Requests for Azure Devops but it seems to be not maintained anymore.
Do you know any other good way to do it? Or may be Microsoft can invest in this important feature?
In our team, we started using the Azure CLI but found it too verbose to be practical. We also wanted to have a similar API to the GitHub CLI.
To fix this, we developed doing-cli, which is essentially a wrapper around the Azure CLI with a feel of the GitHub CLI.
A typical workflow for us is:
doing list to see open work items
doing issue create <issue title> to create a new work item
doing pr create <issue number> to create a branch and a PR based on an existing work item
Our company requires that all PRs are linked to a work item. But sometimes you want to fix things quickly, without having to always create a new work item, create a new branch, link them and open a PR. So we implemented doing workon <title> which will do all these steps for you, as well as checkout the newly created branch.
There used to be an extension, but it got pulled.
When you install the azure cli and the devops extension and then create a pull request from the terminal:
az extension add --name azure-devops
az devops configure --defaults organization=https://dev.azure.com/contoso project=ContosoWebApp
az devops pr create --repository MyRepo --open --source-branch branch-name
That last command needs 2 parameters that can be teased out of the context in a repo folder, that way you can easily alias this to a generic command.
Very few people were uring the Azure Repos and PR for Azure DevOps extensions. And most of Microsoft's investments are in GitHub.
As suggested by Jessehouwing's answer, you can create pull requests using Azure CLI.
In addition, you can also use the REST API Pull Requests - Create:
POST https://dev.azure.com/{organization}/{project}/_apis/git/repositories/{repositoryId}/pullrequests?api-version=6.0
Here is an example of the request body:
{
"sourceRefName": "refs/heads/npaulk/my_work",
"targetRefName": "refs/heads/new_feature",
"title": "A new feature",
"description": "Adding a new feature"
}
I have a Datafactory in AzureDevOps Repos.
I am trying to use Azure Powershell cmdlets to create a trigger, such as the following :
The problem is, when I run the above command, the changes are not showing on the Az DevOps Repo. So the trigger I just created does not appear in the Repo.
As a workaround, I have been able to manually create JSON files in my local git repo > merge with local master > push to online master and then the trigger works just fine and the JSON file is also visible in the Az DevOps Repo.
But how to instruct the Powershell cmdlets to work on a specific branch? Because when I just use PS cmdlets, whatever is added (trigger/dataset/pipeline) does not show up online in the Azure DevOps Repo.
So, question is, where do cmdlets like Set-AzDatafactorV2Trigger operate/make the changes and can that be changed to work against specific branches in a git repo?
I believe that when you run powershell commands against a Data Factory which is connected to git, the updates are made to the "live mode" of ADF and not the the git version of the factory.
Have you tried to switch to "live mode" to see if your triggers are there: