Skip to content
You signed in with another tab or window. Reload to refresh your session.
You signed out in another tab or window. Reload to refresh your session.
You switched accounts on another tab or window. Reload to refresh your session.
Dismiss alert
File tree Expand file tree Collapse file tree 1 file changed +31
-0
lines changed Expand file tree Collapse file tree 1 file changed +31
-0
lines changed Original file line number Diff line number Diff line change
1
+ #! /bin/bash
2
+ #
3
+ # https://circleci.com/docs/2.0/artifacts/#downloading-all-artifacts-for-a-build-on-circleci
4
+
5
+ if [[ $# -eq 0 ]] ; then
6
+ echo ' Must provide Circle CI built number'
7
+ echo ' Go to https://circleci.com/gh/plotly/plotly.js to find out'
8
+ exit 1
9
+ fi
10
+
11
+ if [[ -z " ${CIRCLECI_TOKEN} " ]]; then
12
+ echo ' CIRCLECI_TOKEN environment variable must be set'
13
+ echo ' Go to https://circleci.com/account/api to generate an access token'
14
+ exit 1
15
+ fi
16
+
17
+ BUILT=$1
18
+ URL=" https://circleci.com/api/v1.1/project/github/plotly/plotly.js/$BUILT /artifacts?circle-token=$CIRCLECI_TOKEN "
19
+ DIR=" $( dirname $0 ) /../build/circleci-artifacts-$BUILT "
20
+
21
+ mkdir -p $DIR /{test_images,test_images_diff}
22
+
23
+ FILES=$( curl -s $URL | grep -o ' https://[^"]*' )
24
+
25
+ for f in $FILES ; do
26
+ if [[ $f == * " /test_images/" * ]]; then
27
+ wget $f %$CIRCLECI_TOKEN -q --show-progress -P $DIR /test_images
28
+ elif [[ $f == * " /test_images_diff/" * ]]; then
29
+ wget $f %$CIRCLECI_TOKEN -q --show-progress -P $DIR /test_images_diff
30
+ fi
31
+ done
You can’t perform that action at this time.
0 commit comments