I am created Web App in Azure Portal. And set up Allure report plugin to Azure Devops. Everything work fine, but when I start new pipeline with test, the old test information in the portal is removed and the new one is added. It turns out that in the end I can not view the old information about the tests when I want. I tried to configure the Allure report step so that the folder that will be created has its own $(Build.BuildNumber), but if it is uploaded via FTP to the portal, the portal becomes inaccessible because a folder with a report appears in the path /site/wwwroot and the portal does not reproduce it.
How do I need to set up my web app or steps in azure devops so that I can save and view reports, both old and new?
The Allure Generate Build Step will only generate the Allure report and save it as a build artifact. Then, using Azure File Copy task to copy the repots to Microsoft Azure storage blobs may help you to collect all the reports. Then, you could access the blob with all the reports as you want.
Related
I am new to Azure AD B2C and NodeJS development, but have developed web sites (that does not use frameworks) using JAVA, PHP, C# and C++ for non-cloud servers using Apache or IIS.
I want to build a simple SPA for Azure B2C, that accepts sign-in and sign-up (with federated authentication via google, facebook, etc) using the Authorization Code Flow.
After searching for some time, I found the following example:
https://github.com/Azure-Samples/ms-identity-b2c-javascript-spa
What do they mean when they write the following in the Deployment section:
build your project
Are they assuming that I am using webpack or the like and forgot to describe it or are they assuming that I am familiar with Azure pipelines (which I am not), i.e. this:
https://learn.microsoft.com/en-us/azure/devops/pipelines/ecosystems/javascript?view=azure-devops&tabs=code
Or do they mean something different? How do I build the sample project?
I have tested in my environment.
You can build and deploy your project to Azure Static Website using VS Code.
VS code Azure Storage extension builds and deploys the project to the Azure Storage as a static website
After cloning the project into your local, open command prompt from your project folder.
Run this command to install node modules required for the project :
npm install
Run this command to start the project :
npm start
You can see your project running in http://localhost:6420/
Now to deploy this application to Azure, you can use Azure Storage Account Static website feature.
To deploy the application, please follow below steps :
Open your project from the VS code.
Go to extensions and search for Azure Storage. Select Azure Storage. Click on install.
Sign in to your Azure Account and you can see your subscription.
Under Storage extension, Click on Deploy to Static Website via Azure Storage.
Select your project folder. Select your Subscription.
If storage account is already created, select your storage account. If not click on Create Storage Account (Advanced) and create your storage account.
Click on Enable website hosting
Once the deployment is completed, sign in to Azure Portal.
Open your storage account. Select Containers. Open $web container.
You can see your project uploaded to the Storage Account.
Click on Change access level and select Container ( anonymous read access for containers and blobs). Click OK
Open App folder and click on index.html. Copy the URL
Open the URL in the browser and you should be able to see the application running.
Can we migrate published test results while migrating builds from one project to another in Azure DevOps? or is there any way to store those results.
Create a script using Azure DevOps Services REST API:
Get all Runs from old Azure DevOps: https://learn.microsoft.com/en-us/rest/api/azure/devops/test/runs/list?view=azure-devops-rest-6.0
Get all results for each run from old Azure DevOps: https://learn.microsoft.com/en-us/rest/api/azure/devops/test/results/list?view=azure-devops-rest-6.0
Create previously saved runs in new Azure DevOps: https://learn.microsoft.com/en-us/rest/api/azure/devops/test/runs/create?view=azure-devops-rest-6.0
Create previously saved results in new Azure DevOps: https://learn.microsoft.com/en-us/rest/api/azure/devops/test/results/add?view=azure-devops-rest-6.0
Published tests results will go into Tests Plan -> Runs after builds. You can go the Runs to check the result.
I have my github project configured for automated builds in Azure Pipelines. Under "Pipelines/Builds/" I can click on "..." and select "Status badge".
Inside pipelines, code coverage is already measured: I can select a specific build, and go to the tab "Code coverage". However, I can't find any link to the coverage badge. Is it provided by Azure Devops? Or is there any free tool that integrates with Azure Devops to provide this?
You can get a coverage badge for Azure Pipelines by using shields.io:
go to https://shields.io/category/coverage
select Azure Devops coverage
As the website instructs, you need to find out organization,
project and definition id. Head to the Azure pipelines, and open
the view where you can see the history of builds for your project. The URL will contain all 3 values, e.g. dev.azure.com/ikamenshchikov/flynt/_build?definitionId=1
enter the values you have found in Azure into shields.io blank
fields, and click Copy Badge URL to get an URL to the image. You will get an URL like e.g. https://img.shields.io/azure-devops/coverage/ikamenshchikov/flynt/1.
now you can use this url to add the shield to e.g. your github
README.md. Add the text
![Coverage](https://img.shields.io/azure-devops/coverage/ikamenshchikov/flynt/1)
I am pretty new to Azure Devops. Is there a way to connect and view the logs and the folders created in the self hosted agent of Azure devops pipeline.
You can do it in two ways
(i) While the build running on Azure devops with Hosted Agent the only way to see the logs is to wait for console output.
(ii) After the build finished you can download the logs az zip
The logs are in the _diag folder (the folder exist in agnet root folder).
Also you can use the API to get the logs.
Agree with Sajeetharan,I will show you the specific place to view the logs and folders in the page through the following image.
After the build pipeline finished, you can click into a build record. There is a Logs option in this record. You can click on the specific job to view the log, or you can click the Download all logs button to download the complete log to local view.
You can click on the file container which under Build artifacts published in the Summary to view folders.
In addition,using api:
GET https://dev.azure.com/{organization}/{project}/_apis/build/builds/{buildId}/logs?api-version=5.0 to get logs is also a good method.
Could you mark Sajeetharan's answer if it can be helpful to you.
Created a VM image in azure classic portal, then used that image file to create vm and generated a test report using azure certified test tool.
Publish the VM image in Azure publish portal https://publish.windowsazure.com
It is in 0% of progress in staging state and also shows the below error message with it.Failure: SAS url is not well formed. (Requires Publisher Action)
I could not stop the staging process and there is no option to delete the virtual machine details in azure publish portal.
Also it is not showing option to upload test report of vm image.Please let me know if there is any solution for this.
I've seen this before when creating the SAS url using the latest version of storage explorer. Try using version 6 to create the url and push to staging again (a new request).