Skip to content

Image tests using orca #2615

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 8 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
22 changes: 6 additions & 16 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -80,17 +80,12 @@ jobs:

test-image:
docker:
- image: plotly/testbed:latest
working_directory: /var/www/streambed/image_server/plotly.js/
- image: quay.io/plotly/image-exporter:single-entry
working_directory: /var/www/image-exporter/plotly.js/
steps:
- checkout
- attach_workspace:
at: /var/www/streambed/image_server/plotly.js/
- run:
name: Run and setup container
command: |
supervisord &
npm run docker -- setup
at: /var/www/image-exporter/plotly.js/
- run:
name: Run image tests
command: ./.circleci/test.sh image
Expand All @@ -99,17 +94,12 @@ jobs:

test-image2:
docker:
- image: plotly/testbed:latest
working_directory: /var/www/streambed/image_server/plotly.js/
- image: quay.io/plotly/image-exporter:single-entry
working_directory: /var/www/image-exporter/plotly.js/
steps:
- checkout
- attach_workspace:
at: /var/www/streambed/image_server/plotly.js/
- run:
name: Run and setup container
command: |
supervisord &
npm run docker -- setup
at: /var/www/image-exporter/plotly.js/
- run:
name: Run image tests
command: ./.circleci/test.sh image2
Expand Down
31 changes: 31 additions & 0 deletions .circleci/download_artifacts.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
#! /bin/bash
#
# https://circleci.com/docs/2.0/artifacts/#downloading-all-artifacts-for-a-build-on-circleci

if [[ $# -eq 0 ]] ; then
echo 'Must provide Circle CI built number'
echo 'Go to https://circleci.com/gh/plotly/plotly.js to find out'
exit 1
fi

if [[ -z "${CIRCLECI_TOKEN}" ]]; then
echo 'CIRCLECI_TOKEN environment variable must be set'
echo 'Go to https://circleci.com/account/api to generate an access token'
exit 1
fi

BUILT=$1
URL="https://circleci.com/api/v1.1/project/github/plotly/plotly.js/$BUILT/artifacts?circle-token=$CIRCLECI_TOKEN"
DIR="$(dirname $0)/../build/circleci-artifacts-$BUILT"

mkdir -p $DIR/{test_images,test_images_diff}

FILES=$(curl -s $URL | grep -o 'https://[^"]*')

for f in $FILES; do
if [[ $f == *"/test_images/"* ]]; then
wget $f %$CIRCLECI_TOKEN -q --show-progress -P $DIR/test_images
elif [[ $f == *"/test_images_diff/"* ]]; then
wget $f %$CIRCLECI_TOKEN -q --show-progress -P $DIR/test_images_diff
fi
done
Loading