Skip to content

Commit 87a17a5

Browse files
committed
Downstream: Fix attributes problem
Attributes were being dumped at the beginning of documents like this: ``` Ceph: Red Hat Ceph Storage CephCluster: Red Hat Ceph Storage CephVernum: 7 MessageBus: AMQ-Interconnect ``` This was because wee were passing an attributes file to the processor instead of an asciidoctor file with the attributes. Upon inspection we don't even need to pass these attributes, because the source documents already use the include directive to include their specific attribute files, which in some cases is different from the global one we were previously using. Example: ``` include::assemblies/common/global/adoption-attributes.adoc[] ``` In this patch we stop passing the `--attributes-file` argument to the `rhoso_adoc_docs_to_text.py` script. We also remove the `RHOSO_DOCS_ATTRIBUTES_FILE_URL` environmental variable that is no longer needed.
1 parent 8a2ed1c commit 87a17a5

3 files changed

Lines changed: 3 additions & 12 deletions

File tree

Containerfile

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,6 @@ ARG NUM_WORKERS=1
3636
ARG RHOSO_CA_CERT_URL=""
3737
ARG RHOSO_DOCS_GIT_URL=""
3838
ARG RHOSO_DOCS_GIT_BRANCH=""
39-
ARG RHOSO_DOCS_ATTRIBUTES_FILE_URL=""
4039
ARG RHOSO_RELNOTES_GIT_URL=""
4140
ARG RHOSO_RELNOTES_GIT_BRANCH=""
4241
ARG RHOSO_EXCLUDE_TITLES=""
@@ -46,7 +45,6 @@ ENV NUM_WORKERS=$NUM_WORKERS
4645
ENV RHOSO_CA_CERT_URL=$RHOSO_CA_CERT_URL
4746
ENV RHOSO_DOCS_GIT_URL=$RHOSO_DOCS_GIT_URL
4847
ENV RHOSO_DOCS_GIT_BRANCH=$RHOSO_DOCS_GIT_BRANCH
49-
ENV RHOSO_DOCS_ATTRIBUTES_FILE_URL=$RHOSO_DOCS_ATTRIBUTES_FILE_URL
5048
ENV RHOSO_RELNOTES_GIT_URL=$RHOSO_RELNOTES_GIT_URL
5149
ENV RHOSO_RELNOTES_GIT_BRANCH=$RHOSO_RELNOTES_GIT_BRANCH
5250

Makefile

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,6 @@ PRUNE_PATHS ?= ""
88
INDEX_NAME ?= os-docs-$(OS_VERSION)
99
RHOSO_DOCS_GIT_URL ?= ""
1010
RHOSO_DOCS_GIT_BRANCH ?= ""
11-
RHOSO_DOCS_ATTRIBUTES_FILE_URL ?= ""
1211
RHOSO_RELNOTES_GIT_URL ?= ""
1312
RHOSO_RELNOTES_GIT_BRANCH ?= ""
1413
RHOSO_CA_CERT_URL ?= ""
@@ -43,7 +42,6 @@ build-image-os: ## Build a openstack rag-content container image
4342
--build-arg PRUNE_PATHS=$(PRUNE_PATHS) \
4443
--build-arg RHOSO_DOCS_GIT_URL=$(RHOSO_DOCS_GIT_URL) \
4544
--build-arg RHOSO_DOCS_GIT_BRANCH=$(RHOSO_DOCS_GIT_BRANCH) \
46-
--build-arg RHOSO_DOCS_ATTRIBUTES_FILE_URL=$(RHOSO_DOCS_ATTRIBUTES_FILE_URL) \
4745
--build-arg RHOSO_RELNOTES_GIT_URL=$(RHOSO_RELNOTES_GIT_URL) \
4846
--build-arg RHOSO_RELNOTES_GIT_BRANCH=$(RHOSO_RELNOTES_GIT_BRANCH) \
4947
--build-arg RHOSO_CA_CERT_URL=$(RHOSO_CA_CERT_URL) \

scripts/get_rhoso_plaintext_docs.sh

Lines changed: 3 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -24,10 +24,6 @@ RHOSO_DOCS_GIT_URL=${RHOSO_DOCS_GIT_URL:-}
2424
# Branch to checkout for RHOSO documentation repository
2525
RHOSO_DOCS_GIT_BRANCH=${RHOSO_DOCS_GIT_BRANCH:-rhoso180-antelope}
2626

27-
# URL YAML file which containes RHOSO docs attributes.
28-
RHOSO_DOCS_ATTRIBUTES_FILE_URL=${RHOSO_DOCS_ATTRIBUTES_FILE_URL:-}
29-
[ -z "${RHOSO_DOCS_ATTRIBUTES_FILE_URL}" ] && echo "Err: Mising RHOSO_DOCS_ATTRIBUTES_FILE_URL!" && exit 1
30-
3127
# URL of Git repository for RHOSO release notes
3228
RHOSO_RELNOTES_GIT_URL=${RHOSO_RELNOTES_GIT_URL:-}
3329
[ -z "${RHOSO_RELNOTES_GIT_URL}" ] && echo "Err: Mising RHOSO_RELNOTES_GIT_URL!" && exit 1
@@ -71,18 +67,17 @@ fi
7167
# Clone RHOSO documentation and generate vector database for it
7268
generate_text_docs_rhoso() {
7369
local rhoso_docs_folder="./rhoso_docs"
74-
local attributes_file="attributes.yaml"
7570

7671
if [ ! -d "${rhoso_docs_folder}" ]; then
7772
git_clone -b "${RHOSO_DOCS_GIT_BRANCH}" "${RHOSO_DOCS_GIT_URL}" "${rhoso_docs_folder}"
7873
fi
7974

80-
curl_download -o "${attributes_file}" "${RHOSO_DOCS_ATTRIBUTES_FILE_URL}"
81-
75+
# No need to pass a specific attributes file for the docs, because the
76+
# .adoc files in our documentation already have the appropriate `include`
77+
# directive for the attributes files.
8278
for subdir in "${rhoso_docs_folder}/titles" "${rhoso_docs_folder}"/doc-*; do
8379
python ./scripts/rhoso_adoc_docs_to_text.py \
8480
--input-dir "${subdir}" \
85-
--attributes-file "${attributes_file}" \
8681
--output-dir "$OUTPUT_DIR_NAME/" \
8782
--exclude-titles "${RHOSO_EXCLUDE_TITLES[@]}" \
8883
--remap-titles "${RHOSO_REMAP_TITLES}"

0 commit comments

Comments
 (0)