From 3f6ef8bb9a70707bed9a7d5b35444f779143b833 Mon Sep 17 00:00:00 2001 From: mahdis-z Date: Wed, 4 Sep 2019 00:47:58 -0400 Subject: [PATCH 1/8] circleci config --- .circleci/config.yml | 73 ++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 73 insertions(+) create mode 100644 .circleci/config.yml diff --git a/.circleci/config.yml b/.circleci/config.yml new file mode 100644 index 000000000000..8a81a53dea96 --- /dev/null +++ b/.circleci/config.yml @@ -0,0 +1,73 @@ +# Python CircleCI 2.0 configuration file +# +# Check https://circleci.com/docs/2.0/language-python/ for more details +# +version: 2 +jobs: + build: + resource_class: xlarge + docker: + # a packaged system that has the instructions for creating a running container. + - image: circleci/ruby:2.4-node + + # Specify service dependencies here if necessary + # CircleCI maintains a library of pre-built images + # documented at https://circleci.com/docs/2.0/circleci-images/ + # - image: circleci/postgres:9.4 + + working_directory: ~/Plotly/documentation + + # actions that need to be taken to perform your job + steps: + - add_ssh_keys: + fingerprints: + - "SHA256:USaw9IC3qDmo5lTDeDE1ctu2VeLlrFbqhYZrPVJlw2U" + + # checks out the source code for a job over SSH + - checkout + + # Download and cache dependencies + - restore_cache: + keys: + - v1-dependencies-{{ checksum "requirements.txt" }} + # fallback to using the latest cache if no exact match is found + - v1-dependencies- + + - run: + name: install dependencies + command: | + ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)" + brew install gnupg + host pool.sks-keyservers.net + gpg --keyserver hkp://95.216.167.177 --recv-keys 409B6B1796C275462A1703113804BB82D39DC0E3 7D2BAF1CF37B13E2069D6956105BD0E739499BDB + + npm install electron@1.8.4 orca + pip install -r requirements.txt + sudo apt-get install -y poppler-utils libxtst6 xvfb libgtk2.0-0 libgconf-2-4 libnss3 libasound2 + + # Caches dependencies with a cache key + - save_cache: + paths: + - ./node_modules + key: v1-dependencies-{{ checksum "requirements.txt" }} + + - run: + name: make html + command: | + make -kj8 || make -kj8 + if [ "${CIRCLE_BRANCH}" == "source-design-merge" ]; then + cd build/html + git init + git config user.name mahdis-z + git config user.email maahhddiiss@gmail.com + git add * + git commit -m build + git push --force git@github.com:plotly/documentation.git source-design-merge:built + rm -rf .git + cd ../.. + fi + + + - store_artifacts: + path: build + destination: build From 61c15bbb94fd06432e04a958361cb5e4e597f65c Mon Sep 17 00:00:00 2001 From: mahdis-z Date: Wed, 4 Sep 2019 17:11:02 -0400 Subject: [PATCH 2/8] CircleCI config file --- .circleci/config.yml | 55 ++++---------------------------------------- 1 file changed, 4 insertions(+), 51 deletions(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index 8a81a53dea96..4ac9b1e41fd9 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -1,19 +1,10 @@ -# Python CircleCI 2.0 configuration file -# -# Check https://circleci.com/docs/2.0/language-python/ for more details -# version: 2 jobs: build: resource_class: xlarge docker: # a packaged system that has the instructions for creating a running container. - - image: circleci/ruby:2.4-node - - # Specify service dependencies here if necessary - # CircleCI maintains a library of pre-built images - # documented at https://circleci.com/docs/2.0/circleci-images/ - # - image: circleci/postgres:9.4 + - image: circleci/ruby:2.3.4 working_directory: ~/Plotly/documentation @@ -26,48 +17,10 @@ jobs: # checks out the source code for a job over SSH - checkout - # Download and cache dependencies - - restore_cache: - keys: - - v1-dependencies-{{ checksum "requirements.txt" }} - # fallback to using the latest cache if no exact match is found - - v1-dependencies- - - - run: - name: install dependencies - command: | - ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)" - brew install gnupg - host pool.sks-keyservers.net - gpg --keyserver hkp://95.216.167.177 --recv-keys 409B6B1796C275462A1703113804BB82D39DC0E3 7D2BAF1CF37B13E2069D6956105BD0E739499BDB - - npm install electron@1.8.4 orca - pip install -r requirements.txt - sudo apt-get install -y poppler-utils libxtst6 xvfb libgtk2.0-0 libgconf-2-4 libnss3 libasound2 - - # Caches dependencies with a cache key - - save_cache: - paths: - - ./node_modules - key: v1-dependencies-{{ checksum "requirements.txt" }} - - run: name: make html command: | - make -kj8 || make -kj8 if [ "${CIRCLE_BRANCH}" == "source-design-merge" ]; then - cd build/html - git init - git config user.name mahdis-z - git config user.email maahhddiiss@gmail.com - git add * - git commit -m build - git push --force git@github.com:plotly/documentation.git source-design-merge:built - rm -rf .git - cd ../.. - fi - - - - store_artifacts: - path: build - destination: build + rake deploy + else + bundle exec jekyll serve --config config_dev.yml From 00e542229e3be1866da1abf4513a44a2ea04d076 Mon Sep 17 00:00:00 2001 From: mahdis-z Date: Wed, 4 Sep 2019 17:21:06 -0400 Subject: [PATCH 3/8] debugging --- .circleci/config.yml | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index 4ac9b1e41fd9..183073fa77e2 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -6,8 +6,6 @@ jobs: # a packaged system that has the instructions for creating a running container. - image: circleci/ruby:2.3.4 - working_directory: ~/Plotly/documentation - # actions that need to be taken to perform your job steps: - add_ssh_keys: @@ -24,3 +22,4 @@ jobs: rake deploy else bundle exec jekyll serve --config config_dev.yml + fi From 8defc03db0067160f0842a4b9c52654e636ccb90 Mon Sep 17 00:00:00 2001 From: mahdis-z Date: Wed, 4 Sep 2019 17:30:23 -0400 Subject: [PATCH 4/8] debugging --- .circleci/config.yml | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index 183073fa77e2..8022e43dd04d 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -14,9 +14,15 @@ jobs: # checks out the source code for a job over SSH - checkout + + - run: + name: install dependencies + command: | + gem install bundler + bundle install - run: - name: make html + name: deployment command: | if [ "${CIRCLE_BRANCH}" == "source-design-merge" ]; then rake deploy From 3fed294d7dc5d280b2d2f28246773a2f0491c198 Mon Sep 17 00:00:00 2001 From: mahdis-z Date: Wed, 4 Sep 2019 18:27:17 -0400 Subject: [PATCH 5/8] debugging --- .circleci/config.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.circleci/config.yml b/.circleci/config.yml index 8022e43dd04d..ca4e0b56b5f6 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -5,6 +5,8 @@ jobs: docker: # a packaged system that has the instructions for creating a running container. - image: circleci/ruby:2.3.4 + + working_directory: ~/repo # actions that need to be taken to perform your job steps: From 1317eb3db5055c45aa1ff9851046294c4870f164 Mon Sep 17 00:00:00 2001 From: mahdis-z Date: Thu, 5 Sep 2019 12:33:01 -0400 Subject: [PATCH 6/8] debugging --- .circleci/config.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index ca4e0b56b5f6..df8a4bb9a468 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -29,5 +29,5 @@ jobs: if [ "${CIRCLE_BRANCH}" == "source-design-merge" ]; then rake deploy else - bundle exec jekyll serve --config config_dev.yml + bundle exec jekyll serve --config _config_dev.yml fi From 98009eaf796168881a4b7fd9f0a279532131c95c Mon Sep 17 00:00:00 2001 From: mahdis-z Date: Fri, 6 Sep 2019 10:55:41 -0400 Subject: [PATCH 7/8] debugging --- .circleci/config.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index df8a4bb9a468..452432ff3580 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -4,7 +4,7 @@ jobs: resource_class: xlarge docker: # a packaged system that has the instructions for creating a running container. - - image: circleci/ruby:2.3.4 + - image: circleci/ruby:2.3.3 working_directory: ~/repo From 7dd3074127e969e6bb2de2b1ad351bb449963ba2 Mon Sep 17 00:00:00 2001 From: mahdis-z Date: Fri, 6 Sep 2019 11:39:24 -0400 Subject: [PATCH 8/8] debugging --- .circleci/config.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index 452432ff3580..1d4f3510bc65 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -29,5 +29,5 @@ jobs: if [ "${CIRCLE_BRANCH}" == "source-design-merge" ]; then rake deploy else - bundle exec jekyll serve --config _config_dev.yml + bundle exec jekyll build fi