@@ -21,6 +21,7 @@ setup(){
21
21
export ci=" JENKINS"
22
22
export build_url=${BUILD_URL}
23
23
fi
24
+
24
25
export UUID=$UUID
25
26
# Elasticsearch Config
26
27
export ES_SERVER=$ES_SERVER
@@ -50,35 +51,42 @@ setup(){
50
51
}
51
52
52
53
index_task (){
54
+
53
55
url=$1
54
- curl --insecure -X POST -H " Content-Type: application/json" -H " Cache-Control: no-cache" -d ' {
55
- "ciSystem" : "' $ci ' ",
56
- "uuid" : "' $UUID ' ",
57
- "releaseStream": "' $RELEASE_STREAM ' ",
58
- "platform": "' $platform ' ",
59
- "clusterType": "' $cluster_type ' ",
60
- "benchmark": "' $WORKLOAD ' ",
61
- "masterNodesCount": ' $masters ' ,
62
- "workerNodesCount": ' $workers ' ,
63
- "infraNodesCount": ' $infra ' ,
64
- "masterNodesType": "' $master_type ' ",
65
- "workerNodesType": "' $worker_type ' ",
66
- "infraNodesType": "' $infra_type ' ",
67
- "totalNodesCount": ' $all ' ,
68
- "clusterName": "' $cluster_name ' ",
69
- "ocpVersion": "' $cluster_version ' ",
70
- "networkType": "' $network_type ' ",
71
- "buildTag": "' $task_id ' ",
72
- "jobStatus": "' $state ' ",
73
- "buildUrl": "' $build_url ' ",
74
- "upstreamJob": "' $job_id ' ",
75
- "upstreamJobBuild": "' $job_run_id ' ",
76
- "executionDate": "' $execution_date ' ",
77
- "jobDuration": "' $duration ' ",
78
- "startDate": "' " $start_date " ' ",
79
- "endDate": "' " $end_date " ' ",
80
- "timestamp": "' " $start_date " ' "
81
- }' " $url "
56
+ uuid_dir=/tmp/$UUID
57
+ mkdir $uuid_dir
58
+
59
+ json_data=' {
60
+ "ciSystem":"' $ci ' ",
61
+ "uuid":"' $UUID ' ",
62
+ "releaseStream":"' $RELEASE_STREAM ' ",
63
+ "platform":"' $platform ' ",
64
+ "clusterType":"' $cluster_type ' ",
65
+ "benchmark":"' $WORKLOAD ' ",
66
+ "masterNodesCount":' $masters ' ,
67
+ "workerNodesCount":' $workers ' ,
68
+ "infraNodesCount":' $infra ' ,
69
+ "masterNodesType":"' $master_type ' ",
70
+ "workerNodesType":"' $worker_type ' ",
71
+ "infraNodesType":"' $infra_type ' ",
72
+ "totalNodesCount":' $all ' ,
73
+ "clusterName":"' $cluster_name ' ",
74
+ "ocpVersion":"' $cluster_version ' ",
75
+ "networkType":"' $network_type ' ",
76
+ "buildTag":"' $task_id ' ",
77
+ "jobStatus":"' $state ' ",
78
+ "buildUrl":"' $build_url ' ",
79
+ "upstreamJob":"' $job_id ' ",
80
+ "upstreamJobBuild":"' $job_run_id ' ",
81
+ "executionDate":"' $execution_date ' ",
82
+ "jobDuration":"' $duration ' ",
83
+ "startDate":"' " $start_date " ' ",
84
+ "endDate":"' " $end_date " ' ",
85
+ "timestamp":"' " $start_date " ' "
86
+ }'
87
+ echo $json_data >> $uuid_dir /index_data.json
88
+ curl --insecure -X POST -H " Content-Type:application/json" -H " Cache-Control:no-cache" -d " $json_data " " $url "
89
+
82
90
}
83
91
84
92
set_duration (){
0 commit comments