For running unit test, you can use Jasmine and the coverage report can be generated with nyc and report type as cobertura, which is supported in Azure DevOps.
Jasmine.json
For running unit test, you can use Jasmine and the coverage report can be generated with nyc and report type as cobertura, which is supported in Azure DevOps.
Jasmine.json
Sometimes we have a scenario to update the devops pipeline variables dynamically during the task execution without having to update manually and create new release. you can use the below approach by adding Powershell task to the pipeline.
# Write your PowerShell commands here.
$cosmosconnstr = "$(cosmosconnstring)"
if("$(cosmosconnstring)".Chars("$(cosmosconnstring)".Length - 1) -eq ';')
{
$cosmosconnstr = "$(cosmosconnstring)".TrimEnd(';')
}
Write-Output("##vso[task.setvariable variable=ApplicationSettings.CacheConnection;]$cosmosconnstr")
#End
#Run the below script in another stage to make sure you get the updated value
Write-host "CacheConnection Variable in previous task is: $(ApplicationSettings.CacheConnection)"
When we run the build pipeline in Azure Devops, if we encounter below error then you can make the change recommended here.
Issue
D:\DevOps\Build\33\s\PT\<foldername>cannot be deleted because it is not empty.
D:\DevOps\Build\33\s\PT\<foldername> cannot be deleted because it is not empty.
---- Summary: 0 conflicts, 1 warnings, 0 errors ----
Sleeping for 200 ms
Retrying. Attempt $2/$3
##[error]_proc should be null. (Parameter '_proc')
Cause
You can perform different kinds of cleaning of the working directory of your private agent before the build is run. If the Clean is set to false, it does not get a fresh pull before the build is run.
Resolution