sfcc-ci icon indicating copy to clipboard operation
sfcc-ci copied to clipboard

Feature request: replication sub command

Open Touhami-viseo opened this issue 1 year ago • 4 comments

sfcc-ci Version

2.12.0

NodeJS Version

16.20.2

sfcc-ci Path

N/A

Host OS Details

Ubuntu 22.04.5 LTS

What happened?

This is a feature request.

In order to improve our delivery pipeline we would like to trigger code replications from staging environment to development and production environments. However, currently there is no way to trigger a code or data replication using sfcc-ci.

Being able to trigger replication from our CI would streamline our delivery process, have better reporting (time to delivery, KPIs, etc.) be more efficient, and reduce deployment errors.

I image this new command:

sfcc-ci code:replicate [options] <codeversion> <target>

Where : <codeversion> is the version to replcate. <target> is either development or production.

Thanks in advance.

Relevant log output

N/A

Touhami-viseo avatar Oct 24 '24 10:10 Touhami-viseo

@Touhami-viseo My Idea on ideaexchange may interest you: Offer a way to programmatically deploy a code version to production. I would appreciate an upvote, FWIW.

In the meantime, I'm resorting to Playwright for .NET driven browser automation.

vercellone avatar Dec 10 '24 02:12 vercellone

Not talking down that a direct API would be great, but there are ways already to achieve that control on your DevOps tooling. And no, I am not referring to browser automation.

You can setup code replication via job step, where a replication for the active code version would be executed. And a job is something you could trigger via the CLI.

So the steps would be:

  • code deployment to STG (2FA cert)
  • code activation
  • trigger code replication job

aseyfarth avatar Dec 11 '24 11:12 aseyfarth

Perhaps I should have titled my idea Offer a way to programmatically deploy an inactive (or any) code version to production

I did mention the solution you suggested and explained why it is undesirable.

  1. There is a job which can be run programmatically to replicate the currently active code in staging to production. Since our staging instance typically has a newer code version active when we want to deploy to production, we would have to first activate the version we want, replicate it, then revert the active version to what it was. This isn't difficult but would almost certainly cause disruption in staging and potentially expose us to other side effects.

vercellone avatar Dec 12 '24 18:12 vercellone

@Touhami-viseo My Idea on ideaexchange may interest you: Offer a way to programmatically deploy a code version to production. I would appreciate an upvote, FWIW.

I upvoted your suggestion.

Do you know where is the best place to request features from Salesforce?

Touhami-viseo avatar Jan 23 '25 12:01 Touhami-viseo