AL-Go icon indicating copy to clipboard operation
AL-Go copied to clipboard

Allow Scope to be PTE in continuousDeployment for PTE extensions in Sandbox (enhancement request)

Open louagej opened this issue 1 year ago • 3 comments

Use Case

Developer asks new online environment on the customer tenant. This should be a copy from the current UAT environment. Since the current UAT is part of the CI/CD deployment, the latest version of our app has been published in sope Dev.

image

When creating a copy from the current UAT, all apps, published in scope Dev are removed in the new environment that is created.

If there are multiple PTE-apps installed in Dev scope, it is quit a hassle to reinstall all apps in the new environment.

Request

add a setting in the DeployTo<environmentname> that allows us to define the scope, e.g.: "scope": "PTE"

"DeployToUAT": {
    "EnvironmentName": "UAT",
    "continuousDeployment": true,
    "scope": "PTE"
  }

louagej avatar Mar 13 '24 14:03 louagej

Good idea

freddydk avatar Mar 13 '24 14:03 freddydk

Great idea @louagej

Currently there's a workaround. You need to authenticate using S2S token. See "client credential flow here: https://freddysblog.com/2021/01/25/bcauthcontext/

Downside, of using PTE scope, is that your extension list gets polluted with older extension versions.

gntpet avatar Mar 14 '24 09:03 gntpet

@gntpet , I'm aware of the workaround, but not all customers are capable of creating an app registration in order to setup S2S authentication. In 50% of our deployments, we have to use the device authentication

New-BcAuthContext -includeDeviceLogin -tenantID $tenantID | New-ALGoAuthContext | set-Clipboard

@freddydk , maybe a good idea to prevent PTE-polution to unpublish previous version after publishing and installing the new version

louagej avatar Mar 14 '24 10:03 louagej

on the unpublish - please see #409 and https://github.com/microsoft/navcontainerhelper/issues/2808

freddydk avatar Jun 25 '24 07:06 freddydk

@freddydk , I did a small change and created a pull request for the publishing PTE apps only.

louagej avatar Jun 25 '24 08:06 louagej