Don't miss out Virtual Happy Hour this Friday (April 26).

Try our conversational search powered by Generative AI!

Scott Reed
Dec 13, 2017
  3756
(9 votes)

Configuring VSTS Releases From a single package to work with New Relic on the DXC

As part of my first expereince fully working with the DXC on a project here at https://www.redweb.com/ we chose to use the Visual Studio Team Services code, build, test and deploy process so that we could manage everything in VSTS and have links through to work items for build and releases. In our project our site was both a commerce and cms website so we needed to deploy to 2 defferent Azure web apps.

This process involved

  1. Create a triggered build process that would build the CMS and Commerce solution
  2. Create a single zip artifact package file that would contain packages for both the CMS and Commerce builds.
  3. Create a triggered release process that could deploy each package in the artifcact to each Azure web app (using the Azure App Service Deploy step). This is important so left over files are not on the web app and any old DLLs are not left in the bin folder (which could cause runtime issues).

This was all pretty simple to set up (with a bit of playing) although one problem I have discovered when configuring the release process is around the New Relic files which are in a main top level folder by the name of newrelic. These files are added by Episerver and should not be modified.

The issue I have been getting when deploying is one of two results

  • Deploy failing due to the locked new relic files in the newrelic folder
  • Deploy working but deleting the new relic files and the reporting in New Relic breaking (Requires a ticket with Episerver to fix).

The documentation here https://world.episerver.com/digital-experience-cloud-service/deploying/deploying-code-changes/ lists how to configure this for using publishing within the publish/project config which is great if you are directly publishing a site but this wouldn't work using our method of creating a shared artifact of the code and then pushing out to each Azure app.

The magic key to all of this was configuring the additonal argument to have -skip:skipAction=Delete,objectname='dirPath',absolutepath='.\\newrelic' -skip:skipAction=Delete,objectname='dirPath',absolutepath='.\\newrelic\\Extensions' so that the folder is skipped as part of the deploy process as shown below.

Once this is configured the newrelic files are skipped and only the files we control are remove.

Hopefully this will help people with similar issues. At some point I'll do another blog around the full experience of setting up a DXC VSTS project.

Dec 13, 2017

Comments

Henrik Fransas
Henrik Fransas Dec 14, 2017 09:11 AM

Great! Will forward this to the documentation team so this will be the recommended way, not the ugly do not delete file way.

Mark Price
Mark Price Dec 14, 2017 09:48 AM

That's a very useful blog article, Scott. I will add a slide to our Developing for DXC Service training course to explain this best way to handle NewRelic when using VSTS, and since the course's exercise uses VSTS, I can add it as a step in the exercise instructions too. I'm eagerly awaiting your follow-up post around your full experience of setting up a DXC-S VSTS project. :-)

Dec 14, 2017 10:05 AM

Hi Mark and Henrik, please hold off. Typically I tested a build last night and it seemed to work but for some reason it worked and now it isn't with a fresh checkin. I think there's a few more arguments I need so I'll try to get it working and properly tested then will update again.

Dec 14, 2017 11:16 AM

Hi again guys, I've got this working now although editing and saving my blog post doesn't seem to work. 

The additonal arguments is slightly differennt but it's now working consistently, args are as following

-skip:skipAction=Delete,objectname='dirPath',absolutepath='.\\newrelic' -skip:skipAction=Delete,objectname='dirPath',absolutepath='.\\newrelic\\Extensions'

Henrik Fransas
Henrik Fransas Dec 14, 2017 01:47 PM

Thanks for the update!

Dec 15, 2017 11:19 AM

The main blog post is updated now to reflect my changes. Thanks everyone :-)

Emil W
Emil W Dec 19, 2017 10:00 AM

Nice post! This can also be achieved with Octopus deploy by setting the NewRelic path as a variable in your deploy project.

Just add 'Octopus.Action.Azure.PreservePaths = \\\\newrelic.*(\\.*|$)' in your Octopus deploy projects variables and you will get the same result as above.

Reference: https://help.octopusdeploy.com/discussions/questions/6256-exclude-paths-with-azure-web-app

Happy deploying!

//Emil @episerver

Gregoire Bodson
Gregoire Bodson Nov 21, 2018 09:50 PM

Hi Scott,

Can you clarify how you managed authentification while setting up  Azure App Service Deploy

It cannot be automatic as I get the following error forom azure portal:

Do you know how to configure the advance settings and what to request from Epi DXC team?

Gregoire Bodson
Gregoire Bodson Nov 21, 2018 10:00 PM

Hi Scott,

Can you clarify how you managed authentification while setting up  Azure App Service Deploy

It cannot be automatic as I get the following error forom azure portal: Failed to create an app in Azure Active Directory. Error: Insufficient privileges to complete the operation. For troubleshooting refer to <a href="https://go.microsoft.com/fwlink/?linkid=835898" target="_blank">link</a>.

Do you know how to configure the advance settings and what to request from Epi DXC team?

Gregoire Bodson
Gregoire Bodson Nov 21, 2018 10:00 PM

Hi Scott,

Can you clarify how you managed authentification while setting up  Azure App Service Deploy

It cannot be automatic as I get the following error forom azure portal: Failed to create an app in Azure Active Directory. Error: Insufficient privileges to complete the operation. For troubleshooting refer to <a href="https://go.microsoft.com/fwlink/?linkid=835898" target="_blank">link</a>.

Do you know how to configure the advance settings and what to request from Epi DXC team?

Please login to comment.
Latest blogs
Solving the mystery of high memory usage

Sometimes, my work is easy, the problem could be resolved with one look (when I’m lucky enough to look at where it needs to be looked, just like th...

Quan Mai | Apr 22, 2024 | Syndicated blog

Search & Navigation reporting improvements

From version 16.1.0 there are some updates on the statistics pages: Add pagination to search phrase list Allows choosing a custom date range to get...

Phong | Apr 22, 2024

Optimizely and the never-ending story of the missing globe!

I've worked with Optimizely CMS for 14 years, and there are two things I'm obsessed with: Link validation and the globe that keeps disappearing on...

Tomas Hensrud Gulla | Apr 18, 2024 | Syndicated blog

Visitor Groups Usage Report For Optimizely CMS 12

This add-on offers detailed information on how visitor groups are used and how effective they are within Optimizely CMS. Editors can monitor and...

Adnan Zameer | Apr 18, 2024 | Syndicated blog