Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
21 changes: 1 addition & 20 deletions .github/workflows/docs.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@ on: # yamllint disable-line rule:truthy
paths:
- .github/workflows/docs*
- docs_dev/**
- docs_user/**
- Gemfile
- Makefile
jobs:
Expand All @@ -31,22 +30,9 @@ jobs:
- name: Install Asciidoc
run: make docs-dependencies

- name: Build upstream user docs
run: make docs-user
- name: Build downstream preview of user docs
run: BUILD=downstream make docs-user
- name: Build dev docs
run: make docs-dev

- name: Test user docs
run: |
INSTALL_YAMLS_REF=$(grep -o install_yamls docs_build/adoption-user/index-downstream.html | wc -l)
if [[ $INSTALL_YAMLS_REF -gt 0 ]]; then
echo user facing docs should NOT mention install_yamls
grep install_yamls docs_build/adoption-user/index-downstream.html
exit 1
fi

- name: Prepare gh-pages branch
run: |
git config user.name github-actions
Expand Down Expand Up @@ -103,12 +89,11 @@ jobs:
<body>

<div class="topnav">
<a class="active" href="user/" target="content">User</a>
<a href="dev/" target="content">Contributor</a>
</div>

<div class="asciidoc">
<iframe name="content" width="100%" height="100%" src="user/index.html"></iframe>
<iframe name="content" width="100%" height="100%" src="dev/index.html"></iframe>
</div>

</body>
Expand All @@ -117,14 +102,10 @@ jobs:

- name: Commit asciidoc docs
run: |
mv -T docs_build/adoption-user user
mv -T docs_build/adoption-dev dev

mv user/index-upstream.html user/index.html
mv user/index-downstream.html user/downstream.html
mv dev/index-upstream.html dev/index.html

git add user
git add dev
git add index.html
git commit -m "Rendered docs"
Expand Down
14 changes: 3 additions & 11 deletions AGENTS.md
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,6 @@ There are other adjacent procedures described or linked in the repo that are opt

- There should be parity between the docs and the tests. There may be some legitimate minor differences to account for CI specifics, but in general the intent of the tests is to verify the procedure and the commands from the docs.
- Tests use the `shell` Ansible module liberally, we do not strive for "beautiful Ansible that just uses Python modules". Using `shell` tends to allow verbatim correspondence of tests to the commands/snippets in the docs, which is more important than having beautiful Ansible code.
- Docs must support multiple variants (upstream/downstream/OSPDO). Do not hardcode product names like "Red Hat OpenStack Services on OpenShift". Use the AsciiDoctor attributes defined in `docs_user/adoption-attributes.adoc` (e.g. `{rhos_long}`, `{OpenStackShort}`).

## Important

Expand All @@ -43,17 +42,10 @@ There are other adjacent procedures described or linked in the repo that are opt

## Repository map

- `docs_build` - Generated content. Do not read or edit files in this directory as a source of truth. Always use `docs_user` or `docs_dev`.
- `docs_build` - Generated content. Do not read or edit files in this directory as a source of truth. Always use `docs_dev`.
- `docs_build/adoption-dev/index-upstream.html` - Rendered developer documentation.
- `docs_build/adoption-user/index-{upstream,downstream,downstream-ospdo}.html` - Rendered user documentation (the adoption procedure).
- `docs_dev` - Sources for developer documentation.
- `docs_user` - Sources for user documentation (the adoption procedure).
- `main.adoc` is the root.
- `*-attributes.adoc` files distinguish upstream and downstream variants.
- `assemblies` are higher-level building blocks.
- `modules` are lower-level building blocks.
- `docs_user` - Sources for user documentation (the adoption procedure).
- `Makefile` - The main Makefile for docs building and running tests. For docs it calls nested `make` using `docs_dev/Makefile` and `docs_user/Makefile`.
- `Makefile` - The main Makefile for docs building and running tests. For docs it calls nested `make` using `docs_dev/Makefile`.
- `scenarios` - Configuration of CI jobs doing end-to-end testing.
- `tests` - Ansible test suite utilized in the end-to-end tests.
- `vars.sample.yaml,secrets.sample.yaml` - Example files with variables and secrets that are typically customized before running end-to-end tests.
Expand All @@ -62,7 +54,7 @@ There are other adjacent procedures described or linked in the repo that are opt

## Building docs

`make docs` is the easiest way to build both user docs in all variants and developer docs.
`make docs` is the easiest way to build developer docs.

More detailed info is in `docs_dev/assemblies/documentation.adoc`.

Expand Down
16 changes: 1 addition & 15 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -117,21 +117,7 @@ docs-dependencies: .bundle

bundle config set --local path 'local/bundle'; bundle install

docs: docs-dependencies docs-user-all-variants docs-dev ## Build documentation

docs-user-all-variants:
cd docs_user; BUILD=upstream $(MAKE) html
cd docs_user; BUILD=downstream $(MAKE) html
cd docs_user; BUILD=downstream BUILD_VARIANT=ospdo $(MAKE) html

docs-user:
cd docs_user; $(MAKE) html

docs-user-open:
cd docs_user; $(MAKE) open-html

docs-user-watch:
cd docs_user; $(MAKE) watch-html
docs: docs-dependencies docs-dev ## Build documentation

docs-dev:
cd docs_dev; $(MAKE) html
Expand Down
25 changes: 1 addition & 24 deletions docs_dev/assemblies/documentation.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -9,22 +9,14 @@ Install docs build requirements:
make docs-dependencies
----

To render the user-facing documentation site locally:

[,bash]
----
make docs-user
----

To render the contributor documentation site locally:

[,bash]
----
make docs-dev
----

The built HTML files are in `docs_build/adoption-user` and
`docs_build/adoption-dev` directories respectively.
The built HTML files are in `docs_build/adoption-dev` directory.


There are some additional make targets for convenience. The following
Expand All @@ -33,8 +25,6 @@ resulting HTML in your browser so that you don't have to look for it:

[,bash]
----
make docs-user-open
# or
make docs-dev-open
----

Expand All @@ -46,22 +36,9 @@ browser page" loop when working on the docs, without having to run

[,bash]
----
make docs-user-watch
# or
make docs-dev-watch
----

=== Preview of downstream documentation

To render a preview of what should serve as the base for downstream
docs (e.g. with downstream container image URLs), prepend
`BUILD=downstream` to your make targets. For example:

[,bash]
----
BUILD=downstream make docs-user
----

== Patterns and tips for contributing to documentation

* Pages concerning individual components/services should make sense in
Expand Down
6 changes: 0 additions & 6 deletions docs_user/.vale.ini

This file was deleted.

70 changes: 0 additions & 70 deletions docs_user/.vale/styles/AsciiDocDITA/AdmonitionTitle.yml

This file was deleted.

41 changes: 0 additions & 41 deletions docs_user/.vale/styles/AsciiDocDITA/AttributeReference.yml

This file was deleted.

54 changes: 0 additions & 54 deletions docs_user/.vale/styles/AsciiDocDITA/AuthorLine.yml

This file was deleted.

Loading
Loading