Epinova DXP deployment version 2

Background

  • ”Can Epinova DXP deployment run cross platform?”
  • ”I want to run a Ubuntu agent!”
  • “I like apples. I want to run on MacOS.”

Today everything should be cross platform. We have started to get requests from developers that wants to run Epinova DXP deployment tasks in other platform agents than Windows. Since Optimizely DXP also moves from only supporting Windows to also supporting other OS like Linux machines with their new Content and Commerce Cloud based in .NET 5 it feels right to follow the stream.

All tasks in Epinova DXP deployment extension are using PowerShell scripts and these only work on Windows agents. To be cross platform compatible we need to run the scripts using PowerShell Core. We have now upgraded all tasks and made them available for Windows/Ubuntu/MacOS agents.

Specify the agent

When you are setting up tasks in your release pipeline, you can select any type of “Agent specification”. It’s up to you to select if you want to use Windows, Ubuntu or MacOS agents.

Below you can see an example of a “Run on agent” task group that is specified to run all it tasks on a “ubuntu-20.04” agent. In this example we just have one task, but you could of course have more tasks.

UbuntuAgentTasks.jpg

If you are using YAML you can also use this new functionality. See that I have specified to use the vmImage: “ubuntu-latest” below.

trigger: none

variables:

- group: DXP-variables

pool:

  name: Azure Pipelines

  vmImage'ubuntu-latest'

steps:

- checkout: none  # Don't sync sources

- task: DxpExportDb@2

  inputs:

    ClientKey: '$(ClientKey)'

    ClientSecret: '$(ClientSecret)'

    ProjectId: '$(DXP.ProjectId)'

    Environment: 'Integration'

    DatabaseName: 'epicms' #epicms|epicommerce

    RetentionHours: 24

    Timeout: 1800

 

Note: There may be other tasks (not Epinova DXP deployment tasks) that you use, that is not cross platform compatible. Check the status for the tasks that you’re using before spending time to convert to another agent and realize that you can´t.

 

Upgrade existing tasks

If you already have a build and/or release pipeline you can upgrade your tasks to start using the new version 2 tasks. You don’t need to think about the settings when upgrade to the newer version of the task - they are the same and Azure DevOps will keep them when changing to the new version (I’ve previously seen cases where other task has fields that have new names and do not match between versions which causes the interface to not know what to do with the values for the mismatch fields, and they will disappear).

In classic mode you will get a little flag next to the task version field. That indicates that there is a newer version that you can use. You can just go in and edit the build/release pipeline and change the Epinova DXP deployment tasks to version 2.

TaskWithV1Flag_marked.jpg

After saving your changes you are good to go and create a new build/release.

TaskWithV2.jpg

If you are using YAML files. You could simple just change all tasks that match “-task: Dxp*@1”. And change it to “-task Dxp*@2”.

Here follows an example:

trigger: none

variables:

- group: DXP-variables

pool:

  name: Azure Pipelines

  vmImage: 'windows-latest'

steps:

- checkout: none  # Don't sync sources

taskDxpExportDb@1

  inputs:

    ClientKey: '$(ClientKey)'

    ClientSecret: '$(ClientSecret)'

    ProjectId: '$(DXP.ProjectId)'

    Environment: 'Integration'

    DatabaseName: 'epicms' #epicms|epicommerce

    RetentionHours: 24

    Timeout: 1800

 

Change “- task: DxpExportDb@1” => “- task: DxpExportDb@2”. Result:

trigger: none

variables:

- group: DXP-variables

pool:

  name: Azure Pipelines

  vmImage: 'windows-latest'

steps:

- checkout: none  # Don't sync sources

taskDxpExportDb@2

  inputs:

    ClientKey: '$(ClientKey)'

    ClientSecret: '$(ClientSecret)'

    ProjectId: '$(DXP.ProjectId)'

    Environment: 'Integration'

    DatabaseName: 'epicms' #epicms|epicommerce

    RetentionHours: 24

    Timeout: 1800

Outro

As you can see it is not that hard to upgrade to the new version 2 tasks. And if there is any problem with the new version 2 tasks, please just create an issue in the GitHub repository so we can help you solve that.

I have not been able to play around and done performance tests on the differences between tasks on different agents, but when doing some simple testing I have a strong feeling that the Ubuntu agents are faster than the Windows agents.

My next step will be to dig into the YAML example files and upgrade them. I will come back with a new blog post about that when that is done.

For the latest documentation and guides please visit the repo on GitHub. Where all code, documentation and YAML files etc. exist.