File tree Expand file tree Collapse file tree 1 file changed +5
-18
lines changed Expand file tree Collapse file tree 1 file changed +5
-18
lines changed Original file line number Diff line number Diff line change @@ -163,7 +163,6 @@ export CIRCLE_TOKEN=':your_token'
163
163
164
164
curl https://circleci.com/api/v1.1/project/:vcs-type/:username/:project/$build_number/artifacts?circle-token=$CIRCLE_TOKEN \
165
165
| grep -o 'https://[^"]*' \
166
- | tr -d \" \
167
166
| sed -e "s/$/?circle-token=$CIRCLE_TOKEN/" \
168
167
| wget -v -i -
169
168
` ` `
@@ -180,23 +179,11 @@ Placeholder | Meaning
180
179
# ## Description of Commands
181
180
{:.no_toc}
182
181
183
- First,
184
- the CIRCLE_TOKEN environment variable is created.
185
- Then,
186
- the `curl` command fetches all artifact details for a build
187
- and pipes them to `grep`
188
- to extract the URLs.
189
- These URLs are saved to the `artifacts.txt` file.
190
- Finally,
191
- ` xargs` reads the text file,
192
- downloading artifacts using `wget`.
193
- All artifacts are downloaded to the current directory.
194
-
195
- **Note:**
196
- In the above example,
197
- ` xargs` runs four processes
198
- to download artifacts in parallel.
199
- Adjust the number given to the `-P` flag as needed.
182
+ First, the CIRCLE_TOKEN environment variable is created. Then, the `curl`
183
+ command fetches all artifact details for a build and pipes them to `grep` to
184
+ extract the URLs. Using `sed` your circle token is appended to the file to
185
+ create a unique file name. Finally, `wget` is used to download the artifacts to
186
+ the current directory in your terminal.
200
187
201
188
202
189
# # See Also
You can’t perform that action at this time.
0 commit comments