Prerequisites Follow the below prerequisites before running the tool: CAST-AIP must be installed on the server(s) where you launch the scripts. |
The delivery folder should be accessible (local or network drive) from the server where you run the script |
Take a zip of the delivery folder before proceeding |
Alert Ignore List BuilderSince it is based on the Delivery Manager Tool, for performance reasons, the main component should be launched in one-application mode. Running it on several applications in a row requires a multi-application batch file. This is why a generator tool needs to be launched on the machine. The generator tool is located in the batch_generator sub folder. Generator Configuration The generator batch file (generateBatch.bat) must be configured with the following mandatory variables : FLATDIR, LOGDIR, DELIVERYFOLDER Generator Configuration REM Mandatory set "FLATDIR=<CAST AIP Installation PATH>" set "LOGDIR=<Path to the log folder>" set "DELIVERYFOLDER=<Delivery Folder>" REM Optional set "APP_NAME=" set "JUSTIFICATION=" |
FLATDIR must be set to the CAST Installation path LOGDIR must be set to the folder where the log file of the Main Component should be generated DELIVERYFOLDER must be set to the delivery folder If you mean to run the tool on one specific application only, then APP_NAME must be set to the application name. Otherwise all applications present in the delivery folder will be processed. Starting from version 1.1, if you want a specific justification text (same for every ignored alert), then JUSTIFICATION must be filled. Otherwise a default justification text will be generated : Automatically added to ignore list by com.castsoftware.labs.tools.alertignorelistbuilder (pattern: [xxxx]) Generate multi-application batch fileLaunch the generator batch file you have configured (generateBatch.bat). The output will be 2 multi-application batch files located in the main folder of the extension : - LaunchAlertIgnoreListBuilder.bat for SIMULATION mode
- LaunchAlertIgnoreListBuilderExecute.bat for EXECUTION mode
Configure the Regular ExpressionsThe property file must be configured with regular expressions for each of the addressed alert types : file, project, library, folder For each type, the first property (reference.type.regexps.nb) specifies the number of regular expressions. Each regular expression has a number (starting with 0), and two properties : reference.type.#.pattern, and reference.type.#.case.sensitive AlertsConfig.properties reference.file.regexps.nb=1 reference.file.regexp.0.pattern=.*\.min\.js reference.file.regexp.0.case.sensitive=false reference.project.regexps.nb=1 reference.project.regexp.0.pattern=.*Dummy\.csproj reference.project.regexp.0.case.sensitive=false reference.library.regexps.nb=1 reference.library.regexp.0.pattern=.*mscorlib\.dll.* reference.library.regexp.0.case.sensitive=true reference.folder.regexps.nb=1 reference.folder.regexp.0.pattern=.*ThirdParty.* reference.folder.regexp.0.case.sensitive=false |
Simulate then executeLaunch the simulation batch you have just generated : LaunchAlertIgnoreListBuilder.bat C:\ProgramData\CAST\CAST\Extensions\com.castsoftware.alertignorelistbuilder.1.0.0\LaunchAlertIgnoreListBuilder.bat |
The main component will read the property file, and, for each alert type, check if it finds packaging alerts matching the patterns, and write a summary to the simulation log file : AlertIgnoreListBuilder-<Timestamp>log Running action: Execute a groovy script
Ignore Packaging Alerts - version 1.0
Using CAST-AIP version 8.3.16
Script running in SIMULATION MODE
Reading configuration file...
1 file patterns loaded from configuration file
1 folder patterns loaded from configuration file
1 project patterns loaded from configuration file
1 library patterns loaded from configuration file
File patterns to ignore :
.*.min.js
Folder patterns to ignore :
.*ThirdParty.*
Project patterns to ignore :
.*Dummy.csproj
Library patterns to ignore :
.*mscorlib.dll.*
Processing delivery
Processing application : [Home / My Application]
Processing version : [Home / My Application / My Version]
Processing package : [Home / My Application / My Version / Home / My Application / My Version / My Package]
Alerts loaded
Processing missing projects
Found 0 alert(s) for projects matching configuration patterns
Done missing projects
Processing missing libraries
Found 1 alert(s) for libraries matching configuration patterns
Done missing libraries
Processing missing files
Found 1024 alert(s) for files matching configuration patterns
Done missing files
Done !
0 missing project alert(s) and 1024 missing file alert(s) and 1 missing library alert(s) and 0 missing folder alert(s) ignored
Delivery processed
Saving document: Execute a groovy script |
If you are satisfied with the simulation, then run the execution batch you have just generated : LaunchAlertIgnoreListBuilderExecute.bat C:\ProgramData\CAST\CAST\Extensions\com.castsoftware.alertignorelistbuilder.1.0.0\LaunchAlertIgnoreListBuilderExecute.bat |
Check the execution log file : Running action: Execute a groovy script
Ignore Packaging Alerts - version 1.0
Using CAST-AIP version 8.3.16
Script running in EXECUTION MODE
Reading configuration file...
1 file patterns loaded from configuration file
1 folder patterns loaded from configuration file
1 project patterns loaded from configuration file
1 library patterns loaded from configuration file
File patterns to ignore :
.*.min.js
Folder patterns to ignore :
.*ThirdParty.*
Project patterns to ignore :
.*Dummy.csproj
Library patterns to ignore :
.*mscorlib.dll.*
Processing delivery
Processing application : [Home / My Application]
Processing version : [Home / My Application / My Version]
Processing package : [Home / My Application / My Version / Home / My Application / My Version / My Package]
Alerts loaded
Processing missing projects
Found 0 alert(s) for projects matching configuration patterns
Done missing projects
Processing missing libraries
Found 1 alert(s) for libraries matching configuration patterns
Ignoring alert for missing library:mscorlib.dll
Done missing libraries
Processing missing files
Found 1024 alert(s) for files matching configuration patterns
Ignoring alert for missing file:./wwwroot/lib/kendo-ui/angular.min.js
Ignoring alert for missing file:./wwwroot/lib/kendo-ui/cultures/kendo.culture.aa-DJ.min.js
[ ... ]
Ignoring alert for missing file:./wwwroot/lib/kendo-ui/pako_deflate.min.js
Done missing files
Done !
0 missing project alert(s) and 1024 missing file alert(s) and 1 missing library alert(s) and 0 missing folder alert(s) ignored
Delivery processed
Saving document: Execute a groovy script |
You can now open DMT and repackage. The ignored packaging alerts should not appear any more. |