Skip to content

Commit 14c393d

Browse files
Add flowcontext (#367)
* Added FlowContextDefinedEvent to Artifact Rules. Updated integration tests and documentation about history rules. Updated artifact flow diagram.
1 parent 6a1f9cd commit 14c393d

15 files changed

+1938
-219
lines changed

src/integrationtests/java/util/IntegrationTestBase.java

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -208,7 +208,7 @@ protected JsonNode getJSONFromFile(String filePath) throws IOException {
208208

209209
/**
210210
* Wait for certain amount of events to be processed.
211-
*
211+
*
212212
* @param eventsCount - An int which indicated how many events that should be
213213
* processed.
214214
* @return
@@ -227,7 +227,7 @@ protected void waitForEventsToBeProcessed(int eventsCount) throws InterruptedExc
227227

228228
/**
229229
* Counts documents that were processed
230-
*
230+
*
231231
* @param database - A string with the database to use
232232
* @param collection - A string with the collection to use
233233
* @return amount of processed events
@@ -242,7 +242,7 @@ private long countProcessedEvents(String database, String collection) {
242242

243243
/**
244244
* Retrieves the result from EI and checks if it equals the expected data
245-
*
245+
*
246246
* @param expectedData - A Map<String, JsonNode> which contains the expected
247247
* data
248248
* @return
@@ -286,7 +286,7 @@ private void checkResult(final Map<String, JsonNode> expectedData)
286286

287287
/**
288288
* Retrieves the aggregatedObject from EI by querying
289-
*
289+
*
290290
* @param id - A string which contains the id used in the query
291291
* @return the responseEntity within the body.
292292
* @throws URISyntaxException
Lines changed: 203 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,203 @@
1+
{
2+
"_id": "aacc3c87-75e0-4b6d-88f5-b1a5d4e62b43",
3+
"fileInformation": [
4+
{
5+
"extension": "jar",
6+
"classifier": "debug"
7+
},
8+
{
9+
"extension": "txt",
10+
"classifier": "test"
11+
},
12+
{
13+
"extension": "exe",
14+
"classifier": "application"
15+
}
16+
],
17+
"buildCommand": null,
18+
"flowContexts": [
19+
{
20+
"product": "MyProductA",
21+
"project": "FeatureC",
22+
"program": "MarketD",
23+
"track": "TrackE",
24+
"version": "1.2.3",
25+
"eventId": "aaaaaaaa-kkkk-5ccc-8ddd-eeeeeeeeacd0"
26+
}
27+
],
28+
"internalComposition": {
29+
"compositions": [
30+
{
31+
"eventId": "ab6ef12d-25fb-4d77-b9fd-87688e66de47",
32+
"name": "My composition",
33+
"time": 2000,
34+
"artifacts": [
35+
{
36+
"fileInformation": [
37+
{
38+
"extension": "jar",
39+
"classifier": "debug"
40+
}
41+
],
42+
"internalComposition": {
43+
"compositions": [
44+
{
45+
"eventId": "ab6ef12d-25fb-4d77-b9fd-87688e66da4j",
46+
"sourceChanges": [
47+
{
48+
"submitter": {
49+
"name": "Jane Doe",
50+
"email": "jane.doe@company.com"
51+
},
52+
"SCSEventId": "ace9df6e-cd45-4320-ae66-945f038caa1b",
53+
"flowContexts" : [
54+
{
55+
"eventId" : "flowaaaa-bbbb-5ccc-8ddd-dkt8ejeeeee0",
56+
"product" : "MyProduct",
57+
"project" : "NewImportantFeatures",
58+
"program" : "NewMarket",
59+
"track" : "CustomerXAdaptations",
60+
"version" : "4.3.0"
61+
}
62+
],
63+
"gitIdentifier": null,
64+
"sourceCreations": [
65+
{
66+
"SCCEventId": "ac085e24-ac4c-41be-912d-08c7afd32285",
67+
"author": {
68+
"name": "John Doe",
69+
"id": "johndoe",
70+
"email": "john.doe@company.com",
71+
"group": "Team Gophers"
72+
},
73+
"issues": [
74+
],
75+
"sourceCreations": [
76+
{
77+
"SCCEventId": "a52ad6a4-c522-47e2-9195-0481930979e4",
78+
"author": null,
79+
"issues": [
80+
{
81+
"tracker": "JIRA",
82+
"id": "JIRA-1234",
83+
"type": "BUG",
84+
"uri": "http://jira.company.com/browse/JIRA-1234",
85+
"transition": "RESOLVED"
86+
}
87+
]
88+
}
89+
]
90+
}
91+
]
92+
}
93+
],
94+
"name": "Other composition",
95+
"time": 5005
96+
}
97+
]
98+
},
99+
"id": "a100572b-c3j4-441e-abc9-b62f48080011",
100+
"identity": "pkg:maven/com.mycompany.myproduct/artifact-name@1.0.0"
101+
},
102+
{
103+
"fileInformation": [
104+
{
105+
"extension": "jar",
106+
"classifier": "debug"
107+
}
108+
],
109+
"id": "a400572b-c3j4-441e-abc9-b62f48080033",
110+
"identity": "pkg:maven/com.mycompany.myproduct/artifact-name@1.0.0"
111+
}
112+
]
113+
}
114+
]
115+
},
116+
"testCaseExecutions": [
117+
{
118+
"testCaseStartedTime": 1481875925916,
119+
"testCaseFinishedEventId": "ab9d64b0-a6e9-4419-8b5d-a650c27c1111",
120+
"testCaseStartedEventId": "ab9d64b0-a6e9-4419-8b5d-a650c27c59ca",
121+
"testCaseFinishedTime": 1481875935919,
122+
"testCaseTriggeredTime": 1490777327230,
123+
"testCaseDuration": 10003,
124+
"testCaseTriggeredEventId": "ad3df0e0-404d-46ee-ab4f-3118457148f4",
125+
"outcome": {
126+
"conclusion": "SUCCESSFUL",
127+
"verdict": "PASSED",
128+
"tracker": "My Other Test Management System",
129+
"id": "TC5",
130+
"uri": "https://other-tm.company.com/testCase/TC5"
131+
}
132+
},
133+
{
134+
"testCaseStartedTime": 1481875925918,
135+
"testCaseFinishedEventId": "a7b20d3a-23a6-41c6-8da0-a87a240b4c2f",
136+
"testCaseStartedEventId": "a06defd8-fcf0-4e08-bf32-43bbc06cf655",
137+
"testCaseFinishedTime": 1481875938919,
138+
"testCaseTriggeredTime": 1490777357289,
139+
"testCaseDuration": 13001,
140+
"testCaseTriggeredEventId": "ad3df0e0-404d-46ee-ab4f-3118457148f5",
141+
"outcome": {
142+
"conclusion": "SUCCESSFUL",
143+
"verdict": "PASSED",
144+
"tracker": "My Other Test Management System",
145+
"id": "TC6",
146+
"uri": "https://other-tm.company.com/testCase/TC6"
147+
}
148+
}
149+
],
150+
"confidenceLevels": [
151+
{
152+
"eventId": "a37d59a3-069e-4f4c-8cc5-a52e73501a76",
153+
"name": "performance",
154+
"time": 1481875988767,
155+
"value": "SUCCESS"
156+
},
157+
{
158+
"eventId": "a37d59a3-069e-4f4c-8cc5-a52e73501a75",
159+
"name": "readyForDelivery",
160+
"time": 1481875944272,
161+
"value": "SUCCESS"
162+
}
163+
],
164+
"TemplateName": "ARTIFACT_1",
165+
"id": "aacc3c87-75e0-4b6d-88f5-b1a5d4e62b43",
166+
"time": 1481875891763,
167+
"type": "EiffelArtifactCreatedEvent",
168+
"identity": "pkg:maven/com.mycompany.myproduct/artifact-name@1.0.0",
169+
"artifacts": [
170+
{
171+
"fileInformation": [
172+
{
173+
"extension": "jar",
174+
"classifier": "debug"
175+
}
176+
],
177+
"id": "a100572b-c3b4-461e-abc9-b62f48087011",
178+
"identity": "pkg:maven/com.mycompany.myproduct/artifact-name@1.0.0"
179+
}
180+
],
181+
"publications": [
182+
{
183+
"eventId": "a3d05e6f-9bd9-4138-83b6-e20cc74680a3",
184+
"locations": [
185+
{
186+
"type": "PLAIN",
187+
"uri": "https://myrepository.com/mySubSystemArtifact"
188+
}
189+
],
190+
"time": 1481875921763
191+
},
192+
{
193+
"eventId": "a3d05e6f-9bd9-4138-83b6-e20cc74681b5",
194+
"locations": [
195+
{
196+
"type": "ARTIFACTORY",
197+
"uri": "https://myrepository.com/artifactory"
198+
}
199+
],
200+
"time": 1481875921843
201+
}
202+
]
203+
}

0 commit comments

Comments
 (0)