Has anyone used Azure DevOps to deploy an Umbraco v8 application to Azure?
I can successfully deploy via Visual Studio, but DevOps only seems to copy over all the dlls to the target, no views or anything, and a zip does not get generated.
If anyone has managed this could they share the steps they took please?
The steps I have in the DevOps pipeline are
Build
Test
Deploy
Publish Symbols
Copy File to:
Publish Artifact
What I did notice is that I need a publish profile to successfully publish from Visual Studio, however I cant see where a profile should be included in Devops, unless it should be in the build arguments?
Under variables I have a connection string variable with the same name as the connection string and the value of the production connection string.
Under tasks -> Deploy azure app service I have:
Package or folder: Pressed the "..." button and pointed out the Web project (the same project the umbraco install is inside, the www).
File transforms & variable substitution options:
I have checked the box "XML Variable substitution"
Other important stuff
Roslyn
If you use modelsbuilder purelive, you will need Roslyn in the production server as well. So if you like me do not have Roslyn in sourcecontrol, you need to somehow get Roslyn on the production server. What I do is simply upload the Roslyn folder from: {webproject}\bin\roslyn\ to the webroot. I use FTP for this.
Umbraco
You need to upload Umbraco itself to the production server. Umbraco is inside {webproject}/Umbraco.
uSync
If you use uSync you willl need to upload that as well.
App_Data
App data is also a hidden folder that you (probably) need to upload. Don't really remember.
Troubleshooting
"Error: More than one package matched with specified pattern: d:\a\r1\a***.zip. Please restrain the search pattern.
Go to release step 2.
"Could not find a part of the path 'C:\pathtoproject\bin\roslyn\csc.exe'."
Upload the roslyn folder to server.
Connection string error (don't remember the error message)
This took me hours to solve. The problem was that I had these: ' around my password when it was published to the server. Having those ticks around the password locally was no problem and not even inserting them after the site has been successfully published. But if the ticks are there while the site is being published you will get an error.
Here is how i do my Umbraco 8 website on Azure via DevOps. I also have release pipelines for moving the content between Test and Live bi-directionally. Umbraco 8 on Azure via Devops
Deploying v8 app to Azure using Azure DevOps
Has anyone used Azure DevOps to deploy an Umbraco v8 application to Azure?
I can successfully deploy via Visual Studio, but DevOps only seems to copy over all the dlls to the target, no views or anything, and a zip does not get generated.
If anyone has managed this could they share the steps they took please?
The steps I have in the DevOps pipeline are
Build
Test
Deploy
Publish Symbols
Copy File to:
Publish Artifact
What I did notice is that I need a publish profile to successfully publish from Visual Studio, however I cant see where a profile should be included in Devops, unless it should be in the build arguments?
My current build arguments:
/p:DeployOnBuild=true /p:WebPublishMethod=Package /p:PackageAsSingleFile=true /p:SkipInvalidConfigurations=true /p:PackageLocation="$(build.artifactstagingdirectory)\"
I'm using the Visual Studio Build task
thanks
I was finally able to get it to work.
My build steps are:
Msbuild arguments: /p:DeployOnBuild=true /p:WebPublishMethod=Package /p:PackageAsSingleFile=true /p:SkipInvalidConfigurations=true /p:PackageLocation="$(build.artifactstagingdirectory)\"
Release:
Under variables I have a connection string variable with the same name as the connection string and the value of the production connection string.
Under tasks -> Deploy azure app service I have: Package or folder: Pressed the "..." button and pointed out the Web project (the same project the umbraco install is inside, the www). File transforms & variable substitution options: I have checked the box "XML Variable substitution"
Other important stuff
Roslyn
If you use modelsbuilder purelive, you will need Roslyn in the production server as well. So if you like me do not have Roslyn in sourcecontrol, you need to somehow get Roslyn on the production server. What I do is simply upload the Roslyn folder from: {webproject}\bin\roslyn\ to the webroot. I use FTP for this.
Umbraco
You need to upload Umbraco itself to the production server. Umbraco is inside {webproject}/Umbraco.
uSync
If you use uSync you willl need to upload that as well.
App_Data
App data is also a hidden folder that you (probably) need to upload. Don't really remember.
Troubleshooting
"Error: More than one package matched with specified pattern: d:\a\r1\a***.zip. Please restrain the search pattern.
Go to release step 2.
"Could not find a part of the path 'C:\pathtoproject\bin\roslyn\csc.exe'."
Upload the roslyn folder to server.
Connection string error (don't remember the error message)
This took me hours to solve. The problem was that I had these: ' around my password when it was published to the server. Having those ticks around the password locally was no problem and not even inserting them after the site has been successfully published. But if the ticks are there while the site is being published you will get an error.
Here is my devops page so you can see what it looks like: https://dev.azure.com/rasmusolofssons/rasolo
Here is how i do my Umbraco 8 website on Azure via DevOps. I also have release pipelines for moving the content between Test and Live bi-directionally. Umbraco 8 on Azure via Devops
i am also getting the error while deploying v8 app to azure
is working on a reply...