Giter Site home page Giter Site logo

epinova-dxp-deployment's People

Contributors

dependabot[bot] avatar ovelartelius avatar tholee avatar timotheeweiss avatar tomludd avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

epinova-dxp-deployment's Issues

Question - Deploy nuget package

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.

Linux environment does not support uploading the same package multiple times

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

SmokeTest - Optional reset

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.

Linux: Deploy NuGet package to Production

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 start and end DateTime

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.

SmokeTest Response error

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__

Unable to resolve package source 'https://www.powershellgallery.com/api/v2

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 input is not a valid Base-64 string...

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.

DownloadDxp(DbN)Blobs Join-Parts doesn't support UNC paths

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("/", "\"))

ExportDb - timeout

How does the timeout work? I see you have timeout as an input but I don't see it used anywhere in the code.

Wait for status - task

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

Error when directDeploy checkbox is checked

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

Create a Hotfix release

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.

DeployNuGetPackage retry logic

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.

New option for ZDD in "Deploy NuGet package" task

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.

image

Run in ubuntu pipeline

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?

Check that ProjectId prop is provided

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.

Deploy nuget package warning

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.

Await status - Got error: The property 'Count' cannot be found on this object. Verify that the property exists.

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

Deploy NuGet packages resolved path

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.

Use yml templates

Look into templates and see if there are cases that makes the yml files easier to use.

Deploy NuGet package task is not working for commerce

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

Add number of retries on SmokeTest

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.

Status output

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.

if ($status.status -eq "AwaitingVerification") {
Write-Host "Deployment $deploymentId has been successful."
}
else {
Write-Warning "The deploy has not been successful or the script has timedout."
Write-Host "##vso[task.logissue type=error]The deploy has not been successful or the script has timedout."
Write-Error "The deploy has not been successful or the script has timedout." -ErrorAction Stop
exit 1
}

Allow Reset-EpiDeployment when status is not AwaitingVerification

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.

DeployTo - SourceApp error

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"

ExportDb task

Implement the new Start-EpiDatabaseExport and Get-EpiDatabaseExport methods

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.