From eada79cf881ab2c235615f6705fed6cdb886f213 Mon Sep 17 00:00:00 2001 From: Augusto Date: Wed, 1 Jan 2025 22:11:52 +0100 Subject: [PATCH 1/4] First approximation --- Jenkinsfile | 144 ++++++------ .../EShopOnContainersSystemResources.json | 218 ++++++++++++++++++ .../configurations/retorch-ciinfo.json | 10 - .../configurations/retorchCI.properties | 8 + retorchfiles/envfiles/tjoba.env | 18 ++ retorchfiles/envfiles/tjobb.env | 18 ++ retorchfiles/envfiles/tjobc.env | 28 +-- retorchfiles/envfiles/tjobd.env | 28 +-- retorchfiles/envfiles/tjobe.env | 28 +-- .../EShopOnContainersSystemResources.json | 90 -------- .../scripts/coilifecycles/coi-setup.sh | 3 + .../scripts/coilifecycles/coi-teardown.sh | 6 +- retorchfiles/scripts/printLog.sh | 3 +- retorchfiles/scripts/savetjoblifecycledata.sh | 5 +- retorchfiles/scripts/storeContainerLogs.sh | 3 + .../scripts/tjoblifecycles/tjob-setup.sh | 10 +- .../scripts/tjoblifecycles/tjob-teardown.sh | 5 +- .../tjoblifecycles/tjob-testexecution.sh | 3 + retorchfiles/scripts/waitforSUT.sh | 5 +- retorchfiles/scripts/writetime.sh | 2 + .../e2e/functional/tests/CatalogTests.java | 10 - .../tests/DesktopAPIGatewayAPITests.java | 6 +- .../e2e/functional/tests/LoggedUserTest.java | 9 +- .../e2e/functional/tests/OrderTests.java | 19 +- 24 files changed, 420 insertions(+), 259 deletions(-) create mode 100644 retorchfiles/configurations/EShopOnContainersSystemResources.json delete mode 100644 retorchfiles/configurations/retorch-ciinfo.json create mode 100644 retorchfiles/configurations/retorchCI.properties create mode 100644 retorchfiles/envfiles/tjoba.env create mode 100644 retorchfiles/envfiles/tjobb.env delete mode 100644 retorchfiles/resources/EShopOnContainersSystemResources.json diff --git a/Jenkinsfile b/Jenkinsfile index 1b0f56c2..e72c1238 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -4,94 +4,94 @@ pipeline { SELENOID_PRESENT = "TRUE" SUT_LOCATION = "$WORKSPACE/sut/src" SCRIPTS_FOLDER = "$WORKSPACE/retorchfiles/scripts" - }// EndEnvironment + } // EndEnvironment options { disableConcurrentBuilds() - }// EndPipOptions - stages{ + } // EndPipOptions + stages { stage('Clean Workspace') { - steps{ + steps { cleanWs() - }// EndStepsCleanWS - }// EndStageCleanWS + } // EndStepsCleanWS + } // EndStageCleanWS stage('Clone Project') { - steps{ + steps { checkout scm - }// EndStepsCloneProject - }// EndStageCloneProject + } // EndStepsCloneProject + } // EndStageCloneProject stage('SETUP-Infrastructure') { - steps{ + steps { sh 'chmod +x -R $SCRIPTS_FOLDER' sh '$SCRIPTS_FOLDER/coilifecycles/coi-setup.sh' - }// EndStepsSETUPINF - }// EndStageSETUPInf - stage('Stage 0'){ + } // EndStepsSETUPINF + } // EndStageSETUPInf + stage('Stage 0') { failFast false - parallel{ - stage('TJobC IdResource: basket-api catalog-api chrome-browser eshopUser identity-api webmvc ') { + parallel { + stage('tjoba IdResource: basket-api catalog-api chrome-browser eshopUser identity-api webmvc ') { steps { - catchError(buildResult: 'UNSTABLE', stageResult: 'FAILURE') { - sh '$SCRIPTS_FOLDER/tjoblifecycles/tjob-setup.sh tjobc 0' - sh '$SCRIPTS_FOLDER/tjoblifecycles/tjob-testexecution.sh tjobc 0 http:// 5000 "CatalogTests#addProductsToBasket"' - }// EndExecutionStageErrorTJobC - sh '$SCRIPTS_FOLDER/tjoblifecycles/tjob-teardown.sh tjobc 0' - }// EndStepsTJobC - }// EndStageTJobC - stage('TJobD IdResource: catalog-api chrome-browser eshopUser identity-api webmvc ') { + catchError(buildResult: 'UNSTABLE', stageResult: 'FAILURE') { + sh '$SCRIPTS_FOLDER/tjoblifecycles/tjob-setup.sh tjoba 0' + sh '$SCRIPTS_FOLDER/tjoblifecycles/tjob-testexecution.sh tjoba 0 http:// 5000 "CatalogTests#addProductsToBasket"' + }// EndExecutionStageErrortjoba + sh '$SCRIPTS_FOLDER/tjoblifecycles/tjob-teardown.sh tjoba 0' + }// EndStepstjoba + }// EndStagetjoba + stage('tjobb IdResource: catalog-api chrome-browser eshopUser identity-api webmvc ') { steps { - catchError(buildResult: 'UNSTABLE', stageResult: 'FAILURE') { - sh '$SCRIPTS_FOLDER/tjoblifecycles/tjob-setup.sh tjobd 0' - sh '$SCRIPTS_FOLDER/tjoblifecycles/tjob-testexecution.sh tjobd 0 http:// 5012 "LoggedUserTest#loginTest"' - }// EndExecutionStageErrorTJobD - sh '$SCRIPTS_FOLDER/tjoblifecycles/tjob-teardown.sh tjobd 0' - }// EndStepsTJobD - }// EndStageTJobD - stage('TJobE IdResource: basket-api eshopUser identity-api ') { + catchError(buildResult: 'UNSTABLE', stageResult: 'FAILURE') { + sh '$SCRIPTS_FOLDER/tjoblifecycles/tjob-setup.sh tjobb 0' + sh '$SCRIPTS_FOLDER/tjoblifecycles/tjob-testexecution.sh tjobb 0 http:// 5012 "LoggedUserTest#loginTest"' + }// EndExecutionStageErrortjobb + sh '$SCRIPTS_FOLDER/tjoblifecycles/tjob-teardown.sh tjobb 0' + }// EndStepstjobb + }// EndStagetjobb + stage('tjobc IdResource: basket-api eshopUser identity-api ') { steps { - catchError(buildResult: 'UNSTABLE', stageResult: 'FAILURE') { - sh '$SCRIPTS_FOLDER/tjoblifecycles/tjob-setup.sh tjobe 0' - sh '$SCRIPTS_FOLDER/tjoblifecycles/tjob-testexecution.sh tjobe 0 http:// 5024 "DesktopAPIGatewayAPITests#testAddProductsBasket"' - }// EndExecutionStageErrorTJobE - sh '$SCRIPTS_FOLDER/tjoblifecycles/tjob-teardown.sh tjobe 0' - }// EndStepsTJobE - }// EndStageTJobE - stage('TJobF IdResource: basket-api catalog-api chrome-browser eshopUser identity-api ordering-api payment-api webmvc ') { + catchError(buildResult: 'UNSTABLE', stageResult: 'FAILURE') { + sh '$SCRIPTS_FOLDER/tjoblifecycles/tjob-setup.sh tjobc 0' + sh '$SCRIPTS_FOLDER/tjoblifecycles/tjob-testexecution.sh tjobc 0 http:// 5024 "DesktopAPIGatewayAPITests#testAddProductsBasket"' + }// EndExecutionStageErrortjobc + sh '$SCRIPTS_FOLDER/tjoblifecycles/tjob-teardown.sh tjobc 0' + }// EndStepstjobc + }// EndStagetjobc + stage('tjobd IdResource: basket-api catalog-api chrome-browser eshopUser identity-api ordering-api payment-api webmvc ') { steps { - catchError(buildResult: 'UNSTABLE', stageResult: 'FAILURE') { - sh '$SCRIPTS_FOLDER/tjoblifecycles/tjob-setup.sh tjobf 0' - sh '$SCRIPTS_FOLDER/tjoblifecycles/tjob-testexecution.sh tjobf 0 http:// 5036 "OrderTests#testCancelOrder,OrderTests#testCreateNewOrder"' - }// EndExecutionStageErrorTJobF - sh '$SCRIPTS_FOLDER/tjoblifecycles/tjob-teardown.sh tjobf 0' - }// EndStepsTJobF - }// EndStageTJobF - }// End Parallel - }// End Stage - stage('Stage 1'){ + catchError(buildResult: 'UNSTABLE', stageResult: 'FAILURE') { + sh '$SCRIPTS_FOLDER/tjoblifecycles/tjob-setup.sh tjobd 0' + sh '$SCRIPTS_FOLDER/tjoblifecycles/tjob-testexecution.sh tjobd 0 http:// 5036 "OrderTests#testCancelOrder,OrderTests#testCreateNewOrder"' + }// EndExecutionStageErrortjobd + sh '$SCRIPTS_FOLDER/tjoblifecycles/tjob-teardown.sh tjobd 0' + }// EndStepstjobd + }// EndStagetjobd + } // End Parallel + } // End Stage + stage('Stage 1') { failFast false - parallel{ - stage('TJobG IdResource: catalog-api chrome-browser webmvc ') { + parallel { + stage('tjobe IdResource: catalog-api chrome-browser webmvc ') { steps { - catchError(buildResult: 'UNSTABLE', stageResult: 'FAILURE') { - sh '$SCRIPTS_FOLDER/tjoblifecycles/tjob-setup.sh tjobg 1' - sh '$SCRIPTS_FOLDER/tjoblifecycles/tjob-testexecution.sh tjobg 1 http:// 5048 "CatalogTests#FilterProductsByBrandType"' - }// EndExecutionStageErrorTJobG - sh '$SCRIPTS_FOLDER/tjoblifecycles/tjob-teardown.sh tjobg 1' - }// EndStepsTJobG - }// EndStageTJobG - }// End Parallel - }// End Stage + catchError(buildResult: 'UNSTABLE', stageResult: 'FAILURE') { + sh '$SCRIPTS_FOLDER/tjoblifecycles/tjob-setup.sh tjobe 1' + sh '$SCRIPTS_FOLDER/tjoblifecycles/tjob-testexecution.sh tjobe 1 http:// 5048 "CatalogTests#FilterProductsByBrandType"' + }// EndExecutionStageErrortjobe + sh '$SCRIPTS_FOLDER/tjoblifecycles/tjob-teardown.sh tjobe 1' + }// EndStepstjobe + }// EndStagetjobe + } // End Parallel + } // End Stage stage('TEARDOWN-Infrastructure') { failFast false steps { - sh '$SCRIPTS_FOLDER/coilifecycles/coi-teardown.sh' - }// EndStepsTearDownInf -}// EndStageTearDown - }// EndStagesPipeline - post { - always { - archiveArtifacts artifacts: 'artifacts/*.csv', onlyIfSuccessful: true - archiveArtifacts artifacts: 'target/testlogs/**/*.*', onlyIfSuccessful: false - archiveArtifacts artifacts: 'target/containerlogs/**/*.*', onlyIfSuccessful: false - }//EndAlways - }//EndPostActions -}// EndPipeline + sh '$SCRIPTS_FOLDER/coilifecycles/coi-teardown.sh' + } // EndStepsTearDownInf +} // EndStageTearDown +} // EndStagesPipeline +post { + always { + archiveArtifacts artifacts: 'artifacts/*.csv', onlyIfSuccessful: true + archiveArtifacts artifacts: 'target/testlogs/**/*.*', onlyIfSuccessful: false + archiveArtifacts artifacts: 'target/containerlogs/**/*.*', onlyIfSuccessful: false + }// EndAlways +} // EndPostActions +} // EndPipeline diff --git a/retorchfiles/configurations/EShopOnContainersSystemResources.json b/retorchfiles/configurations/EShopOnContainersSystemResources.json new file mode 100644 index 00000000..450a0a0f --- /dev/null +++ b/retorchfiles/configurations/EShopOnContainersSystemResources.json @@ -0,0 +1,218 @@ +{ + "webmvc": { + "hierarchyParent": [], + "replaceable": [], + "elasticityModel": { + "elasticityID": "elasModelWebMvc", + "elasticity": 5, + "elasticityCost": 10.0 + }, + "resourceType": "LOGICAL", + "resourceID": "webmvc", + "minimalCapacities": [ + { + "name": "memory", + "quantity": 0.048 + }, + { + "name": "processor", + "quantity": 0.25 + }, + { + "name": "storage", + "quantity": 0.31 + } + ], + "dockerImage": "mediaserver;eexit/mirror-http-server" + + }, + "identity-api": { + "hierarchyParent": [], + "replaceable": [], + "elasticityModel": { + "elasticityID": "elasModelIdentityApi", + "elasticity": 5, + "elasticityCost": 25.0 + }, + "resourceType": "LOGICAL", + "resourceID": "identity-api", + "minimalCapacities": [ + { + "name": "memory", + "quantity": 0.048 + }, + { + "name": "processor", + "quantity": 0.25 + }, + { + "name": "storage", + "quantity": 0.31 + } + ], + "dockerImage": "mediaserver;eexit/mirror-http-server" + + }, + "catalog-api": { + "hierarchyParent": [], + "replaceable": [], + "elasticityModel": { + "elasticityID": "elasModelCatalogAPI", + "elasticity": 3, + "elasticityCost": 50.0 + }, + "resourceType": "LOGICAL", + "resourceID": "catalog-api", + "minimalCapacities": [ + { + "name": "memory", + "quantity": 0.048 + }, + { + "name": "processor", + "quantity": 0.25 + }, + { + "name": "storage", + "quantity": 0.31 + } + ], + "dockerImage": "mediaserver;eexit/mirror-http-server" + + }, + "basket-api": { + "hierarchyParent": [], + "replaceable": [], + "elasticityModel": { + "elasticityID": "elasModelBasketApi", + "elasticity": 10, + "elasticityCost": 50.0 + }, + "resourceType": "LOGICAL", + "resourceID": "basket-api", + "minimalCapacities": [ + { + "name": "memory", + "quantity": 0.048 + }, + { + "name": "processor", + "quantity": 0.25 + }, + { + "name": "storage", + "quantity": 0.31 + } + ], + "dockerImage": "mediaserver;eexit/mirror-http-server" + + }, + "chrome-browser": { + "hierarchyParent": [], + "replaceable": [], + "elasticityModel": { + "elasticityID": "elasModelChromeBrowser", + "elasticity": 15, + "elasticityCost": 30.0 + }, + "resourceType": "LOGICAL", + "resourceID": "chrome-browser", + "minimalCapacities": [ + { + "name": "memory", + "quantity": 0.048 + }, + { + "name": "processor", + "quantity": 0.25 + }, + { + "name": "storage", + "quantity": 0.31 + } + ], + "dockerImage": "mediaserver;eexit/mirror-http-server" + + }, + "eshopUser": { + "hierarchyParent": [], + "replaceable": [], + "elasticityModel": { + "elasticityID": "elasModelEshopUser", + "elasticity": 4, + "elasticityCost": 30.0 + }, + "resourceType": "LOGICAL", + "resourceID": "eshopUser", + "minimalCapacities": [ + { + "name": "memory", + "quantity": 0.048 + }, + { + "name": "processor", + "quantity": 0.25 + }, + { + "name": "storage", + "quantity": 0.31 + } + ], + "dockerImage": "mediaserver;eexit/mirror-http-server" + + }, + "ordering-api": { + "hierarchyParent": [], + "replaceable": [], + "elasticityModel": { + "elasticityID": "elasModelOrderingApi", + "elasticity": 5, + "elasticityCost": 15.0 + }, + "resourceType": "LOGICAL", + "resourceID": "ordering-api", + "minimalCapacities": [ + { + "name": "memory", + "quantity": 0.048 + }, + { + "name": "processor", + "quantity": 0.25 + }, + { + "name": "storage", + "quantity": 0.31 + } + ], + "dockerImage": "mediaserver;eexit/mirror-http-server" + + }, + "payment-api": { + "hierarchyParent": [], + "replaceable": [], + "elasticityModel": { + "elasticityID": "elasModelPaymentApi", + "elasticity": 5, + "elasticityCost": 30.0 + }, + "resourceType": "LOGICAL", + "resourceID": "payment-api", + "minimalCapacities": [ + { + "name": "memory", + "quantity": 0.048 + }, + { + "name": "processor", + "quantity": 0.25 + }, + { + "name": "storage", + "quantity": 0.31 + } + ], + "dockerImage": "mediaserver;eexit/mirror-http-server" + + } +} \ No newline at end of file diff --git a/retorchfiles/configurations/retorch-ciinfo.json b/retorchfiles/configurations/retorch-ciinfo.json deleted file mode 100644 index a46eb331..00000000 --- a/retorchfiles/configurations/retorch-ciinfo.json +++ /dev/null @@ -1,10 +0,0 @@ -{ - "agentCIName": "xretorch-agent", - "sut-wait-html": "
", - "sut-location": "$WORKSPACE/sut/src", - "docker-frontend-name": "http://webmvc_", - "docker-frontend-port": "80", - "external-binded-port": "5000", - "external-frontend-url": "http://" - -} \ No newline at end of file diff --git a/retorchfiles/configurations/retorchCI.properties b/retorchfiles/configurations/retorchCI.properties new file mode 100644 index 00000000..08e423ad --- /dev/null +++ b/retorchfiles/configurations/retorchCI.properties @@ -0,0 +1,8 @@ +agentCIName=xretorch-agent +sut-wait-html=
+sut-location=$WORKSPACE/sut/src +docker-frontend-name=http://webmvc_ +docker-frontend-port=80 +external-binded-port=5000 +external-frontend-url=http:// +testsBasePath=./ \ No newline at end of file diff --git a/retorchfiles/envfiles/tjoba.env b/retorchfiles/envfiles/tjoba.env new file mode 100644 index 00000000..3cdf7624 --- /dev/null +++ b/retorchfiles/envfiles/tjoba.env @@ -0,0 +1,18 @@ +# Environment file for the TJob: tjobalike ports, docker images or the tjobname itself. +testsBasePath=./ +mediaserver=eexit/mirror-http-server +tjobname=tjoba +frontend_port=5000 +retorchportj=5010 +retorchportk=5011 +retorchporth=5008 +retorchporti=5009 +retorchportf=5006 +retorchportg=5007 +retorchportd=5004 +retorchporte=5005 +retorchportb=5002 +retorchportc=5003 +retorchporta=5001 +ESHOP_EXTERNAL_DNS_NAME_OR_IP=$DOCKER_HOST_IP +ESHOP_STORAGE_CATALOG_URL=http://webshoppingagg_${tjobname}:80/c/api/v1/catalog/items/[0]/pic/ diff --git a/retorchfiles/envfiles/tjobb.env b/retorchfiles/envfiles/tjobb.env new file mode 100644 index 00000000..ca96d3d5 --- /dev/null +++ b/retorchfiles/envfiles/tjobb.env @@ -0,0 +1,18 @@ +# Environment file for the TJob: tjobblike ports, docker images or the tjobname itself. +testsBasePath=./ +mediaserver=eexit/mirror-http-server +tjobname=tjobb +frontend_port=5012 +retorchportj=5022 +retorchportk=5023 +retorchporth=5020 +retorchporti=5021 +retorchportf=5018 +retorchportg=5019 +retorchportd=5016 +retorchporte=5017 +retorchportb=5014 +retorchportc=5015 +retorchporta=5013 +ESHOP_EXTERNAL_DNS_NAME_OR_IP=$DOCKER_HOST_IP +ESHOP_STORAGE_CATALOG_URL=http://webshoppingagg_${tjobname}:80/c/api/v1/catalog/items/[0]/pic/ diff --git a/retorchfiles/envfiles/tjobc.env b/retorchfiles/envfiles/tjobc.env index 8f190877..1a588fbd 100644 --- a/retorchfiles/envfiles/tjobc.env +++ b/retorchfiles/envfiles/tjobc.env @@ -1,18 +1,18 @@ +# Environment file for the TJob: tjobclike ports, docker images or the tjobname itself. testsBasePath=./ +mediaserver=eexit/mirror-http-server tjobname=tjobc -frontend_port=5000 -MSQLImage=mcr.microsoft.com/mssql/server:2019-latest -retorchportj=5010 -retorchportk=5011 -WebSPAImage=${REGISTRY:-eshop}/webspa:${PLATFORM:-linux}-${TAG:-latest} -retorchporth=5008 -retorchporti=5009 -retorchportf=5006 -retorchportg=5007 -retorchportd=5004 -retorchporte=5005 -retorchportb=5002 -retorchportc=5003 -retorchporta=5001 +frontend_port=5024 +retorchportj=5034 +retorchportk=5035 +retorchporth=5032 +retorchporti=5033 +retorchportf=5030 +retorchportg=5031 +retorchportd=5028 +retorchporte=5029 +retorchportb=5026 +retorchportc=5027 +retorchporta=5025 ESHOP_EXTERNAL_DNS_NAME_OR_IP=$DOCKER_HOST_IP ESHOP_STORAGE_CATALOG_URL=http://webshoppingagg_${tjobname}:80/c/api/v1/catalog/items/[0]/pic/ diff --git a/retorchfiles/envfiles/tjobd.env b/retorchfiles/envfiles/tjobd.env index b987c62f..23c8c6c6 100644 --- a/retorchfiles/envfiles/tjobd.env +++ b/retorchfiles/envfiles/tjobd.env @@ -1,18 +1,18 @@ +# Environment file for the TJob: tjobdlike ports, docker images or the tjobname itself. testsBasePath=./ +mediaserver=eexit/mirror-http-server tjobname=tjobd -frontend_port=5012 -MSQLImage=mcr.microsoft.com/mssql/server:2019-latest -retorchportj=5022 -retorchportk=5023 -WebSPAImage=${REGISTRY:-eshop}/webspa:${PLATFORM:-linux}-${TAG:-latest} -retorchporth=5020 -retorchporti=5021 -retorchportf=5018 -retorchportg=5019 -retorchportd=5016 -retorchporte=5017 -retorchportb=5014 -retorchportc=5015 -retorchporta=5013 +frontend_port=5036 +retorchportj=5046 +retorchportk=5047 +retorchporth=5044 +retorchporti=5045 +retorchportf=5042 +retorchportg=5043 +retorchportd=5040 +retorchporte=5041 +retorchportb=5038 +retorchportc=5039 +retorchporta=5037 ESHOP_EXTERNAL_DNS_NAME_OR_IP=$DOCKER_HOST_IP ESHOP_STORAGE_CATALOG_URL=http://webshoppingagg_${tjobname}:80/c/api/v1/catalog/items/[0]/pic/ diff --git a/retorchfiles/envfiles/tjobe.env b/retorchfiles/envfiles/tjobe.env index 57ff766d..eeed3f37 100644 --- a/retorchfiles/envfiles/tjobe.env +++ b/retorchfiles/envfiles/tjobe.env @@ -1,18 +1,18 @@ +# Environment file for the TJob: tjobelike ports, docker images or the tjobname itself. testsBasePath=./ +mediaserver=eexit/mirror-http-server tjobname=tjobe -frontend_port=5024 -MSQLImage=mcr.microsoft.com/mssql/server:2019-latest -retorchportj=5034 -retorchportk=5035 -WebSPAImage=${REGISTRY:-eshop}/webspa:${PLATFORM:-linux}-${TAG:-latest} -retorchporth=5032 -retorchporti=5033 -retorchportf=5030 -retorchportg=5031 -retorchportd=5028 -retorchporte=5029 -retorchportb=5026 -retorchportc=5027 -retorchporta=5025 +frontend_port=5048 +retorchportj=5058 +retorchportk=5059 +retorchporth=5056 +retorchporti=5057 +retorchportf=5054 +retorchportg=5055 +retorchportd=5052 +retorchporte=5053 +retorchportb=5050 +retorchportc=5051 +retorchporta=5049 ESHOP_EXTERNAL_DNS_NAME_OR_IP=$DOCKER_HOST_IP ESHOP_STORAGE_CATALOG_URL=http://webshoppingagg_${tjobname}:80/c/api/v1/catalog/items/[0]/pic/ diff --git a/retorchfiles/resources/EShopOnContainersSystemResources.json b/retorchfiles/resources/EShopOnContainersSystemResources.json deleted file mode 100644 index c9b4820f..00000000 --- a/retorchfiles/resources/EShopOnContainersSystemResources.json +++ /dev/null @@ -1,90 +0,0 @@ -{ - "webmvc": { - "hierarchyParent": [], - "replaceable": [], - "elasticityModel": { - "elasticityID": "elasModelWebMvc", - "elasticity": 5, - "elasticityCost": 10.0 - }, - "resourceType": "LOGICAL", - "resourceID": "webmvc" - }, - "identity-api": { - "hierarchyParent": [], - "replaceable": [], - "elasticityModel": { - "elasticityID": "elasModelIdentityApi", - "elasticity": 5, - "elasticityCost": 25.0 - }, - "resourceType": "LOGICAL", - "resourceID": "identity-api" - }, - "catalog-api": { - "hierarchyParent": [], - "replaceable": [], - "elasticityModel": { - "elasticityID": "elasModelCatalogAPI", - "elasticity": 3, - "elasticityCost": 50.0 - }, - "resourceType": "LOGICAL", - "resourceID": "catalog-api" - }, - "basket-api": { - "hierarchyParent": [], - "replaceable": [], - "elasticityModel": { - "elasticityID": "elasModelBasketApi", - "elasticity": 10, - "elasticityCost": 50.0 - }, - "resourceType": "LOGICAL", - "resourceID": "basket-api" - }, - "chrome-browser": { - "hierarchyParent": [], - "replaceable": [], - "elasticityModel": { - "elasticityID": "elasModelChromeBrowser", - "elasticity": 15, - "elasticityCost": 30.0 - }, - "resourceType": "LOGICAL", - "resourceID": "chrome-browser" - }, - "eshopUser": { - "hierarchyParent": [], - "replaceable": [], - "elasticityModel": { - "elasticityID": "elasModelEshopUser", - "elasticity": 4, - "elasticityCost": 30.0 - }, - "resourceType": "LOGICAL", - "resourceID": "eshopUser" - }, - "ordering-api": { - "hierarchyParent": [], - "replaceable": [], - "elasticityModel": { - "elasticityID": "elasModelOrderingApi", - "elasticity": 5, - "elasticityCost": 15.0 - }, - "resourceType": "LOGICAL", - "resourceID": "ordering-api" - }, - "payment-api": { - "hierarchyParent": [], - "replaceable": [], - "elasticityModel": { - "elasticityID": "elasModelPaymentApi", - "elasticity": 5, - "elasticityCost": 30.0 - }, - "resourceType": "LOGICAL", - "resourceID": "payment-api" - } -} \ No newline at end of file diff --git a/retorchfiles/scripts/coilifecycles/coi-setup.sh b/retorchfiles/scripts/coilifecycles/coi-setup.sh index 110f13ee..2c10f6de 100644 --- a/retorchfiles/scripts/coilifecycles/coi-setup.sh +++ b/retorchfiles/scripts/coilifecycles/coi-setup.sh @@ -1,4 +1,7 @@ #!/bin/bash +# The coi-setup.sh script provides all the necessary commands to set up the infrastructure before executing +# the TJobs. It performs debugging actions, such as outputting the kernel, library, and Docker versions. +# Additionally, it prunes and removes old videos and execution data. SEL_VIDEO_DIR="/opt/selenoid/video/" SEL_LOG_DIR="/opt/selenoid/logs/" diff --git a/retorchfiles/scripts/coilifecycles/coi-teardown.sh b/retorchfiles/scripts/coilifecycles/coi-teardown.sh index 17ac4d53..eeb15fac 100644 --- a/retorchfiles/scripts/coilifecycles/coi-teardown.sh +++ b/retorchfiles/scripts/coilifecycles/coi-teardown.sh @@ -1,5 +1,9 @@ -COITEARDOWNSTART="$(date +%s%3N)" +#!/bin/bash +# The coi-teardown.sh script provides all the necessary commands to tear-down the infrastructure after executing +# the TJobs. It performs cleaning actions, like remove all the containers and docker volumes, but also ends, collects +# and creates file with the different TJob and COI lifecycles using the savetjoblifecycledata.sh script. +COITEARDOWNSTART="$(date +%s%3N)" # Log the start of the container teardown process "$SCRIPTS_FOLDER/printLog.sh" "DEBUG" "COI-tear-down" "Switching off all containers that start with *tjob*..." # Get the list of container IDs to stop and remove diff --git a/retorchfiles/scripts/printLog.sh b/retorchfiles/scripts/printLog.sh index e814865e..e3c96be4 100644 --- a/retorchfiles/scripts/printLog.sh +++ b/retorchfiles/scripts/printLog.sh @@ -1,7 +1,8 @@ #!/bin/bash +# The printlog.sh script provides a template for outputting formatted messages during the setup, execution +# and teardown of TJobs and COI. if [ "$#" -ne 3 ]; then echo "Usage: $0 " exit 1 fi - echo "[$(date +"%Y-%m-%d %T")] [$1] [$2] - $3" diff --git a/retorchfiles/scripts/savetjoblifecycledata.sh b/retorchfiles/scripts/savetjoblifecycledata.sh index 2af123fe..69a8287a 100644 --- a/retorchfiles/scripts/savetjoblifecycledata.sh +++ b/retorchfiles/scripts/savetjoblifecycledata.sh @@ -1,6 +1,9 @@ #!/bin/bash -set -e +# The savetjoblifecycledata.sh script generates a CSV file containing the durations of different TJob lifecycles. +# It collects the previously generated files using the base-writetime.sh script and combines them into a single file +# with all the durations, which can later be processed. +set -e # Check if the correct number of arguments is provided if [ "$#" -ne 0 ]; then "$SCRIPTS_FOLDER/printLog.sh" "ERROR" "CreationTimeFile" "This script doesn't take any parameter" diff --git a/retorchfiles/scripts/storeContainerLogs.sh b/retorchfiles/scripts/storeContainerLogs.sh index 47511228..e64f9b78 100644 --- a/retorchfiles/scripts/storeContainerLogs.sh +++ b/retorchfiles/scripts/storeContainerLogs.sh @@ -1,4 +1,7 @@ #!/bin/bash +# The storeContainerLogs.sh script executes a docker log command for each container that belongs to the current +# execution plan. The logs are stored into a separate files for then being archived as an artifact. + "$SCRIPTS_FOLDER/printLog.sh" "ERROR" "SaveContainerLogs" "Starting to store container logs!" # Store docker logs DIRECTORY_PATH="$WORKSPACE/target/containerlogs/$1" diff --git a/retorchfiles/scripts/tjoblifecycles/tjob-setup.sh b/retorchfiles/scripts/tjoblifecycles/tjob-setup.sh index 90029ea5..bacd1a9f 100644 --- a/retorchfiles/scripts/tjoblifecycles/tjob-setup.sh +++ b/retorchfiles/scripts/tjoblifecycles/tjob-setup.sh @@ -1,11 +1,17 @@ #!/bin/bash +# The tjob-setup.sh script provides all the necessary commands to set up each TJob's resources before executing +# the TJobs. It includes a placeholder {CUSTOM_SETUP_COMMANDS} where the commands from the custom-tjob-setup file +# are inserted. The script deploys the required test Resources using Docker Compose and waits for the SUT to be ready +# by invoking the waitforSUT.sh script. + # Execute the script to write timestamp "$SCRIPTS_FOLDER/writetime.sh" "$2" "$1" # Export Docker Host IP DOCKER_HOST_IP=$(/sbin/ip route | awk '/default/ { print $3 }') export DOCKER_HOST_IP "$SCRIPTS_FOLDER/printLog.sh" "DEBUG" "$1-set-up" "Exporting the HOST_IP: $DOCKER_HOST_IP" -# Custom Set-up commands + +# START Custom Set-up commands "$SCRIPTS_FOLDER/printLog.sh" "DEBUG" "$1-set-up" "Start executing custom commands" # Custom Set-up commands @@ -21,6 +27,8 @@ docker compose -f "docker-compose.yml" --env-file "$WORKSPACE/retorchfiles/envfi "$SCRIPTS_FOLDER/printLog.sh" "DEBUG" "$1-set-up" "End executing custom commands" +# END Custom Set-up commands + # Deploy containers cd "$SUT_LOCATION" "$SCRIPTS_FOLDER/printLog.sh" "DEBUG" "$1-set-up" "Deploying containers for TJOB $1" diff --git a/retorchfiles/scripts/tjoblifecycles/tjob-teardown.sh b/retorchfiles/scripts/tjoblifecycles/tjob-teardown.sh index 6eb5bf09..ff6ae092 100644 --- a/retorchfiles/scripts/tjoblifecycles/tjob-teardown.sh +++ b/retorchfiles/scripts/tjoblifecycles/tjob-teardown.sh @@ -1,6 +1,9 @@ #!/bin/bash -set -e +# The tjob-teardown.sh script provides all the necessary commands to tear-down each TJob's Resources after the +# test execution has ended. It stores the container logs of the current TJob, tear down the containers +# and execute the custom commands provided in the custom-tjob-teardown file. +set -e # Execute the script to write timestamp "$SCRIPTS_FOLDER/writetime.sh" "$2" "$1" "$SCRIPTS_FOLDER/printLog.sh" "DEBUG" "$1-tear-down" "Starting the TJob tear-down" diff --git a/retorchfiles/scripts/tjoblifecycles/tjob-testexecution.sh b/retorchfiles/scripts/tjoblifecycles/tjob-testexecution.sh index f68ea338..22b2b01c 100644 --- a/retorchfiles/scripts/tjoblifecycles/tjob-testexecution.sh +++ b/retorchfiles/scripts/tjoblifecycles/tjob-testexecution.sh @@ -1,4 +1,7 @@ #!/bin/bash +# The testexecution.sh script executes the test cases, providing them with the URL and port where the SUT is available. +# It also measures the execution time and marks the pipeline as failed if any test case fails. + set -e # Function to execute timestamp script EXECUTE_TIMESTAMP_SCRIPT() { diff --git a/retorchfiles/scripts/waitforSUT.sh b/retorchfiles/scripts/waitforSUT.sh index d7235ae4..164c693e 100644 --- a/retorchfiles/scripts/waitforSUT.sh +++ b/retorchfiles/scripts/waitforSUT.sh @@ -1,4 +1,7 @@ #!/bin/bash +# The waitforSUT.sh script waits for the readiness of the SUT frontend. It performs a wait of up to 200 seconds, +# checking the frontend every 5 seconds. If the SUT is not ready after this period, all containers are teared down. + if [ "$#" -ne 1 ]; then "$SCRIPTS_FOLDER/printLog.sh" "ERROR" "TJob-$1-set-up" "Usage: $0 " exit 1 @@ -7,7 +10,7 @@ DOCKER_HOST_IP=$(/sbin/ip route | awk '/default/ { print $3 }') COUNTER=0 WAIT_LIMIT=40 -while ! curl --insecure -s "http://webmvc_$1:80" | grep -q "
"; do +while ! curl --insecure -s "http://webmvc_$1:80" | grep -q "
"; do "$SCRIPTS_FOLDER/printLog.sh" "DEBUG" "TJob-$1-set-up" "Waiting $COUNTER seconds for $1 with URL http://webmvc_$1:80" sleep 5 ((COUNTER++)) diff --git a/retorchfiles/scripts/writetime.sh b/retorchfiles/scripts/writetime.sh index 912d9073..2257491f 100644 --- a/retorchfiles/scripts/writetime.sh +++ b/retorchfiles/scripts/writetime.sh @@ -1,4 +1,6 @@ #!/bin/bash +# The writetime.sh script appends different timestamps for each TJob to a separate file. These files are then +# processed and combined into a single file containing all COI and TJob lifecycle durations. # Check if the correct number of parameters is provided if [ "$#" -ne 2 ]; then diff --git a/src/test/java/giis/eshopcontainers/e2e/functional/tests/CatalogTests.java b/src/test/java/giis/eshopcontainers/e2e/functional/tests/CatalogTests.java index edbc42ad..2e249a4f 100644 --- a/src/test/java/giis/eshopcontainers/e2e/functional/tests/CatalogTests.java +++ b/src/test/java/giis/eshopcontainers/e2e/functional/tests/CatalogTests.java @@ -5,7 +5,6 @@ import giis.eshopcontainers.e2e.functional.utils.Click; import giis.eshopcontainers.e2e.functional.utils.Navigation; import giis.retorch.annotations.AccessMode; -import giis.retorch.annotations.Resource; import org.junit.jupiter.api.Assertions; import org.junit.jupiter.api.DisplayName; import org.junit.jupiter.api.Test; @@ -18,17 +17,11 @@ class CatalogTests extends BaseLoggedClass { - @Resource(resID = "webmvc", replaceable = {}) @AccessMode(resID = "webmvc", concurrency = 10, sharing = true, accessMode = "READONLY") - @Resource(resID = "identity-api", replaceable = {}) @AccessMode(resID = "identity-api", concurrency = 50, sharing = true, accessMode = "READONLY") - @Resource(resID = "catalog-api", replaceable = {}) @AccessMode(resID = "catalog-api", concurrency = 60, sharing = true, accessMode = "READONLY") - @Resource(resID = "basket-api", replaceable = {}) @AccessMode(resID = "basket-api", concurrency = 30,sharing = true, accessMode = "READWRITE") - @Resource(resID = "chrome-browser", replaceable = {}) @AccessMode(resID = "chrome-browser", concurrency = 1, sharing = false, accessMode = "READWRITE") - @Resource(resID = "eshopUser", replaceable = {}) @AccessMode(resID = "eshopUser", concurrency = 1, accessMode = "READWRITE") @Test @DisplayName("AddProductsToBasket") @@ -63,11 +56,8 @@ private void checkProductButtonDisabled() throws ElementNotFoundException { "The eShop product button was expected to be disabled but was enabled"); } - @Resource(resID = "webmvc", replaceable = {}) @AccessMode(resID = "webmvc", concurrency = 10, sharing = true, accessMode = "READONLY") - @Resource(resID = "catalog-api", replaceable = {}) @AccessMode(resID = "catalog-api", concurrency = 60, sharing = true, accessMode = "READONLY") - @Resource(resID = "chrome-browser", replaceable = {}) @AccessMode(resID = "chrome-browser", concurrency = 1, accessMode = "READWRITE") @Test @DisplayName("FilterProductsByBrand") diff --git a/src/test/java/giis/eshopcontainers/e2e/functional/tests/DesktopAPIGatewayAPITests.java b/src/test/java/giis/eshopcontainers/e2e/functional/tests/DesktopAPIGatewayAPITests.java index d586b7c8..62780638 100644 --- a/src/test/java/giis/eshopcontainers/e2e/functional/tests/DesktopAPIGatewayAPITests.java +++ b/src/test/java/giis/eshopcontainers/e2e/functional/tests/DesktopAPIGatewayAPITests.java @@ -5,7 +5,6 @@ import giis.eshopcontainers.e2e.functional.model.Order; import giis.eshopcontainers.e2e.functional.model.OrderItem; import giis.retorch.annotations.AccessMode; -import giis.retorch.annotations.Resource; import org.apache.http.HttpEntity; import org.apache.http.HttpResponse; import org.apache.http.client.HttpClient; @@ -30,13 +29,10 @@ * API endpoints of the Backend For Frontends (BFF) webshopingagg that is used by the two Desktop * frontends. The different endpoints available can be seen in the Swagger UI */ -public class DesktopAPIGatewayAPITests extends BaseAPIClass { +class DesktopAPIGatewayAPITests extends BaseAPIClass { - @Resource(resID = "identity-api", replaceable = {}) @AccessMode(resID = "identity-api", concurrency = 50, sharing = true, accessMode = "READONLY") - @Resource(resID = "basket-api", replaceable = {}) @AccessMode(resID = "basket-api", concurrency = 30, sharing = true, accessMode = "READWRITE") - @Resource(resID = "eshopUser", replaceable = {}) @AccessMode(resID = "eshopUser", concurrency = 1, accessMode = "READWRITE") @Test @DisplayName("testAddProductsBasketWebAgg") diff --git a/src/test/java/giis/eshopcontainers/e2e/functional/tests/LoggedUserTest.java b/src/test/java/giis/eshopcontainers/e2e/functional/tests/LoggedUserTest.java index 36af25fb..f607940a 100644 --- a/src/test/java/giis/eshopcontainers/e2e/functional/tests/LoggedUserTest.java +++ b/src/test/java/giis/eshopcontainers/e2e/functional/tests/LoggedUserTest.java @@ -3,7 +3,6 @@ import giis.eshopcontainers.e2e.functional.common.BaseLoggedClass; import giis.eshopcontainers.e2e.functional.common.ElementNotFoundException; import giis.retorch.annotations.AccessMode; -import giis.retorch.annotations.Resource; import org.junit.jupiter.api.Assertions; import org.junit.jupiter.api.DisplayName; import org.junit.jupiter.api.Test; @@ -11,15 +10,11 @@ import org.openqa.selenium.WebElement; class LoggedUserTest extends BaseLoggedClass { - @Resource(resID = "webmvc",rType = "LOGICAL",parent = {},replaceable = {}) + @AccessMode(resID = "webmvc", concurrency = 10, sharing = true, accessMode = "READONLY") - @Resource(resID = "identity-api", replaceable = {}) @AccessMode(resID = "identity-api", concurrency = 50, sharing = true, accessMode = "READONLY") - @Resource(resID = "catalog-api", replaceable = {}) @AccessMode(resID = "catalog-api", concurrency = 60, sharing =true, accessMode = "READONLY") - @Resource(resID = "chrome-browser", replaceable = {}) @AccessMode(resID = "chrome-browser", concurrency = 1, accessMode ="READWRITE") - @Resource(resID = "eshopUser", replaceable = {}) @AccessMode(resID = "eshopUser", concurrency = 1, sharing = false, accessMode ="READONLY") @Test @DisplayName("BasicLoginTest") @@ -31,4 +26,4 @@ void loginTest() throws ElementNotFoundException { Assertions.assertEquals("esh-catalog-button ", product.getAttribute("class"), "The eShop product button was expected for being enabled and was disabled"); this.logout(); } -} +} \ No newline at end of file diff --git a/src/test/java/giis/eshopcontainers/e2e/functional/tests/OrderTests.java b/src/test/java/giis/eshopcontainers/e2e/functional/tests/OrderTests.java index 05ef9008..5400105f 100644 --- a/src/test/java/giis/eshopcontainers/e2e/functional/tests/OrderTests.java +++ b/src/test/java/giis/eshopcontainers/e2e/functional/tests/OrderTests.java @@ -4,7 +4,6 @@ import giis.eshopcontainers.e2e.functional.common.ElementNotFoundException; import giis.eshopcontainers.e2e.functional.utils.Click; import giis.retorch.annotations.AccessMode; -import giis.retorch.annotations.Resource; import org.junit.jupiter.api.Assertions; import org.junit.jupiter.api.DisplayName; import org.junit.jupiter.api.Test; @@ -28,21 +27,14 @@ class OrderTests extends BaseLoggedClass { /** * Tests the creation of a new order and its correct state configuration. */ - @Resource(resID = "webmvc", replaceable = {}) + @AccessMode(resID = "webmvc", concurrency = 10, sharing = true, accessMode = "READONLY") - @Resource(resID = "identity-api", replaceable = {}) @AccessMode(resID = "identity-api", concurrency = 50, sharing = true, accessMode = "READONLY") - @Resource(resID = "catalog-api", replaceable = {}) @AccessMode(resID = "catalog-api", concurrency = 60, sharing = true, accessMode = "READONLY") - @Resource(resID = "basket-api", replaceable = {}) @AccessMode(resID = "basket-api", concurrency = 30, sharing = true, accessMode = "READWRITE") - @Resource(resID = "ordering-api", replaceable = {}) @AccessMode(resID = "ordering-api", concurrency = 50, sharing = true, accessMode = "READWRITE") - @Resource(resID = "payment-api", replaceable = {}) @AccessMode(resID = "payment-api", concurrency = 20, sharing = true, accessMode = "READWRITE") - @Resource(resID = "chrome-browser", replaceable = {}) @AccessMode(resID = "chrome-browser", concurrency = 1, accessMode = "READWRITE") - @Resource(resID = "eshopUser", replaceable = {}) @AccessMode(resID = "eshopUser", concurrency = 1, accessMode = "READWRITE") @Test @DisplayName("testCreateNewOrder") @@ -62,21 +54,14 @@ void testCreateNewOrder() throws ElementNotFoundException { * Created an order with three different products, fullfil the order data (payment and address) and removes it * checking that the order state changes as expected. */ - @Resource(resID = "webmvc", replaceable = {}) + @AccessMode(resID = "webmvc", concurrency = 10, sharing = true, accessMode = "READONLY") - @Resource(resID = "identity-api", replaceable = {}) @AccessMode(resID = "identity-api", concurrency = 50, sharing = true, accessMode = "READONLY") - @Resource(resID = "catalog-api", replaceable = {}) @AccessMode(resID = "catalog-api", concurrency = 60, sharing = true, accessMode = "READONLY") - @Resource(resID = "basket-api", replaceable = {}) @AccessMode(resID = "basket-api", concurrency = 30, sharing = true, accessMode = "READWRITE") - @Resource(resID = "ordering-api", replaceable = {}) @AccessMode(resID = "ordering-api", concurrency = 30, sharing = true, accessMode = "READWRITE") - @Resource(resID = "payment-api", replaceable = {}) @AccessMode(resID = "payment-api", concurrency = 20, sharing = true, accessMode = "READWRITE") - @Resource(resID = "chrome-browser", replaceable = {}) @AccessMode(resID = "chrome-browser", concurrency = 1, sharing = false, accessMode = "READWRITE") - @Resource(resID = "eshopUser", replaceable = {}) @AccessMode(resID = "eshopUser", concurrency = 1, accessMode = "READWRITE") @Test @DisplayName("testCancelOrder") From 461e61d8ce58bf25169956bb0d8904a0763a46b3 Mon Sep 17 00:00:00 2001 From: Augusto Date: Wed, 1 Jan 2025 22:17:26 +0100 Subject: [PATCH 2/4] Minor change in the properties file --- retorchfiles/configurations/retorchCI.properties | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/retorchfiles/configurations/retorchCI.properties b/retorchfiles/configurations/retorchCI.properties index 08e423ad..108c8027 100644 --- a/retorchfiles/configurations/retorchCI.properties +++ b/retorchfiles/configurations/retorchCI.properties @@ -1,5 +1,5 @@ agentCIName=xretorch-agent -sut-wait-html=
+sut-wait-html=
sut-location=$WORKSPACE/sut/src docker-frontend-name=http://webmvc_ docker-frontend-port=80 From aba54dde13454d83f1bf48db8479238f0af5f8a8 Mon Sep 17 00:00:00 2001 From: Augusto Date: Wed, 1 Jan 2025 22:24:52 +0100 Subject: [PATCH 3/4] Adding the correct waitforsut directive --- retorchfiles/configurations/retorchCI.properties | 2 +- retorchfiles/scripts/waitforSUT.sh | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/retorchfiles/configurations/retorchCI.properties b/retorchfiles/configurations/retorchCI.properties index 108c8027..08e423ad 100644 --- a/retorchfiles/configurations/retorchCI.properties +++ b/retorchfiles/configurations/retorchCI.properties @@ -1,5 +1,5 @@ agentCIName=xretorch-agent -sut-wait-html=
+sut-wait-html=
sut-location=$WORKSPACE/sut/src docker-frontend-name=http://webmvc_ docker-frontend-port=80 diff --git a/retorchfiles/scripts/waitforSUT.sh b/retorchfiles/scripts/waitforSUT.sh index 164c693e..f05a761d 100644 --- a/retorchfiles/scripts/waitforSUT.sh +++ b/retorchfiles/scripts/waitforSUT.sh @@ -10,7 +10,7 @@ DOCKER_HOST_IP=$(/sbin/ip route | awk '/default/ { print $3 }') COUNTER=0 WAIT_LIMIT=40 -while ! curl --insecure -s "http://webmvc_$1:80" | grep -q "
"; do +while ! curl --insecure -s "http://webmvc_$1:80" | grep -q "
"; do "$SCRIPTS_FOLDER/printLog.sh" "DEBUG" "TJob-$1-set-up" "Waiting $COUNTER seconds for $1 with URL http://webmvc_$1:80" sleep 5 ((COUNTER++)) From 002272022523b6d6ebad539336cf34b23d54bf3f Mon Sep 17 00:00:00 2001 From: Augusto Date: Fri, 7 Feb 2025 10:28:50 +0100 Subject: [PATCH 4/4] Adding the test class that generates the Jenkinsfile --- pom.xml | 5 +++++ .../RetorchGenerateJenkinsfileTest.java | 22 +++++++++++++++++++ 2 files changed, 27 insertions(+) create mode 100644 src/test/java/giis/eshopcontainers/e2e/functional/RetorchGenerateJenkinsfileTest.java diff --git a/pom.xml b/pom.xml index c09e361e..32a030a9 100644 --- a/pom.xml +++ b/pom.xml @@ -69,6 +69,11 @@ retorch-annotations ${retorch-annotations.version} + + io.github.giis-uniovi + retorch-orchestration + 1.1.1-ft_migrateschedulerorchestrator-SNAPSHOT + org.apache.httpcomponents diff --git a/src/test/java/giis/eshopcontainers/e2e/functional/RetorchGenerateJenkinsfileTest.java b/src/test/java/giis/eshopcontainers/e2e/functional/RetorchGenerateJenkinsfileTest.java new file mode 100644 index 00000000..597251b5 --- /dev/null +++ b/src/test/java/giis/eshopcontainers/e2e/functional/RetorchGenerateJenkinsfileTest.java @@ -0,0 +1,22 @@ +package giis.eshopcontainers.e2e.functional; + + +import giis.retorch.orchestration.classifier.EmptyInputException; +import giis.retorch.orchestration.generator.OrchestrationGenerator; +import giis.retorch.orchestration.orchestrator.NoFinalActivitiesException; +import giis.retorch.orchestration.scheduler.NoTGroupsInTheSchedulerException; +import giis.retorch.orchestration.scheduler.NotValidSystemException; +import org.junit.jupiter.api.Disabled; +import org.junit.jupiter.api.Test; + +import java.io.IOException; +import java.net.URISyntaxException; + +@Disabled("Exclude to execute this class when pushing the SUT") +class RetorchGenerateJenkinfileTest { + @Test + void testGenerateJenkinsfile() throws NoFinalActivitiesException, NoTGroupsInTheSchedulerException, EmptyInputException, IOException, URISyntaxException, NotValidSystemException, ClassNotFoundException { + OrchestrationGenerator orch= new OrchestrationGenerator(); + orch.generateJenkinsfile("giis.eshopcontainers.e2e.functional.tests","EShopOnContainers", "./"); + } +} \ No newline at end of file