What is the best way to go about adding Status Checks from Azure DevOps in a self-hosted scenario using a private GitHub Enterprise instance (not accessible externally).
Presently our setup is self-hosted with the agent installed on our build servers. We have a custom hook that tells Azure Pipelines to start a build however we aren't sure the best way to deal with the status checks. It would be preferable to not have each build pipeline have to make custom REST calls for the status checks rather have some means to register the status check between systems.
Has anyone configured for this scenario before?
Thanks!
Related
Forgive me for asking a stupid question. I am from IT Infrastructure background & have been asked to create CI/CD pipelines based on my recent learnings on DevOps.
We have couple of applications whose source code is currently in TFS 2013 & those apps are written in ASP.NET C# language. Now, requirement is to migrate the source code from TFS to Azure Repos (Azure DevOps services) & further create a CI/CD pipeline.
Now for demo purposes, customer is asking us to do the deployment (i.e. Release pipeline) on a test server which is a plain windows 2012 OS without any SQL & IIS for both of these applications. Is that possible & how could we achieve the results to confirm release pipeline is funcioning properly?
In my opinion, it wont work as there is no application infra/configuration done for those applications on that plain test server. I guess we actually need a ready dev/stage environment which is replica of production to do the testing of release pipeline for those applications. Am I correct?
Just need expert advise for confirmation so I communicate the same to customer.
Azure DevOps Pipelines use an agent to perform the deployments. You can run the agent entirely in the cloud when deploying to Azure resources. You can also install an agent locally. Follow this link and scroll down to read about self-hosted agents. This is how you can deploy to your test instance from the pipeline.
Now, what you deploy there may require additional software be installed. You say it's an application in C#. Cool. Now, what's it do? Is it a windows program? Then just having the server there, with an agent installed, is all you need. Is it a web program? Then, yeah, it's going to need an IIS (or whatever) instance available somewhere to deploy to. Is it a database program? Then, yeah, it's going to need a database instance to deploy to. There's nothing magical about having a VM or a machine somewhere. All the same rules have to apply. There has to be an OS, drives, memory, and yes, supporting services depending on the needs of the application.
However, using a local machine instead of a hosted one, that works fine. Just follow the instructions in the link above.
Goal:
We have a Translation Management System project with a set of string translations, which can be exported as iOS, Android, and web formats. This can be done via its API, CLI, or manually with the UI. We need to integrate with our git-based repository, which lives in DevOps, so that when changes are made to the TMS translations, the code base is updated automatically (preferably a PR would be created with the changes).
What I Have Tried:
I am a mobile developer with little web hook experience, but it seems that they are the key to the solution. I can configure the web hook on the TMS side, but need to provide a URL with a listener. Going through the Azure DevOps service hooks settings and reading documentation extensively, I can't find any leads on a way to set up a custom listener to subscribe to another service's web hook, consume its payload, and trigger an action in DevOps.
I'm aware this may be limited by the capabilities of the TMS and DevOps, but how would this be tackled viewing it from a high level perspective? It doesn't seem like there's any built-in solution, so what would a custom solution entail? If something along the lines of what I'm looking for isn't possible, I would like to know that as well.
Thanks in advance!
So that when changes are made to the TMS translations, the code base
is updated automatically (preferably a PR would be created with the
changes).
Sorry but as I know it's not supported scenario in Azure Devops Service.
1.The service hooks option in azure devops service is that when something(event) happens in Azure Devops Service, it runs task(action) on target service. But what you want is when something happens in external service, it runs task(action) in azure devops service. For now this behavior is not supported.
2.And different service in Service Hooks has different supported actions. Let's take Jenkins service(one service hooks) as example, see step5 in trigger Jenkins: Azure Devops can trigger Jenkins build.
As for Web Hooks(another service hooks), it can't trigger actions like the code base is updated automatically. It just sends the Json representation.
So the scenario you want is not supported for now by Azure Devops Service.
In addition: Not sure about how your TMS works, but you can consider using Azure Devops Rest API to trigger actions in Azure Devops Service. (These rest apis can be used to queue build, release or do git-related actions )
When changes are made to your TMS translations, you may call corresponding Azure Devops rest api to manage git repos in Azure Devops if your TMS supports this kind of behavior.
Hope all above resolves your puzzle why your scenario is not supported by Web Hooks in Azure Devops:)
When you Authorize your GitHub repo through the devops settings, webhook will be automatically created on your repo with configurable hook events.
I need help to understand better how to create complete CI/CD with Azure Devops for APim. Ok I already has explored the tools and read docs:
https://github.com/Azure/azure-api-management-devops-resource-kit
But I still have questions, my scenario:
APim dev instance with APi and operations created and others settings, as well APim prod instance created but empty.
I ran the extract tool and got the templates (not all), still need the Master (linked templates), and on this point seat my doubt, I already have 2 repos too(dev and prod).
How can I create the Master template, and how my changes from dev environment will be automatically applied to prod?
I didn't used the policyXMLBaseUrl parameters not sure what Path insert there, although seems #miaojiang inserted a folder from azure storage.
After some search and tries I deployed API's and Operations from an environment to another, but we still don't have a full automated scenario, where I make a change in a instance and that is automatically available.Is necessary to edit policies and definitions directly on the repositories or run the extract tool again.
I'm using azure devops pipeline to build my IIS application and deploy via release management to several different servers, and it works great. My issue though is that one of the servers I need to deploy to will always be offline, so I need to set up some sort of offline installer for that deployment. Is there a way to do this using the build and release management I already have that I'm not seeing?
Azure Pipelines assumes that the server is always available. Best I can think of is to generate some kind of drop on a fileshare and then add a Manual Intervention Task to pause the pipeline and allow you to do your thing.
There is no air-gapped agent nor a way to run part of your pipeline on another system and import the results.
I'm trying to figure out how can I connect my Jenkins Build server to the Azure DevOps Pull Request. My Jenkins Server is behind a corporate firewall, I don't have any way to have access to this server outside of the corporate network.
Due to the corporate network rules I cannot add a hook in Azure to call my Jenkins server, but my server can have access to the Microsoft Azure web site.
I tried to run the VSTS Agent with success on my Linux Jenkins server. It works, but It doesn't do what I would need to do. I don't want to change all my build process to build my application inside this Agent. I really want to be able to launch a Jenkins Pipeline build from my server and forward the build result to the Azure DevOps.
I cannot use the Jenkins VM provided by Azure DevOps, because my Jenkins build process has to run some regression test tool on real hardware unit in our lab to flag the build as a success.
So in other word:
1- I cannot use the VSTS agent because I need to use my Jenkins Build Server
2- I cannot use the Jenkins VM provided by Azure DevOps because I need to have access to real Hardware Unite
3- I think I cannot instrument my Jenkins to see if we have a new Pull Request branch, because I will not be able to send the Jenkins build result to the Microsoft Azure DeveOps server.
Anybody had to do something like that?
Any reading to suggest?
Thanks!
Since one-way communication is going to be possible (from Jenkins to Azure DevOps), you'll have to do the following:
Set up your Jenkins pipeline to periodically poll Azure DevOps for new PR branches and build PRs
Set up a branch policy for approval from external services
Have Jenkins post the build status back to the external service API so that Azure DevOps knows whether the build has succeeded or failed