screwdriver-api 4.1.167 → 4.1.168
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
Binary file
|
|
@@ -11,16 +11,22 @@ queue "Resque(Redis)" as resque
|
|
|
11
11
|
participant "unzip worker" as worker
|
|
12
12
|
|
|
13
13
|
|
|
14
|
-
build -> store: store-cli
|
|
15
|
-
store -> s3: upload zip
|
|
14
|
+
build -> store: store-cli\nPUT /builds/{id}/ARTIFACTS/SD_ARTIFACT.zip
|
|
15
|
+
store -> s3: upload zip artifact
|
|
16
16
|
build -> api: POST /builds/{id}/artifacts/unzip
|
|
17
|
-
api -> qservice: POST /queue/message
|
|
17
|
+
api -> qservice: POST /queue/message?type=unzip
|
|
18
18
|
qservice -> resque: enqueue
|
|
19
|
-
qservice --> api: response\n(POST /queue/message)
|
|
19
|
+
qservice --> api: response\n(POST /queue/message?type=unzip)
|
|
20
20
|
api --> build: response\n(POST /builds/{id}/artifacts/unzip)
|
|
21
21
|
worker -> resque : dequeue
|
|
22
|
-
worker -> store: GET zip
|
|
23
|
-
store
|
|
24
|
-
|
|
22
|
+
worker -> store: GET /builds/{id}/ARTIFACTS/SD_ARTIFACT.zip
|
|
23
|
+
store -> s3: download zip artifact
|
|
24
|
+
store --> worker: response\n(GET /builds/{id}/ARTIFACTS/SD_ARTIFACT.zip)
|
|
25
|
+
worker -> store: PUT /builds/{id}/ARTIFACTS/*
|
|
26
|
+
store -> s3: upload unzip artifacts
|
|
27
|
+
store --> worker: response\n(PUT /builds/{id}/ARTIFACTS/*)
|
|
28
|
+
worker -> store: DELETE /builds/{id}/ARTIFACTS/SD_ARTIFACT.zip
|
|
29
|
+
store -> s3: delete zip artifact
|
|
30
|
+
store --> worker: response\n(DELETE /builds/{id}/ARTIFACTS/SD_ARTIFACT.zip)
|
|
25
31
|
|
|
26
32
|
@enduml
|
|
@@ -18,7 +18,7 @@ Outline:
|
|
|
18
18
|
1. upload zip file to Object Storage(S3) (sd build -> store -> S3)
|
|
19
19
|
1. notify to queue-service after upload zip file (sd build -> api -> queue-service)
|
|
20
20
|
1. send a message to unzip file (queue-service -> Resque)
|
|
21
|
-
1. a consumer(unzip worker) receives the message, then the consumer downloads the zip file and unzips it, re-uploads unzipped files
|
|
21
|
+
1. a consumer(unzip worker) receives the message, then the consumer downloads the zip file and unzips it, re-uploads unzipped files, deletes the zip file
|
|
22
22
|
|
|
23
23
|
## Flow(Details)
|
|
24
24
|
|
|
@@ -41,7 +41,7 @@ Outline:
|
|
|
41
41
|
|
|
42
42
|
Use sd-token to allow only requests when the build ID in the token and the id in the path are the same.
|
|
43
43
|
|
|
44
|
-
#####
|
|
44
|
+
##### Parameters
|
|
45
45
|
|
|
46
46
|
|Name|Type|In|Description|Example|
|
|
47
47
|
|:--|:--|:--|:--|:--|
|
|
@@ -97,7 +97,7 @@ Status(Error):
|
|
|
97
97
|
|
|
98
98
|
Use sd-token to only allow requests from SD API
|
|
99
99
|
|
|
100
|
-
#####
|
|
100
|
+
##### Parameters
|
|
101
101
|
|
|
102
102
|
|Name|Type|In|Description|Example|
|
|
103
103
|
|:--|:--|:--|:--|:--|
|
|
@@ -134,12 +134,28 @@ This is a new component.
|
|
|
134
134
|
1. If retry fails
|
|
135
135
|
1. Add a statusMessage to the build to notify the user that the unzip has failed
|
|
136
136
|
1. Log the failure.
|
|
137
|
+
1. Delete SD_ARTIFACT.zip
|
|
137
138
|
|
|
138
139
|
### SD Store (store)
|
|
140
|
+
Enable the following operations from unzip worker
|
|
141
|
+
1. Download SD_ARTIFACT.zip
|
|
142
|
+
1. Upload unzipped artifact files
|
|
143
|
+
1. Delete SD_ARTIFACT.zip
|
|
139
144
|
|
|
140
|
-
|
|
145
|
+
#### API
|
|
141
146
|
|
|
142
|
-
|
|
147
|
+
|Method|URL|Description|
|
|
148
|
+
|:--|:--|:--|
|
|
149
|
+
|DELETE|/builds/{id}/{artifact*}|delete zipped artifact files|
|
|
150
|
+
|
|
151
|
+
##### Authentication & Authorization
|
|
143
152
|
|
|
144
|
-
- Able to Upload and
|
|
153
|
+
- Able to Upload, Download, and Delete artifact files by unzip worker scope token
|
|
145
154
|
- Return an error if the build id of the build artifacts to be operated is different from the build id contained in the token
|
|
155
|
+
|
|
156
|
+
##### Parameters
|
|
157
|
+
|
|
158
|
+
|Name|Type|In|Description|Example|
|
|
159
|
+
|:--|:--|:--|:--|:--|
|
|
160
|
+
|id|integer|path|build ID|12|
|
|
161
|
+
|artifact*|string|path|path to artifact|ARTIFACTS/SD_ARTIFACT.zip|
|