HodorNV / ALOps

ALOps
59 stars 24 forks source link

Issues with publishing to OnPrem customers (using multi tenant) #803

Open HederGit opened 1 month ago

HederGit commented 1 month ago

Describe the bug The Release Pipeline fails with "No Published Extensions match he specified parameter value" the used yaml please provide the yaml that you used. It helps you put the yaml like this:

steps:
- task: Hodor.hodor-alops.alopspublishtask.ALOpsAppPublish@1
  displayName: 'ALOps App Publish'
  inputs:
    nav_serverinstance: BC23QA
    publish_scope: Tenant
    tenant: dogmanqa

the output


2024-10-17T11:22:40.0635288Z ##[section]Starting: ALOps App Publish
2024-10-17T11:22:40.0651924Z ==============================================================================
2024-10-17T11:22:40.0652076Z Task         : ALOps App Publish
2024-10-17T11:22:40.0652148Z Description  : Publish AL Extension to Business Central
2024-10-17T11:22:40.0652253Z Version      : 1.466.6319
2024-10-17T11:22:40.0652320Z Author       : Hodor
2024-10-17T11:22:40.0652900Z Help         : Publish Business Central extension to service tier.
2024-10-17T11:22:40.0653029Z ==============================================================================
2024-10-17T11:22:41.4527640Z *** Validate configuration
2024-10-17T11:22:41.5279083Z *** Task Inputs:
2024-10-17T11:22:41.5347060Z 
2024-10-17T11:22:41.6116682Z name                                                                                                              value
2024-10-17T11:22:41.6118650Z ----                                                                                                              -----
2024-10-17T11:22:41.6120546Z usedocker                                                                                                         False
2024-10-17T11:22:41.6122691Z fixed_tag                                                                                                              
2024-10-17T11:22:41.6124490Z installpublishedapps                                                                                               True
2024-10-17T11:22:41.6126116Z installaltesttool                                                                                                 False
2024-10-17T11:22:41.6127974Z install_al_app_names                                                                             Tests-TestLibraries...
2024-10-17T11:22:41.6129492Z strictappnames                                                                                                    False
2024-10-17T11:22:41.6131078Z nav_serverinstance                                                                                               BC23QA
2024-10-17T11:22:41.6133272Z artifact_path                                                                                                          
2024-10-17T11:22:41.6134827Z nav_artifact_app_filter                                                                                           *.app
2024-10-17T11:22:41.6136488Z skip_verification                                                                                                  True
2024-10-17T11:22:41.6138673Z forceinstall                                                                                                      False
2024-10-17T11:22:41.6140251Z forcesync                                                                                                         False
2024-10-17T11:22:41.6141981Z publish_scope                                                                                                    Tenant
2024-10-17T11:22:41.6143671Z tenant                                                                                                         dogmanqa
2024-10-17T11:22:41.6145352Z batch_publish_folder                                                                                                   
2024-10-17T11:22:41.6147267Z publisherazureactivedirectorytenantid                                                                                  
2024-10-17T11:22:41.6148821Z blocksymbolsonly                                                                                                  False
2024-10-17T11:22:41.6150581Z pwsh                                                                                                              False
2024-10-17T11:22:41.6150708Z 
2024-10-17T11:22:41.6175089Z 
2024-10-17T11:22:41.6185160Z 
2024-10-17T11:22:41.6345303Z True
2024-10-17T11:22:41.6653736Z *** For documentation, please visit   : https://www.alops.be/documentation
2024-10-17T11:22:41.6657817Z 
2024-10-17T11:22:42.0501086Z *** ALOps License:
2024-10-17T11:22:42.0521233Z   * Licensed To: BrightCom Solutions AB (Collection/Organisation License)
2024-10-17T11:22:42.0525065Z 
2024-10-17T11:22:42.0641437Z *** Importing required PS-Functions
2024-10-17T11:22:42.3152481Z *** Install AL TestTool: False
2024-10-17T11:22:42.3161018Z *** Working folder: C:\Agents\_work\r1\a
2024-10-17T11:22:42.3168555Z *** Artifact folder: C:\Agents\_work\r1\a
2024-10-17T11:22:42.3177861Z ***
2024-10-17T11:22:42.3258520Z *** Dynamic resolve App file.
2024-10-17T11:22:42.3265516Z *** Scanning [System.DefaultWorkingDirectory].
2024-10-17T11:22:42.3325337Z *** Scanning [System.ArtifactsDirectory].
2024-10-17T11:22:42.3383405Z *** Multiple App files found with filter [*.app].
2024-10-17T11:22:42.3441044Z   * C:\Agents\_work\r1\a\_Dogman - ALOps\Dogman\BrightCom Solutions AB_Dogman_23.0.19951.0.app
2024-10-17T11:22:42.3469000Z *** Resolved App File: [C:\Agents\_work\r1\a\_Dogman - ALOps\Dogman\BrightCom Solutions AB_Dogman_23.0.19951.0.app].
2024-10-17T11:22:42.3837580Z *** Import NAV/BC Management DLL's [False]
2024-10-17T11:22:42.3884503Z *** Loading assemblies for ServiceTier [BC23QA].
2024-10-17T11:22:43.0683462Z *** Loading assemblies from: [C:\program files\microsoft dynamics 365 business central\230\service]
2024-10-17T11:22:43.1179730Z *** BC Management DLL: C:\program files\microsoft dynamics 365 business central\230\service\Management\Microsoft.Dynamics.Nav.Management.dll
2024-10-17T11:22:43.1267708Z *** Selected module: [C:\program files\microsoft dynamics 365 business central\230\service\Management\Microsoft.Dynamics.Nav.Management.dll]
2024-10-17T11:22:43.1276536Z *** Loading module: [C:\program files\microsoft dynamics 365 business central\230\service\Management\Microsoft.Dynamics.Nav.Management.dll]
2024-10-17T11:22:43.2545871Z *** BC App Management DLL: C:\program files\microsoft dynamics 365 business central\230\service\Management\Microsoft.Dynamics.Nav.Apps.Management.dll
2024-10-17T11:22:43.2560672Z *** Selected module: [C:\program files\microsoft dynamics 365 business central\230\service\Management\Microsoft.Dynamics.Nav.Apps.Management.dll]
2024-10-17T11:22:43.2566183Z *** Loading module: [C:\program files\microsoft dynamics 365 business central\230\service\Management\Microsoft.Dynamics.Nav.Apps.Management.dll]
2024-10-17T11:22:43.3604009Z 
2024-10-17T11:22:43.3635321Z **************************************
2024-10-17T11:22:43.3643129Z  * App File = [C:\Agents\_work\r1\a\_Dogman - ALOps\Dogman\BrightCom Solutions AB_Dogman_23.0.19951.0.app]
2024-10-17T11:22:43.3646512Z 
2024-10-17T11:22:43.7156959Z  * App.ID        = 150acf42-c434-44f1-a05c-c3b29e272948
2024-10-17T11:22:43.7183877Z  * App.Name      = Dogman
2024-10-17T11:22:43.7202361Z  * App.Publisher = BrightCom Solutions AB
2024-10-17T11:22:43.7224241Z  * App.Version   = 23.0.19951.0
2024-10-17T11:22:43.7230148Z *** Get Published App Info [BrightCom Solutions AB / Dogman / 23.0.19951.0]
2024-10-17T11:22:44.0610173Z  => Publishing App 'Dogman v23.0.19951.0'
2024-10-17T11:22:44.7865113Z *** Get Tenants
2024-10-17T11:22:45.2697779Z *** Tenant Info:
2024-10-17T11:22:45.2816662Z 
2024-10-17T11:22:45.2816933Z 
2024-10-17T11:22:45.2817208Z ServerInstance                         : MicrosoftDynamicsNavServer$BC23QA
2024-10-17T11:22:45.2817475Z DatabaseName                           : ABT Bolagen QA
2024-10-17T11:22:45.2818019Z DatabaseServer                         : sebcdbqa01.brightcom.online
2024-10-17T11:22:45.2818351Z DatabaseUserName                       : nav.service
2024-10-17T11:22:45.2818522Z State                                  : Operational
2024-10-17T11:22:45.2818661Z DetailedState                          : 
2024-10-17T11:22:45.2818822Z DeletionState                          : Not deleted
2024-10-17T11:22:45.2818992Z IsInExclusiveAccessMode                : False
2024-10-17T11:22:45.2819171Z TenantDataVersion                      : 23.3.14876.15024
2024-10-17T11:22:45.2819333Z Compression                            : Unspecified
2024-10-17T11:22:45.2819492Z Id                                     : abtbolagenqa
2024-10-17T11:22:45.2820562Z AlternateId                            : {abtbolagenqa.brightcom.online}
2024-10-17T11:22:45.2820739Z ValidAudiences                         : {}
2024-10-17T11:22:45.2820886Z AllowAppDatabaseWrite                  : True
2024-10-17T11:22:45.2821053Z NasServicesEnabled                     : False
2024-10-17T11:22:45.2821217Z RunNasWithAdminRights                  : False
2024-10-17T11:22:45.2821373Z EncryptionProvider                     : LocalKeyFile
2024-10-17T11:22:45.2821544Z AzureKeyVaultSettings                  : 
2024-10-17T11:22:45.2821703Z DefaultCompany                         : 
2024-10-17T11:22:45.2821879Z DefaultTimeZone                        : (UTC) Coordinated Universal Time
2024-10-17T11:22:45.2822059Z ExchangeAuthenticationMetadataLocation : 
2024-10-17T11:22:45.2822223Z AadTenantId                            : 
2024-10-17T11:22:45.2822382Z ApplicationInsightsConnectionString    : 
2024-10-17T11:22:45.2822549Z DisplayName                            : 
2024-10-17T11:22:45.2822685Z EnvironmentName                        : 
2024-10-17T11:22:45.2822843Z EnvironmentType                        : Production
2024-10-17T11:22:45.2823006Z EnvironmentSettings                    : 
2024-10-17T11:22:45.2823068Z 
2024-10-17T11:22:45.2823113Z 
2024-10-17T11:22:45.2823304Z 
2024-10-17T11:22:45.2823351Z 
2024-10-17T11:22:45.2826433Z *** Published App:
2024-10-17T11:22:45.2837154Z 
2024-10-17T11:22:45.2844511Z *** Sync Tenant abtbolagenqa
2024-10-17T11:22:45.4058086Z *** Sync App [Dogman] on tenant [abtbolagenqa]
2024-10-17T11:22:45.4734644Z *** Install App [Dogman] on tenant [abtbolagenqa]
2024-10-17T11:22:45.8329888Z ##[error]No published extensions match the specified parameter values.
2024-10-17T11:22:45.8633840Z ##[section]Finishing: ALOps App Publish

Expected behavior We specify the tenant we want to publish the App to (DogmanQA) for some reason it tries to publish the app to the "first" tenant in our environment (abtbolagenqa) disregarding the tenant setting. We expect the app to be published to the specified tenant.

Screenshots If applicable, add screenshots to help explain your problem. You can easily paste them in here.

Additional context Add any other context about the problem here.

waldo1001 commented 3 weeks ago

I think we found it.. will be fixed in next release.

HederGit commented 3 weeks ago

Hi Gr8! Do we know approx. when it will be released?

waldo1001 commented 3 weeks ago

We aim for this week..

thomari commented 4 days ago

@waldo1001 Any update on the date of the next release?

waldo1001 commented 3 days ago

Sorry for the delay - we're pushing the release as we speak.

waldo1001 commented 3 days ago

Released in v1.467.6362

HederGit commented 2 days ago

@waldo1001 Thank you for the update! The publish works fine but the "unpublish" of the previously installed app doesnt. 2024-11-20T09:53:57.0503500Z ##[section]Starting: ALOps App Publish 2024-11-20T09:53:57.0517127Z ============================================================================== 2024-11-20T09:53:57.0517249Z Task : ALOps App Publish 2024-11-20T09:53:57.0517307Z Description : Publish AL Extension to Business Central 2024-11-20T09:53:57.0517427Z Version : 1.467.6362 2024-11-20T09:53:57.0517483Z Author : Hodor 2024-11-20T09:53:57.0517872Z Help : Publish Business Central extension to service tier. 2024-11-20T09:53:57.0517968Z ============================================================================== 2024-11-20T09:53:57.6926357Z Validate configuration 2024-11-20T09:53:57.7332952Z Task Inputs: 2024-11-20T09:53:57.7392251Z 2024-11-20T09:53:57.7498605Z name value 2024-11-20T09:53:57.7501462Z ---- ----- 2024-11-20T09:53:57.7504208Z usedocker False 2024-11-20T09:53:57.7505666Z fixed_tag
2024-11-20T09:53:57.7507405Z installpublishedapps True 2024-11-20T09:53:57.7509863Z installaltesttool False 2024-11-20T09:53:57.7511415Z install_al_app_names Tests-TestLibraries... 2024-11-20T09:53:57.7512981Z strictappnames False 2024-11-20T09:53:57.7514874Z nav_serverinstance BC23QA 2024-11-20T09:53:57.7516434Z artifact_path
2024-11-20T09:53:57.7517604Z nav_artifact_app_filter *.app 2024-11-20T09:53:57.7519204Z skip_verification True 2024-11-20T09:53:57.7520998Z forceinstall False 2024-11-20T09:53:57.7522449Z forcesync False 2024-11-20T09:53:57.7524198Z publish_scope Tenant 2024-11-20T09:53:57.7526027Z tenant dogmanqa 2024-11-20T09:53:57.7527826Z batch_publish_folder
2024-11-20T09:53:57.7529387Z publisherazureactivedirectorytenantid
2024-11-20T09:53:57.7530895Z blocksymbolsonly False 2024-11-20T09:53:57.7532127Z pwsh False 2024-11-20T09:53:57.7532646Z 2024-11-20T09:53:57.7557492Z 2024-11-20T09:53:57.7566739Z 2024-11-20T09:53:57.7733330Z True 2024-11-20T09:53:57.7891032Z For documentation, please visit : https://www.alops.be/documentation 2024-11-20T09:53:57.7894692Z 2024-11-20T09:53:58.2039526Z ALOps License: 2024-11-20T09:53:58.2053871Z * Licensed To: BrightCom Solutions AB (Collection/Organisation License) 2024-11-20T09:53:58.2057108Z 2024-11-20T09:53:58.2149200Z Importing required PS-Functions 2024-11-20T09:53:58.3086399Z Install AL TestTool: False 2024-11-20T09:53:58.3092911Z Working folder: C:\Agents_work\r1\a 2024-11-20T09:53:58.3099520Z Artifact folder: C:\Agents_work\r1\a 2024-11-20T09:53:58.3107210Z 2024-11-20T09:53:58.3169698Z Dynamic resolve App file. 2024-11-20T09:53:58.3176052Z Scanning [System.DefaultWorkingDirectory]. 2024-11-20T09:53:58.3223348Z Scanning [System.ArtifactsDirectory]. 2024-11-20T09:53:58.3271321Z Multiple App files found with filter [.app]. 2024-11-20T09:53:58.3319819Z C:\Agents_work\r1\a_Dogman - ALOps\Dogman\BrightCom Solutions AB_Dogman_23.0.20270.0.app 2024-11-20T09:53:58.3342784Z Resolved App File: [C:\Agents_work\r1\a_Dogman - ALOps\Dogman\BrightCom Solutions AB_Dogman_23.0.20270.0.app]. 2024-11-20T09:53:58.3522495Z Import NAV/BC Management DLL's [False] 2024-11-20T09:53:58.3559065Z Loading assemblies for ServiceTier [BC23QA]. 2024-11-20T09:53:58.6327265Z Loading assemblies from: [C:\program files\microsoft dynamics 365 business central\230\service] 2024-11-20T09:53:58.6612205Z BC Management DLL: C:\program files\microsoft dynamics 365 business central\230\service\Management\Microsoft.Dynamics.Nav.Management.dll 2024-11-20T09:53:58.6686595Z Selected module: [C:\program files\microsoft dynamics 365 business central\230\service\Management\Microsoft.Dynamics.Nav.Management.dll] 2024-11-20T09:53:58.6693722Z Loading module: [C:\program files\microsoft dynamics 365 business central\230\service\Management\Microsoft.Dynamics.Nav.Management.dll] 2024-11-20T09:53:58.7455210Z BC App Management DLL: C:\program files\microsoft dynamics 365 business central\230\service\Management\Microsoft.Dynamics.Nav.Apps.Management.dll 2024-11-20T09:53:58.7466850Z Selected module: [C:\program files\microsoft dynamics 365 business central\230\service\Management\Microsoft.Dynamics.Nav.Apps.Management.dll] 2024-11-20T09:53:58.7473065Z * Loading module: [C:\program files\microsoft dynamics 365 business central\230\service\Management\Microsoft.Dynamics.Nav.Apps.Management.dll] 2024-11-20T09:53:58.8017400Z 2024-11-20T09:53:58.8042265Z ** 2024-11-20T09:53:58.8048581Z App File = [C:\Agents_work\r1\a_Dogman - ALOps\Dogman\BrightCom Solutions AB_Dogman_23.0.20270.0.app] 2024-11-20T09:53:58.8051362Z 2024-11-20T09:53:59.0214932Z App.ID = 150acf42-c434-44f1-a05c-c3b29e272948 2024-11-20T09:53:59.0238332Z App.Name = Dogman 2024-11-20T09:53:59.0255300Z App.Publisher = BrightCom Solutions AB 2024-11-20T09:53:59.0273380Z * App.Version = 23.0.20270.0 2024-11-20T09:53:59.0280075Z ** Get Published App Info [BrightCom Solutions AB / Dogman / 23.0.20270.0] 2024-11-20T09:53:59.2581259Z => Publishing App 'Dogman v23.0.20270.0' 2024-11-20T09:53:59.7856181Z Get Tenants 2024-11-20T09:54:00.0613154Z Filter Selected Tenant: dogmanqa 2024-11-20T09:54:00.0693183Z Tenant Info: 2024-11-20T09:54:00.0698769Z 2024-11-20T09:54:00.1365281Z Published App: 2024-11-20T09:54:00.1421931Z 2024-11-20T09:54:00.1422409Z 2024-11-20T09:54:00.1423158Z ServerInstance : MicrosoftDynamicsNavServer$BC23QA 2024-11-20T09:54:00.1423382Z ExtensionDataVersion : 23.0.20268.0 2024-11-20T09:54:00.1423549Z IsInstalled : False 2024-11-20T09:54:00.1423674Z SyncState : NotSynced 2024-11-20T09:54:00.1423866Z NeedsUpgrade : False 2024-11-20T09:54:00.1424014Z IsPublished : True 2024-11-20T09:54:00.1424164Z Brief : BrightCom Solutions AB 2024-11-20T09:54:00.1424344Z Description : BrightCom Solutions AB 2024-11-20T09:54:00.1424536Z CompatibilityId : 1.0.0.0 2024-11-20T09:54:00.1425904Z PrivacyStatement : https://brightcom.se/privacy 2024-11-20T09:54:00.1426144Z Eula : https://brightcom.se/EULA/ 2024-11-20T09:54:00.1426307Z Help : https://brightcom.se/help/ 2024-11-20T09:54:00.1426435Z Url : https://brightcom.se/ 2024-11-20T09:54:00.1426577Z Logo : 2024-11-20T09:54:00.1426712Z DeveloperTenantId : 2024-11-20T09:54:00.1426824Z ScreenShots : {} 2024-11-20T09:54:00.1427065Z Dependencies : {TrueCommerce EDI and eCommerce (DK/UK), TrueCommerce, 8.0.0.0, False, SweBase, 2024-11-20T09:54:00.1427292Z Programekonomi Svenska AB, 21.0.0.0, False, Application, Microsoft, 23.0.0.0, 2024-11-20T09:54:00.1427628Z False, BRC Logistics, Brightcom Solutions AB, 19.4.263.0, False...} 2024-11-20T09:54:00.1427803Z Capabilities : {} 2024-11-20T09:54:00.1428213Z PackageId : 708a38d4-b426-41ea-a6dd-5ad92160f880 2024-11-20T09:54:00.1428579Z PublisherAzureActiveDirectoryTenantId : 2024-11-20T09:54:00.1428840Z AppId : 150acf42-c434-44f1-a05c-c3b29e272948 2024-11-20T09:54:00.1429014Z Name : Dogman 2024-11-20T09:54:00.1429136Z Publisher : BrightCom Solutions AB 2024-11-20T09:54:00.1429312Z Version : 23.0.20270.0 2024-11-20T09:54:00.1429468Z ExtensionType : ModernDev 2024-11-20T09:54:00.1429618Z Scope : Tenant 2024-11-20T09:54:00.1429728Z Tenant : dogmanqa 2024-11-20T09:54:00.1429818Z 2024-11-20T09:54:00.1429913Z 2024-11-20T09:54:00.1429949Z 2024-11-20T09:54:00.1429984Z 2024-11-20T09:54:00.1430768Z Sync Tenant dogmanqa 2024-11-20T09:54:00.2345447Z Sync App [Dogman] on tenant [dogmanqa] 2024-11-20T09:54:00.5238428Z App Already installed, doing upgrade dogmanqa 2024-11-20T09:54:00.5244381Z Current version: 23.0.20268.0 2024-11-20T09:54:00.5250682Z New version: 23.0.20270.0 2024-11-20T09:54:00.5283138Z Sync App [Dogman] on tenant [dogmanqa] 2024-11-20T09:54:00.5431779Z Tenant Dataupgrade dogmanqa 2024-11-20T09:54:07.2348586Z * UnPublishing Old App 'Dogman v23.0.20268.0'. 2024-11-20T09:54:07.3674225Z ##[error]The specified Extension is not published. 2024-11-20T09:54:07.3892758Z ##[section]Finishing: ALOps App Publish

waldo1001 commented 10 hours ago

Depends on how the previous app was installed. Could be it's a different scope.

Would you be able to uninstall all once, and then manage all by the pipeline?