How to integrate Rest Assured test to Azure devops pipeline - azure

I am using a gradle based project and want to integrate the REST assured testing with my Azure devops pipeline. What is the way to do so ?
Do I need to install dependencies for REST assured on my self-hosted agent ?
Do Azure Devops provide any task related to gradle and Rest assured to test the APIs.

Related

AzureML: publish pipelines

I have published an ML pipeline using AzureML SDK, and then triggering thepipeline from an external service using the REST endpoint.
Is there a way, by which I can re-publish the pipeline, keeping the REST endpoint unchanged?

Automated way to add & deploy SPFX sppkg solution package file to SharePoint 2019 (on-premises) app catalog

I'm looking for an automated way for adding & deploying SPFX solution package (*.sppkg) into the SharePoint 2019 (NOT online) app catalog. This is cause and doing the deploying using azure devops (CI/CD) release pipeline.
I found those two below tasks for adding this package:
The first one worked fine in just adding the file to the app catalog but not deploying it, so I had to do it manually.
The second task has the option to write PnP script against SharePoint, but the problem with me is that most of the scripts i found are for SharePoint Online not on premise.
Appreciate your support if you had such situation and got it solved using PnP or something else.
Microsoft's official documentation describes an approach to continuous deployment using Azure DevOps. You can click Implement Continuous Integration and Continuous deployment using Azure DevOps for detailed information. There is no need to write PNP scripts using this method.
Setting up Azure DevOps for Continuous Deployments with a SharePoint
Framework solution requires the following steps:
Creating the Release Definition
Linking the Build Artifact
Creating the Environment
Installing NodeJS
Installing the CLI for Microsoft 365
Connecting to the App Catalog
Adding the Solution Package to the App Catalog
Deploying the Application
Setting the Variables for the Environment
If you just want to use Azure DevOps CD and don't want to use CI, you can skip the second step and upload your build artifacts directly to the repository, and then use them in the release pipeline.
There are some basic scenarion for using pipelines:
You use cloud pipeline (azure, github, etc) with their abilities and their purpuse.
You create own environment with self-hosted pipelines
You add own runner (pipeline agent) to your cloud (azure) environment
So, azure allows you to add own pipeline agent to environment. For example, self-hosting windows agent.
So, I think solution in your case will be:
Install self-hosted agent
Configure agent environment - installing SharePointPnPPowerShell2019
Add agent to your azure environment
Add step to deploy your solution into pipline with using self-hosted agent
This scenario allows you to deploy sppkg solutions without publish your app catalog to internet, because your self-hosted agent will be in the save network as your sharepoint farm.
Azure pipeline deploy steps allow to run powershell on target machines
Prerequisites This task uses Windows Remote Management (WinRM) to
access on-premises physical computers or virtual computers that are
domain-joined or workgroup-joined.

Develop on Azure DevOps and deploy to another cloud service

We have been developing an Angular application on Azure DevOps. My company wants to have the app running on another cloud service. Can anyone tell me: Can we create a pipeline that will deploy the production version of our application from build in Azure to this other cloud service? What are the pitfalls or potential obstacles? Is anyone doing it already that could speak to it from your experience? Thanks in advance.
If you want to deploy Angular application on Azure DevOps to Azure App Service via Azure Pipelines, you could follow below steps.
Create a build pipeline, add a npm task to install the npm packages required by the Angular application
use npm task to build the application and produce the assets to be published on the web server
Add a Publish Build Artifact task that generates the artifacts which will be provided later on as an input to release definition
The last step is to add a CD pipeline which will deploy the artifacts created by the build to the Azure Web App by using this Azure App Service Deploy task. See this tutorial for details.
If want to deploy to other cloud service, this doc provides the system-defined tasks, you could review it to find if there are existing available tasks. If not, you may need to develop a custom pipelines task extension or find if there are existing extensions in the Azure DevOps Marketplace.

Is it possible to execute automation maven project from Azure devops pipeline

I have built an automation framework using Java, Selenium Webdriver, Maven, TestNG. Currently, I am using Jenkins for pipeline and CI.
Now new requirement assigned to me is using Azure DevOps as CI tool and execute all test from there instead of Jenkins.
After some research, I am getting the following :
Upload code to Github or other azure supported repo. and create a pipeline.
Write your Java code using Visual studio code and then it will be far easy to execute from Azure DevOps.
Is there any better way to do this?
You need to follow steps below. Main effort is of tools integration if those are not present in azure devops portal :
I am not sure which code repository you are using however if you are not using one which is supported by Azure devops, then you need integrate it with azure devops portal.
Create agentpool in azure devops with same configuration as your jenkins agent.
Create build pipeline in azure devops. It will ask your repository name . Give the same.
4.While Creating pipeline it will ask you whether to create azure pipline yaml or not . Say "Yes" and it will create sample yaml file in code repository.
Open Yaml file.
give your agentpool name where they have mentioned it.
under section " steps "
mention all steps which you want to do run test cases. you would mentioned same
thing is jenkins pipeline under stages --> steps like shell ''' '''
save yaml and run it. you are done
NOTE : Main thing is configuration of agentpool. you need to make it should have all software tools ( except jenkin agent jar :) ).

How can azure devops build pipeline be triggered when a new image is available on different container registries?

Let's assume that we have 3 different container registries. Is there any available azure devops jobs/tasks that can provide a way to trigger my build pipeline when a new image is pushed on any of these 3 registries?
I have some insights with MS Flow but i want to limit the scope on azure devops.
Find a way or recommendation to trigger the build pipeline using devops jobs/tasks.
You can create in Azure Container Registry a web hook that trigger the build in Azure DevOps when new image pushed.
For this you need to write a service with Web API that handle the API Post calls. the ACR web hook send a Post call to the service when new image is pushed.
In the service you trigger the Azure DevOps build pipeline using the Azure DevOps .Net Libraries (if the service is in C#) or with Azure DevOps Rest API.
How to create ACR Web Hook? find here.
How to trigger build pipeline from code? find here.
you can have releases triggered with new images in the docker hub (reading). I dont think the same can be done for builds. You can create a release that would get triggered on the new image and that release would talk to the API to trigger the build.

Resources