From 415af758c9479ebc3f126043da79d90acb6cc13c Mon Sep 17 00:00:00 2001 From: odubajDT Date: Thu, 30 Nov 2023 08:52:21 +0100 Subject: [PATCH 01/14] chore: introduce dev environment for documentation Signed-off-by: odubajDT --- Makefile | 6 +- docs-new/CONTRIBUTING.md | 62 +++++++++++++++++ docs-new/Makefile | 7 ++ .../{ => docs}/assets/higher-compliance.png | Bin .../{ => docs}/assets/javascripts/versions.js | 0 .../{ => docs}/assets/keptn-icon-white.svg | 0 .../{ => docs}/assets/stylesheets/home.css | 0 .../assets/stylesheets/versions.css | 0 docs-new/docs/documentation/index.md | 3 + docs-new/mkdocs.yaml | 64 ++++++++++++++++++ 10 files changed, 141 insertions(+), 1 deletion(-) create mode 100644 docs-new/CONTRIBUTING.md create mode 100644 docs-new/Makefile rename docs-new/{ => docs}/assets/higher-compliance.png (100%) rename docs-new/{ => docs}/assets/javascripts/versions.js (100%) rename docs-new/{ => docs}/assets/keptn-icon-white.svg (100%) rename docs-new/{ => docs}/assets/stylesheets/home.css (100%) rename docs-new/{ => docs}/assets/stylesheets/versions.css (100%) create mode 100644 docs-new/docs/documentation/index.md create mode 100644 docs-new/mkdocs.yaml diff --git a/Makefile b/Makefile index 4e9e17f03c..1acf91504e 100644 --- a/Makefile +++ b/Makefile @@ -134,9 +134,13 @@ build-deploy-certmanager: .PHONY: build-deploy-dev-environment build-deploy-dev-environment: build-deploy-certmanager build-deploy-operator build-deploy-metrics-operator build-deploy-scheduler - include docs/Makefile +.PHONY: mkdocs-deploy +mkdocs-deploy: + $(MAKE) -C docs-new install + $(MAKE) -C docs-new deploy + yamllint: @docker run --rm -t -v $(PWD):/data cytopia/yamllint:$(YAMLLINT_VERSION) . diff --git a/docs-new/CONTRIBUTING.md b/docs-new/CONTRIBUTING.md new file mode 100644 index 0000000000..5d2cc00a83 --- /dev/null +++ b/docs-new/CONTRIBUTING.md @@ -0,0 +1,62 @@ +# Contribute to the Keptn documentation + +This document provides information about contributing to +the [Keptn documentation](https://lifecycle.keptn.sh/docs/), +which is part of the [Keptn](https://keptn.sh) website. + +The Keptn documentation is authored with +[markdown](https://www.markdownguide.org/basic-syntax/) +and rendered using +[MkDocs](https://www.mkdocs.org/). + +We welcome and encourage contributions of all levels. +You can make modifications using the GitHub editor; +this works well for small modifications but, +if you are making significant changes, +you may find it better to fork and clone the repository +and make changes using the text editor or IDE of your choice. +You can also run the website locally +to check the rendered documentation +and then push your changes to the repository as a pull request. + +If you need help getting started, +feel free to ask for help on the `#help-contributing` or `#keptn-docs` channels on the [Keptn Slack](https://keptn.sh/community/#slack). +We were all new to this once and are happy to help you! + +## Guidelines for Contributing + +Please check [Contribution Guidelines](content/en/contribute/docs/contrib-guidelines-docs/_index.md). + +## Building the Documentation Locally + +First, you need to have `mkdocs` installed on your system. +To install it, execute + +```shell +make install +``` + +This will use `pip` to install `mkdocs` on your system. +Please make sure `pip` is installed on your local system. + +To build and deploy the documentation locally, execute + +```shell +make deploy +``` + +The URL on which your local documentation website is deployed will be +displayed in the logs. + +## Interacting with github + +The documentation source is stored on github.com +and you use the standard github facilities to modify it. +Please check [Working with Git](content/en/contribute/general/git/_index.md). + +### Developer Certification of Origin (DCO) + +All commits must be accompanied by a DCO sign-off. + See +[DCO](content/en/contribute/general/dco) +for more information. diff --git a/docs-new/Makefile b/docs-new/Makefile new file mode 100644 index 0000000000..e32cc67cd6 --- /dev/null +++ b/docs-new/Makefile @@ -0,0 +1,7 @@ +.PHONY: install +install: + pip install mkdocs "mkdocs-material[imaging]" + +.PHONY: deploy +deploy: + mkdocs serve diff --git a/docs-new/assets/higher-compliance.png b/docs-new/docs/assets/higher-compliance.png similarity index 100% rename from docs-new/assets/higher-compliance.png rename to docs-new/docs/assets/higher-compliance.png diff --git a/docs-new/assets/javascripts/versions.js b/docs-new/docs/assets/javascripts/versions.js similarity index 100% rename from docs-new/assets/javascripts/versions.js rename to docs-new/docs/assets/javascripts/versions.js diff --git a/docs-new/assets/keptn-icon-white.svg b/docs-new/docs/assets/keptn-icon-white.svg similarity index 100% rename from docs-new/assets/keptn-icon-white.svg rename to docs-new/docs/assets/keptn-icon-white.svg diff --git a/docs-new/assets/stylesheets/home.css b/docs-new/docs/assets/stylesheets/home.css similarity index 100% rename from docs-new/assets/stylesheets/home.css rename to docs-new/docs/assets/stylesheets/home.css diff --git a/docs-new/assets/stylesheets/versions.css b/docs-new/docs/assets/stylesheets/versions.css similarity index 100% rename from docs-new/assets/stylesheets/versions.css rename to docs-new/docs/assets/stylesheets/versions.css diff --git a/docs-new/docs/documentation/index.md b/docs-new/docs/documentation/index.md new file mode 100644 index 0000000000..b9143495fc --- /dev/null +++ b/docs-new/docs/documentation/index.md @@ -0,0 +1,3 @@ +# Keptn Documentation + +This is the documentation page. diff --git a/docs-new/mkdocs.yaml b/docs-new/mkdocs.yaml new file mode 100644 index 0000000000..52e6ee1e63 --- /dev/null +++ b/docs-new/mkdocs.yaml @@ -0,0 +1,64 @@ +site_name: Keptn - Supercharge Your Deployments +theme: + name: material + custom_dir: overrides + palette: + # Palette toggle for light mode + - scheme: default + media: "(prefers-color-scheme: light)" + toggle: + icon: material/brightness-7 + name: Switch to dark mode + + # Palette toggle for dark mode + - scheme: slate + media: "(prefers-color-scheme: dark)" + toggle: + icon: material/brightness-4 + name: Switch to light mode + logo: assets/keptn-icon-white.svg + favicon: https://lifecycle.keptn.sh/images/logo-mobile.svg + features: + - navigation.tabs + - navigation.tracking + - navigation.indexes + - navigation.top + - search.suggest + - search.highlight + - content.action.edit + - content.action.view +repo_name: keptn/lifecycle-toolkit +repo_url: https://github.com/keptn/lifecycle-toolkit +site_url: https://lifecycle.keptn.sh +edit_uri: edit/main/docs/ +site_description: >- + Achieve cloud-native application lifecycle orchestration with Keptn. + Enhance Kubernetes monitoring, streamline metrics ingestion, and + automate deployment validation. Join the Keptn community for insights. +extra: + social: + - icon: fontawesome/solid/house + link: https://keptn.sh + - icon: fontawesome/brands/twitter + link: https://twitter.com/keptnProject + - icon: fontawesome/brands/linkedin + link: https://www.linkedin.com/company/keptnproject + - icon: fontawesome/brands/github-alt + link: https://github.com/keptn + - icon: fontawesome/brands/slack + link: https://cloud-native.slack.com/archives/C017GAX90GM +extra_javascript: + - assets/javascripts/versions.js +extra_css: + - assets/stylesheets/versions.css +plugins: + - social + - include-markdown: + trailing_newlines: false + - git-revision-date-localized + +nav: + - Home: + - index.md + - Documentation: + - documentation/index.md From 9d84d78f10c0d7e6bb6736f9cda306fe1cb06ee4 Mon Sep 17 00:00:00 2001 From: odubajDT Date: Thu, 30 Nov 2023 09:04:23 +0100 Subject: [PATCH 02/14] pr review Signed-off-by: odubajDT --- docs-new/Makefile | 10 +++++++--- docs-new/{docs => }/assets/higher-compliance.png | Bin docs-new/{docs => }/assets/javascripts/versions.js | 0 docs-new/{docs => }/assets/keptn-icon-white.svg | 0 docs-new/{docs => }/assets/stylesheets/home.css | 0 docs-new/{docs => }/assets/stylesheets/versions.css | 0 docs-new/requirements.txt | 2 ++ 7 files changed, 9 insertions(+), 3 deletions(-) rename docs-new/{docs => }/assets/higher-compliance.png (100%) rename docs-new/{docs => }/assets/javascripts/versions.js (100%) rename docs-new/{docs => }/assets/keptn-icon-white.svg (100%) rename docs-new/{docs => }/assets/stylesheets/home.css (100%) rename docs-new/{docs => }/assets/stylesheets/versions.css (100%) create mode 100644 docs-new/requirements.txt diff --git a/docs-new/Makefile b/docs-new/Makefile index e32cc67cd6..1ca2e51880 100644 --- a/docs-new/Makefile +++ b/docs-new/Makefile @@ -1,7 +1,11 @@ .PHONY: install install: - pip install mkdocs "mkdocs-material[imaging]" + pip install -r requirements.txt -.PHONY: deploy -deploy: +.PHONY: serve +serve: mkdocs serve + +.PHONY: build +build: + mkdocs build diff --git a/docs-new/docs/assets/higher-compliance.png b/docs-new/assets/higher-compliance.png similarity index 100% rename from docs-new/docs/assets/higher-compliance.png rename to docs-new/assets/higher-compliance.png diff --git a/docs-new/docs/assets/javascripts/versions.js b/docs-new/assets/javascripts/versions.js similarity index 100% rename from docs-new/docs/assets/javascripts/versions.js rename to docs-new/assets/javascripts/versions.js diff --git a/docs-new/docs/assets/keptn-icon-white.svg b/docs-new/assets/keptn-icon-white.svg similarity index 100% rename from docs-new/docs/assets/keptn-icon-white.svg rename to docs-new/assets/keptn-icon-white.svg diff --git a/docs-new/docs/assets/stylesheets/home.css b/docs-new/assets/stylesheets/home.css similarity index 100% rename from docs-new/docs/assets/stylesheets/home.css rename to docs-new/assets/stylesheets/home.css diff --git a/docs-new/docs/assets/stylesheets/versions.css b/docs-new/assets/stylesheets/versions.css similarity index 100% rename from docs-new/docs/assets/stylesheets/versions.css rename to docs-new/assets/stylesheets/versions.css diff --git a/docs-new/requirements.txt b/docs-new/requirements.txt new file mode 100644 index 0000000000..e4ef78a6fb --- /dev/null +++ b/docs-new/requirements.txt @@ -0,0 +1,2 @@ +mkdocs +mkdocs-material[imaging] \ No newline at end of file From 8e2eaef668358e926dab0357abef2545ae060f84 Mon Sep 17 00:00:00 2001 From: odubajDT Date: Thu, 30 Nov 2023 09:14:30 +0100 Subject: [PATCH 03/14] polish Signed-off-by: odubajDT --- Makefile | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/Makefile b/Makefile index 1acf91504e..07ed856272 100644 --- a/Makefile +++ b/Makefile @@ -136,10 +136,10 @@ build-deploy-dev-environment: build-deploy-certmanager build-deploy-operator bui include docs/Makefile -.PHONY: mkdocs-deploy -mkdocs-deploy: +.PHONY: docs-deploy +docs-deploy: $(MAKE) -C docs-new install - $(MAKE) -C docs-new deploy + $(MAKE) -C docs-new serve yamllint: @docker run --rm -t -v $(PWD):/data cytopia/yamllint:$(YAMLLINT_VERSION) . From 3d25ff20e67927d47761431ffbf1ca53ce24f89f Mon Sep 17 00:00:00 2001 From: odubajDT Date: Thu, 30 Nov 2023 11:39:12 +0100 Subject: [PATCH 04/14] serve docs in container Signed-off-by: odubajDT --- .gitignore | 2 ++ Makefile | 1 - docs-new/Makefile | 15 +++++++-------- docs-new/mkdocs.yaml | 3 ++- docs-new/requirements.txt | 4 +++- 5 files changed, 14 insertions(+), 11 deletions(-) diff --git a/.gitignore b/.gitignore index 6b3c3aa4f3..54c401555c 100644 --- a/.gitignore +++ b/.gitignore @@ -52,3 +52,5 @@ readme-generator-for-helm/ /out.yaml /test.yaml **helm_tests_output.yaml + +/docs-new/site diff --git a/Makefile b/Makefile index 07ed856272..74b68527f0 100644 --- a/Makefile +++ b/Makefile @@ -138,7 +138,6 @@ include docs/Makefile .PHONY: docs-deploy docs-deploy: - $(MAKE) -C docs-new install $(MAKE) -C docs-new serve yamllint: diff --git a/docs-new/Makefile b/docs-new/Makefile index 1ca2e51880..0e7fbc7989 100644 --- a/docs-new/Makefile +++ b/docs-new/Makefile @@ -1,11 +1,10 @@ -.PHONY: install -install: - pip install -r requirements.txt - -.PHONY: serve -serve: - mkdocs serve +MKDOCS_DOCKER_IMAGE=squidfunk/mkdocs-material:9 +PWD=$(shell pwd) .PHONY: build build: - mkdocs build + docker run --rm -it -v ${PWD}:/docs --entrypoint "" ${MKDOCS_DOCKER_IMAGE} sh -c 'pip3 install -r /docs/requirements.txt; mkdocs build' + +.PHONY: serve +serve: build + docker run --rm -it -p 8000:8000 -v ${PWD}/site:/site -w /site --entrypoint "" ${MKDOCS_DOCKER_IMAGE} python3 -m http.server --bind 0.0.0.0 8000 diff --git a/docs-new/mkdocs.yaml b/docs-new/mkdocs.yaml index 52e6ee1e63..53359d27c1 100644 --- a/docs-new/mkdocs.yaml +++ b/docs-new/mkdocs.yaml @@ -55,7 +55,8 @@ plugins: - social - include-markdown: trailing_newlines: false - - git-revision-date-localized + - git-revision-date-localized: + fallback_to_build_date: true nav: - Home: diff --git a/docs-new/requirements.txt b/docs-new/requirements.txt index e4ef78a6fb..1623e014d7 100644 --- a/docs-new/requirements.txt +++ b/docs-new/requirements.txt @@ -1,2 +1,4 @@ mkdocs -mkdocs-material[imaging] \ No newline at end of file +mkdocs-material +mkdocs-include-markdown-plugin +mkdocs-git-revision-date-localized-plugin \ No newline at end of file From 85e8b53f6eeec352b53648bb94a02cea274b5351 Mon Sep 17 00:00:00 2001 From: odubajDT Date: Thu, 30 Nov 2023 11:43:37 +0100 Subject: [PATCH 05/14] adapt docs Signed-off-by: odubajDT --- docs-new/CONTRIBUTING.md | 16 +++++----------- 1 file changed, 5 insertions(+), 11 deletions(-) diff --git a/docs-new/CONTRIBUTING.md b/docs-new/CONTRIBUTING.md index 5d2cc00a83..d8b26f26b5 100644 --- a/docs-new/CONTRIBUTING.md +++ b/docs-new/CONTRIBUTING.md @@ -29,24 +29,18 @@ Please check [Contribution Guidelines](content/en/contribute/docs/contrib-guidel ## Building the Documentation Locally -First, you need to have `mkdocs` installed on your system. -To install it, execute +To build and deploy the documentation in a docker container, execute ```shell -make install +make serve ``` -This will use `pip` to install `mkdocs` on your system. -Please make sure `pip` is installed on your local system. - -To build and deploy the documentation locally, execute - -```shell -make deploy -``` +This will setup a docker container, install all needed dependencies, +build the documentation and serve it. The URL on which your local documentation website is deployed will be displayed in the logs. +By default is should be `http://0.0.0.0:8000/` ## Interacting with github From 40e66ffd0940f042eead9174a748227b98cae414 Mon Sep 17 00:00:00 2001 From: odubajDT Date: Thu, 30 Nov 2023 13:28:57 +0100 Subject: [PATCH 06/14] fix Signed-off-by: odubajDT --- Makefile | 13 ++++-- docs-new/CONTRIBUTING.md | 19 +------- docs-new/Makefile | 10 ----- docs-new/docs/documentation/index.md | 3 -- docs-new/mkdocs.yaml | 65 ---------------------------- docs-new/requirements.txt | 4 -- mkdocs.yml | 3 +- 7 files changed, 13 insertions(+), 104 deletions(-) delete mode 100644 docs-new/Makefile delete mode 100644 docs-new/docs/documentation/index.md delete mode 100644 docs-new/mkdocs.yaml delete mode 100644 docs-new/requirements.txt diff --git a/Makefile b/Makefile index 74b68527f0..596e31f7dc 100644 --- a/Makefile +++ b/Makefile @@ -136,9 +136,16 @@ build-deploy-dev-environment: build-deploy-certmanager build-deploy-operator bui include docs/Makefile -.PHONY: docs-deploy -docs-deploy: - $(MAKE) -C docs-new serve +MKDOCS_DOCKER_IMAGE=squidfunk/mkdocs-material:9 +PWD=$(shell pwd) + +.PHONY: docs-build +docs-build: + docker run --rm -it -v ${PWD}/docs-new:/docs-new -v ${PWD}/mkdocs.yml:/mkdocs.yml -v ${PWD}/requirements.txt:/requirements.txt --entrypoint "" ${MKDOCS_DOCKER_IMAGE} sh -c 'cd /; ls -la .; pip3 install -r requirements.txt; mkdocs build' + +.PHONY: docs-serve +docs-serve: docs-build + docker run --rm -it -p 8000:8000 -v ${PWD}/site:/site -w /site --entrypoint "" ${MKDOCS_DOCKER_IMAGE} python3 -m http.server --bind 0.0.0.0 8000 yamllint: @docker run --rm -t -v $(PWD):/data cytopia/yamllint:$(YAMLLINT_VERSION) . diff --git a/docs-new/CONTRIBUTING.md b/docs-new/CONTRIBUTING.md index d8b26f26b5..1668858bbd 100644 --- a/docs-new/CONTRIBUTING.md +++ b/docs-new/CONTRIBUTING.md @@ -23,16 +23,12 @@ If you need help getting started, feel free to ask for help on the `#help-contributing` or `#keptn-docs` channels on the [Keptn Slack](https://keptn.sh/community/#slack). We were all new to this once and are happy to help you! -## Guidelines for Contributing - -Please check [Contribution Guidelines](content/en/contribute/docs/contrib-guidelines-docs/_index.md). - ## Building the Documentation Locally To build and deploy the documentation in a docker container, execute ```shell -make serve +make docs-serve ``` This will setup a docker container, install all needed dependencies, @@ -41,16 +37,3 @@ build the documentation and serve it. The URL on which your local documentation website is deployed will be displayed in the logs. By default is should be `http://0.0.0.0:8000/` - -## Interacting with github - -The documentation source is stored on github.com -and you use the standard github facilities to modify it. -Please check [Working with Git](content/en/contribute/general/git/_index.md). - -### Developer Certification of Origin (DCO) - -All commits must be accompanied by a DCO sign-off. - See -[DCO](content/en/contribute/general/dco) -for more information. diff --git a/docs-new/Makefile b/docs-new/Makefile deleted file mode 100644 index 0e7fbc7989..0000000000 --- a/docs-new/Makefile +++ /dev/null @@ -1,10 +0,0 @@ -MKDOCS_DOCKER_IMAGE=squidfunk/mkdocs-material:9 -PWD=$(shell pwd) - -.PHONY: build -build: - docker run --rm -it -v ${PWD}:/docs --entrypoint "" ${MKDOCS_DOCKER_IMAGE} sh -c 'pip3 install -r /docs/requirements.txt; mkdocs build' - -.PHONY: serve -serve: build - docker run --rm -it -p 8000:8000 -v ${PWD}/site:/site -w /site --entrypoint "" ${MKDOCS_DOCKER_IMAGE} python3 -m http.server --bind 0.0.0.0 8000 diff --git a/docs-new/docs/documentation/index.md b/docs-new/docs/documentation/index.md deleted file mode 100644 index b9143495fc..0000000000 --- a/docs-new/docs/documentation/index.md +++ /dev/null @@ -1,3 +0,0 @@ -# Keptn Documentation - -This is the documentation page. diff --git a/docs-new/mkdocs.yaml b/docs-new/mkdocs.yaml deleted file mode 100644 index 53359d27c1..0000000000 --- a/docs-new/mkdocs.yaml +++ /dev/null @@ -1,65 +0,0 @@ -site_name: Keptn - Supercharge Your Deployments -theme: - name: material - custom_dir: overrides - palette: - # Palette toggle for light mode - - scheme: default - media: "(prefers-color-scheme: light)" - toggle: - icon: material/brightness-7 - name: Switch to dark mode - - # Palette toggle for dark mode - - scheme: slate - media: "(prefers-color-scheme: dark)" - toggle: - icon: material/brightness-4 - name: Switch to light mode - logo: assets/keptn-icon-white.svg - favicon: https://lifecycle.keptn.sh/images/logo-mobile.svg - features: - - navigation.tabs - - navigation.tracking - - navigation.indexes - - navigation.top - - search.suggest - - search.highlight - - content.action.edit - - content.action.view -repo_name: keptn/lifecycle-toolkit -repo_url: https://github.com/keptn/lifecycle-toolkit -site_url: https://lifecycle.keptn.sh -edit_uri: edit/main/docs/ -site_description: >- - Achieve cloud-native application lifecycle orchestration with Keptn. - Enhance Kubernetes monitoring, streamline metrics ingestion, and - automate deployment validation. Join the Keptn community for insights. -extra: - social: - - icon: fontawesome/solid/house - link: https://keptn.sh - - icon: fontawesome/brands/twitter - link: https://twitter.com/keptnProject - - icon: fontawesome/brands/linkedin - link: https://www.linkedin.com/company/keptnproject - - icon: fontawesome/brands/github-alt - link: https://github.com/keptn - - icon: fontawesome/brands/slack - link: https://cloud-native.slack.com/archives/C017GAX90GM -extra_javascript: - - assets/javascripts/versions.js -extra_css: - - assets/stylesheets/versions.css -plugins: - - social - - include-markdown: - trailing_newlines: false - - git-revision-date-localized: - fallback_to_build_date: true - -nav: - - Home: - - index.md - - Documentation: - - documentation/index.md diff --git a/docs-new/requirements.txt b/docs-new/requirements.txt deleted file mode 100644 index 1623e014d7..0000000000 --- a/docs-new/requirements.txt +++ /dev/null @@ -1,4 +0,0 @@ -mkdocs -mkdocs-material -mkdocs-include-markdown-plugin -mkdocs-git-revision-date-localized-plugin \ No newline at end of file diff --git a/mkdocs.yml b/mkdocs.yml index 3913343be9..b95e35492b 100644 --- a/mkdocs.yml +++ b/mkdocs.yml @@ -56,7 +56,8 @@ plugins: - social - include-markdown: trailing_newlines: false - - git-revision-date-localized + - git-revision-date-localized: + fallback_to_build_date: true nav: - Home: From bacba85162c54333674008a0aed245bb1f86c52a Mon Sep 17 00:00:00 2001 From: odubajDT Date: Thu, 30 Nov 2023 13:39:35 +0100 Subject: [PATCH 07/14] polish Signed-off-by: odubajDT --- Makefile | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) diff --git a/Makefile b/Makefile index 596e31f7dc..6cec8abf50 100644 --- a/Makefile +++ b/Makefile @@ -141,11 +141,21 @@ PWD=$(shell pwd) .PHONY: docs-build docs-build: - docker run --rm -it -v ${PWD}/docs-new:/docs-new -v ${PWD}/mkdocs.yml:/mkdocs.yml -v ${PWD}/requirements.txt:/requirements.txt --entrypoint "" ${MKDOCS_DOCKER_IMAGE} sh -c 'cd /; ls -la .; pip3 install -r requirements.txt; mkdocs build' + docker run --rm -it -v ${PWD}/docs-new:/docs-new \ + -v ${PWD}/mkdocs.yml:/mkdocs.yml \ + -v ${PWD}/requirements.txt:/requirements.txt \ + --entrypoint "" \ + ${MKDOCS_DOCKER_IMAGE} \ + sh -c 'cd /; pip3 install -r requirements.txt -q; mkdocs build -q' .PHONY: docs-serve docs-serve: docs-build - docker run --rm -it -p 8000:8000 -v ${PWD}/site:/site -w /site --entrypoint "" ${MKDOCS_DOCKER_IMAGE} python3 -m http.server --bind 0.0.0.0 8000 + docker run --rm -it -p 8000:8000 \ + -v ${PWD}/site:/site \ + -w /site \ + --entrypoint "" \ + ${MKDOCS_DOCKER_IMAGE} \ + python3 -m http.server --bind 0.0.0.0 8000 yamllint: @docker run --rm -t -v $(PWD):/data cytopia/yamllint:$(YAMLLINT_VERSION) . From 714d8f78a0ca637f08f6780defec8dfdd8f4f6d7 Mon Sep 17 00:00:00 2001 From: odubajDT Date: Thu, 30 Nov 2023 13:42:19 +0100 Subject: [PATCH 08/14] polish Signed-off-by: odubajDT --- Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Makefile b/Makefile index 6cec8abf50..0a3fa7cddc 100644 --- a/Makefile +++ b/Makefile @@ -146,7 +146,7 @@ docs-build: -v ${PWD}/requirements.txt:/requirements.txt \ --entrypoint "" \ ${MKDOCS_DOCKER_IMAGE} \ - sh -c 'cd /; pip3 install -r requirements.txt -q; mkdocs build -q' + sh -c 'cd /; pip install -r requirements.txt -q; mkdocs build -q' .PHONY: docs-serve docs-serve: docs-build From c36697ee7275ecbfeaf1b8b759bf926d45e2392a Mon Sep 17 00:00:00 2001 From: Moritz Wiesinger Date: Thu, 30 Nov 2023 14:03:03 +0100 Subject: [PATCH 09/14] renovate integration, move away from standalone python server for docs serving Signed-off-by: Moritz Wiesinger --- Makefile | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/Makefile b/Makefile index 0a3fa7cddc..e6fc6edbb2 100644 --- a/Makefile +++ b/Makefile @@ -4,6 +4,9 @@ KUSTOMIZE_VERSION?=v5.2.1 CHART_APPVERSION ?= v0.9.0 # x-release-please-version +# renovate: datasource=docker depName=squidfunk/mkdocs-material +MKDOCS_DOCKER_IMAGE=squidfunk/mkdocs-material:9.4.14 + # renovate: datasource=docker depName=cytopia/yamllint YAMLLINT_VERSION ?= alpine @@ -136,7 +139,6 @@ build-deploy-dev-environment: build-deploy-certmanager build-deploy-operator bui include docs/Makefile -MKDOCS_DOCKER_IMAGE=squidfunk/mkdocs-material:9 PWD=$(shell pwd) .PHONY: docs-build @@ -149,13 +151,14 @@ docs-build: sh -c 'cd /; pip install -r requirements.txt -q; mkdocs build -q' .PHONY: docs-serve -docs-serve: docs-build +docs-serve: docker run --rm -it -p 8000:8000 \ - -v ${PWD}/site:/site \ - -w /site \ + -v ${PWD}/docs-new:/docs-new \ + -v ${PWD}/mkdocs.yml:/mkdocs.yml \ + -v ${PWD}/requirements.txt:/requirements.txt \ --entrypoint "" \ ${MKDOCS_DOCKER_IMAGE} \ - python3 -m http.server --bind 0.0.0.0 8000 + sh -c 'cd /; pip install -r requirements.txt -q; mkdocs serve -a 0.0.0.0:8000' yamllint: @docker run --rm -t -v $(PWD):/data cytopia/yamllint:$(YAMLLINT_VERSION) . From 1840f114a50965fe87664f25d0969b704c34435c Mon Sep 17 00:00:00 2001 From: odubajDT Date: Thu, 30 Nov 2023 14:08:38 +0100 Subject: [PATCH 10/14] spellchecker Signed-off-by: odubajDT --- .github/actions/spelling/expect.txt | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/actions/spelling/expect.txt b/.github/actions/spelling/expect.txt index 0c09687275..bd7c2fc9b0 100644 --- a/.github/actions/spelling/expect.txt +++ b/.github/actions/spelling/expect.txt @@ -681,3 +681,4 @@ yml YOURNAME yourregistry youtube +squidfunk From 13371048b111b6aa6c38cc3b31d6d588fabdfa13 Mon Sep 17 00:00:00 2001 From: odubajDT <93584209+odubajDT@users.noreply.github.com> Date: Thu, 30 Nov 2023 14:23:14 +0100 Subject: [PATCH 11/14] Apply suggestions from code review Co-authored-by: Moritz Wiesinger Signed-off-by: odubajDT <93584209+odubajDT@users.noreply.github.com> --- docs-new/CONTRIBUTING.md | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/docs-new/CONTRIBUTING.md b/docs-new/CONTRIBUTING.md index 1668858bbd..147ade5f07 100644 --- a/docs-new/CONTRIBUTING.md +++ b/docs-new/CONTRIBUTING.md @@ -20,20 +20,20 @@ to check the rendered documentation and then push your changes to the repository as a pull request. If you need help getting started, -feel free to ask for help on the `#help-contributing` or `#keptn-docs` channels on the [Keptn Slack](https://keptn.sh/community/#slack). +feel free to ask for help on the `#keptn` channel on the [CNCF Slack](https://cloud-native.slack.com). We were all new to this once and are happy to help you! ## Building the Documentation Locally -To build and deploy the documentation in a docker container, execute +To build and deploy the documentation in a container, execute ```shell make docs-serve ``` -This will setup a docker container, install all needed dependencies, +This will setup a container, install all needed dependencies, build the documentation and serve it. The URL on which your local documentation website is deployed will be displayed in the logs. -By default is should be `http://0.0.0.0:8000/` +By default this should be `http://0.0.0.0:8000/` From 05e4514e624d31dbc0091ecc0770498e9f34bb6c Mon Sep 17 00:00:00 2001 From: odubajDT Date: Thu, 30 Nov 2023 14:23:58 +0100 Subject: [PATCH 12/14] polish indentation Signed-off-by: odubajDT --- Makefile | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/Makefile b/Makefile index e6fc6edbb2..34691393ae 100644 --- a/Makefile +++ b/Makefile @@ -144,21 +144,21 @@ PWD=$(shell pwd) .PHONY: docs-build docs-build: docker run --rm -it -v ${PWD}/docs-new:/docs-new \ - -v ${PWD}/mkdocs.yml:/mkdocs.yml \ - -v ${PWD}/requirements.txt:/requirements.txt \ - --entrypoint "" \ - ${MKDOCS_DOCKER_IMAGE} \ - sh -c 'cd /; pip install -r requirements.txt -q; mkdocs build -q' + -v ${PWD}/mkdocs.yml:/mkdocs.yml \ + -v ${PWD}/requirements.txt:/requirements.txt \ + --entrypoint "" \ + ${MKDOCS_DOCKER_IMAGE} \ + sh -c 'cd /; pip install -r requirements.txt -q; mkdocs build -q' .PHONY: docs-serve docs-serve: docker run --rm -it -p 8000:8000 \ - -v ${PWD}/docs-new:/docs-new \ - -v ${PWD}/mkdocs.yml:/mkdocs.yml \ - -v ${PWD}/requirements.txt:/requirements.txt \ - --entrypoint "" \ - ${MKDOCS_DOCKER_IMAGE} \ - sh -c 'cd /; pip install -r requirements.txt -q; mkdocs serve -a 0.0.0.0:8000' + -v ${PWD}/docs-new:/docs-new \ + -v ${PWD}/mkdocs.yml:/mkdocs.yml \ + -v ${PWD}/requirements.txt:/requirements.txt \ + --entrypoint "" \ + ${MKDOCS_DOCKER_IMAGE} \ + sh -c 'cd /; pip install -r requirements.txt -q; mkdocs serve -a 0.0.0.0:8000' yamllint: @docker run --rm -t -v $(PWD):/data cytopia/yamllint:$(YAMLLINT_VERSION) . From 97ac08c7be9f485336ae4f5b3fb698036b441b91 Mon Sep 17 00:00:00 2001 From: odubajDT Date: Thu, 30 Nov 2023 14:31:26 +0100 Subject: [PATCH 13/14] adapt image version name variable Signed-off-by: odubajDT --- Makefile | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/Makefile b/Makefile index 34691393ae..c466da2a81 100644 --- a/Makefile +++ b/Makefile @@ -5,7 +5,7 @@ KUSTOMIZE_VERSION?=v5.2.1 CHART_APPVERSION ?= v0.9.0 # x-release-please-version # renovate: datasource=docker depName=squidfunk/mkdocs-material -MKDOCS_DOCKER_IMAGE=squidfunk/mkdocs-material:9.4.14 +MKDOCS_DOCKER_IMAGE_VERSION=squidfunk/mkdocs-material:9.4.14 # renovate: datasource=docker depName=cytopia/yamllint YAMLLINT_VERSION ?= alpine @@ -147,7 +147,7 @@ docs-build: -v ${PWD}/mkdocs.yml:/mkdocs.yml \ -v ${PWD}/requirements.txt:/requirements.txt \ --entrypoint "" \ - ${MKDOCS_DOCKER_IMAGE} \ + ${MKDOCS_DOCKER_IMAGE_VERSION} \ sh -c 'cd /; pip install -r requirements.txt -q; mkdocs build -q' .PHONY: docs-serve @@ -157,7 +157,7 @@ docs-serve: -v ${PWD}/mkdocs.yml:/mkdocs.yml \ -v ${PWD}/requirements.txt:/requirements.txt \ --entrypoint "" \ - ${MKDOCS_DOCKER_IMAGE} \ + ${MKDOCS_DOCKER_IMAGE_VERSION} \ sh -c 'cd /; pip install -r requirements.txt -q; mkdocs serve -a 0.0.0.0:8000' yamllint: From 0c66986da4455dbf8ae470fe05f24cc613857a94 Mon Sep 17 00:00:00 2001 From: odubajDT <93584209+odubajDT@users.noreply.github.com> Date: Thu, 30 Nov 2023 14:54:46 +0100 Subject: [PATCH 14/14] Apply suggestions from code review Co-authored-by: Moritz Wiesinger Signed-off-by: odubajDT <93584209+odubajDT@users.noreply.github.com> --- Makefile | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/Makefile b/Makefile index c466da2a81..1110b3427b 100644 --- a/Makefile +++ b/Makefile @@ -5,7 +5,8 @@ KUSTOMIZE_VERSION?=v5.2.1 CHART_APPVERSION ?= v0.9.0 # x-release-please-version # renovate: datasource=docker depName=squidfunk/mkdocs-material -MKDOCS_DOCKER_IMAGE_VERSION=squidfunk/mkdocs-material:9.4.14 +MKDOCS_DOCKER_IMAGE_VERSION=9.4.14 +MKDOCS_DOCKER_IMAGE=squidfunk/mkdocs-material # renovate: datasource=docker depName=cytopia/yamllint YAMLLINT_VERSION ?= alpine @@ -147,7 +148,7 @@ docs-build: -v ${PWD}/mkdocs.yml:/mkdocs.yml \ -v ${PWD}/requirements.txt:/requirements.txt \ --entrypoint "" \ - ${MKDOCS_DOCKER_IMAGE_VERSION} \ + ${MKDOCS_DOCKER_IMAGE}:${MKDOCS_DOCKER_IMAGE_VERSION} \ sh -c 'cd /; pip install -r requirements.txt -q; mkdocs build -q' .PHONY: docs-serve @@ -157,7 +158,7 @@ docs-serve: -v ${PWD}/mkdocs.yml:/mkdocs.yml \ -v ${PWD}/requirements.txt:/requirements.txt \ --entrypoint "" \ - ${MKDOCS_DOCKER_IMAGE_VERSION} \ + ${MKDOCS_DOCKER_IMAGE}:${MKDOCS_DOCKER_IMAGE_VERSION} \ sh -c 'cd /; pip install -r requirements.txt -q; mkdocs serve -a 0.0.0.0:8000' yamllint: