From 8b245a442c27ede3743de333405be88ffa70a23f Mon Sep 17 00:00:00 2001 From: Ilya Dmitrichenko Date: Thu, 13 Apr 2017 12:32:10 +0100 Subject: [PATCH 1/2] Add website preview --- .gitignore | 3 +++ .ruby-version | 1 + Makefile | 11 +++++++++++ 3 files changed, 15 insertions(+) create mode 100644 .ruby-version diff --git a/.gitignore b/.gitignore index 3a7f66ad..b7e2e426 100644 --- a/.gitignore +++ b/.gitignore @@ -70,3 +70,6 @@ test/coverage.* *qemu-*-static terraform.tfstate terraform.tfstate.backup + +# Website +site-build diff --git a/.ruby-version b/.ruby-version new file mode 100644 index 00000000..276cbf9e --- /dev/null +++ b/.ruby-version @@ -0,0 +1 @@ +2.3.0 diff --git a/Makefile b/Makefile index 63506a8a..154d86aa 100644 --- a/Makefile +++ b/Makefile @@ -378,3 +378,14 @@ integration-tests: all testrunner # integration-tests # RUNNER_ARGS="-parallel" ./test/run-integration-tests.sh + +# This target is only intended for use in Netlify CI environment for generating preview pages on feature branches and pull requests. +# We need to obtain website repository (checked out under `site-build`) and place `site` directory into the context (`site-build/_weave_net_docs`). +# We then run make in `site-build` and Netlify will publish the output (`site-build/_site`). +netlify-site-preview: + @mkdir -p site-build + @curl --user $(WEBSITE_GITHUB_USER) --silent 'https://codeload.github.com/weaveworks/website-next/tar.gz/$(WEBSITE_BRANCH)' \ + | tar --extract --gunzip --directory site-build --strip 1 + @cp -r site site-build/_weave_net_docs + @$(MAKE) -C site-build netlify_ensure_install + @$(MAKE) -C site-build BUILD_ENV=netlify From e93a145bab68b0b96d84bc8b324f8540c62a7d7f Mon Sep 17 00:00:00 2001 From: Bryan Boreham Date: Fri, 5 May 2017 10:52:26 +0000 Subject: [PATCH 2/2] Build a version of wordepress that handles 'search-type' attribute --- bin/circle-deploy-issues | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bin/circle-deploy-issues b/bin/circle-deploy-issues index d8617969..b843731e 100755 --- a/bin/circle-deploy-issues +++ b/bin/circle-deploy-issues @@ -32,7 +32,7 @@ post_comment() { } cd $SRCDIR -bin/install-wordepress v1.0.0 +bin/install-wordepress dc25407c2d2669366cd5c5b41c166b719f5570d0 bin/publish-site "$WP_DEV_URL" "$WP_DEV_USER" "$WP_DEV_PASSWORD" if [ -n "$WP_GH_COMMENT_TOKEN" -a -n "$GH_PR" ] ; then