HodorNV / ALOps

ALOps
59 stars 24 forks source link

Installing extension does not show errors #122

Closed gntpet closed 4 years ago

gntpet commented 4 years ago

Hey Guys, I noticed another issue with ALOpsAppPublish. AzureDevops tells me that all good (everything green)

image

But Extension is just published but not installed.

image

When i try to publish it manually, it shows me the errror: image

Here's full log of ALOps App Publish:

2020-04-28T20:45:29.4443652Z ##[section]Starting: ALOps App Publish
2020-04-28T20:45:29.4554387Z ==============================================================================
2020-04-28T20:45:29.4554727Z Task         : ALOps App Publish
2020-04-28T20:45:29.4554950Z Description  : Publish NAV Apps
2020-04-28T20:45:29.4555292Z Version      : 1.428.1196
2020-04-28T20:45:29.4555622Z Author       : Hodor
2020-04-28T20:45:29.4556422Z Help         : Publish Business Central extension to service tier.
2020-04-28T20:45:29.4556799Z ==============================================================================
2020-04-28T20:45:30.9509931Z *** Validate configuration
2020-04-28T20:45:31.3962038Z *** Importing required PS-Functions
2020-04-28T20:45:31.3968802Z  - Use Docker         = False
2020-04-28T20:45:31.4009662Z  - NAV ServerInstance = NAV
2020-04-28T20:45:31.4014005Z  - Artifact Path      = 
2020-04-28T20:45:31.4054785Z  - App Filter         = *.app
2020-04-28T20:45:31.4070381Z  - Process Type       = Build
2020-04-28T20:45:31.4086198Z  - Skip Verification  = True
2020-04-28T20:45:31.4115967Z 
2020-04-28T20:45:31.4128859Z *** Importing required PS-Functions
2020-04-28T20:45:31.7307828Z *** Install AL TestTool: False
2020-04-28T20:45:31.7314334Z *** Working folder: C:\agent\_work\15\s
2020-04-28T20:45:31.7323318Z *** Artifact folder: C:\agent\_work\15\a
2020-04-28T20:45:31.7330733Z *** Pipeline workspace: C:\agent\_work\15
2020-04-28T20:45:31.7337353Z ***
2020-04-28T20:45:31.7422748Z *** Dynamic resolve App file.
2020-04-28T20:45:31.7430813Z *** Scanning [System.DefaultWorkingDirectory].
2020-04-28T20:45:31.7485853Z *** Scanning [System.ArtifactsDirectory].
2020-04-28T20:45:31.7504200Z *** Scanning [Pipeline.Workspace].
2020-04-28T20:45:31.7664888Z *** Resolved App File: [Default publisher_RepDimension_1.0.0.0.app].
2020-04-28T20:45:31.8517086Z *** Import NAV/BC Management DLL's
2020-04-28T20:45:31.8522688Z *** Loading assemblies for ServiceTier [NAV].
2020-04-28T20:45:32.0698590Z *** Loadin assemblies from: [C:\program files\microsoft dynamics nav\140\service]
2020-04-28T20:45:33.0678638Z 
2020-04-28T20:45:33.0739728Z **************************************
2020-04-28T20:45:33.0740891Z  * App File = [C:\agent\_work\15\ISVApp\Default publisher_RepDimension_1.0.0.0.app]
2020-04-28T20:45:33.0741201Z 
2020-04-28T20:45:33.0741440Z  * App.ID        = 8b06b6d9-fe37-4254-a90a-3e51d462a913
2020-04-28T20:45:33.0741670Z  * App.Name      = RepDimension
2020-04-28T20:45:33.0741933Z  * App.Publisher = Default publisher
2020-04-28T20:45:33.0742197Z  * App.Version   = 1.0.0.0
2020-04-28T20:45:33.1336433Z  * App 'RepDimension v1.0.0.0' already published.
2020-04-28T20:45:33.1345656Z *** Get Tenants
2020-04-28T20:45:33.1346057Z 
2020-04-28T20:45:33.1346306Z 
2020-04-28T20:45:33.1346565Z ServerInstance                         : MicrosoftDynamicsNavServer$NAV
2020-04-28T20:45:33.1347008Z DatabaseName                           : mx_testing
2020-04-28T20:45:33.1347548Z DatabaseServer                         : mvx-sql2.mysqlserver.nl
2020-04-28T20:45:33.1347966Z DatabaseUserName                       : 
2020-04-28T20:45:33.1348339Z State                                  : Operational
2020-04-28T20:45:33.1348831Z DetailedState                          : 
2020-04-28T20:45:33.1349208Z DeletionState                          : Not deleted
2020-04-28T20:45:33.1349594Z IsInExclusiveAccessMode                : False
2020-04-28T20:45:33.1349996Z TenantDataVersion                      : 13.0.27183.0
2020-04-28T20:45:33.1350379Z Id                                     : default
2020-04-28T20:45:33.1351072Z AlternateId                            : {}
2020-04-28T20:45:33.1351406Z AllowAppDatabaseWrite                  : True
2020-04-28T20:45:33.1351740Z NasServicesEnabled                     : False
2020-04-28T20:45:33.1352062Z RunNasWithAdminRights                  : False
2020-04-28T20:45:33.1352412Z EncryptionProvider                     : LocalKeyFile
2020-04-28T20:45:33.1352737Z AzureKeyVaultSettings                  : 
2020-04-28T20:45:33.1354391Z DefaultCompany                         : 
2020-04-28T20:45:33.1354745Z DefaultTimeZone                        : UTC
2020-04-28T20:45:33.1355112Z ExchangeAuthenticationMetadataLocation : https://outlook.office365.com/
2020-04-28T20:45:33.1355623Z AadTenantId                            : common
2020-04-28T20:45:33.1356097Z DisplayName                            : 
2020-04-28T20:45:33.1356719Z UrlName                                : 
2020-04-28T20:45:33.1357086Z EnvironmentType                        : Production
2020-04-28T20:45:33.1357356Z 
2020-04-28T20:45:33.1357592Z ServerInstance       : MicrosoftDynamicsNavServer$NAV
2020-04-28T20:45:33.1357843Z ExtensionDataVersion : 
2020-04-28T20:45:33.1358133Z IsInstalled          : False
2020-04-28T20:45:33.1358437Z SyncState            : Synced
2020-04-28T20:45:33.1358719Z NeedsUpgrade         : False
2020-04-28T20:45:33.1358997Z IsPublished          : True
2020-04-28T20:45:33.1359465Z Brief                : 
2020-04-28T20:45:33.1359713Z Description          : 
2020-04-28T20:45:33.1359971Z CompatibilityId      : 0.0.0.0
2020-04-28T20:45:33.1360238Z PrivacyStatement     : 
2020-04-28T20:45:33.1360480Z Eula                 : 
2020-04-28T20:45:33.1360683Z Help                 : 
2020-04-28T20:45:33.1360866Z Url                  : 
2020-04-28T20:45:33.1361119Z Logo                 : 
2020-04-28T20:45:33.1361363Z DeveloperTenantId    : 
2020-04-28T20:45:33.1361604Z ScreenShots          : {}
2020-04-28T20:45:33.1361862Z Dependencies         : {}
2020-04-28T20:45:33.1362110Z Capabilities         : {}
2020-04-28T20:45:33.1362411Z PackageId            : c3e834cc-32bd-45ad-af88-ee914509dcc1
2020-04-28T20:45:33.1362774Z AppId                : 8b06b6d9-fe37-4254-a90a-3e51d462a913
2020-04-28T20:45:33.1364016Z Name                 : RepDimension
2020-04-28T20:45:33.1364352Z Publisher            : Default publisher
2020-04-28T20:45:33.1364890Z Version              : 1.0.0.0
2020-04-28T20:45:33.1365207Z ExtensionType        : ModernDev
2020-04-28T20:45:33.1365635Z Scope                : Global
2020-04-28T20:45:33.1365866Z 
2020-04-28T20:45:33.1366239Z *** Sync Tenant default
2020-04-28T20:45:33.1366694Z *** Sync App [RepDimension] on tenant [default]
2020-04-28T20:45:33.1367058Z *** Install App [RepDimension] on tenant [default]
2020-04-28T20:45:33.1367321Z 
2020-04-28T20:45:33.1367925Z **************************************
2020-04-28T20:45:33.1368247Z 
2020-04-28T20:45:33.1368493Z *** AL-Extension Published to ALOps Repository
2020-04-28T20:45:33.1370912Z *** Cleanup VSTS Environment: True
2020-04-28T20:45:35.3053118Z ##[section]Async Command Start: Add Build Tag
2020-04-28T20:45:35.3053853Z Build '40959' has following tags now: App.RepDimension.1.0.0.0
2020-04-28T20:45:35.3054183Z ##[section]Async Command End: Add Build Tag
2020-04-28T20:45:35.3055503Z ##[section]Finishing: ALOps App Publish

My code for for publishing and deploying ISV extensions looks like this:

resources:
  repositories:
  - repository: scripts
    type: git
    name: AL_scripts  

stages:
  - stage: PublishArtifact
    variables:
      - group: AzureVaultForBuilds
    jobs:
    - job: PublishArtifact
      pool:
        name: 'AL'
      steps:
        - template: PublishISVApp.yml@scripts

  - stage: DeployToTesting
    jobs:
    - deployment: DeployToTesting
      pool:
        name: 'k3lab'
        demands: 
          - Agent.Name -equals mxtesting
      environment:
        name: mxtesting 
      strategy:
        runOnce:
          deploy:
            steps:
              - task: ALOpsAppPublish@1
                displayName: 'ALOps App Publish'
                inputs:
                  nav_serverinstance: NAV

template PublishISVApp.yml:

steps:
- checkout: self
  clean: true 
- task: PublishBuildArtifacts@1
  displayName: 'Publish ISV Apps as artifacts'
  inputs:
    ArtifactName: 'ISVApp'
    publishLocation: Container
    PathtoPublish: '.apps'  
gntpet commented 4 years ago

reported the same issue some time ago #82

waldo1001 commented 4 years ago

could it be because of the multistage pipeline (just guessting - but it IS a preview feature...)?

could you try a simplified pipeline?

gntpet commented 4 years ago

Don't think so. I use multi-stage pipelines for deploying extensions without using ALops scripts. There, it works fine. If something goes wrong, it shows me an error.

Here the code snippet for installing completely new app that I use Publish-NAVApp -ServerInstance $instanceName -Path $app.FullName -SkipVerification -PassThru | Sync-NAVApp -PassThru | Install-NAVApp

Perhaps in your code you use CommonParameters or pipe output to null?

AdminHodor commented 4 years ago

Dear @gintuoklis,

We found the cause of this and is hotfixed in the next release. For this step the ErrorActionPreference was set to Silent.

Kind regards,

AdminHodor commented 4 years ago

Dear @gintuoklis ,

Fix for this is in version v1.429, which we just released. Could you please validate the solution?

Kind regards,

gntpet commented 4 years ago

Thanks @AdminHodor , Will let you know.