From e8bfb2185184c7b36b05d21176515a8e139ee945 Mon Sep 17 00:00:00 2001 From: Marcus Andersson Date: Fri, 30 Oct 2020 10:22:01 +0100 Subject: [PATCH] Build: changing docs docker image to prevent setting up frontend devenv. (#28670) * Build: changing docs dev-environment I have added a new image that will include the auto-generated frontend docs so you don't have to generate those locally prior to running the doc container. This has a dependency on this PR: https://github.com/grafana/website/pull/2744 and that we publish a version of the `grafana/docs-devenv` image. * will ignore everything (even symbolic links) * fixed spelling. * added newline. * updated image name. --- .gitignore | 4 ++-- docs/Makefile | 25 ++++++++----------------- 2 files changed, 10 insertions(+), 19 deletions(-) diff --git a/.gitignore b/.gitignore index 3ed4beb90f3..00d7d039c2a 100644 --- a/.gitignore +++ b/.gitignore @@ -119,5 +119,5 @@ compilation-stats.json # report dumping the whole system env /report.*.json -# auto generated front end docs -/docs/sources/packages_api/* \ No newline at end of file +# auto generated frontend docs +/docs/sources/packages_api diff --git a/docs/Makefile b/docs/Makefile index 7fef8c68f2f..ae035da788f 100644 --- a/docs/Makefile +++ b/docs/Makefile @@ -1,23 +1,14 @@ -.PHONY: docs docs-test docs-no-pull docs-generate-frontend docs-no-generate-frontend +.PHONY: docs docs-no-pull docs-test -IMAGE = grafana/docs-base:latest +IMAGE = grafana/grafana-docs-dev:latest -docs-generate-frontend: - yarn install --pure-lockfile - yarn run packages:build - yarn run packages:docsExtract - yarn run packages:docsToMarkdown - yarn run packages:clean - -docs-no-generate-frontend: - docker run -v $(shell pwd)/sources:/hugo/content/docs/grafana/latest -p 3002:3002 --rm -it $(IMAGE) /bin/bash -c 'make server' - -docs: docs-generate-frontend +docs: docker pull $(IMAGE) - docker run -v $(shell pwd)/sources:/hugo/content/docs/grafana/latest -p 3002:3002 --rm -it $(IMAGE) /bin/bash -c 'make server' + docker run -v $(shell pwd)/sources:/hugo/content/docs/grafana/latest -p 3002:3002 --rm -it $(IMAGE) + +docs-no-pull: + docker run -v $(shell pwd)/sources:/hugo/content/docs/grafana/latest -p 3002:3002 --rm -it $(IMAGE) -docs-no-pull: docs-generate-frontend docs-no-generate-frontend - -docs-test: docs-generate-frontend +docs-test: docker pull $(IMAGE) docker run -v $(shell pwd)/sources:/hugo/content/docs/grafana/latest --rm -it $(IMAGE) /bin/bash -c 'make prod'