From 38783f4f9f4cbe1288ce4b3de944c46cfa5ce433 Mon Sep 17 00:00:00 2001 From: Marshall Roch Date: Fri, 29 May 2020 10:39:42 -0700 Subject: [PATCH] more fixes for website deploy Summary: we use `s3_website` to push the site to S3. turns out it doesn't support Java 11 yet (https://github.com/laurilehmijoki/s3_website/issues/300) so I updated our docker image to use Java 8. also fixed a deprecation warning about using `bundle install --path`, and fixed a related cwd issue with calling `bundle exec` from outside `website/`. Reviewed By: jbrown215 Differential Revision: D21786250 fbshipit-source-id: 21e01836e6d2cc8b7e33aac992533f1a7153ecdc --- .circleci/config.yml | 11 +++++++---- .circleci/images/website/Dockerfile | 7 +++++-- 2 files changed, 12 insertions(+), 6 deletions(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index 0e69344fc9e..3e350bd40b2 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -81,7 +81,7 @@ executors: working_directory: /flow flow-website: docker: - - image: flowtype/flow-website:0.0.4 + - image: flowtype/flow-website:0.0.5 working_directory: ~/flow awscli: docker: @@ -512,8 +512,9 @@ jobs: - run: name: Install gems command: | - cd website && \ - bundle install --path vendor/bundle && \ + cd website + bundle config set path 'vendor/bundle' + bundle install bundle exec s3_website install - save_cache: key: v2-gem-{{ arch }}-{{ .Branch }}-{{ checksum "website/Gemfile.lock" }} @@ -524,7 +525,9 @@ jobs: command: PATH=~/flow/bin/linux:$PATH .circleci/build_website.sh - run: name: Publish website - command: bundle exec s3_website push --config-dir=website/ --site=dist/flow.org + command: | + cd website + bundle exec s3_website push --site=~/flow/dist/flow.org # deploys flow.js and the libdefs to Try Flow on release branches try_flow_deploy: diff --git a/.circleci/images/website/Dockerfile b/.circleci/images/website/Dockerfile index f0c6bcdcb4a..9d09d1a556b 100644 --- a/.circleci/images/website/Dockerfile +++ b/.circleci/images/website/Dockerfile @@ -1,8 +1,11 @@ -FROM circleci/ruby:2.6-node +# use Debian Stretch because it still provides jre8, which s3_website currently +# needs. See https://github.com/laurilehmijoki/s3_website/issues/300 and +# https://github.com/laurilehmijoki/s3_website/pull/329 +FROM circleci/ruby:2.6.6-stretch-node MAINTAINER Flow Team # s3_website needs Java -RUN sudo apt-get update && sudo apt-get install -y openjdk-11-jre-headless +RUN sudo apt-get update && sudo apt-get install -y openjdk-8-jre-headless # install bundler 2.x RUN sudo gem update --system