Skip to content

Commit

Permalink
Changes:
Browse files Browse the repository at this point in the history
- Some minor typos in the ExecutionPlan.java
- Adjusting tjob and orchestration outputs
  • Loading branch information
augustocristian committed Dec 31, 2024
1 parent 0b7d4f2 commit f4af7c3
Show file tree
Hide file tree
Showing 7 changed files with 90 additions and 97 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -90,22 +90,10 @@ public Map<Integer, LinkedList<Activity>> generateSortedActivityGraph() {
LinkedList<Activity> currentListActivities = new LinkedList<>();
while (iterator.hasNext()) {
Activity currentActivityEntity = iterator.next();
TJob currentTjob= currentActivityEntity.getTJob();
if ((timeMoment == 0) && (currentActivityEntity.getListPredecessors().isEmpty())) {
numberOfAddedActivities--;
currentTjob.setStage(timeMoment);
currentTjob.setIdTJob("TJob" +getIdentifier(tJobEntityList.size()));
tJobEntityList.add(currentTjob);
if ((timeMoment == 0) && (currentActivityEntity.getListPredecessors().isEmpty()) || new HashSet<>(allPassedActivities).containsAll(currentActivityEntity.getListPredecessors())) {
addTJob(currentActivityEntity, timeMoment);
currentListActivities.add(currentActivityEntity);

} else {
if (new HashSet<>(allPassedActivities).containsAll(currentActivityEntity.getListPredecessors())) {
currentListActivities.add(currentActivityEntity);
currentTjob.setStage(timeMoment);
currentTjob.setIdTJob("TJob" +getIdentifier(tJobEntityList.size()));
tJobEntityList.add(currentTjob);
numberOfAddedActivities--;
}
numberOfAddedActivities--;
}
}

Expand All @@ -116,6 +104,11 @@ public Map<Integer, LinkedList<Activity>> generateSortedActivityGraph() {
}
return setOfOrderedActivities;
}
public void addTJob(Activity activity, int timeMoment) {
activity.getTJob().setStage(timeMoment);
activity.getTJob().setIdTJob(!activity.getTJob().getListTestCases().isEmpty()?"TJob" + getIdentifier(tJobEntityList.size()):"GatewayActivity");
if (!activity.getTJob().getListTestCases().isEmpty()) {tJobEntityList.add(activity.getTJob());}
}
/**
* Generates an alphabetical identifier for a {@code TJob} according to the number of TJob:
* e.g. A,B,C..., AA,AB,AC... BA,BB,BC...
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,17 +3,17 @@ someplaceholder2=someimage
testsBasePath=somepath/somedir/
tjobname=tjobf
frontend_port=5000
retorchportj=5053
retorchportk=5054
retorchporth=5051
retorchporti=5052
retorchportf=5049
retorchportg=5050
retorchportd=5047
retorchporte=5048
retorchportb=5045
retorchportc=5046
retorchporta=5044
retorchportj=5064
retorchportk=5065
retorchporth=5062
retorchporti=5063
retorchportf=5060
retorchportg=5061
retorchportd=5058
retorchporte=5059
retorchportb=5056
retorchportc=5057
retorchporta=5055
# The custom.env specifies all the custom environment variables that need to be added to the .env files generated
# for each TJob. The file is located in /retorchfiles/customscriptscode/custom.env and its content is:
APP_EXTERNAL_DNS_NAME_OR_IP=$DOCKER_HOST_IP
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,17 +3,17 @@ someplaceholder2=someimage
testsBasePath=somepath/somedir/
tjobname=tjobg
frontend_port=5000
retorchportj=5064
retorchportk=5065
retorchporth=5062
retorchporti=5063
retorchportf=5060
retorchportg=5061
retorchportd=5058
retorchporte=5059
retorchportb=5056
retorchportc=5057
retorchporta=5055
retorchportj=5075
retorchportk=5076
retorchporth=5073
retorchporti=5074
retorchportf=5071
retorchportg=5072
retorchportd=5069
retorchporte=5070
retorchportb=5067
retorchportc=5068
retorchporta=5066
# The custom.env specifies all the custom environment variables that need to be added to the .env files generated
# for each TJob. The file is located in /retorchfiles/customscriptscode/custom.env and its content is:
APP_EXTERNAL_DNS_NAME_OR_IP=$DOCKER_HOST_IP
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,17 +3,17 @@ someplaceholder2=someimage
testsBasePath=somepath/somedir/
tjobname=tjobh
frontend_port=5000
retorchportj=5075
retorchportk=5076
retorchporth=5073
retorchporti=5074
retorchportf=5071
retorchportg=5072
retorchportd=5069
retorchporte=5070
retorchportb=5067
retorchportc=5068
retorchporta=5066
retorchportj=5086
retorchportk=5087
retorchporth=5084
retorchporti=5085
retorchportf=5082
retorchportg=5083
retorchportd=5080
retorchporte=5081
retorchportb=5078
retorchportc=5079
retorchporta=5077
# The custom.env specifies all the custom environment variables that need to be added to the .env files generated
# for each TJob. The file is located in /retorchfiles/customscriptscode/custom.env and its content is:
APP_EXTERNAL_DNS_NAME_OR_IP=$DOCKER_HOST_IP
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,17 +3,17 @@ someplaceholder2=someimage
testsBasePath=somepath/somedir/
tjobname=tjobi
frontend_port=5000
retorchportj=5086
retorchportk=5087
retorchporth=5084
retorchporti=5085
retorchportf=5082
retorchportg=5083
retorchportd=5080
retorchporte=5081
retorchportb=5078
retorchportc=5079
retorchporta=5077
retorchportj=5097
retorchportk=5098
retorchporth=5095
retorchporti=5096
retorchportf=5093
retorchportg=5094
retorchportd=5091
retorchporte=5092
retorchportb=5089
retorchportc=5090
retorchporta=5088
# The custom.env specifies all the custom environment variables that need to be added to the .env files generated
# for each TJob. The file is located in /retorchfiles/customscriptscode/custom.env and its content is:
APP_EXTERNAL_DNS_NAME_OR_IP=$DOCKER_HOST_IP
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,17 +3,17 @@ someplaceholder2=someimage
testsBasePath=somepath/somedir/
tjobname=tjobj
frontend_port=5000
retorchportj=5097
retorchportk=5098
retorchporth=5095
retorchporti=5096
retorchportf=5093
retorchportg=5094
retorchportd=5091
retorchporte=5092
retorchportb=5089
retorchportc=5090
retorchporta=5088
retorchportj=5108
retorchportk=5109
retorchporth=5106
retorchporti=5107
retorchportf=5104
retorchportg=5105
retorchportd=5102
retorchporte=5103
retorchportb=5100
retorchportc=5101
retorchporta=5099
# The custom.env specifies all the custom environment variables that need to be added to the .env files generated
# for each TJob. The file is located in /retorchfiles/customscriptscode/custom.env and its content is:
APP_EXTERNAL_DNS_NAME_OR_IP=$DOCKER_HOST_IP
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -81,75 +81,75 @@ pipeline {
stage('Stage 3') {
failFast false
parallel {
stage('tjobe IdResource: MedInElasRest mediumElasticResource ') {
steps {
catchError(buildResult: 'UNSTABLE', stageResult: 'FAILURE') {
sh '$SCRIPTS_FOLDER/tjoblifecycles/tjob-setup.sh tjobe 3'
sh '$SCRIPTS_FOLDER/tjoblifecycles/tjob-testexecution.sh tjobe 3 https://full-teaching- 5000 "AggregatorClassTests#tActFiveFiveSch,AggregatorClassTests#tActFivetFourSch,AggregatorClassTests#tActFivetThreeSch"'
}// EndExecutionStageErrortjobe
sh '$SCRIPTS_FOLDER/tjoblifecycles/tjob-teardown.sh tjobe 3'
}// EndStepstjobe
}// EndStagetjobe
stage('tjobf IdResource: MedInElasRest mediumElasticResource ') {
steps {
catchError(buildResult: 'UNSTABLE', stageResult: 'FAILURE') {
sh '$SCRIPTS_FOLDER/tjoblifecycles/tjob-setup.sh tjobf 3'
sh '$SCRIPTS_FOLDER/tjoblifecycles/tjob-testexecution.sh tjobf 3 https://full-teaching- 5000 "AggregatorClassTests#tActFiveFiveSch,AggregatorClassTests#tActFivetFourSch,AggregatorClassTests#tActFivetThreeSch"'
sh '$SCRIPTS_FOLDER/tjoblifecycles/tjob-testexecution.sh tjobf 3 https://full-teaching- 5000 "AggregatorClassTests#tActSixFiveSch,AggregatorClassTests#tActSixtFourSch,AggregatorClassTests#tActSixtThreeSch"'
}// EndExecutionStageErrortjobf
sh '$SCRIPTS_FOLDER/tjoblifecycles/tjob-teardown.sh tjobf 3'
}// EndStepstjobf
}// EndStagetjobf
} // End Parallel
} // End Stage
stage('Stage 4') {
failFast false
parallel {
stage('tjobg IdResource: MedInElasRest mediumElasticResource ') {
steps {
catchError(buildResult: 'UNSTABLE', stageResult: 'FAILURE') {
sh '$SCRIPTS_FOLDER/tjoblifecycles/tjob-setup.sh tjobg 3'
sh '$SCRIPTS_FOLDER/tjoblifecycles/tjob-testexecution.sh tjobg 3 https://full-teaching- 5000 "AggregatorClassTests#tActSixFiveSch,AggregatorClassTests#tActSixtFourSch,AggregatorClassTests#tActSixtThreeSch"'
sh '$SCRIPTS_FOLDER/tjoblifecycles/tjob-setup.sh tjobg 4'
sh '$SCRIPTS_FOLDER/tjoblifecycles/tjob-testexecution.sh tjobg 4 https://full-teaching- 5000 "AggregatorClassTests#tActSevenFiveSch,AggregatorClassTests#tActSeventFourSch,AggregatorClassTests#tActSeventThreeSch"'
}// EndExecutionStageErrortjobg
sh '$SCRIPTS_FOLDER/tjoblifecycles/tjob-teardown.sh tjobg 3'
sh '$SCRIPTS_FOLDER/tjoblifecycles/tjob-teardown.sh tjobg 4'
}// EndStepstjobg
}// EndStagetjobg
} // End Parallel
} // End Stage
stage('Stage 4') {
stage('Stage 5') {
failFast false
parallel {
stage('tjobh IdResource: MedInElasRest mediumElasticResource ') {
steps {
catchError(buildResult: 'UNSTABLE', stageResult: 'FAILURE') {
sh '$SCRIPTS_FOLDER/tjoblifecycles/tjob-setup.sh tjobh 4'
sh '$SCRIPTS_FOLDER/tjoblifecycles/tjob-testexecution.sh tjobh 4 https://full-teaching- 5000 "AggregatorClassTests#tActSevenFiveSch,AggregatorClassTests#tActSeventFourSch,AggregatorClassTests#tActSeventThreeSch"'
sh '$SCRIPTS_FOLDER/tjoblifecycles/tjob-setup.sh tjobh 5'
sh '$SCRIPTS_FOLDER/tjoblifecycles/tjob-testexecution.sh tjobh 5 https://full-teaching- 5000 "AggregatorClassTests#tActEightFiveSch,AggregatorClassTests#tActEighttFourSch,AggregatorClassTests#tActEighttThreeSch"'
}// EndExecutionStageErrortjobh
sh '$SCRIPTS_FOLDER/tjoblifecycles/tjob-teardown.sh tjobh 4'
sh '$SCRIPTS_FOLDER/tjoblifecycles/tjob-teardown.sh tjobh 5'
}// EndStepstjobh
}// EndStagetjobh
} // End Parallel
} // End Stage
stage('Stage 5') {
stage('Stage 6') {
failFast false
parallel {
stage('tjobi IdResource: MedInElasRest mediumElasticResource ') {
steps {
catchError(buildResult: 'UNSTABLE', stageResult: 'FAILURE') {
sh '$SCRIPTS_FOLDER/tjoblifecycles/tjob-setup.sh tjobi 5'
sh '$SCRIPTS_FOLDER/tjoblifecycles/tjob-testexecution.sh tjobi 5 https://full-teaching- 5000 "AggregatorClassTests#tActEightFiveSch,AggregatorClassTests#tActEighttFourSch,AggregatorClassTests#tActEighttThreeSch"'
sh '$SCRIPTS_FOLDER/tjoblifecycles/tjob-setup.sh tjobi 6'
sh '$SCRIPTS_FOLDER/tjoblifecycles/tjob-testexecution.sh tjobi 6 https://full-teaching- 5000 "AggregatorClassTests#tActNineFiveSch,AggregatorClassTests#tActNinetFourSch,AggregatorClassTests#tActNinetThreeSch"'
}// EndExecutionStageErrortjobi
sh '$SCRIPTS_FOLDER/tjoblifecycles/tjob-teardown.sh tjobi 5'
sh '$SCRIPTS_FOLDER/tjoblifecycles/tjob-teardown.sh tjobi 6'
}// EndStepstjobi
}// EndStagetjobi
} // End Parallel
} // End Stage
stage('Stage 6') {
failFast false
parallel {
stage('tjobj IdResource: MedInElasRest mediumElasticResource ') {
steps {
catchError(buildResult: 'UNSTABLE', stageResult: 'FAILURE') {
sh '$SCRIPTS_FOLDER/tjoblifecycles/tjob-setup.sh tjobj 6'
sh '$SCRIPTS_FOLDER/tjoblifecycles/tjob-testexecution.sh tjobj 6 https://full-teaching- 5000 "AggregatorClassTests#tActNineFiveSch,AggregatorClassTests#tActNinetFourSch,AggregatorClassTests#tActNinetThreeSch"'
sh '$SCRIPTS_FOLDER/tjoblifecycles/tjob-testexecution.sh tjobj 6 https://full-teaching- 5000 "AggregatorClassTests#tActTenFiveSch,AggregatorClassTests#tActTentFourSch,AggregatorClassTests#tActTentThreeSch"'
}// EndExecutionStageErrortjobj
sh '$SCRIPTS_FOLDER/tjoblifecycles/tjob-teardown.sh tjobj 6'
}// EndStepstjobj
}// EndStagetjobj
stage('tjobk IdResource: MedInElasRest mediumElasticResource ') {
steps {
catchError(buildResult: 'UNSTABLE', stageResult: 'FAILURE') {
sh '$SCRIPTS_FOLDER/tjoblifecycles/tjob-setup.sh tjobk 6'
sh '$SCRIPTS_FOLDER/tjoblifecycles/tjob-testexecution.sh tjobk 6 https://full-teaching- 5000 "AggregatorClassTests#tActTenFiveSch,AggregatorClassTests#tActTentFourSch,AggregatorClassTests#tActTentThreeSch"'
}// EndExecutionStageErrortjobk
sh '$SCRIPTS_FOLDER/tjoblifecycles/tjob-teardown.sh tjobk 6'
}// EndStepstjobk
}// EndStagetjobk
} // End Parallel
} // End Stage
stage('TEARDOWN-Infrastructure') {
Expand Down

0 comments on commit f4af7c3

Please sign in to comment.