Skip to content

Commit

Permalink
more fixes for website deploy
Browse files Browse the repository at this point in the history
Summary:
we use `s3_website` to push the site to S3. turns out it doesn't support Java 11 yet (laurilehmijoki/s3_website#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
  • Loading branch information
mroch authored and facebook-github-bot committed May 29, 2020
1 parent 71939e7 commit 38783f4
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 6 deletions.
11 changes: 7 additions & 4 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down Expand Up @@ -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" }}
Expand All @@ -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:
Expand Down
7 changes: 5 additions & 2 deletions .circleci/images/website/Dockerfile
Original file line number Diff line number Diff line change
@@ -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 <[email protected]>

# 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
Expand Down

0 comments on commit 38783f4

Please sign in to comment.