I have pipelines in Azure DevOps working with Windows Self hosted agent, I currently get source code from external Git but I also need to get source code from internal TFS 2018 server.
I created a service connection, I saw that I can specify it as an Azure subscription name in tasks that deploys but I can't see how to get source code, I have this UI when I create a YAML pipeline but there is not either any TFS option in classic mode:
Should I have a Service or TFS option in there ?
Thanks.
You can create a service connection named other git and use this service connection to get source code from TFS 2018. Here is my sample:
Create a Personal access token in TFS 2018.
Create a service connection named other git. The Git repository URL is the URL when you open the TFS 2018 repository.
If you are using git as source control, the format of the URL is http://{server:port}/tfs/DefaultCollection/_git/{repo name}
If you are using TFVC as source control, the format of the URL is http://{server:port}/tfs/DefaultCollection/{project name}/_versionControl
or http://{server:port}/tfs/DefaultCollection/{project name}
Please enter the Personal access token you created in the Password/Token filed.
3.Create a pipeline and choose other git as source. You can choose an already created service connection or create a new one.
Now you can use the repository in TFS 2018 as the source of this pipeline.
Here is the approach if you are looking at TFVC:
Go to project settings --> Repositories --> Create Repo. Select TFVC
After you create the TFVC repo, from the build you should be able to find the option:
Related
Few days ago I had to recreate Azure Synapse Workspace. I had connected Git repository (Azure DevOps Git).
After Workspace recreation I reconnected to repo and restored whole project (pipelines, linked services etc.).
Unfortunately after this action template files are not being updated in main branch after Publishing changes in Synapse:
They are being updated only in Publish branch which should be rather read only:
I tried to create completely new repo, but with the same result - main folder is being created and synced properly:
but Templates folder and files are not created in main branch.
I'm using these templates for deployment to production and I need to make customizations so it's much easier to work with them in main branch.
Do you know how could I 'restore' previous behaviour?
Templates folder and files are not created in main branch.
To recover a deleted Azure Synapse instance that has source control configured either in GitGub or Azure DevOps, you need to create the new Branch. Follow below steps.
Create a new Azure Synapse instance of the service.
Reconfigure Git with the same settings, but make sure to import existing resources to the selected repository and choose New branch.
While configuring the repository, under Collaboration branch choose + Create new and create a new branch.
Create a pull request to merge the changes to the collaboration branch and publish.
In case there was a Self-hosted Integration Runtime in a Synapse workspace, a new instance of the IR must be created in a workspace. For an on-premises or virtual machine IR instance, they must be uninstalled and reinstalled, and a new key obtained. After setup of the new Integration Runtime is completed, the Linked Service must be updated to point to new IR and the connection should be tested again, or it will fail with error invalid reference.
I have tried to repo the same with a sample pipeline in the workspace, and when I restored it I can see both pipeline and template folder in the Repo. Refer below image.
Please refer Troubleshoot CI-CD, Azure DevOps, and GitHub issues in Azure Data Factory and Synapse Analytics to know more on backup and restore Azure Synapse.
I am looking for a sample ARM template which can setup my Azure DevOps repository into Azure Databricks. This will help me deploy my Master branch directly on ADB workspace.
I tried to do manually on portal and it works, but the repos path for the notebooks shows my email_id, which is not good in Production.
I want to configure through a Powershell OR an ARM template while creating Databricks. The same problem I am facing on Azure dataFactory as well.
Please help me resolve it.
It's not possible as of today - there is no API for creating a checkout. It will be possible only when Databricks Repos will start to provide corresponding API for creating the checkouts of repositories, not only "Update checkout" API that is available right now.
If you're concerned with the checkout created in your own folder, you can just create a Folder inside Repos, call it like "Production", and then do checkout inside that folder (pictures are taken from my demo of Repos with Azure DevOps):
To deploy Notebooks from your master branch to another workspace, I would recommend to trigger a deployment pipeline from the master branch onto the target databricks worskpace.
That way, no need to setup Repos in the target environment.
You use Repos in your development workspace (with your email in path)
You commit to the branch you work on and eventually merge / PR to master
Once on Master branch, a DevOps pipeline is triggered and deploys the notebook to your target workspace on the path you want
Getting this error message "Invalid GIT configuration. You need to gain access to the repository before you can publish any changes. Details: Incorrect account name for the given tenant." while logging into Azure Data Factory. Not able to publish or save any changes.
Check access to the Dev Ops Project connected to the Azure ADF that was setup during initial connection to the Azure DevOps Project - DEV.azure.com
Either that or change the organization name back to the original name if the URL has been updated recently.
I fixed this issue by logging onto my Azure DevOps Project, where the Git repository for the ADF pipelines was.
In my current company we use GitHub Enterprise as revision control. Where I sign in with SAML to access my account. Now I want to deploy code that is there in GitHub to my Azure App service. So in azure deployment options, I selected GitHub option. But it is saying "Azure needs your permission to access your GitHub account" and asking me to login into GitHub. But I do not have GitHub user name and password as we are using SAML to access GitHub account. Could you please help me how can I authorize GitHub account with Azure?
Azure GitHub deployment process
The Azure deployment process is kinda tricky, trying to deploy from Github Enterprise, I manage to get it working like this:
In the Azure project menu, click on Properties then for the DEPLOYMENT TRIGGER URL, copy it.
Go to the project settings in Github Enterprise, on the option Hooks & Services and add a new webhook, set the DEPLOYMENT TRIGGER URL on the Payload URL, leave everything else the same.
Now we add the deployment process, in the Azure project menu click on Deployment Options then choose as source External Repository
On your Github Account go to settings, then on the menu click on Personal Access Tokens, now generate a new token and give it the following scopes: repo and admin:pre_receive_hook then copy the token
Finally, set the main branch that will activate the webhook when you push code on the repo, on the repository URL we have to set the following items:
https://<github_access_token>:x-oauth-basic#github.<enterprise>.net/<repo_name_from_root>
something like this:
https://c4207e6aae44ce086595c9abfcccb5123caf20cc:x-oauth-basic#github.mycompany.net/repolocation/deployrepo
Now push on your repo and the webhook will automatically trigger the deployment and build process.
I'm deploying with Visual Studio Team services to Azure (NodeJS) but the problem is when files are changed in the remote repo in azure (through my site) I can't get them to my local repo. How can I get it without manually going in and copy the files? (Git pull doesn't work)
According to your description, I assume that your local repository is link to VSTS repo and VSTS repo push files to Azure Remote Repo. In this scenario, your local repo isn't linked to Azure Remote Repo, when you execute git pull from local repo, it just try to pull the changes from VSTS repo, not Azure Repo. To pull the changes from Azure Repo, trying the steps blow:
Configure "Deployment credentials" from Azure Portal. You'll need to use this credential to authenticate Azure Repo.
Open Kudu service page of your webapp. For example, if your app url is "https://app1.azurewebsites.net/", then the Kudu service page is "https://app1.scm.azurewebsites.net/".
Click "Source control info" link in Kudu service page. You will get the URL of the Azure Remote Repository.
Go to your local repo and add a remote repo with the URL you get from Step 3.
Perform a pull action from the new added remote repo and enter the credential you configured in Step 1 when prompted.