Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
144 changes: 72 additions & 72 deletions Jenkinsfile
Original file line number Diff line number Diff line change
Expand Up @@ -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
5 changes: 5 additions & 0 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,11 @@
<artifactId>retorch-annotations</artifactId>
<version>${retorch-annotations.version}</version>
</dependency>
<dependency>
<groupId>io.github.giis-uniovi</groupId>
<artifactId>retorch-orchestration</artifactId>
<version>1.1.1-ft_migrateschedulerorchestrator-SNAPSHOT</version> <!--TO-DO Replace with the correct version when released-->
</dependency>
<!-- https://mvnrepository.com/artifact/org.apache.httpcomponents/httpclient -->
<dependency>
<groupId>org.apache.httpcomponents</groupId>
Expand Down
218 changes: 218 additions & 0 deletions retorchfiles/configurations/EShopOnContainersSystemResources.json
Original file line number Diff line number Diff line change
@@ -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"

}
}
Loading
Loading