HodorNV / ALOps

ALOps
56 stars 24 forks source link

License Check #675

Closed epernst closed 10 months ago

epernst commented 11 months ago

Love the ability to perform a license check, but I would love if we had the option to do the check, but not fail the pipeline. Ideally that it optionally would just give a warning and an output variable with the failing message.

Then we could give a warning, when running our PR builds, but have it fail when running the CI. Hereby our test suites etc. is still executed. And we can use the variable message to create a comment on the PR (just two lines of Powershell code to call the ADO API RestMethod), prompting the developer to resolve the issue, before approving the PR.

waldo1001 commented 11 months ago

We'll foresee a parameter for this option. Default will be error.

AdminHodor commented 11 months ago

Dear @epernst ,

Please try our latest release v1.459. We added a new boolean parameter "warning_only", when enabled the pipeline will still succeed and only show warnings instead of failing.

Kind regards,

NAVFreak commented 11 months ago

Is it this that breaks my pipeline @AdminHodor ?

2023-10-04T15:27:58.3379984Z ##[section]Starting: ALOps App License Check
2023-10-04T15:27:58.3497291Z ==============================================================================
2023-10-04T15:27:58.3497476Z Task         : ALOps App License Check
2023-10-04T15:27:58.3497560Z Description  : Check App files agains a license
2023-10-04T15:27:58.3497680Z Version      : 1.459.4969
2023-10-04T15:27:58.3497779Z Author       : Hodor
2023-10-04T15:27:58.3497881Z Help         : Check App files agains a license.
2023-10-04T15:27:58.3497991Z ==============================================================================
2023-10-04T15:27:59.2793312Z *** Validate configuration
2023-10-04T15:27:59.3604675Z *** Task Inputs:
2023-10-04T15:27:59.3670924Z 
2023-10-04T15:27:59.3772168Z name                                                                                                              value
2023-10-04T15:27:59.3776441Z ----                                                                                                              -----
2023-10-04T15:27:59.3779554Z usedocker                                                                                                          True
2023-10-04T15:27:59.3783390Z fixed_tag                                                                                                              
2023-10-04T15:27:59.3842594Z licensefile      ...4-03-***0T***0:34:***4Z&spr=https&sv=***0***-***-0***&sr=b&sig=CAmurcZf88SDz8WRsa%***BtS9nfTwu3wGwCIDg***oqSDtOg%3D
2023-10-04T15:27:59.3844572Z artifact_path                                                                 c:\vsts-agent-win-x64-***.***.***\_work\496\a
2023-10-04T15:27:59.3848256Z artifact_filter                                                                                                   *.app
2023-10-04T15:27:59.3851692Z artifact_include                                                                                                       
2023-10-04T15:27:59.3854852Z artifact_exclude                                                                                                       
2023-10-04T15:27:59.3857988Z exclude_ranges                                                                                         ..49999,***00000..
2023-10-04T15:27:59.3860713Z warning_only                                                                                                      False
2023-10-04T15:27:59.3861116Z 
2023-10-04T15:27:59.3890550Z 
2023-10-04T15:27:59.3904788Z 
2023-10-04T15:27:59.4122165Z *** For documentation, please visit   : https://www.alops.be/documentation
2023-10-04T15:27:59.4128502Z 
2023-10-04T15:27:59.6474925Z *** ALOps License:
2023-10-04T15:27:59.6506497Z   * Licensed To: Navet AB (Collection/Organization License)
2023-10-04T15:27:59.6512980Z 
2023-10-04T15:27:59.6646360Z *** Imported required PS-Functions
2023-10-04T15:27:59.7451544Z *** Parse Task Parameters
2023-10-04T15:27:59.9343318Z *** Initiate Docker Session
2023-10-04T15:28:00.2243608Z *** Set Docker Container ErrorActionPreference = Stop
2023-10-04T15:28:00.9151751Z *** Load Management DLL's
2023-10-04T15:28:00.9527921Z *** Import NAV/BC Management DLL's [True]
2023-10-04T15:28:00.9588941Z *** ServiceTier not specified, loading default assemblies.
2023-10-04T15:28:01.1611412Z *** BC NCL Management DLL: C:\Program Files\Microsoft Dynamics NAV\***0\Service\Management\Microsoft.Dynamics.Nav.Ncl.dll
2023-10-04T15:28:01.6141797Z *** BC Types DLL: C:\Program Files\Microsoft Dynamics NAV\***0\Service\Management\Microsoft.Dynamics.Nav.Types.dll
2023-10-04T15:28:01.6495054Z *** Selected module: [C:\Program Files\Microsoft Dynamics NAV\***0\Service\Management\Microsoft.Dynamics.Nav.Types.dll]
2023-10-04T15:28:01.6519502Z *** Loading module: [C:\Program Files\Microsoft Dynamics NAV\***0\Service\Management\Microsoft.Dynamics.Nav.Types.dll]
2023-10-04T15:28:01.7523401Z *** Load module [Microsoft.Dynamics.Nav.Management]
2023-10-04T15:28:01.9074662Z *** Selected module: [C:\Program Files\Microsoft Dynamics NAV\***0\Service\Management\Microsoft.Dynamics.Nav.Management.dll]
2023-10-04T15:28:01.9089131Z *** Loading module: [C:\Program Files\Microsoft Dynamics NAV\***0\Service\Management\Microsoft.Dynamics.Nav.Management.dll]
2023-10-04T15:28:01.9308327Z *** Load module [Microsoft.Dynamics.Nav.Apps.Management]
2023-10-04T15:28:02.0861150Z *** Selected module: [C:\Program Files\Microsoft Dynamics NAV\***0\Service\Management\Microsoft.Dynamics.Nav.Apps.Management.dll]
2023-10-04T15:28:02.0871061Z *** Loading module: [C:\Program Files\Microsoft Dynamics NAV\***0\Service\Management\Microsoft.Dynamics.Nav.Apps.Management.dll]
2023-10-04T15:28:02.1039418Z *** Load CodeAnalysis from [C:\Program Files\Microsoft Dynamics NAV\***0\Service\Management]
2023-10-04T15:28:02.1224835Z *** Loading assemblies from: [C:\Program Files\Microsoft Dynamics NAV\***0\Service\Management]
2023-10-04T15:28:02.1333743Z *** Loading: [C:\Program Files\Microsoft Dynamics NAV\***0\Service\Management\Microsoft.Dynamics.Nav.CodeAnalysis.dll]
2023-10-04T15:28:02.1911612Z *** Import BCLicenseReader
2023-10-04T15:28:02.4353247Z ##[error]Cannot process argument transformation on parameter 'WarningOnly'. Cannot convert value "System.String" to type "System.Boolean". Boolean parameters accept only Boolean values and numbers, such as $True, $False, *** or 0.
2023-10-04T15:28:02.4850354Z ##[section]Finishing: ALOps App License Check
AdminHodor commented 11 months ago

Dear @NAVFreak ,

Our apologies for this, an issue with the defaults. this was fixed in a patch at 18h00 in version 1.459.4971.

Kind regards,

NAVFreak commented 11 months ago

Works now. I guess we had bunch of builds right before the fix