Episerver DXC Azure - Team Services Integration

Vote:
 

When trying to link to Team Services account on EpiServer Azure, get an error. Having trouble setting up continous delivery/deployment for Episerver Azure to Team Services GIT Project. Any suggestions? What other tools are easier to setup?

#177089
Apr 03, 2017 22:56
Vote:
 

Are you trying to setup continous integration to the integration environment?

#177095
Apr 04, 2017 5:47
Vote:
 

Yes! Any suggestions to resolve the linking issue? or what else to use other than team services?

#177162
Apr 04, 2017 18:53
Vote:
 

You can publish to Azure using Visual Studio. You can download the publishing profile and import it using Visual Studio publishing profile setup. You can logon to portal.azure.com under App Services > Select your app service > Get Publish Profile.

Image PublishProfile.GIF

#177163
Apr 04, 2017 19:58
Vote:
 

Yes, I have done that publish via the profile on Visual Studio. But how do you setup for continuous deployment on Azure? Continuous Delivery so your source control is integrated with Azure - that is what I was trying to do? We have 4 developers on the team - so then will all 4 use the publishing profile and publish code?? Whats the best practive to setup with source control etc?

#177164
Apr 04, 2017 20:03
Vote:
 
#177169
Apr 04, 2017 21:09
Vote:
 

This article is great. Since I am new to deployment, the develop CI Build defintion you talk about in the article. So you never really build from that. You only build from the Integrate CI - which is where the publishing profile is?

And what is the linking of team services account on Azure? And the continuous delivery on Azure?

#177176
Apr 04, 2017 23:02
Vote:
 

Also I get this error when I run the Integrate Build which has the publishing profile passed into it:

   

Error: C:\a\_tasks\NuGetInstaller_333b11bd-d341-40d9-afcf-b32d5ce6f23b\0.2.29\node_modules\nuget-task-common\NuGet\3.3.0\NuGet.exe failed with return code: 1

Packages failed to install
#177177
Apr 04, 2017 23:50
Vote:
 

By build I mean MSBuild (not publishing). Also this is just a model that worked for us but you can get more creative with it.

Both develop and Integration definitions build/compile the website but only integration CI definition will publish to the Integration server. The first one is used to auto-build all merges to the develop branch done by developers to ensure that any compilation errors are caught right away and can have slack or email notifications setup on every build. This maintains the integrity of code at all times by forcing the developers to fix any issues right away. 

In regards to the error, you dont have to use all build steps if nuget, gulp etc. doesnt apply to you, you can remove it from the build definition. Its an extra nice to have. 

Aniket Gadre

#177178
Edited, Apr 05, 2017 1:45
Vote:
 

Now I am getting these errors when I run the build:

   

Error: C:\a\_tasks\NuGetInstaller_333b11bd-d341-40d9-afcf-b32d5ce6f23b\0.2.29\node_modules\nuget-task-common\NuGet\3.5.0\NuGet.exe failed with return code: 1
Packages failed to install
Visual Studio version '15.0' not found. Looking for the latest version.
Process 'msbuild.exe' exited with code '1'.
Directory 'C:\a\1\a' is empty. Nothing will be added to build artifact 'drop'.
How do I remove this Nuget step? and why is it looking for Visual Studio - where do I have to install it??
#177230
Apr 05, 2017 17:59
Vote:
 

You can edit any build definition and right click on each build step to disable it. You can also set "Continue on error" under 'Control options' for each build step. That way it will throw an error but continue to the next build step.

Regarding your issue with VS, it uses a build agent to build your code (MSbuild.exe) and your solution is probably on a lower version. Try changing the VS version on the "Build solution step" to match the version of your solution.

#177238
Apr 05, 2017 19:51
Vote:
 

Thank you so much Aniket! You have been a really great help to me on this! was able to run the Develop Build. Now tried to run the Integrate/Deploy Build with the publish profile and I get this error: Anything I can try out?

Visual Studio version '15.0' not found. Looking for the latest version.
"C:\Program Files (x86)\MSBuild\14.0\bin\msbuild.exe" "C:\a\1\s\QDX.sln" /nologo /nr:false /t:"Clean" /fl /flp:"logfile=C:\a\1\s\QDX.sln-clean.log" /dl:CentralLogger,"C:\a\_tasks\VSBuild_71a9a2d3-a98a-4caa-96ab-affca411ecda\1.113.0\ps_modules\MSBuildHelpers\Microsoft.TeamFoundation.DistributedTask.MSBuild.Logger.dll";"RootDetailId=a6913f27-a560-45c7-a86c-25ff33c37f94|SolutionDir=C:\a\1\s"*ForwardingLogger,"C:\a\_tasks\VSBuild_71a9a2d3-a98a-4caa-96ab-affca411ecda\1.113.0\ps_modules\MSBuildHelpers\Microsoft.TeamFoundation.DistributedTask.MSBuild.Logger.dll" /p:OutDir="C:\a\1\b\\"
MSBUILD : error MSB1008: Only one project can be specified.
Switch: profileName=qntm01c1j23inte - Web Deploy
For switch syntax, type "MSBuild /help"
Process 'msbuild.exe' exited with code '1'.
"C:\Program Files (x86)\MSBuild\14.0\bin\msbuild.exe" "C:\a\1\s\QDX.sln" /nologo /nr:false /fl /flp:"logfile=C:\a\1\s\QDX.sln.log" /dl:CentralLogger,"C:\a\_tasks\VSBuild_71a9a2d3-a98a-4caa-96ab-affca411ecda\1.113.0\ps_modules\MSBuildHelpers\Microsoft.TeamFoundation.DistributedTask.MSBuild.Logger.dll";"RootDetailId=b235b506-49f0-43fc-a340-eba59ad08da2|SolutionDir=C:\a\1\s"*ForwardingLogger,"C:\a\_tasks\VSBuild_71a9a2d3-a98a-4caa-96ab-affca411ecda\1.113.0\ps_modules\MSBuildHelpers\Microsoft.TeamFoundation.DistributedTask.MSBuild.Logger.dll" /p:OutDir="C:\a\1\b\\
MSBUILD : error MSB1008: Only one project can be specified.
Switch: profileName=qntm01c1j23inte - Web Deploy
For switch syntax, type "MSBuild /help"
Process 'msbuild.exe' exited with code '1'.
******************************************************************************
Finishing: Build solution QDX.sln
******************************************************************************
******************************************************************************
Starting: Copy files from $(build.binariesdirectory)
******************************************************************************
==============================================================================
Task : Windows Machine File Copy
Description : Copy files to remote machine(s)
Version : 1.0.39
Author : Microsoft Corporation
Help : [More Information](https://go.microsoft.com/fwlink/?linkid=627415)
==============================================================================
Preparing task execution handler.
Executing the powershell script: C:\a\_tasks\WindowsMachineFileCopy_731004d4-1d66-4f70-8c05-638018b22210\1.0.39\WindowsMachineFileCopy.ps1
Copy started for - 'C:\deployment'
System.Management.Automation.RuntimeException: Copying failed for resource :
Parameter 'Username' cannot be null or empty. ---> System.Management.Automation.RuntimeException: Copying failed for resource :
Parameter 'Username' cannot be null or empty.
--- End of inner exception stack trace ---
at System.Management.Automation.Runspaces.PipelineBase.Invoke(IEnumerable input)
at System.Management.Automation.PowerShell.Worker.ConstructPipelineAndDoWork(Runspace rs, Boolean performSyncInvoke)
at System.Management.Automation.PowerShell.Worker.CreateRunspaceIfNeededAndDoWork(Runspace rsToUse, Boolean isSync)
at System.Management.Automation.PowerShell.CoreInvokeHelper[TInput,TOutput](PSDataCollection`1 input, PSDataCollection`1 output, PSInvocationSettings settings)
at System.Management.Automation.PowerShell.CoreInvoke[TInput,TOutput](PSDataCollection`1 input, PSDataCollection`1 output, PSInvocationSettings settings)
at Microsoft.TeamFoundation.DistributedTask.Handlers.LegacyVSTSPowerShellHost.VSTSPowerShellHost.Main(String[] args)
LegacyVSTSPowerShellHost.exe completed with return code: -1.
#177239
Edited, Apr 05, 2017 20:38
Vote:
 

My guess is you have a syntax error in your build arguments you specify for the publish. Try removing quotes from the username, password. Use the same syntax I have in the blog post.

Not sure what the second error is...

EDIT YOUR REPLY: You have all your azure credentials in this reply. Avoid adding username/password or other sensitive information when you respond :).

#177245
Apr 06, 2017 0:33
Vote:
 

I think I fixed the parameters and build solution worked. But the next step on there about copying files - do I need that? It wrrors out saying username cannot be null or empty.

2017-04-05T22:55:10.6167420Z ##[section]Starting: Copy files from $(build.binariesdirectory)
2017-04-05T22:55:10.6167420Z ==============================================================================
2017-04-05T22:55:10.6167420Z Task         : Windows Machine File Copy
2017-04-05T22:55:10.6167420Z Description  : Copy files to remote machine(s)
2017-04-05T22:55:10.6167420Z Version      : 1.0.39
2017-04-05T22:55:10.6167420Z Author       : Microsoft Corporation
2017-04-05T22:55:10.6167420Z Help         : [More Information](https://go.microsoft.com/fwlink/?linkid=627415)
2017-04-05T22:55:10.6167420Z ==============================================================================
2017-04-05T22:55:10.6227439Z Preparing task execution handler.
2017-04-05T22:55:16.6824669Z Executing the powershell script: C:\a\_tasks\WindowsMachineFileCopy_731004d4-1d66-4f70-8c05-638018b22210\1.0.39\WindowsMachineFileCopy.ps1
2017-04-05T22:55:19.9926491Z Copy started for - 'C:\deployment'
2017-04-05T22:55:20.1834148Z ##[error]System.Management.Automation.RuntimeException: Copying failed for resource :
2017-04-05T22:55:20.1834148Z Parameter 'Username' cannot be null or empty. ---> System.Management.Automation.RuntimeException: Copying failed for resource :
2017-04-05T22:55:20.1834148Z Parameter 'Username' cannot be null or empty.
2017-04-05T22:55:20.1834148Z    --- End of inner exception stack trace ---
2017-04-05T22:55:20.1834148Z    at System.Management.Automation.Runspaces.PipelineBase.Invoke(IEnumerable input)
2017-04-05T22:55:20.1834148Z    at System.Management.Automation.PowerShell.Worker.ConstructPipelineAndDoWork(Runspace rs, Boolean performSyncInvoke)
2017-04-05T22:55:20.1834148Z    at System.Management.Automation.PowerShell.Worker.CreateRunspaceIfNeededAndDoWork(Runspace rsToUse, Boolean isSync)
2017-04-05T22:55:20.1834148Z    at System.Management.Automation.PowerShell.CoreInvokeHelper[TInput,TOutput](PSDataCollection`1 input, PSDataCollection`1 output, PSInvocationSettings settings)
2017-04-05T22:55:20.1834148Z    at System.Management.Automation.PowerShell.CoreInvoke[TInput,TOutput](PSDataCollection`1 input, PSDataCollection`1 output, PSInvocationSettings settings)
2017-04-05T22:55:20.1834148Z    at Microsoft.TeamFoundation.DistributedTask.Handlers.LegacyVSTSPowerShellHost.VSTSPowerShellHost.Main(String[] args)
2017-04-05T22:55:20.1914151Z ##[error]LegacyVSTSPowerShellHost.exe completed with return code: -1.
2017-04-05T22:55:20.1924145Z ##[section]Finishing: Copy files from $(build.binariesdirectory)

#177278
Apr 06, 2017 16:22
Vote:
 

You can remove that.

#177295
Apr 06, 2017 19:01