epinova / epinova-dxp-deployment Goto Github PK
View Code? Open in Web Editor NEWDXP deployment with Azure DevOps release tasks
License: MIT License
DXP deployment with Azure DevOps release tasks
License: MIT License
On the Deploy nuget package task. Is it possible to change the task to upload ALL nupkg files that are in the drop folder? My Build pipeline generates Cms and Commerce nupkg.
Add-EpiDeploymentPackage can only be invoked once per package/nuget in a linux environment.
So when we deploy the same package, that was deployed to preproduction, to production deployment fails with the following error.
Error:
##[error] Set-AzStorageBlobContent: /home/vsts/work/_tasks/DxpDeployNuGetPackage_2bc993e5-c27c-4a24-aeaf-0fc403debc8d/2.0.12/ps_modules/EpiCloud/EpiCloud.psm1:424
Line 424
| … $null = Set-AzStorageBlobContent @setAzureStorageBlobContentParam …
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
| There is currently a lease on the blob and no lease ID was
| specified in the request. HTTP Status Code: 412 - HTTP Error
| Message: There is currently a lease on the blob and no lease
| ID was specified in the request. ErrorCode: LeaseIdMissing
| ErrorMessage: There is currently a lease on the blob and no
| lease ID was specified in the request.
| RequestId:xxx
To to beginn maybe handle this error, unless there is an api to see if package/nuget is already uploaded.
@ovelartelius
$resolvedCmsPackagePath = Get-ChildItem -Path $dropPath -Filter .cms..nupkg i
To make it easier for users to understand how to sync down... create a specific task for ContentSyncDown instead of using DeplotTo that could be baffling.
Rename the task Smoke and reset to Smoke test - if fail reset
I want a task that will fail if the status is not as expected.
We need a status that could be one of Succeeded or Reset.
Today we can only specify either Succeeded or Reset. Not "Succeeded or Reset" as one option.
It would be nice if the SmokeTest task can have a optional parameter that is true/false so that developers can choose if the task should reset the or not if it fails the tests.
If we could name it: "Reset on fail" and make it default set to true.
The we have a nice option to choose how developers wants the task to behave.
This is useful if developer want to use this task during content sync down.
Error message: A package named 'XXX.nupkg' is already linked to a deployment and cannot be overwritten.
Deploy is success but the error message make the task to fail in the pipeline.
Show in the log the current DateTime when start and stop. It is sometimes hard to see that in Azure DevOps. If you want to look up when the actual deploy where made.
DeployTo, DeployNuget, CompleteDeploy task.
I used an incorrect url (it returned the 302 status) inside my 'Smoke test' task and got the below error:
The property 'Response' cannot be found on this object. Verify that the property exists.
I guess this error is happening inside the catch block at line 77:
$statusCode = $_.Exception.Response.StatusCode.value__
On the Deploy to (Episerver DXP) Task (the first one we run), we get the error:
2021-02-15T09:35:27.1952022Z ##[warning]Unable to resolve package source 'https://www.powershellgallery.com/api/v2'.
2021-02-15T09:35:27.3100586Z ##[error]No match was found for the specified search criteria and module name 'EpiCloud'. Try Get-PSRepository to see all available registered module repositories.
2021-02-15T09:35:27.4036161Z ##[error]The term 'Connect-EpiCloud' is not recognized as the name of a cmdlet, function, script file, or operable program. Check the spelling of the name, or if a path was included, verify that the path is correct and try again.
I strongly suspect from my google adventures that this may be a TLS thing. I tried running the powershell script on the agent just before:
[Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12
To try and force it to use TLS 1.2, but to no avail.
Not sure if this is one you know about as I didn't see it on your Problems page at:
https://github.com/Epinova/epinova-dxp-deployment/blob/develop/documentation/Problems.md
Get the error "The input is not a valid Base-64 string as it contains a non-base 64 character, more than two padding characters, or an illegal character among the padding characters." when run
$packageLocation = Get-EpiDeploymentPackageLocation -ProjectId $projectId
Write-Host "packageLocation: $packageLocation"
in DeployNuGetPackage.ps1.
Add info so that user see what information that is used and add better error messages so that users understand what went wrong.
The start of an UNC path ("\\") is removed by the Join-Parts method which makes Test-Path fail to find existing files.
Suggested solution: remove the trim($Separator)
in Join-Parts. In this specific case it is probably not necessary (at least not on Windows)
Bonus: add a Replace to this line to convert URI style paths to UNC style paths:
$filePath = (Join-Parts -Separator '\' -Parts $downloadFolder, $blobContent.Name.Replace("/", "\"))
How does the timeout work? I see you have timeout as an input but I don't see it used anywhere in the code.
Reported by @tomludd
The property 'Count' cannot be found on this object. Verify that the property exists.
Would it be possible for a task where one is waiting for a specific deployment status "AwaitingConfirmation" ? This would be usefull when Nuget deploy fails, or script fails because of loss of connection. Then deployment will continue in the portal, but reset cannot yet be run.
/Asked from user X
I am using Deploy Nuget package job to do a direct deploy to Integration but the following error occurs:
I have even tested adding a variable named DirectDeploy in variables for the release to no avail.
2021-11-26T12:13:18.6815065Z ##[error]Start-EpiDeployment : A parameter cannot be found that matches parameter name '
DirectDeploy'. This error might have been caused by applying the default parame
ter binding. You can disable the default parameter binding in $PSDefaultParamet
erValues by setting $PSDefaultParameterValues["Disabled"] to be $true, and then
2021-11-26T12:13:18.6831680Z ##[error]Start-EpiDeployment : A parameter cannot be found that matches parameter name '
DirectDeploy'. This error might have been caused by applying the default parame
ter binding. You can disable the default parameter binding in $PSDefaultParamet
erValues by setting $PSDefaultParameterValues["Disabled"] to be $true, and then
2021-11-26T12:13:18.6838555Z ##[error] trying again. The following default parameters were successfully bound for thi
s cmdlet when the error occurred: -ClientKey -ClientSecret
At D:\build_agents\agent1\_work\_tasks\DxpDeployNuGetPackage_2bc993e5-c27c-4a24
-aeaf-0fc403debc8d\2.0.13\DeployNuGetPackage.ps1:145 char:19
+ ... $deploy = Start-EpiDeployment @startEpiDeploymentSplat -DirectDeplo ...
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : InvalidArgument: (:) [Start-EpiDeployment], Pare
ntContainsErrorRecordException
+ FullyQualifiedErrorId : NamedParameterNotFound,Start-EpiDeployment
2021-11-26T12:13:18.6845632Z ##[error] trying again. The following default parameters were successfully bound for thi
s cmdlet when the error occurred: -ClientKey -ClientSecret
At D:\build_agents\agent1\_work\_tasks\DxpDeployNuGetPackage_2bc993e5-c27c-4a24
-aeaf-0fc403debc8d\2.0.13\DeployNuGetPackage.ps1:145 char:19
+ ... $deploy = Start-EpiDeployment @startEpiDeploymentSplat -DirectDeplo ...
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : InvalidArgument: (:) [Start-EpiDeployment], Pare
ntContainsErrorRecordException
+ FullyQualifiedErrorId : NamedParameterNotFound,Start-EpiDeployment
Include, if possible, status updates & warnings from the job Depliy Nuget Package where output type is Information.
I am still getting the same error.
When editing the task the drop-down indicates: cms,commerce
But, I noticed that the YAML indicates: SourceApp: 'cms, commerce'
Originally posted by @mikemalloy-commscope in #24 (comment)
A yaml file that contains a hotfix build and deploy to production.
Developer should be able to branch from master with the name "hotfix/*". Manual trigger of the pipeline. Pipeline should build a nuget package, build and deploy it to production.
Handling when lost connection during Start-DxpProgress
If connection is lost. Have logic to retry example 3 times with 5-10 sec wait between each try.
Could you provide an option for Zero Downtime Deployment inside task "Deploy NuGet package (EPiServer DXP)"
.EXAMPLE
Start-EpiDeployment -ClientKey $myKey -ClientSecret $mySecret -ProjectId $projectId -TargetEnvironment Production -DeploymentPackage cms.app.1.0.0.nupkg -ZeroDownTimeMode ReadOnly
Starts a deployment of a code package to Production environment with zero downtime readonly mode.
When i try to run the task DxpDeployNuGetPackage@1 in a pipeline using "vmImage: ubuntu-latest" i get the following error:
##[error]The current operating system is not capable of running this task. That typically means the task was written for Windows only. For example, written for Windows Desktop PowerShell.
would it be possible to enable this to run in ubuntu?
I wrote the wrong name for the ProjectId and got a very strange error message: ##[error]Exception calling "FromBase64String" with "1" argument(s): "The input is not a valid Base-64 string as it contains a non-base 64 character, more than two padding characters, or an illegal character among the padding characters.
We need to implement a check for the ProjectId and give user more information so that users understand why it is not working.
When using the Deploy nuget package (Episerver DXP) task I see the following warning 2 times.
##[warning]Because the Az modules have all the capabilities of AzureRM modules and more, we will retire the AzureRM modules on 29 February 2024. Learn more about the migration to Az: http://aka.ms/azpsmigrate.
2021-06-16T13:55:54.6746941Z ##[section]Starting: Await status on Production
2021-06-16T13:55:54.6953141Z ==============================================================================
2021-06-16T13:55:54.6953484Z Task : Await status (Episerver DXP)
2021-06-16T13:55:54.6953785Z Description : Await status to be in AwaitingVerification/Reset/Succeeded. (Episerver DXP, former DXC)
2021-06-16T13:55:54.6954514Z Version : 1.0.28
2021-06-16T13:55:54.6954762Z Author : Ove Lartelius
2021-06-16T13:55:54.6955089Z Help : https://github.com/Epinova/epinova-dxp-deployment/blob/master/documentation/AwaitStatus.md
2021-06-16T13:55:54.6955414Z ==============================================================================
2021-06-16T13:55:57.5961847Z Inputs:
2021-06-16T13:55:57.5975078Z ClientKey: XXX
2021-06-16T13:55:57.6019899Z ClientSecret: **** (it is a secret...)
2021-06-16T13:55:57.6035253Z ProjectId: XXX
2021-06-16T13:55:57.6047400Z TargetEnvironment: Production
2021-06-16T13:55:57.6058041Z Timeout: 1800
2021-06-16T13:55:57.6187827Z Installing Azure.Storage Powershell Module
2021-06-16T13:56:29.1614773Z EpiCloud @{Version=0.13.15}
2021-06-16T13:56:29.1652625Z PowerShell @{Version=5.1.14393.4402}
2021-06-16T13:56:30.2922116Z
2021-06-16T13:56:31.1163079Z ##[error]The property 'Count' cannot be found on this object. Verify that the property exists.
2021-06-16T13:56:31.1751452Z ##[section]Finishing: Await status on Production
There is a broken image at the end of this markdown:
https://github.com/Epinova/epinova-dxp-deployment/blob/develop/documentation/DeployNugetPackage.md
After the problem with https://www.powershellgallery.com/ it is worth look into the possibility to include the Episerver deployment API module into the tasks.
Can you change the pattern to support the code package format?
<app name>.<package type>.app.<version>.nupkg
For example, my filenames look like...
cms.app.1.0.11274.nupkg
commerce.app.1.0.11274.nupkg
$resolvedCmsPackagePath = Get-ChildItem -Path $dropPath -Filter *.cms.*.nupkg
$resolvedCommercePackagePath = Get-ChildItem -Path $dropPath -Filter *.commerce.*.nupkg
I'm seeing the error:
##[error]Could not find the cms package in location D:\a\r1\a_commscope-app-Integration\DXP-Deployment-Package.
##[error]Could not find the cms package in location D:\a\r1\a_commscope-app-Integration\DXP-Deployment-Package.
The section Gather projectis, apikey and secret needs to be updated with the latest changes/version.
Make sure that the task DeployTo have support to IncludeBloBs and/or IncludeDb.
Look into templates and see if there are cases that makes the yml files easier to use.
I'm getting the below error:
##[error]The variable '$resolvedCmsPackagePath' cannot be retrieved because it has not been set.
The reason is that the resolvedCmsPackagePath variable is not defined by default in DeployNuGetPackage.ps1. But it is used in a clause at line 90: if ($null -ne $resolvedCmsPackagePath -and $null -ne $resolvedCommercePackagePath).
I suggest to initialize the variable as null by default at line 56:
$resolvedCmsPackagePath = $null
Sometimes the sleeping time is not enough. Should be good to have a retry param so that you can allow the script to retry x times before fail and reset the deploy.
Hey,
Nice work with the deployment scripts!
Any particular reason for not outputting $status.status
in the error messages below? It would help with troubleshooting.
epinova-dxp-deployment/src/DeployNuGetPackage/DeployNuGetPackage.ps1
Lines 108 to 116 in 77485a0
I do not know if this limitation is coming from EpiCloud or Epinova package but I wanted to ask here first in case the limitation exists only at this package.
Sometimes the slot environment crashes directly after the deployment warmup phase gets stuck until it times out. It would be nice to reset the deployment slot manually in such cases. Currently the current message is given if reset is run:
Environment Integration is not in status AwaitingVerification. We do not need to reset this environment.
For the DeployTo task I am choosing SourceApp: cms, commerce
I receive the error:
##[error]Cannot validate argument on parameter 'SourceApp'. The argument "cms, commerce" does not belong to the set "cms,commerce" specified by the ValidateSet attribute. Supply an argument that is in the set and then try the command again.
I think the value of SourceApp needs to remove the space?
So "cms, commerce" becomes "cms,commerce"
Update tasks to use EpinovaDxpDeploymentUtil
Implement the new Start-EpiDatabaseExport and Get-EpiDatabaseExport methods
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.