generated from giis-uniovi/samples-giis-template
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Jenkinsfile
97 lines (97 loc) · 4.28 KB
/
Jenkinsfile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
pipeline {
agent {label 'xretorch-agent'}
environment {
SELENOID_PRESENT = "TRUE"
SUT_LOCATION = "$WORKSPACE/sut/src"
SCRIPTS_FOLDER = "$WORKSPACE/retorchfiles/scripts"
}// EndEnvironment
options {
disableConcurrentBuilds()
}// EndPipOptions
stages{
stage('Clean Workspace') {
steps{
cleanWs()
}// EndStepsCleanWS
}// EndStageCleanWS
stage('Clone Project') {
steps{
checkout scm
}// EndStepsCloneProject
}// EndStageCloneProject
stage('SETUP-Infrastructure') {
steps{
sh 'chmod +x -R $SCRIPTS_FOLDER'
sh '$SCRIPTS_FOLDER/coilifecycles/coi-setup.sh'
}// EndStepsSETUPINF
}// EndStageSETUPInf
stage('Stage 0'){
failFast false
parallel{
stage('TJobC 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 ') {
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 ') {
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 ') {
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'){
failFast false
parallel{
stage('TJobG 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
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