From f95796e389275291582dac938af5949947a05b27 Mon Sep 17 00:00:00 2001 From: Matt Klein Date: Sun, 12 Nov 2017 16:20:04 -0800 Subject: [PATCH] docs: push to envoy-docs/latest (#234) Signed-off-by: Matt Klein --- .circleci/config.yml | 2 ++ ci/build_setup.sh | 2 +- ci/do_ci.sh | 5 +++++ docs/build.sh | 2 +- docs/publish.sh | 4 ++-- 5 files changed, 11 insertions(+), 4 deletions(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index 39b4189e..2e4db0b9 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -16,6 +16,8 @@ jobs: steps: - checkout - run: ci/do_ci.sh bazel.docs + - add_ssh_keys + - run: docs/publish.sh workflows: version: 2 diff --git a/ci/build_setup.sh b/ci/build_setup.sh index 2d0f5d9b..061422c0 100755 --- a/ci/build_setup.sh +++ b/ci/build_setup.sh @@ -4,7 +4,7 @@ set -e -NUM_CPUS=`grep -c ^processor /proc/cpuinfo` +[ -z "${NUM_CPUS}" ] && NUM_CPUS=`grep -c ^processor /proc/cpuinfo` export ENVOY_SRCDIR=/source diff --git a/ci/do_ci.sh b/ci/do_ci.sh index 882b2302..fa21e44d 100755 --- a/ci/do_ci.sh +++ b/ci/do_ci.sh @@ -4,6 +4,11 @@ set -e +# xlarge resource_class. +# See note: https://circleci.com/docs/2.0/configuration-reference/#resource_class for why we +# hard code this (basically due to how docker works). +export NUM_CPUS=8 + . "$(dirname "$0")"/build_setup.sh echo "building using ${NUM_CPUS} CPUs" diff --git a/docs/build.sh b/docs/build.sh index ae43f88e..b66229ed 100755 --- a/docs/build.sh +++ b/docs/build.sh @@ -21,7 +21,7 @@ fi source "${BUILD_DIR}"/venv/bin/activate -bazel --batch build -s ${BAZEL_BUILD_OPTIONS} //api --aspects \ +bazel --batch build ${BAZEL_BUILD_OPTIONS} //api --aspects \ tools/protodoc/protodoc.bzl%proto_doc_aspect --output_groups=rst # These are the protos we want to put in docs, this list will grow. diff --git a/docs/publish.sh b/docs/publish.sh index 861093f1..7e44a1c0 100755 --- a/docs/publish.sh +++ b/docs/publish.sh @@ -4,7 +4,7 @@ set -e DOCS_DIR=generated/docs CHECKOUT_DIR=../envoy-docs -PUBLISH_DIR="$CHECKOUT_DIR"/envoy +PUBLISH_DIR="$CHECKOUT_DIR"/envoy-docs/latest BUILD_SHA=`git rev-parse HEAD` if [ -z "$CIRCLE_PULL_REQUEST" ] && [ "$CIRCLE_BRANCH" == "master" ] @@ -24,7 +24,7 @@ then echo 'add' git add . echo 'commit' - git commit -m "docs @$BUILD_SHA" + git commit -m "docs data-plane-api@$BUILD_SHA" echo 'push' git push origin master else