Epinova / epinova-dxp-deployment

DXP deployment with Azure DevOps release tasks
MIT License
14 stars 11 forks source link

Error with DropPath on DxpDeployNuGetPackage since 2.2.19 #225

Closed johanbenschop closed 2 years ago

johanbenschop commented 2 years ago

Yesterday evening deploys to our DXP integration environment started to fail while earlier they worked just fine. We haven't made any changes to our deployment configuration. The ones that worked fine use version 2.2.18 of the DxpDeployNuGetPackage task, while version 2.2.19 gives the following error: Cannot find path '/home/vsts/work/1/s/"/home/vsts/work/1/DxpPackage"' because it does not exist. I'm guessing this is related to issue #222. I'm unsure of how to resolve this error.

The full output of the task:

Starting: DxpDeployNuGetPackage
==============================================================================
Task         : Deploy nuget package (Optimizely DXP)
Description  : Start a deploy of a nuget package to target environment for your DXP project. (Optimizely DXP, former Episerver DXC)
Version      : 2.2.19
Author       : Ove Lartelius
Help         : https://github.com/Epinova/epinova-dxp-deployment/blob/master/documentation/DeployNugetPackage.md
==============================================================================
Using executable 'pwsh' as only only option on 'Linux'
pwsh /home/vsts/work/_tasks/DxpDeployNuGetPackage_2bc993e5-c27c-4a24-aeaf-0fc403debc8d/2.2.19\DeployNuGetPackage.ps1 -ClientKey **** -ClientSecret **** -ProjectId **** -TargetEnvironment Integration -SourceApp cms -DirectDeploy true -UseMaintenancePage false -DropPath "/home/vsts/work/1\DxpPackage" -Timeout 1800
Inputs:

ClientKey:          **** (it is a secret...)
ClientSecret:       **** (it is a secret...)
ProjectId:          **** (it is a secret...)
TargetEnvironment:  Integration
SourceApp:          cms
DirectDeploy:       True
Warm-up URL:        
UseMaintenancePage: False

DropPath:           "/home/vsts/work/1\DxpPackage"
Timeout:            1800

ZeroDowntimeMode:   

Added /home/vsts/work/_tasks/DxpDeployNuGetPackage_2bc993e5-c27c-4a24-aeaf-0fc403debc8d/2.2.19/ps_modules to env:PSModulePath

EpiCloud            [@{Version=1.1.0}]

Name                           Value

----                           -----
PSVersion                      7.2.4
PSEdition                      Core
GitCommitId                    7.2.4
OS                             Linux 5.13.0-1031-azure #37~20.04.1-Ubuntu SMP …
Platform                       Unix
PSCompatibleVersions           {1.0, 2.0, 3.0, 4.0…}
PSRemotingProtocolVersion      2.3
SerializationVersion           1.1.0.1

WSManStackVersion              3.0

ClientKey              : **** (it is a secret...)

AuthenticationVerified : True

ProjectId              : **** (it is a secret...)

PackageLocation:    https://ourblobname.blob.core.windows.net/deploymentpackages?sv=****

##[error]Get-ChildItem: /home/vsts/work/_tasks/DxpDeployNuGetPackage_2bc993e5-c27c-4a24-aeaf-0fc403debc8d/2.2.19/ps_modules/EpinovaDxpDeploymentUtil.ps1:833
Line |
 833 |  … eFileInfo = Get-ChildItem -Path $DropPath -Filter "*.$PackageType.*.n …
     |                ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
     | Cannot find path
     | '/home/vsts/work/1/s/"/home/vsts/work/1/DxpPackage"' because
     | it does not exist.

##[error]Get-ChildItem: /home/vsts/work/_tasks/DxpDeployNuGetPackage_2bc993e5-c27c-4a24-aeaf-0fc403debc8d/2.2.19/ps_modules/EpinovaDxpDeploymentUtil.ps1:833
Line |
 833 |  … eFileInfo = Get-ChildItem -Path $DropPath -Filter "*.$PackageType.*.n …
     |                ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
     | Cannot find path
     | '/home/vsts/work/1/s/"/home/vsts/work/1/DxpPackage"' because
     | it does not exist.

Loaded cms package:    

##[error]Publish-Package: /home/vsts/work/_tasks/DxpDeployNuGetPackage_2bc993e5-c27c-4a24-aeaf-0fc403debc8d/2.2.19/DeployNuGetPackage.ps1:73
Line |
  73 |  … msPackage = Publish-Package -PackageType "cms" -DropPath $dropPath -P …
     |                ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
     | Cannot bind argument to parameter 'PackageFile' because it is
     | null.

##[error]Publish-Package: /home/vsts/work/_tasks/DxpDeployNuGetPackage_2bc993e5-c27c-4a24-aeaf-0fc403debc8d/2.2.19/DeployNuGetPackage.ps1:73
Line |
  73 |  … msPackage = Publish-Package -PackageType "cms" -DropPath $dropPath -P …
     |                ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
     | Cannot bind argument to parameter 'PackageFile' because it is
     | null.

Script finished
Finishing: DxpDeployNuGetPackage
tomludd commented 2 years ago

Updates in https://github.com/Epinova/epinova-dxp-deployment/pull/224 https://github.com/Epinova/epinova-dxp-deployment/issues/222 breaks deployment when using ubuntu agent.

As a workaround you can use a windows agent when deploying. image

ovelartelius commented 2 years ago

@johanbenschop Hi. I know that this is confusing. We have release v2.2.19 of the DXP extension in Azure DevOps. That should contain the task DeployNuGetPackage with v2.2.20. I can see in your log that the task you run with was v2.2.19. That is the old one that are related to #222 issue. So the solution is now to create a new release so that you have a chance to get the task DeployNuGetPackage v2.2.20 that will work much better.

johanbenschop commented 2 years ago

Hello there. Yes, our pipelines are indeed back in working order again. Thank you very much.