Skip to content

Commit b7b4312

Browse files
Merge branch 'main' into DOC-3433
2 parents 92c53d1 + eebbde1 commit b7b4312

File tree

709 files changed

+26290
-4709
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

709 files changed

+26290
-4709
lines changed

.github/workflows/k8s_apis_sync.yaml

Lines changed: 25 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -90,30 +90,30 @@ jobs:
9090
EOL
9191
}
9292
93-
formatYamlSnippet admission-service.yaml content/embeds/admission-service.md
94-
formatYamlSnippet admission/webhook.yaml content/embeds/admission_webhook.md
95-
formatYamlSnippet examples/v1/rec.yaml content/embeds/rec.md
96-
formatYamlSnippet examples/v1alpha1/reaadb.yaml content/embeds/reaadb.md
97-
formatYamlSnippet examples/v1alpha1/redb.yaml content/embeds/redb.md
98-
formatYamlSnippet examples/v1alpha1/rerc.yaml content/embeds/rerc.md
99-
formatYamlSnippet log_collector/log_collector_role_all_mode.yaml content/embeds/log_collector_role_all_mode.md
100-
formatYamlSnippet log_collector/log_collector_role_restricted_mode.yaml content/embeds/log_collector_role_restricted_mode.md
101-
formatYamlSnippet multi-namespace-redb/operator_cluster_role_binding.yaml content/embeds/multi-ns_operator_cluster_role_binding.md
102-
formatYamlSnippet multi-namespace-redb/operator_cluster_role.yaml content/embeds/multi-ns_operator_cluster_role.md
103-
formatYamlSnippet multi-namespace-redb/role_binding.yaml content/embeds/multi-ns_role_binding.md
104-
formatYamlSnippet multi-namespace-redb/role.yaml content/embeds/multi-ns_role.md
105-
formatYamlSnippet openshift/admission-service.yaml content/embeds/openshift_admission-service.md
106-
formatYamlSnippet openshift/rec_rhel.yaml content/embeds/openshift_rec.md
107-
formatYamlSnippet openshift/role_binding.yaml content/embeds/openshift_role_binding.md
108-
formatYamlSnippet openshift/role.yaml content/embeds/openshift_role.md
109-
formatYamlSnippet openshift/scc.yaml content/embeds/openshift_scc.md
110-
formatYamlSnippet openshift/service_account.yaml content/embeds/openshift_service_account.md
111-
formatYamlSnippet rack_awareness/rack_aware_cluster_role_binding.yaml content/embeds/rack_aware_cluster_role_binding.md
112-
formatYamlSnippet rack_awareness/rack_aware_cluster_role.yaml content/embeds/rack_aware_cluster_role.md
113-
formatYamlSnippet rack_awareness/rack_aware_rec.yaml content/embeds/rack_aware_rec.md
114-
formatYamlSnippet role_binding.yaml content/embeds/role_binding.md
115-
formatYamlSnippet role.yaml content/embeds/role.md
116-
formatYamlSnippet service_account.yaml content/embeds/service_account.md
93+
formatYamlSnippet admission-service.yaml content/embeds/k8s/admission-service.md
94+
formatYamlSnippet admission/webhook.yaml content/embeds/k8s/admission_webhook.md
95+
formatYamlSnippet examples/v1/rec.yaml content/embeds/k8s/rec.md
96+
formatYamlSnippet examples/v1alpha1/reaadb.yaml content/embeds/k8s/reaadb.md
97+
formatYamlSnippet examples/v1alpha1/redb.yaml content/embeds/k8s/redb.md
98+
formatYamlSnippet examples/v1alpha1/rerc.yaml content/embeds/k8s/rerc.md
99+
formatYamlSnippet log_collector/log_collector_role_all_mode.yaml content/embeds/k8s/log_collector_role_all_mode.md
100+
formatYamlSnippet log_collector/log_collector_role_restricted_mode.yaml content/embeds/k8s/log_collector_role_restricted_mode.md
101+
formatYamlSnippet multi-namespace-redb/operator_cluster_role_binding.yaml content/embeds/k8s/multi-ns_operator_cluster_role_binding.md
102+
formatYamlSnippet multi-namespace-redb/operator_cluster_role.yaml content/embeds/k8s/multi-ns_operator_cluster_role.md
103+
formatYamlSnippet multi-namespace-redb/role_binding.yaml content/embeds/k8s/multi-ns_role_binding.md
104+
formatYamlSnippet multi-namespace-redb/role.yaml content/embeds/k8s/multi-ns_role.md
105+
formatYamlSnippet openshift/admission-service.yaml content/embeds/k8s/openshift_admission-service.md
106+
formatYamlSnippet openshift/rec_rhel.yaml content/embeds/k8s/openshift_rec.md
107+
formatYamlSnippet openshift/role_binding.yaml content/embeds/k8s/openshift_role_binding.md
108+
formatYamlSnippet openshift/role.yaml content/embeds/k8s/openshift_role.md
109+
formatYamlSnippet openshift/scc.yaml content/embeds/k8s/openshift_scc.md
110+
formatYamlSnippet openshift/service_account.yaml content/embeds/k8s/openshift_service_account.md
111+
formatYamlSnippet rack_awareness/rack_aware_cluster_role_binding.yaml content/embeds/k8s/rack_aware_cluster_role_binding.md
112+
formatYamlSnippet rack_awareness/rack_aware_cluster_role.yaml content/embeds/k8s/rack_aware_cluster_role.md
113+
formatYamlSnippet rack_awareness/rack_aware_rec.yaml content/embeds/k8s/rack_aware_rec.md
114+
formatYamlSnippet role_binding.yaml content/embeds/k8s/role_binding.md
115+
formatYamlSnippet role.yaml content/embeds/k8s/role.md
116+
formatYamlSnippet service_account.yaml content/embeds/k8s/service_account.md
117117
118118
- name: 'Send pull request'
119119
env:
@@ -136,7 +136,7 @@ jobs:
136136
git apply content/operate/kubernetes/reference/kubernetes-api-reference-frontmatter.patch
137137
138138
git add content/operate/kubernetes/reference/
139-
git add content/embeds/
139+
git add content/embeds/k8s/
140140
141141
git commit -m "k8s api docs ${RELEASE}"
142142
git push origin "${BRANCH}"

.github/workflows/main-staging.yml

Lines changed: 36 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ jobs:
77
name: Build the staging documentation site
88
runs-on: ubuntu-latest
99
env:
10-
HUGO_VERSION: 0.111.2
10+
HUGO_VERSION: 0.143.1
1111
GCLOUD_VERSION: 458.0.1-linux-x86_64
1212
BUCKET: docs-staging-learn-redis-com
1313
BUCKET_SERVICE_ACCOUNT: ${{ secrets.BUCKET_DOCUMENTATION_SA_STAGING }}
@@ -60,6 +60,7 @@ jobs:
6060
setBaseUrl
6161
kubernetes_versions=($(find content/operate/kubernetes/ -maxdepth 1 -type d -regex ".*[0-9-]" | awk -F/ '{print $NF}'))
6262
rs_versions=($(find content/operate/rs/ -maxdepth 1 -type d -regex ".*[0-9-]" | awk -F/ '{print $NF}'))
63+
rdi_versions=($(find content/integrate/redis-data-integration/ -maxdepth 1 -type d -regex ".*[0-9-]" | awk -F/ '{print $NF}'))
6364
6465
# build latest
6566
for version in "${kubernetes_versions[@]}"; do
@@ -68,6 +69,9 @@ jobs:
6869
for version in "${rs_versions[@]}"; do
6970
rm -r "content/operate/rs/${version}"
7071
done
72+
for version in "${rdi_versions[@]}"; do
73+
rm -r "content/integrate/redis-data-integration/${version}"
74+
done
7175
make all
7276
7377
git checkout .
@@ -89,7 +93,7 @@ jobs:
8993
sed -i 's/linkTitle: '"${version}"'/linkTitle: Redis for Kubernetes/' content/operate/kubernetes/_index.md
9094
9195
# inject replace command in meta-links to make sure editURL and issuesURL point to right version
92-
sed -i "11i \{\{ \$gh_file = replaceRE \`\^operate\/kubernetes\/\` \"operate\/kubernetes\/$version\/\" \$gh_file }}" layouts/partials/meta-links.html
96+
sed -i "12i \{\{ \$gh_file = replaceRE \`\^operate\/kubernetes\/\` \"operate\/kubernetes\/$version\/\" \$gh_file }}" layouts/partials/meta-links.html
9397
9498
hugo -d "kubernetes-${version}"
9599
@@ -112,13 +116,36 @@ jobs:
112116
sed -i 's/linkTitle: '"${version}"'/linkTitle: Redis Software/' content/operate/rs/_index.md
113117
114118
# inject replace command in meta-links to make sure editURL and issuesURL point to right version
115-
sed -i "11i \{\{ \$gh_file = replaceRE \`\^operate\/rs\/\` \"operate\/rs\/$version\/\" \$gh_file }}" layouts/partials/meta-links.html
119+
sed -i "12i \{\{ \$gh_file = replaceRE \`\^operate\/rs\/\` \"operate\/rs\/$version\/\" \$gh_file }}" layouts/partials/meta-links.html
116120
117121
hugo -d "rs-${version}"
118122
119123
git checkout .
120124
done
121125
126+
for version in "${rdi_versions[@]}"; do
127+
128+
setBaseUrl
129+
130+
# for each version, remove all other versions before building
131+
versions_to_remove=($(echo "${rdi_versions[@]}" "${version}" | tr ' ' '\n' | sort | uniq -u))
132+
for version_to_remove in "${versions_to_remove[@]}"; do
133+
rm -r "content/integrate/redis-data-integration/${version_to_remove}"
134+
done
135+
136+
cp -r "content/integrate/redis-data-integration/${version}"/* content/integrate/redis-data-integration/
137+
rm -r "content/integrate/redis-data-integration/${version}"
138+
sed -i 's/id="versionSelectorRedis-Data-IntegrationValue" class="version-selector-control">latest/id="versionSelectorRedis-Data-IntegrationValue" class="version-selector-control">v'"${version}"'/' layouts/partials/docs-nav.html
139+
sed -i 's/linkTitle: '"${version}"'/linkTitle: Redis Data Integration/' content/integrate/redis-data-integration/_index.md
140+
141+
# inject replace command in meta-links to make sure editURL and issuesURL point to right version
142+
sed -i "12i \{\{ \$gh_file = replaceRE \`\^integrate\/redis-data-integration\/\` \"integrate\/redis-data-integration\/$version\/\" \$gh_file }}" layouts/partials/meta-links.html
143+
144+
hugo -d "redis-data-integration-${version}"
145+
146+
git checkout .
147+
done
148+
122149
- name: List client examples
123150
run: ls "${{ github.workspace }}/examples"
124151
- name: List files to be published
@@ -152,8 +179,12 @@ jobs:
152179
153180
versioned_builds=($(find . -type d -regex ".*[0-9-]" -maxdepth 1 | sed -E 's/^.\///'))
154181
for versioned_build in "${versioned_builds[@]}"; do
155-
product=$(grep -Eo '[a-zA-Z]+' <<< $versioned_build)
156-
gsutil -m rsync -r -c -j html -d "${{ github.workspace }}/${versioned_build}/operate/${product}" "gs://${BUCKET}/${versioned_build}/operate/${product}"
182+
product=$(awk 'BEGIN{FS=OFS="-"}{NF--; print}' <<< $versioned_build)
183+
if [[ "${product}" == "redis-data-integration" ]]; then
184+
gsutil -m rsync -r -c -j html -d "${{ github.workspace }}/${versioned_build}/integrate/${product}" "gs://${BUCKET}/${versioned_build}/integrate/${product}"
185+
else
186+
gsutil -m rsync -r -c -j html -d "${{ github.workspace }}/${versioned_build}/operate/${product}" "gs://${BUCKET}/${versioned_build}/operate/${product}"
187+
fi
157188
done
158189
159190
- name: End

.github/workflows/main.yml

Lines changed: 42 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ jobs:
77
name: Build the production documentation site
88
runs-on: ubuntu-latest
99
env:
10-
HUGO_VERSION: 0.111.2
10+
HUGO_VERSION: 0.143.1
1111
GCLOUD_VERSION: 458.0.1-linux-x86_64
1212
BUCKET: docs-prod-learn-redis-com
1313
BUCKET_SERVICE_ACCOUNT: ${{ secrets.BUCKET_DOCUMENTATION_SA_PROD }}
@@ -60,6 +60,7 @@ jobs:
6060
setBaseUrl
6161
kubernetes_versions=($(find content/operate/kubernetes/ -maxdepth 1 -type d -regex ".*[0-9-]" | awk -F/ '{print $NF}'))
6262
rs_versions=($(find content/operate/rs/ -maxdepth 1 -type d -regex ".*[0-9-]" | awk -F/ '{print $NF}'))
63+
rdi_versions=($(find content/integrate/redis-data-integration/ -maxdepth 1 -type d -regex ".*[0-9-]" | awk -F/ '{print $NF}'))
6364
6465
# build latest
6566
for version in "${kubernetes_versions[@]}"; do
@@ -68,6 +69,9 @@ jobs:
6869
for version in "${rs_versions[@]}"; do
6970
rm -r "content/operate/rs/${version}"
7071
done
72+
for version in "${rdi_versions[@]}"; do
73+
rm -r "content/integrate/redis-data-integration/${version}"
74+
done
7175
make all
7276
7377
git checkout .
@@ -89,7 +93,7 @@ jobs:
8993
sed -i 's/linkTitle: '"${version}"'/linkTitle: Redis for Kubernetes/' content/operate/kubernetes/_index.md
9094
9195
# inject replace command in meta-links to make sure editURL and issuesURL point to right version
92-
sed -i "11i \{\{ \$gh_file = replaceRE \`\^operate\/kubernetes\/\` \"operate\/kubernetes\/$version\/\" \$gh_file }}" layouts/partials/meta-links.html
96+
sed -i "12i \{\{ \$gh_file = replaceRE \`\^operate\/kubernetes\/\` \"operate\/kubernetes\/$version\/\" \$gh_file }}" layouts/partials/meta-links.html
9397
9498
hugo -d "kubernetes-${version}"
9599
@@ -112,13 +116,36 @@ jobs:
112116
sed -i 's/linkTitle: '"${version}"'/linkTitle: Redis Software/' content/operate/rs/_index.md
113117
114118
# inject replace command in meta-links to make sure editURL and issuesURL point to right version
115-
sed -i "11i \{\{ \$gh_file = replaceRE \`\^operate\/rs\/\` \"operate\/rs\/$version\/\" \$gh_file }}" layouts/partials/meta-links.html
119+
sed -i "12i \{\{ \$gh_file = replaceRE \`\^operate\/rs\/\` \"operate\/rs\/$version\/\" \$gh_file }}" layouts/partials/meta-links.html
116120
117121
hugo -d "rs-${version}"
118122
119123
git checkout .
120124
done
121125
126+
for version in "${rdi_versions[@]}"; do
127+
128+
setBaseUrl
129+
130+
# for each version, remove all other versions before building
131+
versions_to_remove=($(echo "${rdi_versions[@]}" "${version}" | tr ' ' '\n' | sort | uniq -u))
132+
for version_to_remove in "${versions_to_remove[@]}"; do
133+
rm -r "content/integrate/redis-data-integration/${version_to_remove}"
134+
done
135+
136+
cp -r "content/integrate/redis-data-integration/${version}"/* content/integrate/redis-data-integration/
137+
rm -r "content/integrate/redis-data-integration/${version}"
138+
sed -i 's/id="versionSelectorRedis-Data-IntegrationValue" class="version-selector-control">latest/id="versionSelectorRedis-Data-IntegrationValue" class="version-selector-control">v'"${version}"'/' layouts/partials/docs-nav.html
139+
sed -i 's/linkTitle: '"${version}"'/linkTitle: Redis Data Integration/' content/integrate/redis-data-integration/_index.md
140+
141+
# inject replace command in meta-links to make sure editURL and issuesURL point to right version
142+
sed -i "12i \{\{ \$gh_file = replaceRE \`\^integrate\/redis-data-integration\/\` \"integrate\/redis-data-integration\/$version\/\" \$gh_file }}" layouts/partials/meta-links.html
143+
144+
hugo -d "redis-data-integration-${version}"
145+
146+
git checkout .
147+
done
148+
122149
- name: List client examples
123150
run: ls "${{ github.workspace }}/examples"
124151
- name: List files to be published
@@ -154,17 +181,25 @@ jobs:
154181
then
155182
versioned_builds=($(find . -type d -regex ".*[0-9-]" -maxdepth 1 | sed -E 's/^.\///'))
156183
for versioned_build in "${versioned_builds[@]}"; do
157-
product=$(grep -Eo '[a-zA-Z]+' <<< $versioned_build)
158-
gsutil -m rsync -r -c -j html -d "${{ github.workspace }}/${versioned_build}/operate/${product}" "gs://${BUCKET}/${versioned_build}/operate/${product}"
184+
product=$(awk 'BEGIN{FS=OFS="-"}{NF--; print}' <<< $versioned_build)
185+
if [[ "${product}" == "redis-data-integration" ]]; then
186+
gsutil -m rsync -r -c -j html -d "${{ github.workspace }}/${versioned_build}/integrate/${product}" "gs://${BUCKET}/${versioned_build}/integrate/${product}"
187+
else
188+
gsutil -m rsync -r -c -j html -d "${{ github.workspace }}/${versioned_build}/operate/${product}" "gs://${BUCKET}/${versioned_build}/operate/${product}"
189+
fi
159190
done
160191
fi
161192
162193
if [[ "$bucket_path" == staging/* ]]
163194
then
164195
versioned_builds=($(find . -type d -regex ".*[0-9-]" -maxdepth 1 | sed -E 's/^.\///'))
165196
for versioned_build in "${versioned_builds[@]}"; do
166-
product=$(grep -Eo '[a-zA-Z]+' <<< $versioned_build)
167-
gsutil -m rsync -r -c -j html -d "${{ github.workspace }}/${versioned_build}/operate/${product}" "gs://${BUCKET}/${bucket_path}/${versioned_build}/operate/${product}"
197+
product=$(awk 'BEGIN{FS=OFS="-"}{NF--; print}' <<< $versioned_build)
198+
if [[ "${product}" == "redis-data-integration" ]]; then
199+
gsutil -m rsync -r -c -j html -d "${{ github.workspace }}/${versioned_build}/integrate/${product}" "gs://${BUCKET}/${bucket_path}/${versioned_build}/integrate/${product}"
200+
else
201+
gsutil -m rsync -r -c -j html -d "${{ github.workspace }}/${versioned_build}/operate/${product}" "gs://${BUCKET}/${bucket_path}/${versioned_build}/operate/${product}"
202+
fi
168203
done
169204
fi
170205

0 commit comments

Comments
 (0)