HodorNV / ALOps

ALOps
59 stars 24 forks source link

ALOps App Publish with Extension Installation? #131

Closed DanielGoehler closed 4 years ago

DanielGoehler commented 4 years ago

I setup a release pipeline and because of Business Central V14 and several dependent apps I use ALOps App Cleaner with default option Sync Mode = Add [a documentation of these options would be nice]. ALOps App Publish publishes and syncs the apps, but they will not get installed. What do I miss?

##[section]Starting: ALOps App Publish (MyCustomer BaseApp)
==============================================================================
Task         : ALOps App Publish
Description  : Publish NAV Apps
Version      : 1.429.1405
Author       : Hodor
Help         : Publish Business Central extension to service tier.
==============================================================================
*** Validate configuration
*** No ALOps License found. Set License with the [alops-licenseid] or [alops_licenseid] variables.
Cleanup old Tasks
*** Importing required PS-Functions
 - Use Docker         = False
 - NAV ServerInstance = BC_TEST
 - Artifact Path      = 
 - App Filter         = *MyCustomer*.app
 - Process Type       = Release
 - Skip Verification  = True

*** Importing required PS-Functions
*** Install AL TestTool: False
*** Working folder: C:\agent\_work\r1\a
*** Artifact folder: C:\agent\_work\r1\a
***
*** Dynamic resolve App file.
*** Scanning [System.DefaultWorkingDirectory].
*** Scanning [System.ArtifactsDirectory].
*** Multiple App files found with filter [*MyCustomer*.app].
  * C:\agent\_work\r1\a\MyCustomer BaseApp\MyCustomer-BaseApp\MyCompany_MyCustomer_1.0.202020.437.app
*** Resolved App File: [MyCompany_MyCustomer_1.0.202020.437.app].
*** Import NAV/BC Management DLL's
*** Loading assemblies for ServiceTier [BC_TEST].
*** Loadin assemblies from: [C:\program files\microsoft dynamics 365 business central\140\service]

**************************************
 * App File = [C:\agent\_work\r1\a\MyCustomer BaseApp\MyCustomer-BaseApp\MyCompany_MyCustomer_1.0.202020.437.app]

 * App.ID        = 0f4df20f-45a2-46b9-8c27-5d201bded8d1
 * App.Name      = MyCustomer
 * App.Publisher = MyCompany
 * App.Version   = 1.0.202020.437
 => Publishing App 'MyCustomer v1.0.202020.437'
*** Get Tenants

ServerInstance                         : MicrosoftDynamicsNavServer$BC_TEST
DatabaseName                           : BC_TEST
DatabaseServer                         : SQLSERVER
DatabaseUserName                       : 
State                                  : Operational
DetailedState                          : 
DeletionState                          : Not deleted
IsInExclusiveAccessMode                : False
TenantDataVersion                      : 14.10.40471.0
Id                                     : default
AlternateId                            : {}
AllowAppDatabaseWrite                  : True
NasServicesEnabled                     : False
RunNasWithAdminRights                  : False
EncryptionProvider                     : LocalKeyFile
AzureKeyVaultSettings                  : 
DefaultCompany                         : MT-Energie Service
DefaultTimeZone                        : (UTC+01:00) Amsterdam, Berlin, Bern, 
                                         Rom, Stockholm, Wien
ExchangeAuthenticationMetadataLocation : https://outlook.office365.com/
AadTenantId                            : common
DisplayName                            : 
UrlName                                : 
EnvironmentType                        : Production

ServerInstance       : MicrosoftDynamicsNavServer$BC_TEST
ExtensionDataVersion : 1.0.202020.437
IsInstalled          : False
SyncState            : Synced
NeedsUpgrade         : False
IsPublished          : True
Brief                : MyCustomer
Description          : Basis-App for MyCustomer
CompatibilityId      : 0.0.0.0
PrivacyStatement     : https://www.mycompany.com/inprint
Eula                 : https://www.mycompany.com/inprint
Help                 : https://www.mycompany.com/support
Url                  : https://www.mycompany.com
Logo                 : /logo/Logo.jpg
DeveloperTenantId    : 
ScreenShots          : {}
Dependencies         : {MyApp2, MyCompany, 
                       1.0.0.0, MyApp1, MyCompany,
                       1.0.0.0}
Capabilities         : {}
PackageId            : 26caf2a7-c14e-4cdb-80dd-8f4a0ad7f38a
AppId                : 0f4df20f-45a2-46b9-8c27-5d201bded8d1
Name                 : MyCustomer
Publisher            : MyCompany
Version              : 1.0.202020.437
ExtensionType        : ModernDev
Scope                : Global

*** Sync Tenant default
*** Sync App [MyCustomer] on tenant [default]
*** Tenant Dataupgrade default

**************************************

*** AL-Extension Published to ALOps Repository
*** Cleanup VSTS Environment: True
##[section]Finishing: ALOps App Publish (MyCustomer BaseApp)
DanielGoehler commented 4 years ago

Hi @AdminHodor, what should I do here?

DanielGoehler commented 4 years ago

Hi @waldo1001, do you have any idea what is missing here?

waldo1001 commented 4 years ago

Can you share the yaml ..

and also try to remove the clean? It's not clear to my why you would clean your apps before publishing?

DanielGoehler commented 4 years ago

Regarding yaml: How can I share the yaml for a release pipeline?

Regarding ALOps App Cleaner: Does ALOps App Publish about the dependents and that System is Business Central 14? If I try to publish a new version of a Extension which other Extensions are dependent on via PowerShell that fails.

waldo1001 commented 4 years ago

Yaml - you're right - you can't :(. Sorry - so used to talking about build pipelines ;-)

When you publish an app that is already installed, ALOps will try to upgrade (you need to do version management, of course - making sure every new app-file is a higher version in the manifest). So a clean should not be necessary.
Upgrading should work - also with dependencies.

What we do though is to always publish all apps in the release pipeline, in the right order. So it depends a bit on how you build your release pipeline, but in any case, what should never be necessary, is to clean the apps before publish.. .

DanielGoehler commented 4 years ago

Yeah everything works fine after ALOps App Cleaner was removed. Thanks!