I have been using Azure pipelines for many years. Recently I switched to using from azure Microsoft Hosted Agents to Self hosted Agent which are running in a VMSS.
Since switching, I have noticed MANY builds fail because of an error like below. This happens quite often and very randomly. The build will be successful if I rerun the build.
---> Running in 3619316996da
unexpected EOF
##[error]unexpected EOF
##[error]The process '/usr/bin/docker' failed with exit code 1
Finishing: Build an image
Has anyone had such an issue or can help enlighten me where to look. Its pretty frustrating especially since the issue seems to be random and didn't happen with Microsoft Hosted Agents.
Problem was solved after updating linux/Docker to the latest version
Related
In azure devops i'm getting a warning about the removal of microsoft host agent that uses windows 2016 (vs2017-win2016)
https://github.com/actions/virtual-environments/issues/4312
What i want to know in regards to that, is if on the pipelines agent jobs where the agent specification is set to windows 2016, if they will automatically start using a newer version of windows agent or stop working completly.
The github topic seems to indicate that.
The ones were the agent job inherits from the pipeline, i believe there is no problem, besides that for some reason the task(s) are tied to windows 2016.
And what about the pipelines defined in the Releases section
When i click Create release
will it only fail after i try to deploy a created release?
I think, your pipelines will fail. There was a situation when MS just "friendly" reminded about depreciation:
Check this issue: https://github.com/actions/virtual-environments/issues/4312
Releases also contain the same issue. You have to update their jobs to use the new agent type:
I am new to Azure DevOps and trying to create my first Azure pipeline. I have a ASP.NET MVC project and there are a few NuGet packages that need to be restored before the MSBuild step.
Unfortunately, the NuGet restore is failing with the following error:
The pipeline is not valid. Job Job_1: Step 'NuGetCommand' references
task 'NuGetCommand' at version '2.194.0' contains an execution handler
that relies on NodeJS version '6' which is restricted by your
administrator.
NodeJS 6 came disabled out of the box so we are not going to enable it.
My Questions:
Is there an alternative to NuGet restore that does not use NodeJS?
Is there a way to update the NodeJS6 to a higher version?
update 23-Nov-2021
I have found a work around for the time being. I am using a custom PowerShell script to restore NuGet Packages and build Visual Studio project
$msBuildExe = 'C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\MSBuild\Current\Bin\MSBuild.exe'
Write-Host "Restoring NuGet packages" -foregroundcolor green
& "$($msBuildExe)" "$($path)" /p:Configuration=Release /p:platform=x86 /t:restore
Note: $path here is the path to my .csproj file
Apparently, other people are also getting the same issue and it is just a matter of time that the task is updated by the OpenSource community.
Here are some similar issues being faced in other tasks as well:
https://github.com/microsoft/azure-pipelines-tasks/issues/15526
https://github.com/microsoft/azure-pipelines-tasks/issues/15511
https://github.com/microsoft/azure-pipelines-tasks/issues/15516
https://github.com/microsoft/azure-pipelines-tasks/issues/15525
It's AzureDevOps' NuGetCommand task that uses NodeJS, not NuGet itself. Therefore, you can find a way to restore without using Azure DevOps' NuGetCommand task.
Idea 1: use DotnetCoreCli task instead. However, this probably won't work for you since you said your project is ASP.NET MVC, rather than ASP.NET Core. Also, it also appears to need NodeJS to run.
Idea 2: Use MSBuild restore. You can test on your local machine whether or not this works by clearing your global packages folder, or temporarily configuring NuGet to use a different path, and then running msbuild -t:restore My.sln from a Developer PowerShell For Visual Studio prompt. If your project uses packages.config, rather than PackageReference, you'll need to also pass -p:RestorePackagesConfig=true (although maybe this is currently broken). I'm not an expert on Azure Pipelines tasks, so I don't know what it means that this task defines both PowerShell and Node execution entry points, but maybe it means it will work even if your CI agent doesn't allow NodeJS.
Idea 3: Don't use any of the built-in tasks, just use - script: or - task: PowerShell#2, but even that is a little questionable whether it'll work since even the powershell task defines a Node execution entry point. I'm guessing it will work, but I don't have access to a CI agent where NodeJS is forbidden, so I couldn't test even if I wanted to. Anyway, if this works, then you can run MSBuild yourself (but it might also be your responsibility to find msbuild.exe if it's not on the path). Or you can download nuget.exe yourself and execute it in your script. The point is, if you can get Azure Pipeline's script task working, you can run any script and do everything you need yourself.
Idea 4: Use Microsoft Hosted agents. They have documented all the software they pre-install on the machines, which includes Node JS. Downside is that once you exceed the free quota it costs money, and I've worked for companies where it's easier to get money to buy hardware once-off, and pretend that maintenance of the server is free, even though it reduces team productivity, rather than pay for a monthly service. So, I'll totally understand if this is not an option for you.
Idea 5: Talk to whoever maintains your CI agents and convince them to allow & install NodeJS. It's clearly a fundamental part of Azure Pipelines. The tasks are open source on github, and you can see that pretty much all of them use NodeJS to orchestrate whatever work it does. Frankly, I thought the agent software itself was a NodeJS application, so I'm surprised that it runs without NodeJS.
I'm running into a strange problem whenever I start a particular build, and I can't get my head around it.
I just imported an existing VSTS-repository into my new GIT-Repository on Azure DevOps. My next step is to create a Build-pipeline which should lead to an artifact which I can deploy. For the company I work for I've done this many times, but I've never seen this error before.
The buildpipeline is setup, and as soon as I start a build it immediately fails with the following error;
Hopefully somebody can help out in resolving this.
UPDATE - Added settings for retrieving sources
After posting the second screenshot and going through everything again properly, I saw that I didn't point the Build Pipeline to the proper GIT-Repository in Azure Devops. After updating this, the issue was resolved.
I am currently getting the following error on VSTS when trying to do publish a release to a Azure:
The release definition cannot be saved because the environment 'App-Service-Template' references a service endpoint that is in dirty state. Update the endpoint(s) and retry the operation. Details: 'System.Collections.Generic.List`1[System.String]'
I have tried the following troubleshooting steps and still get the same error:
I have recreated the service end point in VSTS and it fails
I have recreated the Resource group in Azure that the service point connects to and have tried to connect the end point to a empty resource group and it fails
I followed the manual steps of creating the end point connection, i then can verify the status of the connection which passes. I then try to publish the release to Azure and get the above error message.
Lastly i have tried all the MS VSTS recommended troubleshooting with still no luck https://learn.microsoft.com/en-us/vsts/pipelines/release/azure-rm-endpoint?view=vsts
I am all out of ideas. Any Help would be appreciated.
Cheers
What ultimately fixed this issue for us was abandoning and deleting the failed releases, and then a new build and release triggered from that new build.
(one weird quirk we encountered was that the release sat in the last stage for over 8 minutes: 'wait for console output from agent'... when I left the release and came back it said successful with the last stage only taking 27 seconds)
We had the exact same error. I also ran through the points on your list with no luck, before arriving at the solution with a new build and release.
I have managed to resolve the issue. It was caused by a corrupt resource group in Azure. Deleted the resource group and created it with a different name and this worked. No idea why this happened as there were no logs and resources where running in the group, just couldn't deploy new or change existing ones.
I've got an ASP.NET MVC web app with a set of Selenium UI integration tests for it. I want to put this in Azure, and apply continuous delivery like this:
I commit a change to the Git repository
Azure notices the commit, gets the latest code, builds it, and deploys it to some test environment
Azure runs my unit tests on the code, and fails the build if any tests fail
Azure runs my integration tests on the test environment, and fails the build if any tests fail
If all tests pass, promote the code to production
This seems like a logical pipeline to me but I've struggled to get it working.
I've managed to get to step 3. by creating two web apps, e.g. Muppet and MuppetStaging. The MuppetStaging environment is automatically updated on each commit, so that's a great start. I edited the deploy.cmd to perform unit tests. This fails the build when the unit tests fail. That's great too.
The integration testing is the hard bit. Before the deployment has been completed, I can't integration test the current build - because it's not been deployed yet. The best I could do was integration test the previous version... but not the pending version. And even if I could, how would I then promote a successful build to production?
I know there is a "staging slot" concept but I don't want to have to press a "Swap" button to get my change into production, that would defeat the concept of CD. There is also an "Auto Swap" but again I don't think this takes integration testing into account.
I've been looking at tutorials relating to this kind of issue but no-one seems to have my requirements exactly... so either it's not possible or I'm doing it all wrong.
let me see if i can help and answer some of your question.
The integration testing is the hard bit. Before the deployment has
been completed, I can't integration test the current build - because
it's not been deployed yet.
There is post deployment hook that trigger after everything is deployed but still within the deployment process.
https://github.com/projectkudu/kudu/wiki/Post-Deployment-Action-Hooks
There is also an "Auto Swap" but again I don't think this takes
integration testing into account.
if you do testing with post deployment hook, if test failed which will fail the deployment operation, "Auto Swap" shouldn`t be trigger. if it does please do file a bug in Project Kudu
Microsoft Release Management tools seems to apply to your problem perfectly. If you haven't tried these already you should. They are now available as a service and also works great with Azure. Use Visual Studio Team Services (previously known as Visual Studio Online) to use Release Management as a Service and use Git as version control system.
Check these resources:
1. Official RM Page
2. Visual Studio Team Services
3. Continuous Integration via VSTS