From d8184fcdcf42186dddad6421fa57b3c1d7647ecc Mon Sep 17 00:00:00 2001 From: leon2Meudon92 Date: Tue, 30 Aug 2022 16:51:53 +0200 Subject: [PATCH 01/51] WEBITOOLS-129: Added create application integration test batch --- .../create-application-integ-test.bat | 32 +++++++++++++++++++ 1 file changed, 32 insertions(+) create mode 100644 aip-console-tools-cli/src/test/java/com/castsoftware/aip/console/tools/testbatches/create-application-integ-test.bat diff --git a/aip-console-tools-cli/src/test/java/com/castsoftware/aip/console/tools/testbatches/create-application-integ-test.bat b/aip-console-tools-cli/src/test/java/com/castsoftware/aip/console/tools/testbatches/create-application-integ-test.bat new file mode 100644 index 00000000..dc30483d --- /dev/null +++ b/aip-console-tools-cli/src/test/java/com/castsoftware/aip/console/tools/testbatches/create-application-integ-test.bat @@ -0,0 +1,32 @@ +@echo off +REM -- Create Application -- +SET TOOLS_CLI_PATH=%~1 +SET SERVER_URL=%~2 +SET API_KEY=%~3 +SET APP_NAME=%~4 +SET IN_PLACE_MODE=%~5 +SET DOMAIN_NAME=%~6 +SET CSS=%~7 + +REM EXAMPLE +REM create-application-integ-test.bat "download folder" "http://machine.corp.castsoftware.com:8081" "LPZ5i8lJ.5dKr2Y4e39cVIJ70rJETgG0sY29C2ElH" "WEBITOOLS-102-Test-App" false "TOOLS-CLI-TEST_DOM" +REM +SET MORE_OPTIONS= +if not "%DOMAIN_NAME%" == "" SET MORE_OPTIONS=--domain-name="%DOMAIN_NAME%" +if not "%IN_PLACE_MODE%" == "" SET MORE_OPTIONS=%MORE_OPTIONS% --no-version-history=%IN_PLACE_MODE% +if not "%CSS%" == "" SET MORE_OPTIONS=%MORE_OPTIONS% --css-server=%CSS% + +echo -- Create Application command -- +echo java -jar aip-console-tools-cli.jar CreateApplication --server-url="%SERVER_URL%" --apikey="%API_KEY%" --timeout=5000 ^ +--app-name="%APP_NAME%" --verbose=false ^ +%MORE_OPTIONS% +echo -------------------------------- + +CD /d "%TOOLS_CLI_PATH%" + +java -jar aip-console-tools-cli.jar CreateApplication --server-url="%SERVER_URL%" --apikey="%API_KEY%" --timeout=5000 ^ + --app-name="%APP_NAME%" --verbose=false ^ + %MORE_OPTIONS% + +echo exit code=%errorlevel% + From d8cfb01e724b5a2f217e71a6d56d2608a1f6896b Mon Sep 17 00:00:00 2001 From: leon2Meudon92 Date: Wed, 31 Aug 2022 13:42:59 +0200 Subject: [PATCH 02/51] WEBITOOLS-129: download target Console tools version from extend --- .../create-application-integ-test.bat | 25 +++++++++++++++++++ 1 file changed, 25 insertions(+) diff --git a/aip-console-tools-cli/src/test/java/com/castsoftware/aip/console/tools/testbatches/create-application-integ-test.bat b/aip-console-tools-cli/src/test/java/com/castsoftware/aip/console/tools/testbatches/create-application-integ-test.bat index dc30483d..c5d60459 100644 --- a/aip-console-tools-cli/src/test/java/com/castsoftware/aip/console/tools/testbatches/create-application-integ-test.bat +++ b/aip-console-tools-cli/src/test/java/com/castsoftware/aip/console/tools/testbatches/create-application-integ-test.bat @@ -7,6 +7,8 @@ SET APP_NAME=%~4 SET IN_PLACE_MODE=%~5 SET DOMAIN_NAME=%~6 SET CSS=%~7 +set TOOLS_EXTENSION=com.castsoftware.aip.console.tools +set EXTEND_URL=https://extend.castsoftware.com REM EXAMPLE REM create-application-integ-test.bat "download folder" "http://machine.corp.castsoftware.com:8081" "LPZ5i8lJ.5dKr2Y4e39cVIJ70rJETgG0sY29C2ElH" "WEBITOOLS-102-Test-App" false "TOOLS-CLI-TEST_DOM" @@ -16,6 +18,29 @@ if not "%DOMAIN_NAME%" == "" SET MORE_OPTIONS=--domain-name="%DOMAIN_NAME%" if not "%IN_PLACE_MODE%" == "" SET MORE_OPTIONS=%MORE_OPTIONS% --no-version-history=%IN_PLACE_MODE% if not "%CSS%" == "" SET MORE_OPTIONS=%MORE_OPTIONS% --css-server=%CSS% +for %%a in (TOOLS_VERSION EXTEND_API_KEY) do ( + if not defined %%a ( + @echo. + @echo ERROR : Environment variable %%a should exist as environment var... + @echo. + exit /b 1 + ) +) + +if not defined TOOLSDIR ( + set TOOLSDIR=%WORKSPACE%\bin +) +if exist %TOOLSDIR% rmdir /S/Q %TOOLSDIR% +mkdir %TOOLSDIR% + +echo ================================ +echo Downloading extension from CAST Extend... +echo %TOOLS_EXTENSION% with version %TOOLS_VERSION% +echo. + +curl -X GET "%EXTEND_URL%/api/package/download/%TOOLS_EXTENSION%/%TOOLS_VERSION%" -H "x-nuget-apikey: %EXTEND_API_KEY%" --output %TOOLSDIR%\%TOOLS_EXTENSION%.zip +if errorlevel 1 goto endclean + echo -- Create Application command -- echo java -jar aip-console-tools-cli.jar CreateApplication --server-url="%SERVER_URL%" --apikey="%API_KEY%" --timeout=5000 ^ --app-name="%APP_NAME%" --verbose=false ^ From 0e16ebe2ccb91f55f0ce0a7fd51f4799717198d3 Mon Sep 17 00:00:00 2001 From: leon2Meudon92 Date: Wed, 31 Aug 2022 13:42:59 +0200 Subject: [PATCH 03/51] WEBITOOLS-129: download target Console tools version from extend --- .../create-application-integ-test.bat | 26 +++++++++++++++++++ 1 file changed, 26 insertions(+) diff --git a/aip-console-tools-cli/src/test/java/com/castsoftware/aip/console/tools/testbatches/create-application-integ-test.bat b/aip-console-tools-cli/src/test/java/com/castsoftware/aip/console/tools/testbatches/create-application-integ-test.bat index dc30483d..d2639329 100644 --- a/aip-console-tools-cli/src/test/java/com/castsoftware/aip/console/tools/testbatches/create-application-integ-test.bat +++ b/aip-console-tools-cli/src/test/java/com/castsoftware/aip/console/tools/testbatches/create-application-integ-test.bat @@ -7,6 +7,8 @@ SET APP_NAME=%~4 SET IN_PLACE_MODE=%~5 SET DOMAIN_NAME=%~6 SET CSS=%~7 +set TOOLS_EXTENSION=com.castsoftware.aip.console.tools +set EXTEND_URL=https://extend.castsoftware.com REM EXAMPLE REM create-application-integ-test.bat "download folder" "http://machine.corp.castsoftware.com:8081" "LPZ5i8lJ.5dKr2Y4e39cVIJ70rJETgG0sY29C2ElH" "WEBITOOLS-102-Test-App" false "TOOLS-CLI-TEST_DOM" @@ -16,6 +18,30 @@ if not "%DOMAIN_NAME%" == "" SET MORE_OPTIONS=--domain-name="%DOMAIN_NAME%" if not "%IN_PLACE_MODE%" == "" SET MORE_OPTIONS=%MORE_OPTIONS% --no-version-history=%IN_PLACE_MODE% if not "%CSS%" == "" SET MORE_OPTIONS=%MORE_OPTIONS% --css-server=%CSS% +for %%a in (TOOLS_VERSION EXTEND_API_KEY) do ( + if not defined %%a ( + @echo. + @echo ERROR : Environment variable %%a should exist as environment var... + @echo. + exit /b 1 + ) +) + +if not defined TOOLSDIR ( + set TOOLSDIR=%WORKSPACE%\bin +) +echo -- Creating %TOOLSDIR% folder -- +if exist %TOOLSDIR% rmdir /S/Q %TOOLSDIR% +mkdir %TOOLSDIR% + +echo ================================ +echo -------- Downloading extension from CAST Extend... ----------- +echo %TOOLS_EXTENSION% with version %TOOLS_VERSION% +echo. + +curl -X GET "%EXTEND_URL%/api/package/download/%TOOLS_EXTENSION%/%TOOLS_VERSION%" -H "x-nuget-apikey: %EXTEND_API_KEY%" --output %TOOLSDIR%\%TOOLS_EXTENSION%.zip +if errorlevel 1 goto endclean + echo -- Create Application command -- echo java -jar aip-console-tools-cli.jar CreateApplication --server-url="%SERVER_URL%" --apikey="%API_KEY%" --timeout=5000 ^ --app-name="%APP_NAME%" --verbose=false ^ From 382ab18a0e5ad6b17ba95d0077c6b6f328ae5671 Mon Sep 17 00:00:00 2001 From: leon2Meudon92 Date: Wed, 31 Aug 2022 14:23:37 +0200 Subject: [PATCH 04/51] WEBITOOLS-129: download target Console tools version from extend --- .../tools/testbatches/create-application-integ-test.bat | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/aip-console-tools-cli/src/test/java/com/castsoftware/aip/console/tools/testbatches/create-application-integ-test.bat b/aip-console-tools-cli/src/test/java/com/castsoftware/aip/console/tools/testbatches/create-application-integ-test.bat index d2639329..b5ff6c56 100644 --- a/aip-console-tools-cli/src/test/java/com/castsoftware/aip/console/tools/testbatches/create-application-integ-test.bat +++ b/aip-console-tools-cli/src/test/java/com/castsoftware/aip/console/tools/testbatches/create-application-integ-test.bat @@ -9,6 +9,7 @@ SET DOMAIN_NAME=%~6 SET CSS=%~7 set TOOLS_EXTENSION=com.castsoftware.aip.console.tools set EXTEND_URL=https://extend.castsoftware.com +set PATH=C:\CAST-Caches\Win64;%PATH% REM EXAMPLE REM create-application-integ-test.bat "download folder" "http://machine.corp.castsoftware.com:8081" "LPZ5i8lJ.5dKr2Y4e39cVIJ70rJETgG0sY29C2ElH" "WEBITOOLS-102-Test-App" false "TOOLS-CLI-TEST_DOM" @@ -42,6 +43,10 @@ echo. curl -X GET "%EXTEND_URL%/api/package/download/%TOOLS_EXTENSION%/%TOOLS_VERSION%" -H "x-nuget-apikey: %EXTEND_API_KEY%" --output %TOOLSDIR%\%TOOLS_EXTENSION%.zip if errorlevel 1 goto endclean +pushd %TOOLSDIR% +7z.exe x -y -o. %TOOLS_EXTENSION%.zip +popd + echo -- Create Application command -- echo java -jar aip-console-tools-cli.jar CreateApplication --server-url="%SERVER_URL%" --apikey="%API_KEY%" --timeout=5000 ^ --app-name="%APP_NAME%" --verbose=false ^ From daf7ec8f1b007d5007adee5da76e54cec142bcbf Mon Sep 17 00:00:00 2001 From: leon2Meudon92 Date: Wed, 31 Aug 2022 14:43:42 +0200 Subject: [PATCH 05/51] WEBITOOLS-129: download target Console tools version from extend --- .../console/tools/testbatches/create-application-integ-test.bat | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/aip-console-tools-cli/src/test/java/com/castsoftware/aip/console/tools/testbatches/create-application-integ-test.bat b/aip-console-tools-cli/src/test/java/com/castsoftware/aip/console/tools/testbatches/create-application-integ-test.bat index b5ff6c56..d9032224 100644 --- a/aip-console-tools-cli/src/test/java/com/castsoftware/aip/console/tools/testbatches/create-application-integ-test.bat +++ b/aip-console-tools-cli/src/test/java/com/castsoftware/aip/console/tools/testbatches/create-application-integ-test.bat @@ -44,7 +44,7 @@ curl -X GET "%EXTEND_URL%/api/package/download/%TOOLS_EXTENSION%/%TOOLS_VERSION% if errorlevel 1 goto endclean pushd %TOOLSDIR% -7z.exe x -y -o. %TOOLS_EXTENSION%.zip +7z.exe x "%TOOLS_EXTENSION%.zip" -y -o "%TOOLS_EXTENSION%" popd echo -- Create Application command -- From 0cc2abaf3388cb7d923ad018ee0db9dd012ade27 Mon Sep 17 00:00:00 2001 From: leon2Meudon92 Date: Wed, 31 Aug 2022 14:44:42 +0200 Subject: [PATCH 06/51] WEBITOOLS-129: download target Console tools version from extend --- .../tools/testbatches/create-application-integ-test.bat | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/aip-console-tools-cli/src/test/java/com/castsoftware/aip/console/tools/testbatches/create-application-integ-test.bat b/aip-console-tools-cli/src/test/java/com/castsoftware/aip/console/tools/testbatches/create-application-integ-test.bat index d9032224..689a38f8 100644 --- a/aip-console-tools-cli/src/test/java/com/castsoftware/aip/console/tools/testbatches/create-application-integ-test.bat +++ b/aip-console-tools-cli/src/test/java/com/castsoftware/aip/console/tools/testbatches/create-application-integ-test.bat @@ -43,9 +43,7 @@ echo. curl -X GET "%EXTEND_URL%/api/package/download/%TOOLS_EXTENSION%/%TOOLS_VERSION%" -H "x-nuget-apikey: %EXTEND_API_KEY%" --output %TOOLSDIR%\%TOOLS_EXTENSION%.zip if errorlevel 1 goto endclean -pushd %TOOLSDIR% -7z.exe x "%TOOLS_EXTENSION%.zip" -y -o "%TOOLS_EXTENSION%" -popd +7z.exe x "%TOOLSDIR%\%TOOLS_EXTENSION%.zip" -y -o "%TOOLSDIR%\%TOOLS_EXTENSION%" echo -- Create Application command -- echo java -jar aip-console-tools-cli.jar CreateApplication --server-url="%SERVER_URL%" --apikey="%API_KEY%" --timeout=5000 ^ From 93b9a5414664b1f92a59dc88ec39f1b5a4e7be0d Mon Sep 17 00:00:00 2001 From: leon2Meudon92 Date: Wed, 31 Aug 2022 14:49:09 +0200 Subject: [PATCH 07/51] WEBITOOLS-129: download target Console tools version from extend --- .../tools/testbatches/create-application-integ-test.bat | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/aip-console-tools-cli/src/test/java/com/castsoftware/aip/console/tools/testbatches/create-application-integ-test.bat b/aip-console-tools-cli/src/test/java/com/castsoftware/aip/console/tools/testbatches/create-application-integ-test.bat index 689a38f8..20f7b1b1 100644 --- a/aip-console-tools-cli/src/test/java/com/castsoftware/aip/console/tools/testbatches/create-application-integ-test.bat +++ b/aip-console-tools-cli/src/test/java/com/castsoftware/aip/console/tools/testbatches/create-application-integ-test.bat @@ -43,6 +43,10 @@ echo. curl -X GET "%EXTEND_URL%/api/package/download/%TOOLS_EXTENSION%/%TOOLS_VERSION%" -H "x-nuget-apikey: %EXTEND_API_KEY%" --output %TOOLSDIR%\%TOOLS_EXTENSION%.zip if errorlevel 1 goto endclean +echo ---------------------------- +echo Unzip the downloaded extension +echo 7z.exe x "%TOOLSDIR%\%TOOLS_EXTENSION%.zip" -y -o "%TOOLSDIR%\%TOOLS_EXTENSION%" +echo ---------------------------- 7z.exe x "%TOOLSDIR%\%TOOLS_EXTENSION%.zip" -y -o "%TOOLSDIR%\%TOOLS_EXTENSION%" echo -- Create Application command -- From dd0ad1f6c9d7bbce7977259149ae85676bb41260 Mon Sep 17 00:00:00 2001 From: leon2Meudon92 Date: Wed, 31 Aug 2022 14:52:59 +0200 Subject: [PATCH 08/51] WEBITOOLS-129: download target Console tools version from extend --- .../console/tools/testbatches/create-application-integ-test.bat | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/aip-console-tools-cli/src/test/java/com/castsoftware/aip/console/tools/testbatches/create-application-integ-test.bat b/aip-console-tools-cli/src/test/java/com/castsoftware/aip/console/tools/testbatches/create-application-integ-test.bat index 20f7b1b1..050457cd 100644 --- a/aip-console-tools-cli/src/test/java/com/castsoftware/aip/console/tools/testbatches/create-application-integ-test.bat +++ b/aip-console-tools-cli/src/test/java/com/castsoftware/aip/console/tools/testbatches/create-application-integ-test.bat @@ -45,7 +45,7 @@ if errorlevel 1 goto endclean echo ---------------------------- echo Unzip the downloaded extension -echo 7z.exe x "%TOOLSDIR%\%TOOLS_EXTENSION%.zip" -y -o "%TOOLSDIR%\%TOOLS_EXTENSION%" +echo 7z.exe x "%TOOLSDIR%\%TOOLS_EXTENSION%.zip" -y -o. "%TOOLSDIR%\%TOOLS_EXTENSION%" echo ---------------------------- 7z.exe x "%TOOLSDIR%\%TOOLS_EXTENSION%.zip" -y -o "%TOOLSDIR%\%TOOLS_EXTENSION%" From b95114d48771b3e2ea555ef3674d6b42a8c7b06d Mon Sep 17 00:00:00 2001 From: leon2Meudon92 Date: Wed, 31 Aug 2022 15:01:25 +0200 Subject: [PATCH 09/51] WEBITOOLS-129: download target Console tools version from extend --- .../tools/testbatches/create-application-integ-test.bat | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/aip-console-tools-cli/src/test/java/com/castsoftware/aip/console/tools/testbatches/create-application-integ-test.bat b/aip-console-tools-cli/src/test/java/com/castsoftware/aip/console/tools/testbatches/create-application-integ-test.bat index 050457cd..97954282 100644 --- a/aip-console-tools-cli/src/test/java/com/castsoftware/aip/console/tools/testbatches/create-application-integ-test.bat +++ b/aip-console-tools-cli/src/test/java/com/castsoftware/aip/console/tools/testbatches/create-application-integ-test.bat @@ -45,9 +45,9 @@ if errorlevel 1 goto endclean echo ---------------------------- echo Unzip the downloaded extension -echo 7z.exe x "%TOOLSDIR%\%TOOLS_EXTENSION%.zip" -y -o. "%TOOLSDIR%\%TOOLS_EXTENSION%" +echo 7z.exe x -y -o. "%TOOLSDIR%\%TOOLS_EXTENSION%.zip" echo ---------------------------- -7z.exe x "%TOOLSDIR%\%TOOLS_EXTENSION%.zip" -y -o "%TOOLSDIR%\%TOOLS_EXTENSION%" +7z.exe x "%TOOLSDIR%\%TOOLS_EXTENSION%.zip" -y -o. "%TOOLSDIR%\%TOOLS_EXTENSION%" echo -- Create Application command -- echo java -jar aip-console-tools-cli.jar CreateApplication --server-url="%SERVER_URL%" --apikey="%API_KEY%" --timeout=5000 ^ From 3a2b57d326798732f79897def06460dc844e38c0 Mon Sep 17 00:00:00 2001 From: leon2Meudon92 Date: Wed, 31 Aug 2022 15:05:00 +0200 Subject: [PATCH 10/51] WEBITOOLS-129: download target Console tools version from extend --- .../console/tools/testbatches/create-application-integ-test.bat | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/aip-console-tools-cli/src/test/java/com/castsoftware/aip/console/tools/testbatches/create-application-integ-test.bat b/aip-console-tools-cli/src/test/java/com/castsoftware/aip/console/tools/testbatches/create-application-integ-test.bat index 97954282..8b241754 100644 --- a/aip-console-tools-cli/src/test/java/com/castsoftware/aip/console/tools/testbatches/create-application-integ-test.bat +++ b/aip-console-tools-cli/src/test/java/com/castsoftware/aip/console/tools/testbatches/create-application-integ-test.bat @@ -47,7 +47,7 @@ echo ---------------------------- echo Unzip the downloaded extension echo 7z.exe x -y -o. "%TOOLSDIR%\%TOOLS_EXTENSION%.zip" echo ---------------------------- -7z.exe x "%TOOLSDIR%\%TOOLS_EXTENSION%.zip" -y -o. "%TOOLSDIR%\%TOOLS_EXTENSION%" +7z.exe x -y -o. "%TOOLSDIR%\%TOOLS_EXTENSION%.zip" echo -- Create Application command -- echo java -jar aip-console-tools-cli.jar CreateApplication --server-url="%SERVER_URL%" --apikey="%API_KEY%" --timeout=5000 ^ From 3450534194890714954d812e65178ea0077de1d2 Mon Sep 17 00:00:00 2001 From: leon2Meudon92 Date: Wed, 31 Aug 2022 15:18:23 +0200 Subject: [PATCH 11/51] WEBITOOLS-129: download target Console tools version from extend --- .../tools/testbatches/create-application-integ-test.bat | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/aip-console-tools-cli/src/test/java/com/castsoftware/aip/console/tools/testbatches/create-application-integ-test.bat b/aip-console-tools-cli/src/test/java/com/castsoftware/aip/console/tools/testbatches/create-application-integ-test.bat index 8b241754..a7e0a90b 100644 --- a/aip-console-tools-cli/src/test/java/com/castsoftware/aip/console/tools/testbatches/create-application-integ-test.bat +++ b/aip-console-tools-cli/src/test/java/com/castsoftware/aip/console/tools/testbatches/create-application-integ-test.bat @@ -45,9 +45,9 @@ if errorlevel 1 goto endclean echo ---------------------------- echo Unzip the downloaded extension -echo 7z.exe x -y -o. "%TOOLSDIR%\%TOOLS_EXTENSION%.zip" +echo 7z.exe x "%TOOLSDIR%\%TOOLS_EXTENSION%.zip" -y -o"%TOOLSDIR%\%TOOLS_EXTENSION%" echo ---------------------------- -7z.exe x -y -o. "%TOOLSDIR%\%TOOLS_EXTENSION%.zip" +7z.exe x "%TOOLSDIR%\%TOOLS_EXTENSION%.zip" -y -o"%TOOLSDIR%\%TOOLS_EXTENSION%" echo -- Create Application command -- echo java -jar aip-console-tools-cli.jar CreateApplication --server-url="%SERVER_URL%" --apikey="%API_KEY%" --timeout=5000 ^ From 5611c51457a78eb45e88b2f2760a0dc8621cc1c0 Mon Sep 17 00:00:00 2001 From: leon2Meudon92 Date: Wed, 31 Aug 2022 15:23:07 +0200 Subject: [PATCH 12/51] WEBITOOLS-129: download target Console tools version from extend --- .../testbatches/create-application-integ-test.bat | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/aip-console-tools-cli/src/test/java/com/castsoftware/aip/console/tools/testbatches/create-application-integ-test.bat b/aip-console-tools-cli/src/test/java/com/castsoftware/aip/console/tools/testbatches/create-application-integ-test.bat index a7e0a90b..4605220c 100644 --- a/aip-console-tools-cli/src/test/java/com/castsoftware/aip/console/tools/testbatches/create-application-integ-test.bat +++ b/aip-console-tools-cli/src/test/java/com/castsoftware/aip/console/tools/testbatches/create-application-integ-test.bat @@ -1,12 +1,11 @@ @echo off REM -- Create Application -- -SET TOOLS_CLI_PATH=%~1 -SET SERVER_URL=%~2 -SET API_KEY=%~3 -SET APP_NAME=%~4 -SET IN_PLACE_MODE=%~5 -SET DOMAIN_NAME=%~6 -SET CSS=%~7 +SET SERVER_URL=%~1 +SET API_KEY=%~2 +SET APP_NAME=%~3 +SET IN_PLACE_MODE=%~4 +SET DOMAIN_NAME=%~5 +SET CSS=%~6 set TOOLS_EXTENSION=com.castsoftware.aip.console.tools set EXTEND_URL=https://extend.castsoftware.com set PATH=C:\CAST-Caches\Win64;%PATH% @@ -49,6 +48,7 @@ echo 7z.exe x "%TOOLSDIR%\%TOOLS_EXTENSION%.zip" -y -o"%TOOLSDIR%\%TOOLS_EXTENSI echo ---------------------------- 7z.exe x "%TOOLSDIR%\%TOOLS_EXTENSION%.zip" -y -o"%TOOLSDIR%\%TOOLS_EXTENSION%" +SET TOOLS_CLI_PATH=%TOOLSDIR%\%TOOLS_EXTENSION% echo -- Create Application command -- echo java -jar aip-console-tools-cli.jar CreateApplication --server-url="%SERVER_URL%" --apikey="%API_KEY%" --timeout=5000 ^ --app-name="%APP_NAME%" --verbose=false ^ From 70cf5ad04c1d0153f1af3d46eb8dda3052f44d1c Mon Sep 17 00:00:00 2001 From: leon2Meudon92 Date: Thu, 1 Sep 2022 16:30:22 +0200 Subject: [PATCH 13/51] WEBITOOLS-129: download target Console tools version from extend --- .../create-application-integ-test.bat | 16 +++---- .../deliver-version-integ-test.bat | 45 +++++++++++++++++++ 2 files changed, 51 insertions(+), 10 deletions(-) create mode 100644 aip-console-tools-cli/src/test/java/com/castsoftware/aip/console/tools/testbatches/deliver-version-integ-test.bat diff --git a/aip-console-tools-cli/src/test/java/com/castsoftware/aip/console/tools/testbatches/create-application-integ-test.bat b/aip-console-tools-cli/src/test/java/com/castsoftware/aip/console/tools/testbatches/create-application-integ-test.bat index 4605220c..0aa33c95 100644 --- a/aip-console-tools-cli/src/test/java/com/castsoftware/aip/console/tools/testbatches/create-application-integ-test.bat +++ b/aip-console-tools-cli/src/test/java/com/castsoftware/aip/console/tools/testbatches/create-application-integ-test.bat @@ -30,17 +30,13 @@ for %%a in (TOOLS_VERSION EXTEND_API_KEY) do ( if not defined TOOLSDIR ( set TOOLSDIR=%WORKSPACE%\bin ) -echo -- Creating %TOOLSDIR% folder -- -if exist %TOOLSDIR% rmdir /S/Q %TOOLSDIR% -mkdir %TOOLSDIR% -echo ================================ -echo -------- Downloading extension from CAST Extend... ----------- -echo %TOOLS_EXTENSION% with version %TOOLS_VERSION% -echo. - -curl -X GET "%EXTEND_URL%/api/package/download/%TOOLS_EXTENSION%/%TOOLS_VERSION%" -H "x-nuget-apikey: %EXTEND_API_KEY%" --output %TOOLSDIR%\%TOOLS_EXTENSION%.zip -if errorlevel 1 goto endclean +if not exist %TOOLSDIR%\%TOOLS_EXTENSION%.zip ( + @echo. + @echo ERROR : %TOOLSDIR%\%TOOLS_EXTENSION%.zip file should be downloaded from DEV Build job ... + @echo. + exit /b -1 +) echo ---------------------------- echo Unzip the downloaded extension diff --git a/aip-console-tools-cli/src/test/java/com/castsoftware/aip/console/tools/testbatches/deliver-version-integ-test.bat b/aip-console-tools-cli/src/test/java/com/castsoftware/aip/console/tools/testbatches/deliver-version-integ-test.bat new file mode 100644 index 00000000..9e4a5b43 --- /dev/null +++ b/aip-console-tools-cli/src/test/java/com/castsoftware/aip/console/tools/testbatches/deliver-version-integ-test.bat @@ -0,0 +1,45 @@ +@echo off +REM -- Create Application -- +SET SERVER_URL=%~1 +SET API_KEY=%~2 +SET APP_NAME=%~3 +SET IN_PLACE_MODE=%~4 +SET DOMAIN_NAME=%~5 +SET CSS=%~6 +set TOOLS_EXTENSION=com.castsoftware.aip.console.tools +set EXTEND_URL=https://extend.castsoftware.com +set PATH=C:\CAST-Caches\Win64;%PATH% + +REM EXAMPLE +REM +SET MORE_OPTIONS= +if not "%VERSION_NAME%" == "" SET MORE_OPTIONS=--version-name="%VERSION_NAME%" +if not "%VERSION_DATE%" == "" SET MORE_OPTIONS=%MORE_OPTIONS% --version-date="%VERSION_DATE%" + +if not "%IN_PLACE_MODE%" == "" SET MORE_OPTIONS=%MORE_OPTIONS% --no-version-history=%IN_PLACE_MODE% +if not "%CSS%" == "" SET MORE_OPTIONS=%MORE_OPTIONS% --css-server=%CSS% + +for %%a in ( SOURCES_ZIP TOOLSDIR EXTEND_API_KEY) do ( + if not defined %%a ( + @echo. + @echo ERROR : Environment variable %%a should exist as environment var... + @echo. + exit /b 1 + ) +) + +SET TOOLS_CLI_PATH=%TOOLSDIR%\%TOOLS_EXTENSION% +echo -- Delivers a new version to AIP Console -- +echo java -jar aip-console-tools-cli.jar deliver --server-url="%SERVER_URL%" --apikey="%API_KEY%" --timeout=5000 ^ +--app-name="%APP_NAME%" --verbose=false ^ +%MORE_OPTIONS% +echo -------------------------------- + +CD /d "%TOOLS_CLI_PATH%" + +java -jar aip-console-tools-cli.jar deliver --server-url="%SERVER_URL%" --apikey="%API_KEY%" --timeout=5000 ^ + --app-name="%APP_NAME%" --file="%SOURCES_ZIP%" --verbose=false ^ + %MORE_OPTIONS% + +echo exit code=%errorlevel% + From 7dd31a8ccc4b18c00ed5c838deead7a285c6ab87 Mon Sep 17 00:00:00 2001 From: leon2Meudon92 Date: Thu, 1 Sep 2022 16:31:41 +0200 Subject: [PATCH 14/51] WEBITOOLS-129: download target Console tools version from extend --- .../tools/testbatches/create-application-integ-test.bat | 9 --------- 1 file changed, 9 deletions(-) diff --git a/aip-console-tools-cli/src/test/java/com/castsoftware/aip/console/tools/testbatches/create-application-integ-test.bat b/aip-console-tools-cli/src/test/java/com/castsoftware/aip/console/tools/testbatches/create-application-integ-test.bat index 0aa33c95..11e8222e 100644 --- a/aip-console-tools-cli/src/test/java/com/castsoftware/aip/console/tools/testbatches/create-application-integ-test.bat +++ b/aip-console-tools-cli/src/test/java/com/castsoftware/aip/console/tools/testbatches/create-application-integ-test.bat @@ -18,15 +18,6 @@ if not "%DOMAIN_NAME%" == "" SET MORE_OPTIONS=--domain-name="%DOMAIN_NAME%" if not "%IN_PLACE_MODE%" == "" SET MORE_OPTIONS=%MORE_OPTIONS% --no-version-history=%IN_PLACE_MODE% if not "%CSS%" == "" SET MORE_OPTIONS=%MORE_OPTIONS% --css-server=%CSS% -for %%a in (TOOLS_VERSION EXTEND_API_KEY) do ( - if not defined %%a ( - @echo. - @echo ERROR : Environment variable %%a should exist as environment var... - @echo. - exit /b 1 - ) -) - if not defined TOOLSDIR ( set TOOLSDIR=%WORKSPACE%\bin ) From ec89d8be3642ec8090db4852ade7e79e9abb745a Mon Sep 17 00:00:00 2001 From: leon2Meudon92 Date: Thu, 1 Sep 2022 17:30:57 +0200 Subject: [PATCH 15/51] WEBITOOLS-129: added deliver batch --- .../deliver-version-integ-test.bat | 19 +++++++++++-------- 1 file changed, 11 insertions(+), 8 deletions(-) diff --git a/aip-console-tools-cli/src/test/java/com/castsoftware/aip/console/tools/testbatches/deliver-version-integ-test.bat b/aip-console-tools-cli/src/test/java/com/castsoftware/aip/console/tools/testbatches/deliver-version-integ-test.bat index 9e4a5b43..67c79ce5 100644 --- a/aip-console-tools-cli/src/test/java/com/castsoftware/aip/console/tools/testbatches/deliver-version-integ-test.bat +++ b/aip-console-tools-cli/src/test/java/com/castsoftware/aip/console/tools/testbatches/deliver-version-integ-test.bat @@ -15,11 +15,18 @@ REM SET MORE_OPTIONS= if not "%VERSION_NAME%" == "" SET MORE_OPTIONS=--version-name="%VERSION_NAME%" if not "%VERSION_DATE%" == "" SET MORE_OPTIONS=%MORE_OPTIONS% --version-date="%VERSION_DATE%" - -if not "%IN_PLACE_MODE%" == "" SET MORE_OPTIONS=%MORE_OPTIONS% --no-version-history=%IN_PLACE_MODE% +if not "%EXCLUSION_PATTERNS%" == "" SET MORE_OPTIONS=%MORE_OPTIONS% --exclude-patterns="%EXCLUSION_PATTERNS%" +if not "%EXCLUSION_RULES%" == "" SET MORE_OPTIONS=%MORE_OPTIONS% --exclusion-rules="%EXCLUSION_RULES%" +if not "%BACKUP_NAME%" == "" SET MORE_OPTIONS=%MORE_OPTIONS% --backup-name="%BACKUP_NAME%" if not "%CSS%" == "" SET MORE_OPTIONS=%MORE_OPTIONS% --css-server=%CSS% -for %%a in ( SOURCES_ZIP TOOLSDIR EXTEND_API_KEY) do ( +REM Add all boolean +if "%CLONE_VERSION%" == "false" SET MORE_OPTIONS=%MORE_OPTIONS% --create-new-version +if "%SET_AS_CURRENT%" == "true" SET MORE_OPTIONS=%MORE_OPTIONS% --set-as-current +SET MORE_OPTIONS=%MORE_OPTIONS% --backup=%BACKUP% --enable-security-assessment=%SECURITY_ASSESSMENT% --enable-security-dataflow=%SECURITY_DATAFLOW% +SET MORE_OPTIONS=%MORE_OPTIONS% --blueprint=%BLUEPRINT% --auto-create=%AUTO_CREATE% %CLONE_VERSION% --auto-discover=%AUTO_DISCOVER% + +for %%a in ( SOURCES_ZIP TOOLSDIR ) do ( if not defined %%a ( @echo. @echo ERROR : Environment variable %%a should exist as environment var... @@ -28,13 +35,9 @@ for %%a in ( SOURCES_ZIP TOOLSDIR EXTEND_API_KEY) do ( ) ) -SET TOOLS_CLI_PATH=%TOOLSDIR%\%TOOLS_EXTENSION% echo -- Delivers a new version to AIP Console -- -echo java -jar aip-console-tools-cli.jar deliver --server-url="%SERVER_URL%" --apikey="%API_KEY%" --timeout=5000 ^ ---app-name="%APP_NAME%" --verbose=false ^ -%MORE_OPTIONS% echo -------------------------------- - +SET TOOLS_CLI_PATH=%TOOLSDIR%\%TOOLS_EXTENSION% CD /d "%TOOLS_CLI_PATH%" java -jar aip-console-tools-cli.jar deliver --server-url="%SERVER_URL%" --apikey="%API_KEY%" --timeout=5000 ^ From 7383c14e39f47a781f9e78dbe1aed9827b2f3326 Mon Sep 17 00:00:00 2001 From: leon2Meudon92 Date: Thu, 1 Sep 2022 18:09:29 +0200 Subject: [PATCH 16/51] WEBITOOLS-129: added deliver batch --- .../aip/console/tools/testbatches/deliver-version-integ-test.bat | 1 + 1 file changed, 1 insertion(+) diff --git a/aip-console-tools-cli/src/test/java/com/castsoftware/aip/console/tools/testbatches/deliver-version-integ-test.bat b/aip-console-tools-cli/src/test/java/com/castsoftware/aip/console/tools/testbatches/deliver-version-integ-test.bat index 67c79ce5..9a4a0052 100644 --- a/aip-console-tools-cli/src/test/java/com/castsoftware/aip/console/tools/testbatches/deliver-version-integ-test.bat +++ b/aip-console-tools-cli/src/test/java/com/castsoftware/aip/console/tools/testbatches/deliver-version-integ-test.bat @@ -36,6 +36,7 @@ for %%a in ( SOURCES_ZIP TOOLSDIR ) do ( ) echo -- Delivers a new version to AIP Console -- +echo OPTIONS= %MORE_OPTIONS% echo -------------------------------- SET TOOLS_CLI_PATH=%TOOLSDIR%\%TOOLS_EXTENSION% CD /d "%TOOLS_CLI_PATH%" From 4b3ae2bf3d32a05965df98c34a434793c7c15078 Mon Sep 17 00:00:00 2001 From: leon2Meudon92 Date: Fri, 2 Sep 2022 16:07:57 +0200 Subject: [PATCH 17/51] WEBITOOLS-129: added deliver batch --- .../tools/testbatches/deliver-version-integ-test.bat | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/aip-console-tools-cli/src/test/java/com/castsoftware/aip/console/tools/testbatches/deliver-version-integ-test.bat b/aip-console-tools-cli/src/test/java/com/castsoftware/aip/console/tools/testbatches/deliver-version-integ-test.bat index 9a4a0052..c8032ed5 100644 --- a/aip-console-tools-cli/src/test/java/com/castsoftware/aip/console/tools/testbatches/deliver-version-integ-test.bat +++ b/aip-console-tools-cli/src/test/java/com/castsoftware/aip/console/tools/testbatches/deliver-version-integ-test.bat @@ -22,9 +22,10 @@ if not "%CSS%" == "" SET MORE_OPTIONS=%MORE_OPTIONS% --css-server=%CSS% REM Add all boolean if "%CLONE_VERSION%" == "false" SET MORE_OPTIONS=%MORE_OPTIONS% --create-new-version +if "%CLONE_VERSION%" == "true" SET MORE_OPTIONS=%MORE_OPTIONS% if "%SET_AS_CURRENT%" == "true" SET MORE_OPTIONS=%MORE_OPTIONS% --set-as-current SET MORE_OPTIONS=%MORE_OPTIONS% --backup=%BACKUP% --enable-security-assessment=%SECURITY_ASSESSMENT% --enable-security-dataflow=%SECURITY_DATAFLOW% -SET MORE_OPTIONS=%MORE_OPTIONS% --blueprint=%BLUEPRINT% --auto-create=%AUTO_CREATE% %CLONE_VERSION% --auto-discover=%AUTO_DISCOVER% +SET MORE_OPTIONS=%MORE_OPTIONS% --blueprint=%BLUEPRINT% --auto-create=%AUTO_CREATE% --auto-discover=%AUTO_DISCOVER% for %%a in ( SOURCES_ZIP TOOLSDIR ) do ( if not defined %%a ( @@ -34,9 +35,17 @@ for %%a in ( SOURCES_ZIP TOOLSDIR ) do ( exit /b 1 ) ) +echo ---------------------------- +echo Unzip the downloaded build artifact +echo 7z.exe x "%TOOLSDIR%\%TOOLS_EXTENSION%.zip" -y -o"%TOOLSDIR%\%TOOLS_EXTENSION%" +echo ---------------------------- +7z.exe x "%TOOLSDIR%\%TOOLS_EXTENSION%.zip" -y -o"%TOOLSDIR%\%TOOLS_EXTENSION%" echo -- Delivers a new version to AIP Console -- echo OPTIONS= %MORE_OPTIONS% +echo java -jar aip-console-tools-cli.jar deliver --server-url="%SERVER_URL%" --apikey="%API_KEY%" --timeout=5000 ^ + --app-name="%APP_NAME%" --file="%SOURCES_ZIP%" --verbose=false ^ + %MORE_OPTIONS% echo -------------------------------- SET TOOLS_CLI_PATH=%TOOLSDIR%\%TOOLS_EXTENSION% CD /d "%TOOLS_CLI_PATH%" From 38549518959da87ed0060d59c7ef21e1880935b2 Mon Sep 17 00:00:00 2001 From: leon2Meudon92 Date: Mon, 5 Sep 2022 14:21:40 +0200 Subject: [PATCH 18/51] WEBITOOLS-129: added analyze batch --- .../tools/commands/AnalyzeCommand.java | 2 +- .../analyzer-version-integ-test.bat | 50 +++++++++++++++++++ .../deliver-version-integ-test.bat | 2 +- 3 files changed, 52 insertions(+), 2 deletions(-) create mode 100644 aip-console-tools-cli/src/test/java/com/castsoftware/aip/console/tools/testbatches/analyzer-version-integ-test.bat diff --git a/aip-console-tools-cli/src/main/java/com/castsoftware/aip/console/tools/commands/AnalyzeCommand.java b/aip-console-tools-cli/src/main/java/com/castsoftware/aip/console/tools/commands/AnalyzeCommand.java index 0395f9fa..b2ba6d26 100644 --- a/aip-console-tools-cli/src/main/java/com/castsoftware/aip/console/tools/commands/AnalyzeCommand.java +++ b/aip-console-tools-cli/src/main/java/com/castsoftware/aip/console/tools/commands/AnalyzeCommand.java @@ -95,7 +95,7 @@ public class AnalyzeCommand implements Callable { defaultValue = "true", fallbackValue = "true") private boolean consolidation = true; - @CommandLine.Option(names = "--module-option", description = "Generates a user defined module option forr either technology module or analysis unit module. Possible value is one of: full_content, one_per_au, one_per_techno") + @CommandLine.Option(names = "--module-option", description = "Generates a user defined module option for either technology module or analysis unit module. Possible value is one of: full_content, one_per_au, one_per_techno") private ModuleGenerationType moduleGenerationType; public AnalyzeCommand(RestApiService restApiService, JobsService jobsService, ApplicationService applicationService) { diff --git a/aip-console-tools-cli/src/test/java/com/castsoftware/aip/console/tools/testbatches/analyzer-version-integ-test.bat b/aip-console-tools-cli/src/test/java/com/castsoftware/aip/console/tools/testbatches/analyzer-version-integ-test.bat new file mode 100644 index 00000000..181af577 --- /dev/null +++ b/aip-console-tools-cli/src/test/java/com/castsoftware/aip/console/tools/testbatches/analyzer-version-integ-test.bat @@ -0,0 +1,50 @@ +@echo off +REM -- Analyses an existing version on AIP Console Application -- +SET SERVER_URL=%~1 +SET API_KEY=%~2 +SET APP_NAME=%~3 +SET VERSION_NAME=%~4 + +REM EXAMPLE +REM call "analyzer-version-integ-test.bat" "server-url" "api-key" "app-name" "version-name" +REM +SET MORE_OPTIONS= +if "%SHOW_SQL%" == "true" SET MORE_OPTIONS=%MORE_OPTIONS% --show-sql +if "%AMT_PROFILING%" == "true" SET MORE_OPTIONS=%MORE_OPTIONS% --amt-profiling" + +if not "%MODULE_OPTION%" == "" SET MORE_OPTIONS=%MORE_OPTIONS% --module-option="%MODULE_OPTION%" +if "%UPLOAD_APPLICATION%" == "true" SET MORE_OPTIONS=%MORE_OPTIONS% --upload-application +if "%PROCESS_IMAGING%" == "true" SET MORE_OPTIONS=%MORE_OPTIONS% --process-imaging +if "%WITH_SNAPSHOT%" == "true" SET MORE_OPTIONS=%MORE_OPTIONS% --snapshot + + +for %%a in ( VERSION_NAME APP_NAME ) do ( + if not defined %%a ( + @echo. + @echo ERROR : Environment variable %%a should exist as environment var... + @echo. + exit /b 1 + ) +) + +echo ---------------------------- +echo Unzip the downloaded build artifact +echo 7z.exe x "%TOOLSDIR%\%TOOLS_EXTENSION%.zip" -y -o"%TOOLSDIR%\%TOOLS_EXTENSION%" +echo ---------------------------- +7z.exe x "%TOOLSDIR%\%TOOLS_EXTENSION%.zip" -y -o"%TOOLSDIR%\%TOOLS_EXTENSION%" + +echo -- Analyses an existing version on AIP Console -- +echo OPTIONS= %MORE_OPTIONS% +echo java -jar aip-console-tools-cli.jar analyze --server-url="%SERVER_URL%" --apikey="%API_KEY%" --timeout=5000 ^ + --app-name="%APP_NAME%" --version-name="%VERSION_NAME%" --verbose=false ^ + %MORE_OPTIONS% +echo -------------------------------- +SET TOOLS_CLI_PATH=%TOOLSDIR%\%TOOLS_EXTENSION% +CD /d "%TOOLS_CLI_PATH%" + +java -jar aip-console-tools-cli.jar analyze --server-url="%SERVER_URL%" --apikey="%API_KEY%" --timeout=5000 ^ + --app-name="%APP_NAME%" --version-name="%VERSION_NAME%" --verbose=false ^ + %MORE_OPTIONS% + +echo exit code=%errorlevel% + diff --git a/aip-console-tools-cli/src/test/java/com/castsoftware/aip/console/tools/testbatches/deliver-version-integ-test.bat b/aip-console-tools-cli/src/test/java/com/castsoftware/aip/console/tools/testbatches/deliver-version-integ-test.bat index c8032ed5..56b9c283 100644 --- a/aip-console-tools-cli/src/test/java/com/castsoftware/aip/console/tools/testbatches/deliver-version-integ-test.bat +++ b/aip-console-tools-cli/src/test/java/com/castsoftware/aip/console/tools/testbatches/deliver-version-integ-test.bat @@ -1,5 +1,5 @@ @echo off -REM -- Create Application -- +REM -- deliver version to existing Application -- SET SERVER_URL=%~1 SET API_KEY=%~2 SET APP_NAME=%~3 From 3c6ac19bc98544a70440dfa52f0af27f44837163 Mon Sep 17 00:00:00 2001 From: leon2Meudon92 Date: Mon, 5 Sep 2022 15:25:57 +0200 Subject: [PATCH 19/51] WEBITOOLS-129: added analyze batch --- .../tools/testbatches/analyzer-version-integ-test.bat | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/aip-console-tools-cli/src/test/java/com/castsoftware/aip/console/tools/testbatches/analyzer-version-integ-test.bat b/aip-console-tools-cli/src/test/java/com/castsoftware/aip/console/tools/testbatches/analyzer-version-integ-test.bat index 181af577..32822758 100644 --- a/aip-console-tools-cli/src/test/java/com/castsoftware/aip/console/tools/testbatches/analyzer-version-integ-test.bat +++ b/aip-console-tools-cli/src/test/java/com/castsoftware/aip/console/tools/testbatches/analyzer-version-integ-test.bat @@ -4,6 +4,9 @@ SET SERVER_URL=%~1 SET API_KEY=%~2 SET APP_NAME=%~3 SET VERSION_NAME=%~4 +set TOOLS_EXTENSION=com.castsoftware.aip.console.tools +set EXTEND_URL=https://extend.castsoftware.com +set PATH=C:\CAST-Caches\Win64;%PATH% REM EXAMPLE REM call "analyzer-version-integ-test.bat" "server-url" "api-key" "app-name" "version-name" @@ -18,7 +21,7 @@ if "%PROCESS_IMAGING%" == "true" SET MORE_OPTIONS=%MORE_OPTIONS% --process-imagi if "%WITH_SNAPSHOT%" == "true" SET MORE_OPTIONS=%MORE_OPTIONS% --snapshot -for %%a in ( VERSION_NAME APP_NAME ) do ( +for %%a in ( VERSION_NAME APP_NAME TOOLSDIR) do ( if not defined %%a ( @echo. @echo ERROR : Environment variable %%a should exist as environment var... From badc5a052c450af8b43e9238030d3dafb5d9142d Mon Sep 17 00:00:00 2001 From: leon2Meudon92 Date: Mon, 5 Sep 2022 15:45:07 +0200 Subject: [PATCH 20/51] WEBITOOLS-129: added analyze batch --- ...yzer-version-integ-test.bat => analyze-version-integ-test.bat} | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename aip-console-tools-cli/src/test/java/com/castsoftware/aip/console/tools/testbatches/{analyzer-version-integ-test.bat => analyze-version-integ-test.bat} (100%) diff --git a/aip-console-tools-cli/src/test/java/com/castsoftware/aip/console/tools/testbatches/analyzer-version-integ-test.bat b/aip-console-tools-cli/src/test/java/com/castsoftware/aip/console/tools/testbatches/analyze-version-integ-test.bat similarity index 100% rename from aip-console-tools-cli/src/test/java/com/castsoftware/aip/console/tools/testbatches/analyzer-version-integ-test.bat rename to aip-console-tools-cli/src/test/java/com/castsoftware/aip/console/tools/testbatches/analyze-version-integ-test.bat From 13fa4fb7b26abfd686e69b046e10192652b5206b Mon Sep 17 00:00:00 2001 From: leon2Meudon92 Date: Mon, 5 Sep 2022 16:28:45 +0200 Subject: [PATCH 21/51] WEBITOOLS-129: added analyze batch --- .../aip/console/tools/testbatches/analyze-version-integ-test.bat | 1 + 1 file changed, 1 insertion(+) diff --git a/aip-console-tools-cli/src/test/java/com/castsoftware/aip/console/tools/testbatches/analyze-version-integ-test.bat b/aip-console-tools-cli/src/test/java/com/castsoftware/aip/console/tools/testbatches/analyze-version-integ-test.bat index 32822758..dfae5431 100644 --- a/aip-console-tools-cli/src/test/java/com/castsoftware/aip/console/tools/testbatches/analyze-version-integ-test.bat +++ b/aip-console-tools-cli/src/test/java/com/castsoftware/aip/console/tools/testbatches/analyze-version-integ-test.bat @@ -4,6 +4,7 @@ SET SERVER_URL=%~1 SET API_KEY=%~2 SET APP_NAME=%~3 SET VERSION_NAME=%~4 + set TOOLS_EXTENSION=com.castsoftware.aip.console.tools set EXTEND_URL=https://extend.castsoftware.com set PATH=C:\CAST-Caches\Win64;%PATH% From f961068e68fddd75183fad85d3256c2725fb0350 Mon Sep 17 00:00:00 2001 From: leon2Meudon92 Date: Tue, 6 Sep 2022 11:14:43 +0200 Subject: [PATCH 22/51] WEBITOOLS-129: added snapshot batch --- .../snapshot-version-integ-test.bat | 48 +++++++++++++++++++ 1 file changed, 48 insertions(+) create mode 100644 aip-console-tools-cli/src/test/java/com/castsoftware/aip/console/tools/testbatches/snapshot-version-integ-test.bat diff --git a/aip-console-tools-cli/src/test/java/com/castsoftware/aip/console/tools/testbatches/snapshot-version-integ-test.bat b/aip-console-tools-cli/src/test/java/com/castsoftware/aip/console/tools/testbatches/snapshot-version-integ-test.bat new file mode 100644 index 00000000..4655a3be --- /dev/null +++ b/aip-console-tools-cli/src/test/java/com/castsoftware/aip/console/tools/testbatches/snapshot-version-integ-test.bat @@ -0,0 +1,48 @@ +@echo off +REM -- Take a snapshot of an existing version on AIP Console Application -- +SET SERVER_URL=%~1 +SET API_KEY=%~2 +SET APP_NAME=%~3 +SET VERSION_NAME=%~4 +SET SNAPSHOT_NAME=%~5 + +set TOOLS_EXTENSION=com.castsoftware.aip.console.tools +set EXTEND_URL=https://extend.castsoftware.com +set PATH=C:\CAST-Caches\Win64;%PATH% + +REM EXAMPLE +REM call "snapshot-version-integ-test.bat" "server-url" "api-key" "app-name" "version-name" "snapshot-name" +REM +SET MORE_OPTIONS= +if "%UPLOAD_APPLICATION%" == "true" SET MORE_OPTIONS=%MORE_OPTIONS% --upload-application +if "%PROCESS_IMAGING%" == "true" SET MORE_OPTIONS=%MORE_OPTIONS% --process-imaging + + +for %%a in ( VERSION_NAME APP_NAME TOOLSDIR) do ( + if not defined %%a ( + @echo. + @echo ERROR : Environment variable %%a should exist as environment var... + @echo. + exit /b 1 + ) +) + +echo ---------------------------- +echo Unzip the downloaded build artifact +echo 7z.exe x "%TOOLSDIR%\%TOOLS_EXTENSION%.zip" -y -o"%TOOLSDIR%\%TOOLS_EXTENSION%" +echo ---------------------------- +7z.exe x "%TOOLSDIR%\%TOOLS_EXTENSION%.zip" -y -o"%TOOLSDIR%\%TOOLS_EXTENSION%" + +echo -- Analyses an existing version on AIP Console -- +echo OPTIONS= %MORE_OPTIONS% + +echo -------------------------------- +SET TOOLS_CLI_PATH=%TOOLSDIR%\%TOOLS_EXTENSION% +CD /d "%TOOLS_CLI_PATH%" + +java -jar aip-console-tools-cli.jar snapshot --server-url="%SERVER_URL%" --apikey="%API_KEY%" --timeout=5000 ^ + --app-name="%APP_NAME%" --version-name="%VERSION_NAME%" --verbose=false ^ + %MORE_OPTIONS% + +echo exit code=%errorlevel% + From 09c5994c2bbea03610544c99f10f16e6d34e40fa Mon Sep 17 00:00:00 2001 From: leon2Meudon92 Date: Tue, 6 Sep 2022 11:34:46 +0200 Subject: [PATCH 23/51] WEBITOOLS-129: added snapshot batch --- .../tools/testbatches/snapshot-version-integ-test.bat | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/aip-console-tools-cli/src/test/java/com/castsoftware/aip/console/tools/testbatches/snapshot-version-integ-test.bat b/aip-console-tools-cli/src/test/java/com/castsoftware/aip/console/tools/testbatches/snapshot-version-integ-test.bat index 4655a3be..38ba2077 100644 --- a/aip-console-tools-cli/src/test/java/com/castsoftware/aip/console/tools/testbatches/snapshot-version-integ-test.bat +++ b/aip-console-tools-cli/src/test/java/com/castsoftware/aip/console/tools/testbatches/snapshot-version-integ-test.bat @@ -14,11 +14,12 @@ REM EXAMPLE REM call "snapshot-version-integ-test.bat" "server-url" "api-key" "app-name" "version-name" "snapshot-name" REM SET MORE_OPTIONS= +if not "%SNAPSHOT_DATE%" == "" SET MORE_OPTIONS=%MORE_OPTIONS% --snapshot-date="%SNAPSHOT_DATE%" if "%UPLOAD_APPLICATION%" == "true" SET MORE_OPTIONS=%MORE_OPTIONS% --upload-application if "%PROCESS_IMAGING%" == "true" SET MORE_OPTIONS=%MORE_OPTIONS% --process-imaging -for %%a in ( VERSION_NAME APP_NAME TOOLSDIR) do ( +for %%a in ( VERSION_NAME APP_NAME SNAPSHOT_NAME TOOLSDIR) do ( if not defined %%a ( @echo. @echo ERROR : Environment variable %%a should exist as environment var... @@ -41,7 +42,7 @@ SET TOOLS_CLI_PATH=%TOOLSDIR%\%TOOLS_EXTENSION% CD /d "%TOOLS_CLI_PATH%" java -jar aip-console-tools-cli.jar snapshot --server-url="%SERVER_URL%" --apikey="%API_KEY%" --timeout=5000 ^ - --app-name="%APP_NAME%" --version-name="%VERSION_NAME%" --verbose=false ^ + --app-name="%APP_NAME%" --version-name="%VERSION_NAME%" --snapshot-name="%SNAPSHOT_NAME%" --verbose=false ^ %MORE_OPTIONS% echo exit code=%errorlevel% From a5085d683dbff99fcbcfa4492f3bb3fba87e83a5 Mon Sep 17 00:00:00 2001 From: leon2Meudon92 Date: Fri, 9 Sep 2022 12:02:58 +0200 Subject: [PATCH 24/51] WEBITOOLS-129: Added verbose parameter --- .../console/tools/testbatches/analyze-version-integ-test.bat | 2 +- .../console/tools/testbatches/deliver-version-integ-test.bat | 2 +- .../console/tools/testbatches/snapshot-version-integ-test.bat | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/aip-console-tools-cli/src/test/java/com/castsoftware/aip/console/tools/testbatches/analyze-version-integ-test.bat b/aip-console-tools-cli/src/test/java/com/castsoftware/aip/console/tools/testbatches/analyze-version-integ-test.bat index dfae5431..dff73626 100644 --- a/aip-console-tools-cli/src/test/java/com/castsoftware/aip/console/tools/testbatches/analyze-version-integ-test.bat +++ b/aip-console-tools-cli/src/test/java/com/castsoftware/aip/console/tools/testbatches/analyze-version-integ-test.bat @@ -40,7 +40,7 @@ echo ---------------------------- echo -- Analyses an existing version on AIP Console -- echo OPTIONS= %MORE_OPTIONS% echo java -jar aip-console-tools-cli.jar analyze --server-url="%SERVER_URL%" --apikey="%API_KEY%" --timeout=5000 ^ - --app-name="%APP_NAME%" --version-name="%VERSION_NAME%" --verbose=false ^ + --app-name="%APP_NAME%" --version-name="%VERSION_NAME%" --verbose=%VERBOSE% ^ %MORE_OPTIONS% echo -------------------------------- SET TOOLS_CLI_PATH=%TOOLSDIR%\%TOOLS_EXTENSION% diff --git a/aip-console-tools-cli/src/test/java/com/castsoftware/aip/console/tools/testbatches/deliver-version-integ-test.bat b/aip-console-tools-cli/src/test/java/com/castsoftware/aip/console/tools/testbatches/deliver-version-integ-test.bat index 56b9c283..1f521c16 100644 --- a/aip-console-tools-cli/src/test/java/com/castsoftware/aip/console/tools/testbatches/deliver-version-integ-test.bat +++ b/aip-console-tools-cli/src/test/java/com/castsoftware/aip/console/tools/testbatches/deliver-version-integ-test.bat @@ -44,7 +44,7 @@ echo ---------------------------- echo -- Delivers a new version to AIP Console -- echo OPTIONS= %MORE_OPTIONS% echo java -jar aip-console-tools-cli.jar deliver --server-url="%SERVER_URL%" --apikey="%API_KEY%" --timeout=5000 ^ - --app-name="%APP_NAME%" --file="%SOURCES_ZIP%" --verbose=false ^ + --app-name="%APP_NAME%" --file="%SOURCES_ZIP%" --verbose=%VERBOSE% ^ %MORE_OPTIONS% echo -------------------------------- SET TOOLS_CLI_PATH=%TOOLSDIR%\%TOOLS_EXTENSION% diff --git a/aip-console-tools-cli/src/test/java/com/castsoftware/aip/console/tools/testbatches/snapshot-version-integ-test.bat b/aip-console-tools-cli/src/test/java/com/castsoftware/aip/console/tools/testbatches/snapshot-version-integ-test.bat index 38ba2077..17b2bc39 100644 --- a/aip-console-tools-cli/src/test/java/com/castsoftware/aip/console/tools/testbatches/snapshot-version-integ-test.bat +++ b/aip-console-tools-cli/src/test/java/com/castsoftware/aip/console/tools/testbatches/snapshot-version-integ-test.bat @@ -42,7 +42,7 @@ SET TOOLS_CLI_PATH=%TOOLSDIR%\%TOOLS_EXTENSION% CD /d "%TOOLS_CLI_PATH%" java -jar aip-console-tools-cli.jar snapshot --server-url="%SERVER_URL%" --apikey="%API_KEY%" --timeout=5000 ^ - --app-name="%APP_NAME%" --version-name="%VERSION_NAME%" --snapshot-name="%SNAPSHOT_NAME%" --verbose=false ^ + --app-name="%APP_NAME%" --version-name="%VERSION_NAME%" --snapshot-name="%SNAPSHOT_NAME%" --verbose=%VERBOSE% ^ %MORE_OPTIONS% echo exit code=%errorlevel% From 44930f91a71c33224dad2038de688d541448dca2 Mon Sep 17 00:00:00 2001 From: leon2Meudon92 Date: Tue, 13 Sep 2022 16:09:36 +0200 Subject: [PATCH 25/51] WEBITOOLS-129: Added rescan batch --- .../add-rescan-version-integ-test.bat | 64 +++++++++++++++++++ 1 file changed, 64 insertions(+) create mode 100644 aip-console-tools-cli/src/test/java/com/castsoftware/aip/console/tools/testbatches/add-rescan-version-integ-test.bat diff --git a/aip-console-tools-cli/src/test/java/com/castsoftware/aip/console/tools/testbatches/add-rescan-version-integ-test.bat b/aip-console-tools-cli/src/test/java/com/castsoftware/aip/console/tools/testbatches/add-rescan-version-integ-test.bat new file mode 100644 index 00000000..d44db1ae --- /dev/null +++ b/aip-console-tools-cli/src/test/java/com/castsoftware/aip/console/tools/testbatches/add-rescan-version-integ-test.bat @@ -0,0 +1,64 @@ +@echo off +REM -- deliver version to existing Application -- +SET SERVER_URL=%~1 +SET API_KEY=%~2 +SET APP_NAME=%~3 +SET IN_PLACE_MODE=%~4 +SET DOMAIN_NAME=%~5 +SET CSS=%~6 +set TOOLS_EXTENSION=com.castsoftware.aip.console.tools +set EXTEND_URL=https://extend.castsoftware.com +set PATH=C:\CAST-Caches\Win64;%PATH% + +REM EXAMPLE +REM +SET MORE_OPTIONS= +if not "%DOMAIN_NAME%" == "" SET MORE_OPTIONS=--domain-name="%DOMAIN_NAME%" +if not "%VERSION_NAME%" == "" SET MORE_OPTIONS=%MORE_OPTIONS% --version-name="%VERSION_NAME%" +if "%SHOW_SQL%" == "true" SET MORE_OPTIONS=%MORE_OPTIONS% --show-sql +if "%AMT_PROFILING%" == "true" SET MORE_OPTIONS=%MORE_OPTIONS% --amt-profiling" +if not "%VERSION_DATE%" == "" SET MORE_OPTIONS=%MORE_OPTIONS% --version-date="%VERSION_DATE%" +if not "%EXCLUSION_PATTERNS%" == "" SET MORE_OPTIONS=%MORE_OPTIONS% --exclude-patterns="%EXCLUSION_PATTERNS%" +if not "%EXCLUSION_RULES%" == "" SET MORE_OPTIONS=%MORE_OPTIONS% --exclusion-rules="%EXCLUSION_RULES%" +if not "%BACKUP_NAME%" == "" SET MORE_OPTIONS=%MORE_OPTIONS% --backup-name="%BACKUP_NAME%" +if not "%CSS%" == "" SET MORE_OPTIONS=%MORE_OPTIONS% --css-server=%CSS% + +REM Add all boolean +if "%CLONE_VERSION%" == "false" SET MORE_OPTIONS=%MORE_OPTIONS% --create-new-version +if "%CLONE_VERSION%" == "true" SET MORE_OPTIONS=%MORE_OPTIONS% +if "%SET_AS_CURRENT%" == "true" SET MORE_OPTIONS=%MORE_OPTIONS% --set-as-current +SET MORE_OPTIONS=%MORE_OPTIONS% --backup=%BACKUP% --enable-security-assessment=%SECURITY_ASSESSMENT% --enable-security-dataflow=%SECURITY_DATAFLOW% +SET MORE_OPTIONS=%MORE_OPTIONS% --blueprint=%BLUEPRINT% --auto-create=%AUTO_CREATE% --auto-discover=%AUTO_DISCOVER% +if "%PROCESS_IMAGING%" == "true" SET MORE_OPTIONS=%MORE_OPTIONS% --process-imaging +if "%UPLOAD_APPLICATION%" == "true" SET MORE_OPTIONS=%MORE_OPTIONS% --upload-application +if not "%MODULE_OPTION%" == "" SET MORE_OPTIONS=%MORE_OPTIONS% --module-option="%MODULE_OPTION%" + +for %%a in ( SOURCES_ZIP TOOLSDIR ) do ( + if not defined %%a ( + @echo. + @echo ERROR : Environment variable %%a should exist as environment var... + @echo. + exit /b 1 + ) +) +echo ---------------------------- +echo Unzip the downloaded build artifact +echo 7z.exe x "%TOOLSDIR%\%TOOLS_EXTENSION%.zip" -y -o"%TOOLSDIR%\%TOOLS_EXTENSION%" +echo ---------------------------- +7z.exe x "%TOOLSDIR%\%TOOLS_EXTENSION%.zip" -y -o"%TOOLSDIR%\%TOOLS_EXTENSION%" + +echo -- Delivers a new version to AIP Console -- +echo OPTIONS= %MORE_OPTIONS% +echo java -jar aip-console-tools-cli.jar add --server-url="%SERVER_URL%" --apikey="%API_KEY%" --timeout=5000 ^ + --app-name="%APP_NAME%" --file="%SOURCES_ZIP%" --verbose=%VERBOSE% ^ + %MORE_OPTIONS% +echo -------------------------------- +SET TOOLS_CLI_PATH=%TOOLSDIR%\%TOOLS_EXTENSION% +CD /d "%TOOLS_CLI_PATH%" + +java -jar aip-console-tools-cli.jar add --server-url="%SERVER_URL%" --apikey="%API_KEY%" --timeout=5000 ^ + --app-name="%APP_NAME%" --file="%SOURCES_ZIP%" --verbose=false ^ + %MORE_OPTIONS% + +echo exit code=%errorlevel% + From f72e6a4748dfea0d8c7f36fdbe88631cf4113f9d Mon Sep 17 00:00:00 2001 From: leon2Meudon92 Date: Tue, 13 Sep 2022 16:58:27 +0200 Subject: [PATCH 26/51] WEBITOOLS-129: Added rescan batch --- .../tools/testbatches/add-rescan-version-integ-test.bat | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/aip-console-tools-cli/src/test/java/com/castsoftware/aip/console/tools/testbatches/add-rescan-version-integ-test.bat b/aip-console-tools-cli/src/test/java/com/castsoftware/aip/console/tools/testbatches/add-rescan-version-integ-test.bat index d44db1ae..edbb2cf5 100644 --- a/aip-console-tools-cli/src/test/java/com/castsoftware/aip/console/tools/testbatches/add-rescan-version-integ-test.bat +++ b/aip-console-tools-cli/src/test/java/com/castsoftware/aip/console/tools/testbatches/add-rescan-version-integ-test.bat @@ -18,10 +18,9 @@ if not "%VERSION_NAME%" == "" SET MORE_OPTIONS=%MORE_OPTIONS% --version-name="%V if "%SHOW_SQL%" == "true" SET MORE_OPTIONS=%MORE_OPTIONS% --show-sql if "%AMT_PROFILING%" == "true" SET MORE_OPTIONS=%MORE_OPTIONS% --amt-profiling" if not "%VERSION_DATE%" == "" SET MORE_OPTIONS=%MORE_OPTIONS% --version-date="%VERSION_DATE%" -if not "%EXCLUSION_PATTERNS%" == "" SET MORE_OPTIONS=%MORE_OPTIONS% --exclude-patterns="%EXCLUSION_PATTERNS%" -if not "%EXCLUSION_RULES%" == "" SET MORE_OPTIONS=%MORE_OPTIONS% --exclusion-rules="%EXCLUSION_RULES%" if not "%BACKUP_NAME%" == "" SET MORE_OPTIONS=%MORE_OPTIONS% --backup-name="%BACKUP_NAME%" if not "%CSS%" == "" SET MORE_OPTIONS=%MORE_OPTIONS% --css-server=%CSS% +if not "%SNAPSHOT_NAME%" == "" SET MORE_OPTIONS=%MORE_OPTIONS% --snapshot-name="%SNAPSHOT_NAME%" REM Add all boolean if "%CLONE_VERSION%" == "false" SET MORE_OPTIONS=%MORE_OPTIONS% --create-new-version From af23beb85085116996a7c3d851d902d01cf45cdd Mon Sep 17 00:00:00 2001 From: leon2Meudon92 Date: Tue, 13 Sep 2022 17:00:29 +0200 Subject: [PATCH 27/51] WEBITOOLS-129: Added rescan batch --- .../tools/testbatches/add-rescan-version-integ-test.bat | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/aip-console-tools-cli/src/test/java/com/castsoftware/aip/console/tools/testbatches/add-rescan-version-integ-test.bat b/aip-console-tools-cli/src/test/java/com/castsoftware/aip/console/tools/testbatches/add-rescan-version-integ-test.bat index edbb2cf5..ccda54a3 100644 --- a/aip-console-tools-cli/src/test/java/com/castsoftware/aip/console/tools/testbatches/add-rescan-version-integ-test.bat +++ b/aip-console-tools-cli/src/test/java/com/castsoftware/aip/console/tools/testbatches/add-rescan-version-integ-test.bat @@ -25,9 +25,8 @@ if not "%SNAPSHOT_NAME%" == "" SET MORE_OPTIONS=%MORE_OPTIONS% --snapshot-name=" REM Add all boolean if "%CLONE_VERSION%" == "false" SET MORE_OPTIONS=%MORE_OPTIONS% --create-new-version if "%CLONE_VERSION%" == "true" SET MORE_OPTIONS=%MORE_OPTIONS% -if "%SET_AS_CURRENT%" == "true" SET MORE_OPTIONS=%MORE_OPTIONS% --set-as-current SET MORE_OPTIONS=%MORE_OPTIONS% --backup=%BACKUP% --enable-security-assessment=%SECURITY_ASSESSMENT% --enable-security-dataflow=%SECURITY_DATAFLOW% -SET MORE_OPTIONS=%MORE_OPTIONS% --blueprint=%BLUEPRINT% --auto-create=%AUTO_CREATE% --auto-discover=%AUTO_DISCOVER% +SET MORE_OPTIONS=%MORE_OPTIONS% --blueprint=%BLUEPRINT% --auto-create=%AUTO_CREATE% if "%PROCESS_IMAGING%" == "true" SET MORE_OPTIONS=%MORE_OPTIONS% --process-imaging if "%UPLOAD_APPLICATION%" == "true" SET MORE_OPTIONS=%MORE_OPTIONS% --upload-application if not "%MODULE_OPTION%" == "" SET MORE_OPTIONS=%MORE_OPTIONS% --module-option="%MODULE_OPTION%" From e3aed4b8813216408c5456e99d766d4447b18f86 Mon Sep 17 00:00:00 2001 From: leon2Meudon92 Date: Tue, 13 Sep 2022 17:02:18 +0200 Subject: [PATCH 28/51] WEBITOOLS-129: Added rescan batch --- .../console/tools/testbatches/add-rescan-version-integ-test.bat | 2 -- 1 file changed, 2 deletions(-) diff --git a/aip-console-tools-cli/src/test/java/com/castsoftware/aip/console/tools/testbatches/add-rescan-version-integ-test.bat b/aip-console-tools-cli/src/test/java/com/castsoftware/aip/console/tools/testbatches/add-rescan-version-integ-test.bat index ccda54a3..f6ed0ca9 100644 --- a/aip-console-tools-cli/src/test/java/com/castsoftware/aip/console/tools/testbatches/add-rescan-version-integ-test.bat +++ b/aip-console-tools-cli/src/test/java/com/castsoftware/aip/console/tools/testbatches/add-rescan-version-integ-test.bat @@ -23,8 +23,6 @@ if not "%CSS%" == "" SET MORE_OPTIONS=%MORE_OPTIONS% --css-server=%CSS% if not "%SNAPSHOT_NAME%" == "" SET MORE_OPTIONS=%MORE_OPTIONS% --snapshot-name="%SNAPSHOT_NAME%" REM Add all boolean -if "%CLONE_VERSION%" == "false" SET MORE_OPTIONS=%MORE_OPTIONS% --create-new-version -if "%CLONE_VERSION%" == "true" SET MORE_OPTIONS=%MORE_OPTIONS% SET MORE_OPTIONS=%MORE_OPTIONS% --backup=%BACKUP% --enable-security-assessment=%SECURITY_ASSESSMENT% --enable-security-dataflow=%SECURITY_DATAFLOW% SET MORE_OPTIONS=%MORE_OPTIONS% --blueprint=%BLUEPRINT% --auto-create=%AUTO_CREATE% if "%PROCESS_IMAGING%" == "true" SET MORE_OPTIONS=%MORE_OPTIONS% --process-imaging From b910493f891d5bbcb7e5246e14ac602cce2ac1ae Mon Sep 17 00:00:00 2001 From: leon2Meudon92 Date: Fri, 28 Oct 2022 08:12:26 +0200 Subject: [PATCH 29/51] WEBITOOLS-129: add node name --- .../console/tools/testbatches/add-rescan-version-integ-test.bat | 2 ++ .../console/tools/testbatches/create-application-integ-test.bat | 2 ++ .../console/tools/testbatches/deliver-version-integ-test.bat | 2 ++ 3 files changed, 6 insertions(+) diff --git a/aip-console-tools-cli/src/test/java/com/castsoftware/aip/console/tools/testbatches/add-rescan-version-integ-test.bat b/aip-console-tools-cli/src/test/java/com/castsoftware/aip/console/tools/testbatches/add-rescan-version-integ-test.bat index f6ed0ca9..7eb66dc6 100644 --- a/aip-console-tools-cli/src/test/java/com/castsoftware/aip/console/tools/testbatches/add-rescan-version-integ-test.bat +++ b/aip-console-tools-cli/src/test/java/com/castsoftware/aip/console/tools/testbatches/add-rescan-version-integ-test.bat @@ -6,6 +6,7 @@ SET APP_NAME=%~3 SET IN_PLACE_MODE=%~4 SET DOMAIN_NAME=%~5 SET CSS=%~6 +SET NODE_NAME=%~7 set TOOLS_EXTENSION=com.castsoftware.aip.console.tools set EXTEND_URL=https://extend.castsoftware.com set PATH=C:\CAST-Caches\Win64;%PATH% @@ -13,6 +14,7 @@ set PATH=C:\CAST-Caches\Win64;%PATH% REM EXAMPLE REM SET MORE_OPTIONS= +if not "%NODE_NAME%" == "" SET MORE_OPTIONS=--node-name="%NODE_NAME%" if not "%DOMAIN_NAME%" == "" SET MORE_OPTIONS=--domain-name="%DOMAIN_NAME%" if not "%VERSION_NAME%" == "" SET MORE_OPTIONS=%MORE_OPTIONS% --version-name="%VERSION_NAME%" if "%SHOW_SQL%" == "true" SET MORE_OPTIONS=%MORE_OPTIONS% --show-sql diff --git a/aip-console-tools-cli/src/test/java/com/castsoftware/aip/console/tools/testbatches/create-application-integ-test.bat b/aip-console-tools-cli/src/test/java/com/castsoftware/aip/console/tools/testbatches/create-application-integ-test.bat index 11e8222e..7d966c16 100644 --- a/aip-console-tools-cli/src/test/java/com/castsoftware/aip/console/tools/testbatches/create-application-integ-test.bat +++ b/aip-console-tools-cli/src/test/java/com/castsoftware/aip/console/tools/testbatches/create-application-integ-test.bat @@ -6,6 +6,7 @@ SET APP_NAME=%~3 SET IN_PLACE_MODE=%~4 SET DOMAIN_NAME=%~5 SET CSS=%~6 +SET NODE_NAME=%~7 set TOOLS_EXTENSION=com.castsoftware.aip.console.tools set EXTEND_URL=https://extend.castsoftware.com set PATH=C:\CAST-Caches\Win64;%PATH% @@ -14,6 +15,7 @@ REM EXAMPLE REM create-application-integ-test.bat "download folder" "http://machine.corp.castsoftware.com:8081" "LPZ5i8lJ.5dKr2Y4e39cVIJ70rJETgG0sY29C2ElH" "WEBITOOLS-102-Test-App" false "TOOLS-CLI-TEST_DOM" REM SET MORE_OPTIONS= +if not "%NODE_NAME%" == "" SET MORE_OPTIONS=--node-name="%NODE_NAME%" if not "%DOMAIN_NAME%" == "" SET MORE_OPTIONS=--domain-name="%DOMAIN_NAME%" if not "%IN_PLACE_MODE%" == "" SET MORE_OPTIONS=%MORE_OPTIONS% --no-version-history=%IN_PLACE_MODE% if not "%CSS%" == "" SET MORE_OPTIONS=%MORE_OPTIONS% --css-server=%CSS% diff --git a/aip-console-tools-cli/src/test/java/com/castsoftware/aip/console/tools/testbatches/deliver-version-integ-test.bat b/aip-console-tools-cli/src/test/java/com/castsoftware/aip/console/tools/testbatches/deliver-version-integ-test.bat index 1f521c16..fc6fba73 100644 --- a/aip-console-tools-cli/src/test/java/com/castsoftware/aip/console/tools/testbatches/deliver-version-integ-test.bat +++ b/aip-console-tools-cli/src/test/java/com/castsoftware/aip/console/tools/testbatches/deliver-version-integ-test.bat @@ -6,6 +6,7 @@ SET APP_NAME=%~3 SET IN_PLACE_MODE=%~4 SET DOMAIN_NAME=%~5 SET CSS=%~6 +SET NODE_NAME=%~7 set TOOLS_EXTENSION=com.castsoftware.aip.console.tools set EXTEND_URL=https://extend.castsoftware.com set PATH=C:\CAST-Caches\Win64;%PATH% @@ -13,6 +14,7 @@ set PATH=C:\CAST-Caches\Win64;%PATH% REM EXAMPLE REM SET MORE_OPTIONS= +if not "%NODE_NAME%" == "" SET MORE_OPTIONS=--node-name="%NODE_NAME%" if not "%VERSION_NAME%" == "" SET MORE_OPTIONS=--version-name="%VERSION_NAME%" if not "%VERSION_DATE%" == "" SET MORE_OPTIONS=%MORE_OPTIONS% --version-date="%VERSION_DATE%" if not "%EXCLUSION_PATTERNS%" == "" SET MORE_OPTIONS=%MORE_OPTIONS% --exclude-patterns="%EXCLUSION_PATTERNS%" From 61f796513b663564c4ee9816d703bcc0c5609ff3 Mon Sep 17 00:00:00 2001 From: leon2Meudon92 Date: Fri, 28 Oct 2022 09:16:14 +0200 Subject: [PATCH 30/51] WEBITOOLS-129: add node name --- .../console/tools/testbatches/add-rescan-version-integ-test.bat | 2 +- .../console/tools/testbatches/create-application-integ-test.bat | 2 +- .../console/tools/testbatches/deliver-version-integ-test.bat | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/aip-console-tools-cli/src/test/java/com/castsoftware/aip/console/tools/testbatches/add-rescan-version-integ-test.bat b/aip-console-tools-cli/src/test/java/com/castsoftware/aip/console/tools/testbatches/add-rescan-version-integ-test.bat index 7eb66dc6..b180aff0 100644 --- a/aip-console-tools-cli/src/test/java/com/castsoftware/aip/console/tools/testbatches/add-rescan-version-integ-test.bat +++ b/aip-console-tools-cli/src/test/java/com/castsoftware/aip/console/tools/testbatches/add-rescan-version-integ-test.bat @@ -6,7 +6,7 @@ SET APP_NAME=%~3 SET IN_PLACE_MODE=%~4 SET DOMAIN_NAME=%~5 SET CSS=%~6 -SET NODE_NAME=%~7 +REM SET NODE_NAME=%~7 set TOOLS_EXTENSION=com.castsoftware.aip.console.tools set EXTEND_URL=https://extend.castsoftware.com set PATH=C:\CAST-Caches\Win64;%PATH% diff --git a/aip-console-tools-cli/src/test/java/com/castsoftware/aip/console/tools/testbatches/create-application-integ-test.bat b/aip-console-tools-cli/src/test/java/com/castsoftware/aip/console/tools/testbatches/create-application-integ-test.bat index 7d966c16..946fe0d1 100644 --- a/aip-console-tools-cli/src/test/java/com/castsoftware/aip/console/tools/testbatches/create-application-integ-test.bat +++ b/aip-console-tools-cli/src/test/java/com/castsoftware/aip/console/tools/testbatches/create-application-integ-test.bat @@ -6,7 +6,7 @@ SET APP_NAME=%~3 SET IN_PLACE_MODE=%~4 SET DOMAIN_NAME=%~5 SET CSS=%~6 -SET NODE_NAME=%~7 +REM SET NODE_NAME=%~7 set TOOLS_EXTENSION=com.castsoftware.aip.console.tools set EXTEND_URL=https://extend.castsoftware.com set PATH=C:\CAST-Caches\Win64;%PATH% diff --git a/aip-console-tools-cli/src/test/java/com/castsoftware/aip/console/tools/testbatches/deliver-version-integ-test.bat b/aip-console-tools-cli/src/test/java/com/castsoftware/aip/console/tools/testbatches/deliver-version-integ-test.bat index fc6fba73..67d854b4 100644 --- a/aip-console-tools-cli/src/test/java/com/castsoftware/aip/console/tools/testbatches/deliver-version-integ-test.bat +++ b/aip-console-tools-cli/src/test/java/com/castsoftware/aip/console/tools/testbatches/deliver-version-integ-test.bat @@ -6,7 +6,7 @@ SET APP_NAME=%~3 SET IN_PLACE_MODE=%~4 SET DOMAIN_NAME=%~5 SET CSS=%~6 -SET NODE_NAME=%~7 +REM SET NODE_NAME=%~7 set TOOLS_EXTENSION=com.castsoftware.aip.console.tools set EXTEND_URL=https://extend.castsoftware.com set PATH=C:\CAST-Caches\Win64;%PATH% From 87ba1da05fe416fedfc32669ef6c1b4f9d64131e Mon Sep 17 00:00:00 2001 From: leon2Meudon92 Date: Fri, 28 Oct 2022 09:31:31 +0200 Subject: [PATCH 31/51] WEBITOOLS-129: add node name --- .../console/tools/testbatches/create-application-integ-test.bat | 2 ++ 1 file changed, 2 insertions(+) diff --git a/aip-console-tools-cli/src/test/java/com/castsoftware/aip/console/tools/testbatches/create-application-integ-test.bat b/aip-console-tools-cli/src/test/java/com/castsoftware/aip/console/tools/testbatches/create-application-integ-test.bat index 946fe0d1..9630c8f6 100644 --- a/aip-console-tools-cli/src/test/java/com/castsoftware/aip/console/tools/testbatches/create-application-integ-test.bat +++ b/aip-console-tools-cli/src/test/java/com/castsoftware/aip/console/tools/testbatches/create-application-integ-test.bat @@ -39,6 +39,8 @@ echo ---------------------------- SET TOOLS_CLI_PATH=%TOOLSDIR%\%TOOLS_EXTENSION% echo -- Create Application command -- +echo NODE name= %NODE_NAME% +echo OPTIONS= %MORE_OPTIONS% echo java -jar aip-console-tools-cli.jar CreateApplication --server-url="%SERVER_URL%" --apikey="%API_KEY%" --timeout=5000 ^ --app-name="%APP_NAME%" --verbose=false ^ %MORE_OPTIONS% From 1a79f20cc4ea8adcb3ef7b2ce981610e9f9b9caa Mon Sep 17 00:00:00 2001 From: leon2Meudon92 Date: Fri, 28 Oct 2022 09:37:12 +0200 Subject: [PATCH 32/51] WEBITOOLS-129: add node name --- .../console/tools/testbatches/add-rescan-version-integ-test.bat | 2 +- .../console/tools/testbatches/create-application-integ-test.bat | 2 +- .../console/tools/testbatches/deliver-version-integ-test.bat | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/aip-console-tools-cli/src/test/java/com/castsoftware/aip/console/tools/testbatches/add-rescan-version-integ-test.bat b/aip-console-tools-cli/src/test/java/com/castsoftware/aip/console/tools/testbatches/add-rescan-version-integ-test.bat index b180aff0..6f4c032f 100644 --- a/aip-console-tools-cli/src/test/java/com/castsoftware/aip/console/tools/testbatches/add-rescan-version-integ-test.bat +++ b/aip-console-tools-cli/src/test/java/com/castsoftware/aip/console/tools/testbatches/add-rescan-version-integ-test.bat @@ -14,8 +14,8 @@ set PATH=C:\CAST-Caches\Win64;%PATH% REM EXAMPLE REM SET MORE_OPTIONS= -if not "%NODE_NAME%" == "" SET MORE_OPTIONS=--node-name="%NODE_NAME%" if not "%DOMAIN_NAME%" == "" SET MORE_OPTIONS=--domain-name="%DOMAIN_NAME%" +if not "%NODE_NAME%" == "" SET MORE_OPTIONS=%MORE_OPTIONS% --node-name="%NODE_NAME%" if not "%VERSION_NAME%" == "" SET MORE_OPTIONS=%MORE_OPTIONS% --version-name="%VERSION_NAME%" if "%SHOW_SQL%" == "true" SET MORE_OPTIONS=%MORE_OPTIONS% --show-sql if "%AMT_PROFILING%" == "true" SET MORE_OPTIONS=%MORE_OPTIONS% --amt-profiling" diff --git a/aip-console-tools-cli/src/test/java/com/castsoftware/aip/console/tools/testbatches/create-application-integ-test.bat b/aip-console-tools-cli/src/test/java/com/castsoftware/aip/console/tools/testbatches/create-application-integ-test.bat index 9630c8f6..0b87891b 100644 --- a/aip-console-tools-cli/src/test/java/com/castsoftware/aip/console/tools/testbatches/create-application-integ-test.bat +++ b/aip-console-tools-cli/src/test/java/com/castsoftware/aip/console/tools/testbatches/create-application-integ-test.bat @@ -15,10 +15,10 @@ REM EXAMPLE REM create-application-integ-test.bat "download folder" "http://machine.corp.castsoftware.com:8081" "LPZ5i8lJ.5dKr2Y4e39cVIJ70rJETgG0sY29C2ElH" "WEBITOOLS-102-Test-App" false "TOOLS-CLI-TEST_DOM" REM SET MORE_OPTIONS= -if not "%NODE_NAME%" == "" SET MORE_OPTIONS=--node-name="%NODE_NAME%" if not "%DOMAIN_NAME%" == "" SET MORE_OPTIONS=--domain-name="%DOMAIN_NAME%" if not "%IN_PLACE_MODE%" == "" SET MORE_OPTIONS=%MORE_OPTIONS% --no-version-history=%IN_PLACE_MODE% if not "%CSS%" == "" SET MORE_OPTIONS=%MORE_OPTIONS% --css-server=%CSS% +if not "%NODE_NAME%" == "" SET MORE_OPTIONS=%MORE_OPTIONS% --node-name="%NODE_NAME%" if not defined TOOLSDIR ( set TOOLSDIR=%WORKSPACE%\bin diff --git a/aip-console-tools-cli/src/test/java/com/castsoftware/aip/console/tools/testbatches/deliver-version-integ-test.bat b/aip-console-tools-cli/src/test/java/com/castsoftware/aip/console/tools/testbatches/deliver-version-integ-test.bat index 67d854b4..0f27b512 100644 --- a/aip-console-tools-cli/src/test/java/com/castsoftware/aip/console/tools/testbatches/deliver-version-integ-test.bat +++ b/aip-console-tools-cli/src/test/java/com/castsoftware/aip/console/tools/testbatches/deliver-version-integ-test.bat @@ -14,8 +14,8 @@ set PATH=C:\CAST-Caches\Win64;%PATH% REM EXAMPLE REM SET MORE_OPTIONS= -if not "%NODE_NAME%" == "" SET MORE_OPTIONS=--node-name="%NODE_NAME%" if not "%VERSION_NAME%" == "" SET MORE_OPTIONS=--version-name="%VERSION_NAME%" +if not "%NODE_NAME%" == "" SET MORE_OPTIONS=%MORE_OPTIONS% --node-name="%NODE_NAME%" if not "%VERSION_DATE%" == "" SET MORE_OPTIONS=%MORE_OPTIONS% --version-date="%VERSION_DATE%" if not "%EXCLUSION_PATTERNS%" == "" SET MORE_OPTIONS=%MORE_OPTIONS% --exclude-patterns="%EXCLUSION_PATTERNS%" if not "%EXCLUSION_RULES%" == "" SET MORE_OPTIONS=%MORE_OPTIONS% --exclusion-rules="%EXCLUSION_RULES%" From e8908d4380328dca57d76634dad5a2e5c618799c Mon Sep 17 00:00:00 2001 From: leon2Meudon92 Date: Thu, 24 Nov 2022 16:49:04 +0100 Subject: [PATCH 33/51] WEBITOOLS-129: Added onboarding batch for integration tests --- .../onboard-application-integ-test.bat | 45 +++++++++++++++++++ 1 file changed, 45 insertions(+) create mode 100644 aip-console-tools-cli/src/test/java/com/castsoftware/aip/console/tools/testbatches/onboard-application-integ-test.bat diff --git a/aip-console-tools-cli/src/test/java/com/castsoftware/aip/console/tools/testbatches/onboard-application-integ-test.bat b/aip-console-tools-cli/src/test/java/com/castsoftware/aip/console/tools/testbatches/onboard-application-integ-test.bat new file mode 100644 index 00000000..601de0e6 --- /dev/null +++ b/aip-console-tools-cli/src/test/java/com/castsoftware/aip/console/tools/testbatches/onboard-application-integ-test.bat @@ -0,0 +1,45 @@ +@echo off +REM -- Onboard application -- +SET SERVER_URL=%~1 +SET API_KEY=%~2 +SET APP_NAME=%~3 +SET DOMAIN_NAME=%~4 +set TOOLS_EXTENSION=com.castsoftware.aip.console.tools +set EXTEND_URL=https://extend.castsoftware.com +set PATH=C:\CAST-Caches\Win64;%PATH% + +REM +SET MORE_OPTIONS= +if not "%RUN_ANALYSIS%" == "true" SET MORE_OPTIONS=--run-analysis="%VERSION_NAME%" +if not "%EXCLUSION_PATTERNS%" == "" SET MORE_OPTIONS=%MORE_OPTIONS% --exclude-patterns="%EXCLUSION_PATTERNS%" +if not "%EXCLUSION_RULES%" == "" SET MORE_OPTIONS=%MORE_OPTIONS% --exclusion-rules="%EXCLUSION_RULES%" + +for %%a in ( SOURCES_ZIP TOOLSDIR ) do ( + if not defined %%a ( + @echo. + @echo ERROR : Environment variable %%a should exist as environment var... + @echo. + exit /b 1 + ) +) +echo ---------------------------- +echo Unzip the downloaded build artifact +echo 7z.exe x "%TOOLSDIR%\%TOOLS_EXTENSION%.zip" -y -o"%TOOLSDIR%\%TOOLS_EXTENSION%" +echo ---------------------------- +7z.exe x "%TOOLSDIR%\%TOOLS_EXTENSION%.zip" -y -o"%TOOLSDIR%\%TOOLS_EXTENSION%" + +echo -- Onboard application to CAST Imaging Console -- +echo OPTIONS= %MORE_OPTIONS% +echo java -jar aip-console-tools-cli.jar Onboard-Application --server-url="%SERVER_URL%" --apikey="%API_KEY%" --timeout=5000 ^ + --app-name="%APP_NAME%" --file="%SOURCES_ZIP%" --verbose=%VERBOSE% ^ + %MORE_OPTIONS% +echo -------------------------------- +SET TOOLS_CLI_PATH=%TOOLSDIR%\%TOOLS_EXTENSION% +CD /d "%TOOLS_CLI_PATH%" + +java -jar aip-console-tools-cli.jar Onboard-Application --server-url="%SERVER_URL%" --apikey="%API_KEY%" --timeout=5000 ^ + --app-name="%APP_NAME%" --file="%SOURCES_ZIP%" --verbose=false ^ + %MORE_OPTIONS% + +echo exit code=%errorlevel% + From 3daa71b67e8275388e57caa3b95557ff19a0265f Mon Sep 17 00:00:00 2001 From: leon2Meudon92 Date: Thu, 24 Nov 2022 17:17:21 +0100 Subject: [PATCH 34/51] WEBITOOLS-129: Added onboarding batch for integration tests --- .../tools/testbatches/onboard-application-integ-test.bat | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/aip-console-tools-cli/src/test/java/com/castsoftware/aip/console/tools/testbatches/onboard-application-integ-test.bat b/aip-console-tools-cli/src/test/java/com/castsoftware/aip/console/tools/testbatches/onboard-application-integ-test.bat index 601de0e6..699b0903 100644 --- a/aip-console-tools-cli/src/test/java/com/castsoftware/aip/console/tools/testbatches/onboard-application-integ-test.bat +++ b/aip-console-tools-cli/src/test/java/com/castsoftware/aip/console/tools/testbatches/onboard-application-integ-test.bat @@ -10,7 +10,7 @@ set PATH=C:\CAST-Caches\Win64;%PATH% REM SET MORE_OPTIONS= -if not "%RUN_ANALYSIS%" == "true" SET MORE_OPTIONS=--run-analysis="%VERSION_NAME%" +if not "%RUN_ANALYSIS%" == "true" SET MORE_OPTIONS=--run-analysis if not "%EXCLUSION_PATTERNS%" == "" SET MORE_OPTIONS=%MORE_OPTIONS% --exclude-patterns="%EXCLUSION_PATTERNS%" if not "%EXCLUSION_RULES%" == "" SET MORE_OPTIONS=%MORE_OPTIONS% --exclusion-rules="%EXCLUSION_RULES%" From fd967ffa853588c7cca24994fa323ab7689190d7 Mon Sep 17 00:00:00 2001 From: leon2Meudon92 Date: Tue, 29 Nov 2022 17:17:04 +0100 Subject: [PATCH 35/51] WEBITOOLS-151: Fix negated RUN_ANALYSIS option value --- .../tools/testbatches/onboard-application-integ-test.bat | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/aip-console-tools-cli/src/test/java/com/castsoftware/aip/console/tools/testbatches/onboard-application-integ-test.bat b/aip-console-tools-cli/src/test/java/com/castsoftware/aip/console/tools/testbatches/onboard-application-integ-test.bat index 699b0903..9165a4da 100644 --- a/aip-console-tools-cli/src/test/java/com/castsoftware/aip/console/tools/testbatches/onboard-application-integ-test.bat +++ b/aip-console-tools-cli/src/test/java/com/castsoftware/aip/console/tools/testbatches/onboard-application-integ-test.bat @@ -9,8 +9,8 @@ set EXTEND_URL=https://extend.castsoftware.com set PATH=C:\CAST-Caches\Win64;%PATH% REM -SET MORE_OPTIONS= -if not "%RUN_ANALYSIS%" == "true" SET MORE_OPTIONS=--run-analysis +SET MORE_OPTIONS="" +if "%RUN_ANALYSIS%" == "true" SET MORE_OPTIONS=--run-analysis if not "%EXCLUSION_PATTERNS%" == "" SET MORE_OPTIONS=%MORE_OPTIONS% --exclude-patterns="%EXCLUSION_PATTERNS%" if not "%EXCLUSION_RULES%" == "" SET MORE_OPTIONS=%MORE_OPTIONS% --exclusion-rules="%EXCLUSION_RULES%" From a6ee097cfc9a011a74b7cf25f9cbe479f25fd9be Mon Sep 17 00:00:00 2001 From: leon2Meudon92 Date: Wed, 30 Nov 2022 17:20:19 +0100 Subject: [PATCH 36/51] WEBITOOLS-129: Added Publish-Imaging-integ-tests.bat --- .../Publish-Imaging-integ-tests.bat | 24 +++++++++++++++++++ 1 file changed, 24 insertions(+) create mode 100644 aip-console-tools-cli/src/test/java/com/castsoftware/aip/console/tools/testbatches/Publish-Imaging-integ-tests.bat diff --git a/aip-console-tools-cli/src/test/java/com/castsoftware/aip/console/tools/testbatches/Publish-Imaging-integ-tests.bat b/aip-console-tools-cli/src/test/java/com/castsoftware/aip/console/tools/testbatches/Publish-Imaging-integ-tests.bat new file mode 100644 index 00000000..9b09687b --- /dev/null +++ b/aip-console-tools-cli/src/test/java/com/castsoftware/aip/console/tools/testbatches/Publish-Imaging-integ-tests.bat @@ -0,0 +1,24 @@ +@echo off +REM -- Publish existing application data to Imaging -- +SET SERVER_URL=%~1 +SET API_KEY=%~2 +SET APP_NAME=%~3 +set TOOLS_EXTENSION=com.castsoftware.aip.console.tools +set EXTEND_URL=https://extend.castsoftware.com +set PATH=C:\CAST-Caches\Win64;%PATH% + + +echo -- Publish existing application data to Imaging -- +echo java -jar aip-console-tools-cli.jar Onboard-Application --server-url="%SERVER_URL%" --apikey="%API_KEY%" --timeout=5000 ^ + --app-name="%APP_NAME%" --file="%SOURCES_ZIP%" --verbose=%VERBOSE% ^ + %MORE_OPTIONS% +echo -------------------------------- +SET TOOLS_CLI_PATH=%TOOLSDIR%\%TOOLS_EXTENSION% +CD /d "%TOOLS_CLI_PATH%" + +java -jar aip-console-tools-cli.jar Onboard-Application --server-url="%SERVER_URL%" --apikey="%API_KEY%" --timeout=5000 ^ + --app-name="%APP_NAME%" --file="%SOURCES_ZIP%" --verbose=false ^ + %MORE_OPTIONS% + +echo exit code=%errorlevel% + From 46848c736b8df548ce1ab6dc49da559104a60d2d Mon Sep 17 00:00:00 2001 From: leon2Meudon92 Date: Wed, 30 Nov 2022 17:24:06 +0100 Subject: [PATCH 37/51] WEBITOOLS-129: Added Publish-Imaging-integ-tests.bat --- .../Publish-Imaging-integ-tests.bat | 19 +++++++++++++------ 1 file changed, 13 insertions(+), 6 deletions(-) diff --git a/aip-console-tools-cli/src/test/java/com/castsoftware/aip/console/tools/testbatches/Publish-Imaging-integ-tests.bat b/aip-console-tools-cli/src/test/java/com/castsoftware/aip/console/tools/testbatches/Publish-Imaging-integ-tests.bat index 9b09687b..95794c73 100644 --- a/aip-console-tools-cli/src/test/java/com/castsoftware/aip/console/tools/testbatches/Publish-Imaging-integ-tests.bat +++ b/aip-console-tools-cli/src/test/java/com/castsoftware/aip/console/tools/testbatches/Publish-Imaging-integ-tests.bat @@ -7,18 +7,25 @@ set TOOLS_EXTENSION=com.castsoftware.aip.console.tools set EXTEND_URL=https://extend.castsoftware.com set PATH=C:\CAST-Caches\Win64;%PATH% +for %%a in ( TOOLSDIR ) do ( + if not defined %%a ( + @echo. + @echo ERROR : Environment variable %%a should exist as environment var... + @echo. + exit /b 1 + ) +) echo -- Publish existing application data to Imaging -- -echo java -jar aip-console-tools-cli.jar Onboard-Application --server-url="%SERVER_URL%" --apikey="%API_KEY%" --timeout=5000 ^ - --app-name="%APP_NAME%" --file="%SOURCES_ZIP%" --verbose=%VERBOSE% ^ - %MORE_OPTIONS% +echo java -jar aip-console-tools-cli.jar Publish-Imaging --server-url="%SERVER_URL%" --apikey="%API_KEY%" --timeout=5000 ^ + --app-name="%APP_NAME%" --verbose=%VERBOSE% echo -------------------------------- + SET TOOLS_CLI_PATH=%TOOLSDIR%\%TOOLS_EXTENSION% CD /d "%TOOLS_CLI_PATH%" -java -jar aip-console-tools-cli.jar Onboard-Application --server-url="%SERVER_URL%" --apikey="%API_KEY%" --timeout=5000 ^ - --app-name="%APP_NAME%" --file="%SOURCES_ZIP%" --verbose=false ^ - %MORE_OPTIONS% +java -jar aip-console-tools-cli.jar Publish-Imaging --server-url="%SERVER_URL%" --apikey="%API_KEY%" --timeout=5000 ^ + --app-name="%APP_NAME%" --verbose=%VERBOSE% echo exit code=%errorlevel% From 3e77d067961cc513222cf14305314644f91b6ce5 Mon Sep 17 00:00:00 2001 From: leon2Meudon92 Date: Wed, 30 Nov 2022 17:36:33 +0100 Subject: [PATCH 38/51] WEBITOOLS-129: update Publish-Imaging-integ-tests.bat --- .../tools/testbatches/Publish-Imaging-integ-tests.bat | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/aip-console-tools-cli/src/test/java/com/castsoftware/aip/console/tools/testbatches/Publish-Imaging-integ-tests.bat b/aip-console-tools-cli/src/test/java/com/castsoftware/aip/console/tools/testbatches/Publish-Imaging-integ-tests.bat index 95794c73..d82aa670 100644 --- a/aip-console-tools-cli/src/test/java/com/castsoftware/aip/console/tools/testbatches/Publish-Imaging-integ-tests.bat +++ b/aip-console-tools-cli/src/test/java/com/castsoftware/aip/console/tools/testbatches/Publish-Imaging-integ-tests.bat @@ -15,6 +15,11 @@ for %%a in ( TOOLSDIR ) do ( exit /b 1 ) ) +echo ---------------------------- +echo Unziping the downloaded build artifact +echo 7z.exe x "%TOOLSDIR%\%TOOLS_EXTENSION%.zip" -y -o"%TOOLSDIR%\%TOOLS_EXTENSION%" +echo ---------------------------- +7z.exe x "%TOOLSDIR%\%TOOLS_EXTENSION%.zip" -y -o"%TOOLSDIR%\%TOOLS_EXTENSION%" echo -- Publish existing application data to Imaging -- echo java -jar aip-console-tools-cli.jar Publish-Imaging --server-url="%SERVER_URL%" --apikey="%API_KEY%" --timeout=5000 ^ From 7da683c8e10472a81390fad5c61f572c2a783027 Mon Sep 17 00:00:00 2001 From: leon2Meudon92 Date: Wed, 25 Jan 2023 11:17:45 +0100 Subject: [PATCH 39/51] WEBITOOLS-129: update onboard batch --- .../tools/testbatches/onboard-application-integ-test.bat | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/aip-console-tools-cli/src/test/java/com/castsoftware/aip/console/tools/testbatches/onboard-application-integ-test.bat b/aip-console-tools-cli/src/test/java/com/castsoftware/aip/console/tools/testbatches/onboard-application-integ-test.bat index 9165a4da..568d23ad 100644 --- a/aip-console-tools-cli/src/test/java/com/castsoftware/aip/console/tools/testbatches/onboard-application-integ-test.bat +++ b/aip-console-tools-cli/src/test/java/com/castsoftware/aip/console/tools/testbatches/onboard-application-integ-test.bat @@ -9,10 +9,10 @@ set EXTEND_URL=https://extend.castsoftware.com set PATH=C:\CAST-Caches\Win64;%PATH% REM -SET MORE_OPTIONS="" -if "%RUN_ANALYSIS%" == "true" SET MORE_OPTIONS=--run-analysis +SET MORE_OPTIONS=--strategy=%STRATEGY% if not "%EXCLUSION_PATTERNS%" == "" SET MORE_OPTIONS=%MORE_OPTIONS% --exclude-patterns="%EXCLUSION_PATTERNS%" if not "%EXCLUSION_RULES%" == "" SET MORE_OPTIONS=%MORE_OPTIONS% --exclusion-rules="%EXCLUSION_RULES%" +if %STRATEGY%=="FIRST_SCAN" SET MORE_OPTIONS=%MORE_OPTIONS% --file="%SOURCES_ZIP%" for %%a in ( SOURCES_ZIP TOOLSDIR ) do ( if not defined %%a ( @@ -31,14 +31,14 @@ echo ---------------------------- echo -- Onboard application to CAST Imaging Console -- echo OPTIONS= %MORE_OPTIONS% echo java -jar aip-console-tools-cli.jar Onboard-Application --server-url="%SERVER_URL%" --apikey="%API_KEY%" --timeout=5000 ^ - --app-name="%APP_NAME%" --file="%SOURCES_ZIP%" --verbose=%VERBOSE% ^ + --app-name="%APP_NAME%" --verbose=%VERBOSE% ^ %MORE_OPTIONS% echo -------------------------------- SET TOOLS_CLI_PATH=%TOOLSDIR%\%TOOLS_EXTENSION% CD /d "%TOOLS_CLI_PATH%" java -jar aip-console-tools-cli.jar Onboard-Application --server-url="%SERVER_URL%" --apikey="%API_KEY%" --timeout=5000 ^ - --app-name="%APP_NAME%" --file="%SOURCES_ZIP%" --verbose=false ^ + --app-name="%APP_NAME%" --verbose=false ^ %MORE_OPTIONS% echo exit code=%errorlevel% From 64d3df2bd47333ee1a0b73bf3351151d6b250b03 Mon Sep 17 00:00:00 2001 From: leon2Meudon92 Date: Thu, 9 Feb 2023 11:10:41 +0100 Subject: [PATCH 40/51] WEBITOOLS-129: Updates batches --- ...d-application-integ-test.bat => fast-scan-integ-test.bat} | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) rename aip-console-tools-cli/src/test/java/com/castsoftware/aip/console/tools/testbatches/{onboard-application-integ-test.bat => fast-scan-integ-test.bat} (85%) diff --git a/aip-console-tools-cli/src/test/java/com/castsoftware/aip/console/tools/testbatches/onboard-application-integ-test.bat b/aip-console-tools-cli/src/test/java/com/castsoftware/aip/console/tools/testbatches/fast-scan-integ-test.bat similarity index 85% rename from aip-console-tools-cli/src/test/java/com/castsoftware/aip/console/tools/testbatches/onboard-application-integ-test.bat rename to aip-console-tools-cli/src/test/java/com/castsoftware/aip/console/tools/testbatches/fast-scan-integ-test.bat index 568d23ad..7a387efb 100644 --- a/aip-console-tools-cli/src/test/java/com/castsoftware/aip/console/tools/testbatches/onboard-application-integ-test.bat +++ b/aip-console-tools-cli/src/test/java/com/castsoftware/aip/console/tools/testbatches/fast-scan-integ-test.bat @@ -9,10 +9,9 @@ set EXTEND_URL=https://extend.castsoftware.com set PATH=C:\CAST-Caches\Win64;%PATH% REM -SET MORE_OPTIONS=--strategy=%STRATEGY% +SET MORE_OPTIONS=--file="%SOURCES_ZIP%" if not "%EXCLUSION_PATTERNS%" == "" SET MORE_OPTIONS=%MORE_OPTIONS% --exclude-patterns="%EXCLUSION_PATTERNS%" if not "%EXCLUSION_RULES%" == "" SET MORE_OPTIONS=%MORE_OPTIONS% --exclusion-rules="%EXCLUSION_RULES%" -if %STRATEGY%=="FIRST_SCAN" SET MORE_OPTIONS=%MORE_OPTIONS% --file="%SOURCES_ZIP%" for %%a in ( SOURCES_ZIP TOOLSDIR ) do ( if not defined %%a ( @@ -37,7 +36,7 @@ echo -------------------------------- SET TOOLS_CLI_PATH=%TOOLSDIR%\%TOOLS_EXTENSION% CD /d "%TOOLS_CLI_PATH%" -java -jar aip-console-tools-cli.jar Onboard-Application --server-url="%SERVER_URL%" --apikey="%API_KEY%" --timeout=5000 ^ +java -jar aip-console-tools-cli.jar Fast-Scan --server-url="%SERVER_URL%" --apikey="%API_KEY%" --timeout=5000 ^ --app-name="%APP_NAME%" --verbose=false ^ %MORE_OPTIONS% From 2f925f02fc7577d3c3df70a27a9db76919660e8d Mon Sep 17 00:00:00 2001 From: leon2Meudon92 Date: Thu, 9 Feb 2023 11:16:19 +0100 Subject: [PATCH 41/51] WEBITOOLS-129: Updates batches --- .../aip/console/tools/testbatches/fast-scan-integ-test.bat | 1 + 1 file changed, 1 insertion(+) diff --git a/aip-console-tools-cli/src/test/java/com/castsoftware/aip/console/tools/testbatches/fast-scan-integ-test.bat b/aip-console-tools-cli/src/test/java/com/castsoftware/aip/console/tools/testbatches/fast-scan-integ-test.bat index 7a387efb..d0d79322 100644 --- a/aip-console-tools-cli/src/test/java/com/castsoftware/aip/console/tools/testbatches/fast-scan-integ-test.bat +++ b/aip-console-tools-cli/src/test/java/com/castsoftware/aip/console/tools/testbatches/fast-scan-integ-test.bat @@ -12,6 +12,7 @@ REM SET MORE_OPTIONS=--file="%SOURCES_ZIP%" if not "%EXCLUSION_PATTERNS%" == "" SET MORE_OPTIONS=%MORE_OPTIONS% --exclude-patterns="%EXCLUSION_PATTERNS%" if not "%EXCLUSION_RULES%" == "" SET MORE_OPTIONS=%MORE_OPTIONS% --exclusion-rules="%EXCLUSION_RULES%" +if not "%DOMAIN_NAME%" == "" SET MORE_OPTIONS=%MORE_OPTIONS% --domain-name="%DOMAIN_NAME%" for %%a in ( SOURCES_ZIP TOOLSDIR ) do ( if not defined %%a ( From 88c2196421c08950b202fd13130ebdd444b8fa8e Mon Sep 17 00:00:00 2001 From: leon2Meudon92 Date: Fri, 17 Feb 2023 17:03:07 +0100 Subject: [PATCH 42/51] WEBITOOLS-169: added module option --- .../aip/console/tools/testbatches/deept-analysis-integ-test.bat | 1 + 1 file changed, 1 insertion(+) diff --git a/aip-console-tools-cli/src/test/java/com/castsoftware/aip/console/tools/testbatches/deept-analysis-integ-test.bat b/aip-console-tools-cli/src/test/java/com/castsoftware/aip/console/tools/testbatches/deept-analysis-integ-test.bat index 29b861a1..f939d2ee 100644 --- a/aip-console-tools-cli/src/test/java/com/castsoftware/aip/console/tools/testbatches/deept-analysis-integ-test.bat +++ b/aip-console-tools-cli/src/test/java/com/castsoftware/aip/console/tools/testbatches/deept-analysis-integ-test.bat @@ -10,6 +10,7 @@ set PATH=C:\CAST-Caches\Win64;%PATH% REM SET MORE_OPTIONS= if not "%SNAPSHOT_NAME%" == "" SET MORE_OPTIONS=%MORE_OPTIONS% --snapshot-name="%SNAPSHOT_NAME%" +if not "%MODULE_GENERATION_TYPE%" == "" SET MORE_OPTIONS=%MORE_OPTIONS% --snapshot-name="%MODULE_GENERATION_TYPE%" if not "%SLEEP_DURATION%" == "" SET MORE_OPTIONS=%MORE_OPTIONS% --sleep-duration="%SLEEP_DURATION%" for %%a in ( SOURCES_ZIP TOOLSDIR ) do ( From 3f6881d4005fcae866451727aab364e7fc773c02 Mon Sep 17 00:00:00 2001 From: leon2Meudon92 Date: Fri, 17 Feb 2023 17:04:44 +0100 Subject: [PATCH 43/51] WEBITOOLS-169: added module option --- .../aip/console/tools/testbatches/deept-analysis-integ-test.bat | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/aip-console-tools-cli/src/test/java/com/castsoftware/aip/console/tools/testbatches/deept-analysis-integ-test.bat b/aip-console-tools-cli/src/test/java/com/castsoftware/aip/console/tools/testbatches/deept-analysis-integ-test.bat index f939d2ee..771f9ff8 100644 --- a/aip-console-tools-cli/src/test/java/com/castsoftware/aip/console/tools/testbatches/deept-analysis-integ-test.bat +++ b/aip-console-tools-cli/src/test/java/com/castsoftware/aip/console/tools/testbatches/deept-analysis-integ-test.bat @@ -10,7 +10,7 @@ set PATH=C:\CAST-Caches\Win64;%PATH% REM SET MORE_OPTIONS= if not "%SNAPSHOT_NAME%" == "" SET MORE_OPTIONS=%MORE_OPTIONS% --snapshot-name="%SNAPSHOT_NAME%" -if not "%MODULE_GENERATION_TYPE%" == "" SET MORE_OPTIONS=%MORE_OPTIONS% --snapshot-name="%MODULE_GENERATION_TYPE%" +if not "%MODULE_GENERATION_TYPE%" == "" SET MORE_OPTIONS=%MORE_OPTIONS% --module-option="%MODULE_GENERATION_TYPE%" if not "%SLEEP_DURATION%" == "" SET MORE_OPTIONS=%MORE_OPTIONS% --sleep-duration="%SLEEP_DURATION%" for %%a in ( SOURCES_ZIP TOOLSDIR ) do ( From bd6036e9bdf1ea50b59ef4b0ad0b045340d90b64 Mon Sep 17 00:00:00 2001 From: leon2Meudon92 Date: Thu, 29 Jun 2023 10:45:09 +0200 Subject: [PATCH 44/51] WEBITOOLS-185: update batches to run integration jobs --- .../tools/testbatches/create-application-integ-test.bat | 3 +++ 1 file changed, 3 insertions(+) diff --git a/aip-console-tools-cli/src/test/java/com/castsoftware/aip/console/tools/testbatches/create-application-integ-test.bat b/aip-console-tools-cli/src/test/java/com/castsoftware/aip/console/tools/testbatches/create-application-integ-test.bat index 0b87891b..81cfac97 100644 --- a/aip-console-tools-cli/src/test/java/com/castsoftware/aip/console/tools/testbatches/create-application-integ-test.bat +++ b/aip-console-tools-cli/src/test/java/com/castsoftware/aip/console/tools/testbatches/create-application-integ-test.bat @@ -24,6 +24,9 @@ if not defined TOOLSDIR ( set TOOLSDIR=%WORKSPACE%\bin ) +echo ===== Processing NUPKG artifact ========== +7z.exe e "%DEV_ARTIFACT%\upload\com.castsoftware.aip.console.tools*.nupkg" -y -o"%TOOLSDIR%" com.castsoftware.aip.console.tools*.zip + if not exist %TOOLSDIR%\%TOOLS_EXTENSION%.zip ( @echo. @echo ERROR : %TOOLSDIR%\%TOOLS_EXTENSION%.zip file should be downloaded from DEV Build job ... From 87bce6b78ce95185102ea647475a43c546e6defc Mon Sep 17 00:00:00 2001 From: leon2Meudon92 Date: Thu, 29 Jun 2023 10:52:14 +0200 Subject: [PATCH 45/51] WEBITOOLS-185: update batches to run integration jobs --- .../testbatches/create-application-integ-test.bat | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) diff --git a/aip-console-tools-cli/src/test/java/com/castsoftware/aip/console/tools/testbatches/create-application-integ-test.bat b/aip-console-tools-cli/src/test/java/com/castsoftware/aip/console/tools/testbatches/create-application-integ-test.bat index 81cfac97..4dc2a792 100644 --- a/aip-console-tools-cli/src/test/java/com/castsoftware/aip/console/tools/testbatches/create-application-integ-test.bat +++ b/aip-console-tools-cli/src/test/java/com/castsoftware/aip/console/tools/testbatches/create-application-integ-test.bat @@ -24,14 +24,13 @@ if not defined TOOLSDIR ( set TOOLSDIR=%WORKSPACE%\bin ) -echo ===== Processing NUPKG artifact ========== -7z.exe e "%DEV_ARTIFACT%\upload\com.castsoftware.aip.console.tools*.nupkg" -y -o"%TOOLSDIR%" com.castsoftware.aip.console.tools*.zip - if not exist %TOOLSDIR%\%TOOLS_EXTENSION%.zip ( - @echo. - @echo ERROR : %TOOLSDIR%\%TOOLS_EXTENSION%.zip file should be downloaded from DEV Build job ... - @echo. - exit /b -1 + @echo ===== Processing NUPKG artifact ========== +7z.exe e "%DEV_ARTIFACT%\upload\com.castsoftware.aip.console.tools*.nupkg" -y -o"%TOOLSDIR%" com.castsoftware.aip.console.tools*.zip + REM @echo. + REM @echo ERROR : %TOOLSDIR%\%TOOLS_EXTENSION%.zip file should be downloaded from DEV Build job ... + REM @echo. + REM exit /b -1 ) echo ---------------------------- From f907e9c457e191c00786cd3254af8da6b93e3776 Mon Sep 17 00:00:00 2001 From: leon2Meudon92 Date: Thu, 29 Jun 2023 10:57:33 +0200 Subject: [PATCH 46/51] WEBITOOLS-185: update batches to run integration jobs --- .../tools/testbatches/create-application-integ-test.bat | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/aip-console-tools-cli/src/test/java/com/castsoftware/aip/console/tools/testbatches/create-application-integ-test.bat b/aip-console-tools-cli/src/test/java/com/castsoftware/aip/console/tools/testbatches/create-application-integ-test.bat index 4dc2a792..32c72b84 100644 --- a/aip-console-tools-cli/src/test/java/com/castsoftware/aip/console/tools/testbatches/create-application-integ-test.bat +++ b/aip-console-tools-cli/src/test/java/com/castsoftware/aip/console/tools/testbatches/create-application-integ-test.bat @@ -24,7 +24,7 @@ if not defined TOOLSDIR ( set TOOLSDIR=%WORKSPACE%\bin ) -if not exist %TOOLSDIR%\%TOOLS_EXTENSION%.zip ( +if not exist %TOOLSDIR%\%TOOLS_EXTENSION%*.zip ( @echo ===== Processing NUPKG artifact ========== 7z.exe e "%DEV_ARTIFACT%\upload\com.castsoftware.aip.console.tools*.nupkg" -y -o"%TOOLSDIR%" com.castsoftware.aip.console.tools*.zip REM @echo. @@ -35,7 +35,7 @@ if not exist %TOOLSDIR%\%TOOLS_EXTENSION%.zip ( echo ---------------------------- echo Unzip the downloaded extension -echo 7z.exe x "%TOOLSDIR%\%TOOLS_EXTENSION%.zip" -y -o"%TOOLSDIR%\%TOOLS_EXTENSION%" +echo 7z.exe x "%TOOLSDIR%\%TOOLS_EXTENSION%*.zip" -y -o"%TOOLSDIR%\%TOOLS_EXTENSION%" echo ---------------------------- 7z.exe x "%TOOLSDIR%\%TOOLS_EXTENSION%.zip" -y -o"%TOOLSDIR%\%TOOLS_EXTENSION%" From 6b3aa91f12d130d5c1b14d3b89f1577416dae5f2 Mon Sep 17 00:00:00 2001 From: leon2Meudon92 Date: Thu, 29 Jun 2023 11:07:56 +0200 Subject: [PATCH 47/51] WEBITOOLS-185: update batches to run integration jobs --- .../create-application-integ-test.bat | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/aip-console-tools-cli/src/test/java/com/castsoftware/aip/console/tools/testbatches/create-application-integ-test.bat b/aip-console-tools-cli/src/test/java/com/castsoftware/aip/console/tools/testbatches/create-application-integ-test.bat index 32c72b84..e7c337b2 100644 --- a/aip-console-tools-cli/src/test/java/com/castsoftware/aip/console/tools/testbatches/create-application-integ-test.bat +++ b/aip-console-tools-cli/src/test/java/com/castsoftware/aip/console/tools/testbatches/create-application-integ-test.bat @@ -7,7 +7,7 @@ SET IN_PLACE_MODE=%~4 SET DOMAIN_NAME=%~5 SET CSS=%~6 REM SET NODE_NAME=%~7 -set TOOLS_EXTENSION=com.castsoftware.aip.console.tools +set TOOLS_EXTENSION=com.castsoftware.aip.console.tools.%TOOLS_VERSION% set EXTEND_URL=https://extend.castsoftware.com set PATH=C:\CAST-Caches\Win64;%PATH% @@ -24,19 +24,19 @@ if not defined TOOLSDIR ( set TOOLSDIR=%WORKSPACE%\bin ) -if not exist %TOOLSDIR%\%TOOLS_EXTENSION%*.zip ( - @echo ===== Processing NUPKG artifact ========== -7z.exe e "%DEV_ARTIFACT%\upload\com.castsoftware.aip.console.tools*.nupkg" -y -o"%TOOLSDIR%" com.castsoftware.aip.console.tools*.zip +if not exist %TOOLSDIR%\%TOOLS_EXTENSION%.zip ( + @echo ===== Processing NUPKG artifact version %TOOLS_VERSION% ========== +7z.exe e "%DEV_ARTIFACT%\upload\com.castsoftware.aip.console.tools.%TOOLS_VERSION%.nupkg" -y -o"%TOOLSDIR%" %TOOLS_EXTENSION%.zip REM @echo. REM @echo ERROR : %TOOLSDIR%\%TOOLS_EXTENSION%.zip file should be downloaded from DEV Build job ... REM @echo. REM exit /b -1 ) -echo ---------------------------- -echo Unzip the downloaded extension -echo 7z.exe x "%TOOLSDIR%\%TOOLS_EXTENSION%*.zip" -y -o"%TOOLSDIR%\%TOOLS_EXTENSION%" -echo ---------------------------- +@echo ---------------------------- +@echo Unzip the downloaded extension +@echo 7z.exe x "%TOOLSDIR%\%TOOLS_EXTENSION%*.zip" -y -o"%TOOLSDIR%\%TOOLS_EXTENSION%" +@echo ---------------------------- 7z.exe x "%TOOLSDIR%\%TOOLS_EXTENSION%.zip" -y -o"%TOOLSDIR%\%TOOLS_EXTENSION%" SET TOOLS_CLI_PATH=%TOOLSDIR%\%TOOLS_EXTENSION% From f4db6d63f2fe15f7783632f3c50cc2cc866b3893 Mon Sep 17 00:00:00 2001 From: leon2Meudon92 Date: Thu, 29 Jun 2023 11:11:44 +0200 Subject: [PATCH 48/51] WEBITOOLS-185: update batches to run integration jobs --- .../console/tools/testbatches/create-application-integ-test.bat | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/aip-console-tools-cli/src/test/java/com/castsoftware/aip/console/tools/testbatches/create-application-integ-test.bat b/aip-console-tools-cli/src/test/java/com/castsoftware/aip/console/tools/testbatches/create-application-integ-test.bat index e7c337b2..da7e4d12 100644 --- a/aip-console-tools-cli/src/test/java/com/castsoftware/aip/console/tools/testbatches/create-application-integ-test.bat +++ b/aip-console-tools-cli/src/test/java/com/castsoftware/aip/console/tools/testbatches/create-application-integ-test.bat @@ -26,7 +26,7 @@ if not defined TOOLSDIR ( if not exist %TOOLSDIR%\%TOOLS_EXTENSION%.zip ( @echo ===== Processing NUPKG artifact version %TOOLS_VERSION% ========== -7z.exe e "%DEV_ARTIFACT%\upload\com.castsoftware.aip.console.tools.%TOOLS_VERSION%.nupkg" -y -o"%TOOLSDIR%" %TOOLS_EXTENSION%.zip +7z.exe e "%DEV_ARTIFACT%\upload\com.castsoftware.aip.console.tools*.nupkg" -y -o"%TOOLSDIR%" %TOOLS_EXTENSION%.zip REM @echo. REM @echo ERROR : %TOOLSDIR%\%TOOLS_EXTENSION%.zip file should be downloaded from DEV Build job ... REM @echo. From 1d70e0e668e0039487c3230c6c821eee64062043 Mon Sep 17 00:00:00 2001 From: leon2Meudon92 Date: Thu, 29 Jun 2023 11:41:25 +0200 Subject: [PATCH 49/51] WEBITOOLS-185: update batches to run integration jobs --- .../tools/testbatches/Publish-Imaging-integ-tests.bat | 6 +++++- .../tools/testbatches/add-rescan-version-integ-test.bat | 6 +++++- .../tools/testbatches/analyze-version-integ-test.bat | 7 +++++-- .../tools/testbatches/deept-analysis-integ-test.bat | 6 +++++- .../tools/testbatches/deliver-version-integ-test.bat | 7 ++++++- .../aip/console/tools/testbatches/fast-scan-integ-test.bat | 6 +++++- .../tools/testbatches/snapshot-version-integ-test.bat | 7 +++++-- 7 files changed, 36 insertions(+), 9 deletions(-) diff --git a/aip-console-tools-cli/src/test/java/com/castsoftware/aip/console/tools/testbatches/Publish-Imaging-integ-tests.bat b/aip-console-tools-cli/src/test/java/com/castsoftware/aip/console/tools/testbatches/Publish-Imaging-integ-tests.bat index d82aa670..235f21c7 100644 --- a/aip-console-tools-cli/src/test/java/com/castsoftware/aip/console/tools/testbatches/Publish-Imaging-integ-tests.bat +++ b/aip-console-tools-cli/src/test/java/com/castsoftware/aip/console/tools/testbatches/Publish-Imaging-integ-tests.bat @@ -3,7 +3,7 @@ REM -- Publish existing application data to Imaging -- SET SERVER_URL=%~1 SET API_KEY=%~2 SET APP_NAME=%~3 -set TOOLS_EXTENSION=com.castsoftware.aip.console.tools +set TOOLS_EXTENSION=com.castsoftware.aip.console.tools.%TOOLS_VERSION% set EXTEND_URL=https://extend.castsoftware.com set PATH=C:\CAST-Caches\Win64;%PATH% @@ -15,6 +15,10 @@ for %%a in ( TOOLSDIR ) do ( exit /b 1 ) ) +if not exist %TOOLSDIR%\%TOOLS_EXTENSION%.zip ( + @echo ===== Processing NUPKG artifact version %TOOLS_VERSION% ========== +7z.exe e "%DEV_ARTIFACT%\upload\com.castsoftware.aip.console.tools*.nupkg" -y -o"%TOOLSDIR%" %TOOLS_EXTENSION%.zip +) echo ---------------------------- echo Unziping the downloaded build artifact echo 7z.exe x "%TOOLSDIR%\%TOOLS_EXTENSION%.zip" -y -o"%TOOLSDIR%\%TOOLS_EXTENSION%" diff --git a/aip-console-tools-cli/src/test/java/com/castsoftware/aip/console/tools/testbatches/add-rescan-version-integ-test.bat b/aip-console-tools-cli/src/test/java/com/castsoftware/aip/console/tools/testbatches/add-rescan-version-integ-test.bat index 6f4c032f..c2f3fd70 100644 --- a/aip-console-tools-cli/src/test/java/com/castsoftware/aip/console/tools/testbatches/add-rescan-version-integ-test.bat +++ b/aip-console-tools-cli/src/test/java/com/castsoftware/aip/console/tools/testbatches/add-rescan-version-integ-test.bat @@ -7,7 +7,7 @@ SET IN_PLACE_MODE=%~4 SET DOMAIN_NAME=%~5 SET CSS=%~6 REM SET NODE_NAME=%~7 -set TOOLS_EXTENSION=com.castsoftware.aip.console.tools +set TOOLS_EXTENSION=com.castsoftware.aip.console.tools.%TOOLS_VERSION% set EXTEND_URL=https://extend.castsoftware.com set PATH=C:\CAST-Caches\Win64;%PATH% @@ -39,6 +39,10 @@ for %%a in ( SOURCES_ZIP TOOLSDIR ) do ( exit /b 1 ) ) +if not exist %TOOLSDIR%\%TOOLS_EXTENSION%.zip ( + @echo ===== Processing NUPKG artifact version %TOOLS_VERSION% ========== +7z.exe e "%DEV_ARTIFACT%\upload\com.castsoftware.aip.console.tools*.nupkg" -y -o"%TOOLSDIR%" %TOOLS_EXTENSION%.zip +) echo ---------------------------- echo Unzip the downloaded build artifact echo 7z.exe x "%TOOLSDIR%\%TOOLS_EXTENSION%.zip" -y -o"%TOOLSDIR%\%TOOLS_EXTENSION%" diff --git a/aip-console-tools-cli/src/test/java/com/castsoftware/aip/console/tools/testbatches/analyze-version-integ-test.bat b/aip-console-tools-cli/src/test/java/com/castsoftware/aip/console/tools/testbatches/analyze-version-integ-test.bat index dff73626..ce1df976 100644 --- a/aip-console-tools-cli/src/test/java/com/castsoftware/aip/console/tools/testbatches/analyze-version-integ-test.bat +++ b/aip-console-tools-cli/src/test/java/com/castsoftware/aip/console/tools/testbatches/analyze-version-integ-test.bat @@ -5,7 +5,7 @@ SET API_KEY=%~2 SET APP_NAME=%~3 SET VERSION_NAME=%~4 -set TOOLS_EXTENSION=com.castsoftware.aip.console.tools +set TOOLS_EXTENSION=com.castsoftware.aip.console.tools.%TOOLS_VERSION% set EXTEND_URL=https://extend.castsoftware.com set PATH=C:\CAST-Caches\Win64;%PATH% @@ -30,7 +30,10 @@ for %%a in ( VERSION_NAME APP_NAME TOOLSDIR) do ( exit /b 1 ) ) - +if not exist %TOOLSDIR%\%TOOLS_EXTENSION%.zip ( + @echo ===== Processing NUPKG artifact version %TOOLS_VERSION% ========== +7z.exe e "%DEV_ARTIFACT%\upload\com.castsoftware.aip.console.tools*.nupkg" -y -o"%TOOLSDIR%" %TOOLS_EXTENSION%.zip +) echo ---------------------------- echo Unzip the downloaded build artifact echo 7z.exe x "%TOOLSDIR%\%TOOLS_EXTENSION%.zip" -y -o"%TOOLSDIR%\%TOOLS_EXTENSION%" diff --git a/aip-console-tools-cli/src/test/java/com/castsoftware/aip/console/tools/testbatches/deept-analysis-integ-test.bat b/aip-console-tools-cli/src/test/java/com/castsoftware/aip/console/tools/testbatches/deept-analysis-integ-test.bat index 771f9ff8..5645e9d0 100644 --- a/aip-console-tools-cli/src/test/java/com/castsoftware/aip/console/tools/testbatches/deept-analysis-integ-test.bat +++ b/aip-console-tools-cli/src/test/java/com/castsoftware/aip/console/tools/testbatches/deept-analysis-integ-test.bat @@ -3,7 +3,7 @@ REM -- Onboard application -- SET SERVER_URL=%~1 SET API_KEY=%~2 SET APP_NAME=%~3 -set TOOLS_EXTENSION=com.castsoftware.aip.console.tools +set TOOLS_EXTENSION=com.castsoftware.aip.console.tools.%TOOLS_VERSION% set EXTEND_URL=https://extend.castsoftware.com set PATH=C:\CAST-Caches\Win64;%PATH% @@ -21,6 +21,10 @@ for %%a in ( SOURCES_ZIP TOOLSDIR ) do ( exit /b 1 ) ) +if not exist %TOOLSDIR%\%TOOLS_EXTENSION%.zip ( + @echo ===== Processing NUPKG artifact version %TOOLS_VERSION% ========== +7z.exe e "%DEV_ARTIFACT%\upload\com.castsoftware.aip.console.tools*.nupkg" -y -o"%TOOLSDIR%" %TOOLS_EXTENSION%.zip +) echo ---------------------------- echo Unzip the downloaded build artifact echo 7z.exe x "%TOOLSDIR%\%TOOLS_EXTENSION%.zip" -y -o"%TOOLSDIR%\%TOOLS_EXTENSION%" diff --git a/aip-console-tools-cli/src/test/java/com/castsoftware/aip/console/tools/testbatches/deliver-version-integ-test.bat b/aip-console-tools-cli/src/test/java/com/castsoftware/aip/console/tools/testbatches/deliver-version-integ-test.bat index 0f27b512..a35e6f7b 100644 --- a/aip-console-tools-cli/src/test/java/com/castsoftware/aip/console/tools/testbatches/deliver-version-integ-test.bat +++ b/aip-console-tools-cli/src/test/java/com/castsoftware/aip/console/tools/testbatches/deliver-version-integ-test.bat @@ -7,7 +7,7 @@ SET IN_PLACE_MODE=%~4 SET DOMAIN_NAME=%~5 SET CSS=%~6 REM SET NODE_NAME=%~7 -set TOOLS_EXTENSION=com.castsoftware.aip.console.tools +set TOOLS_EXTENSION=com.castsoftware.aip.console.tools.%TOOLS_VERSION% set EXTEND_URL=https://extend.castsoftware.com set PATH=C:\CAST-Caches\Win64;%PATH% @@ -37,6 +37,11 @@ for %%a in ( SOURCES_ZIP TOOLSDIR ) do ( exit /b 1 ) ) +if not exist %TOOLSDIR%\%TOOLS_EXTENSION%.zip ( + @echo ===== Processing NUPKG artifact version %TOOLS_VERSION% ========== +7z.exe e "%DEV_ARTIFACT%\upload\com.castsoftware.aip.console.tools*.nupkg" -y -o"%TOOLSDIR%" %TOOLS_EXTENSION%.zip +) + echo ---------------------------- echo Unzip the downloaded build artifact echo 7z.exe x "%TOOLSDIR%\%TOOLS_EXTENSION%.zip" -y -o"%TOOLSDIR%\%TOOLS_EXTENSION%" diff --git a/aip-console-tools-cli/src/test/java/com/castsoftware/aip/console/tools/testbatches/fast-scan-integ-test.bat b/aip-console-tools-cli/src/test/java/com/castsoftware/aip/console/tools/testbatches/fast-scan-integ-test.bat index 7334f364..92745a51 100644 --- a/aip-console-tools-cli/src/test/java/com/castsoftware/aip/console/tools/testbatches/fast-scan-integ-test.bat +++ b/aip-console-tools-cli/src/test/java/com/castsoftware/aip/console/tools/testbatches/fast-scan-integ-test.bat @@ -4,7 +4,7 @@ SET SERVER_URL=%~1 SET API_KEY=%~2 SET APP_NAME=%~3 SET DOMAIN_NAME=%~4 -set TOOLS_EXTENSION=com.castsoftware.aip.console.tools +set TOOLS_EXTENSION=com.castsoftware.aip.console.tools.%TOOLS_VERSION% set EXTEND_URL=https://extend.castsoftware.com set PATH=C:\CAST-Caches\Win64;%PATH% @@ -23,6 +23,10 @@ for %%a in ( SOURCES_ZIP TOOLSDIR ) do ( exit /b 1 ) ) +if not exist %TOOLSDIR%\%TOOLS_EXTENSION%.zip ( + @echo ===== Processing NUPKG artifact version %TOOLS_VERSION% ========== +7z.exe e "%DEV_ARTIFACT%\upload\com.castsoftware.aip.console.tools*.nupkg" -y -o"%TOOLSDIR%" %TOOLS_EXTENSION%.zip +) echo ---------------------------- echo Unzip the downloaded build artifact echo 7z.exe x "%TOOLSDIR%\%TOOLS_EXTENSION%.zip" -y -o"%TOOLSDIR%\%TOOLS_EXTENSION%" diff --git a/aip-console-tools-cli/src/test/java/com/castsoftware/aip/console/tools/testbatches/snapshot-version-integ-test.bat b/aip-console-tools-cli/src/test/java/com/castsoftware/aip/console/tools/testbatches/snapshot-version-integ-test.bat index 17b2bc39..bddc07f1 100644 --- a/aip-console-tools-cli/src/test/java/com/castsoftware/aip/console/tools/testbatches/snapshot-version-integ-test.bat +++ b/aip-console-tools-cli/src/test/java/com/castsoftware/aip/console/tools/testbatches/snapshot-version-integ-test.bat @@ -6,7 +6,7 @@ SET APP_NAME=%~3 SET VERSION_NAME=%~4 SET SNAPSHOT_NAME=%~5 -set TOOLS_EXTENSION=com.castsoftware.aip.console.tools +set TOOLS_EXTENSION=com.castsoftware.aip.console.tools.%TOOLS_VERSION% set EXTEND_URL=https://extend.castsoftware.com set PATH=C:\CAST-Caches\Win64;%PATH% @@ -27,7 +27,10 @@ for %%a in ( VERSION_NAME APP_NAME SNAPSHOT_NAME TOOLSDIR) do ( exit /b 1 ) ) - +if not exist %TOOLSDIR%\%TOOLS_EXTENSION%.zip ( + @echo ===== Processing NUPKG artifact version %TOOLS_VERSION% ========== +7z.exe e "%DEV_ARTIFACT%\upload\com.castsoftware.aip.console.tools*.nupkg" -y -o"%TOOLSDIR%" %TOOLS_EXTENSION%.zip +) echo ---------------------------- echo Unzip the downloaded build artifact echo 7z.exe x "%TOOLSDIR%\%TOOLS_EXTENSION%.zip" -y -o"%TOOLSDIR%\%TOOLS_EXTENSION%" From 977b24a6bcb6d2e0882ada7c9249990b63578e1d Mon Sep 17 00:00:00 2001 From: leon2Meudon92 Date: Fri, 30 Jun 2023 11:45:38 +0200 Subject: [PATCH 50/51] WEBITOOLS-185: update architecture studio batch --- ...tecture-Studio-Model-Check-integ-tests.bat | 42 +++++++++++++++++++ 1 file changed, 42 insertions(+) create mode 100644 aip-console-tools-cli/src/test/java/com/castsoftware/aip/console/tools/testbatches/Architecture-Studio-Model-Check-integ-tests.bat diff --git a/aip-console-tools-cli/src/test/java/com/castsoftware/aip/console/tools/testbatches/Architecture-Studio-Model-Check-integ-tests.bat b/aip-console-tools-cli/src/test/java/com/castsoftware/aip/console/tools/testbatches/Architecture-Studio-Model-Check-integ-tests.bat new file mode 100644 index 00000000..8b0387a0 --- /dev/null +++ b/aip-console-tools-cli/src/test/java/com/castsoftware/aip/console/tools/testbatches/Architecture-Studio-Model-Check-integ-tests.bat @@ -0,0 +1,42 @@ +@echo off +REM -- Check architecture model against an application -- +SET SERVER_URL=%~1 +SET API_KEY=%~2 +SET APP_NAME=%~3 +SET MODEL_CHECK_REPORT_PATH=%~4 +SET MODEL_NAME=%~5 +SET UPLOAD_FILE_PATH=%~6 +set TOOLS_EXTENSION=com.castsoftware.aip.console.tools.%TOOLS_VERSION% +set EXTEND_URL=https://extend.castsoftware.com +set PATH=C:\CAST-Caches\Win64;%PATH% + +for %%a in ( TOOLSDIR ) do ( + if not defined %%a ( + @echo. + @echo ERROR : Environment variable %%a should exist as environment var... + @echo. + exit /b 1 + ) +) +if not exist %TOOLSDIR%\%TOOLS_EXTENSION%.zip ( + @echo ===== Processing NUPKG artifact version %TOOLS_VERSION% ========== +7z.exe e "%DEV_ARTIFACT%\upload\com.castsoftware.aip.console.tools*.nupkg" -y -o"%TOOLSDIR%" %TOOLS_EXTENSION%.zip +) +echo ---------------------------- +echo Unziping the downloaded build artifact +echo 7z.exe x "%TOOLSDIR%\%TOOLS_EXTENSION%.zip" -y -o"%TOOLSDIR%\%TOOLS_EXTENSION%" +echo ---------------------------- +7z.exe x "%TOOLSDIR%\%TOOLS_EXTENSION%.zip" -y -o"%TOOLSDIR%\%TOOLS_EXTENSION%" + +echo -- Check architecture model against an application -- +echo java -jar aip-console-tools-cli.jar ArchitectureStudioModelChecker --server-url="%SERVER_URL%" --apikey="%API_KEY%" --timeout=5000 ^ + --app-name="%APP_NAME%" --model-name="%MODEL_NAME%" --report-path="%MODEL_CHECK_REPORT_PATH" --file-path="%UPLOAD_FILE_PATH" --verbose=%VERBOSE% +echo -------------------------------- + +SET TOOLS_CLI_PATH=%TOOLSDIR%\%TOOLS_EXTENSION% +CD /d "%TOOLS_CLI_PATH%" + +java -jar aip-console-tools-cli.jar ArchitectureStudioModelChecker --server-url="%SERVER_URL%" --apikey="%API_KEY%" --timeout=5000 ^ + --app-name="%APP_NAME%" --model-name="%MODEL_NAME%" --report-path="%MODEL_CHECK_REPORT_PATH" --file-path="%UPLOAD_FILE_PATH" --verbose=%VERBOSE% + +echo exit code=%errorlevel% \ No newline at end of file From 8b97ed393afcbf6da050f175bf765ab2a248f8ee Mon Sep 17 00:00:00 2001 From: leon2Meudon92 Date: Thu, 9 Nov 2023 10:43:15 +0100 Subject: [PATCH 51/51] WEBITOOLS-200: Updated batches for integration tests with jenkins jobs --- .../testbatches/deept-analysis-integ-test.bat | 2 +- .../testbatches/fast-scan-integ-test.bat | 2 +- .../onboard-application-integ-test.bat | 53 +++++++++++++++++++ 3 files changed, 55 insertions(+), 2 deletions(-) create mode 100644 aip-console-tools-cli/src/test/java/com/castsoftware/aip/console/tools/testbatches/onboard-application-integ-test.bat diff --git a/aip-console-tools-cli/src/test/java/com/castsoftware/aip/console/tools/testbatches/deept-analysis-integ-test.bat b/aip-console-tools-cli/src/test/java/com/castsoftware/aip/console/tools/testbatches/deept-analysis-integ-test.bat index 5645e9d0..c55698bd 100644 --- a/aip-console-tools-cli/src/test/java/com/castsoftware/aip/console/tools/testbatches/deept-analysis-integ-test.bat +++ b/aip-console-tools-cli/src/test/java/com/castsoftware/aip/console/tools/testbatches/deept-analysis-integ-test.bat @@ -34,7 +34,7 @@ echo ---------------------------- echo -- Onboard application to CAST Imaging Console -- echo -- DEEP-ANALYSIS echo OPTIONS= %MORE_OPTIONS% -echo java -jar aip-console-tools-cli.jar Onboard-Application --server-url="%SERVER_URL%" --apikey="%API_KEY%" --timeout=5000 ^ +echo java -jar aip-console-tools-cli.jar Deep-Analyze --server-url="%SERVER_URL%" --apikey="%API_KEY%" --timeout=5000 ^ --app-name="%APP_NAME%" --verbose=%VERBOSE% ^ %MORE_OPTIONS% echo -------------------------------- diff --git a/aip-console-tools-cli/src/test/java/com/castsoftware/aip/console/tools/testbatches/fast-scan-integ-test.bat b/aip-console-tools-cli/src/test/java/com/castsoftware/aip/console/tools/testbatches/fast-scan-integ-test.bat index 92745a51..e4e2347f 100644 --- a/aip-console-tools-cli/src/test/java/com/castsoftware/aip/console/tools/testbatches/fast-scan-integ-test.bat +++ b/aip-console-tools-cli/src/test/java/com/castsoftware/aip/console/tools/testbatches/fast-scan-integ-test.bat @@ -36,7 +36,7 @@ echo ---------------------------- echo -- Onboard application to CAST Imaging Console -- echo -- FAST-SCAN echo OPTIONS= %MORE_OPTIONS% -echo java -jar aip-console-tools-cli.jar Onboard-Application --server-url="%SERVER_URL%" --apikey="%API_KEY%" --timeout=5000 ^ +echo java -jar aip-console-tools-cli.jar FAst-Scan --server-url="%SERVER_URL%" --apikey="%API_KEY%" --timeout=5000 ^ --app-name="%APP_NAME%" --verbose=%VERBOSE% ^ %MORE_OPTIONS% echo -------------------------------- diff --git a/aip-console-tools-cli/src/test/java/com/castsoftware/aip/console/tools/testbatches/onboard-application-integ-test.bat b/aip-console-tools-cli/src/test/java/com/castsoftware/aip/console/tools/testbatches/onboard-application-integ-test.bat new file mode 100644 index 00000000..85023d08 --- /dev/null +++ b/aip-console-tools-cli/src/test/java/com/castsoftware/aip/console/tools/testbatches/onboard-application-integ-test.bat @@ -0,0 +1,53 @@ +@echo off +REM -- Onboard-application All-in-one -- +SET SERVER_URL=%~1 +SET API_KEY=%~2 +SET APP_NAME=%~3 +SET DOMAIN_NAME=%~4 +set TOOLS_EXTENSION=com.castsoftware.aip.console.tools.%TOOLS_VERSION% +set EXTEND_URL=https://extend.castsoftware.com +set PATH=C:\CAST-Caches\Win64;%PATH% + +REM +SET MORE_OPTIONS=--file="%SOURCES_ZIP%" +if not "%EXCLUSION_PATTERNS%" == "" SET MORE_OPTIONS=%MORE_OPTIONS% --exclude-patterns="%EXCLUSION_PATTERNS%" +if not "%EXCLUSION_RULES%" == "" SET MORE_OPTIONS=%MORE_OPTIONS% --exclusion-rules="%EXCLUSION_RULES%" +if not "%DOMAIN_NAME%" == "" SET MORE_OPTIONS=%MORE_OPTIONS% --domain-name="%DOMAIN_NAME%" +if not "%SLEEP_DURATION%" == "" SET MORE_OPTIONS=%MORE_OPTIONS% --sleep-duration="%SLEEP_DURATION%" +if not "%SNAPSHOT_NAME%" == "" SET MORE_OPTIONS=%MORE_OPTIONS% --snapshot-name="%SNAPSHOT_NAME%" +if not "%MODULE_GENERATION_TYPE%" == "" SET MORE_OPTIONS=%MORE_OPTIONS% --module-option="%MODULE_GENERATION_TYPE%" + +for %%a in ( SOURCES_ZIP TOOLSDIR ) do ( + if not defined %%a ( + @echo. + @echo ERROR : Environment variable %%a should exist as environment var... + @echo. + exit /b 1 + ) +) +if not exist %TOOLSDIR%\%TOOLS_EXTENSION%.zip ( + @echo ===== Processing NUPKG artifact version %TOOLS_VERSION% ========== +7z.exe e "%DEV_ARTIFACT%\upload\com.castsoftware.aip.console.tools*.nupkg" -y -o"%TOOLSDIR%" %TOOLS_EXTENSION%.zip +) +echo ---------------------------- +echo Unzip the downloaded build artifact +echo 7z.exe x "%TOOLSDIR%\%TOOLS_EXTENSION%.zip" -y -o"%TOOLSDIR%\%TOOLS_EXTENSION%" +echo ---------------------------- +7z.exe x "%TOOLSDIR%\%TOOLS_EXTENSION%.zip" -y -o"%TOOLSDIR%\%TOOLS_EXTENSION%" + +echo -- Onboard application to CAST Imaging Console -- +echo -- FAST-SCAN +echo OPTIONS= %MORE_OPTIONS% +echo java -jar aip-console-tools-cli.jar Onboard-Application --server-url="%SERVER_URL%" --apikey="%API_KEY%" --timeout=5000 ^ + --app-name="%APP_NAME%" --verbose=%VERBOSE% ^ + %MORE_OPTIONS% +echo -------------------------------- +SET TOOLS_CLI_PATH=%TOOLSDIR%\%TOOLS_EXTENSION% +CD /d "%TOOLS_CLI_PATH%" + +java -jar aip-console-tools-cli.jar Onboard-Application --server-url="%SERVER_URL%" --apikey="%API_KEY%" --timeout=5000 ^ + --app-name="%APP_NAME%" --verbose=false ^ + %MORE_OPTIONS% + +echo exit code=%errorlevel% +