Skip to content

Commit dc1b000

Browse files
github-actions[bot]grafanabotsimonswine
authored
Update make docs procedure (#3241)
Co-authored-by: grafanabot <[email protected]> Co-authored-by: Christian Simon <[email protected]>
1 parent 692323c commit dc1b000

File tree

1 file changed

+32
-8
lines changed

1 file changed

+32
-8
lines changed

docs/make-docs

Lines changed: 32 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,22 @@
66
# [Semantic versioning](https://semver.org/) is used to help the reader identify the significance of changes.
77
# Changes are relevant to this script and the support docs.mk GNU Make interface.
88
#
9+
# ## 6.1.0 (2024-04-22)
10+
#
11+
# ### Changed
12+
#
13+
# - Mount volumes with SELinux labels.
14+
#
15+
# https://docs.docker.com/storage/bind-mounts/#configure-the-selinux-label
16+
#
17+
# ## 6.1.0 (2024-04-22)
18+
#
19+
# ### Added
20+
#
21+
# - Pseudo project for including only website resources and no website content.
22+
#
23+
# Facilitates testing shortcodes and layout changes with a small documentation set instead of Grafana Cloud or the entire website.
24+
#
925
# ## 6.0.1 (2024-02-28)
1026
#
1127
# ### Added
@@ -300,6 +316,7 @@ SOURCES_helm_charts_tempo_distributed='tempo'
300316
SOURCES_opentelemetry='opentelemetry-docs'
301317
SOURCES_plugins_grafana_datadog_datasource='datadog-datasource'
302318
SOURCES_plugins_grafana_oracle_datasource='oracle-datasource'
319+
SOURCES_resources='website'
303320

304321
VERSIONS_as_code='UNVERSIONED'
305322
VERSIONS_grafana_cloud='UNVERSIONED'
@@ -311,6 +328,7 @@ VERSIONS_grafana_cloud_frontend_observability_faro_web_sdk='UNVERSIONED'
311328
VERSIONS_opentelemetry='UNVERSIONED'
312329
VERSIONS_plugins_grafana_datadog_datasource='latest'
313330
VERSIONS_plugins_grafana_oracle_datasource='latest'
331+
VERSIONS_resources='UNVERSIONED'
314332
VERSIONS_technical_documentation='UNVERSIONED'
315333
VERSIONS_website='UNVERSIONED'
316334
VERSIONS_writers_toolkit='UNVERSIONED'
@@ -321,6 +339,7 @@ PATHS_helm_charts_tempo_distributed='docs/sources/helm-charts/tempo-distributed'
321339
PATHS_mimir='docs/sources/mimir'
322340
PATHS_plugins_grafana_datadog_datasource='docs/sources'
323341
PATHS_plugins_grafana_oracle_datasource='docs/sources'
342+
PATHS_resources='content'
324343
PATHS_tempo='docs/sources/tempo'
325344
PATHS_website='content'
326345

@@ -584,6 +603,11 @@ POSIX_HERESTRING
584603
proj_to_url_src_dst_ver "$(new_proj helm-charts/mimir-distributed "${_version}")"
585604
proj_to_url_src_dst_ver "$(new_proj enterprise-metrics "${_version}")"
586605
;;
606+
resources)
607+
_repo="$(repo_path website)"
608+
echo "arbitrary^${_repo}/config^/hugo/config" "arbitrary^${_repo}/layouts^/hugo/layouts" "arbitrary^${_repo}/scripts^/hugo/scripts"
609+
unset _repo
610+
;;
587611
traces)
588612
proj_to_url_src_dst_ver "$(new_proj tempo "${_version}")"
589613
proj_to_url_src_dst_ver "$(new_proj enterprise-traces "${_version}")"
@@ -617,7 +641,7 @@ $x
617641
POSIX_HERESTRING
618642

619643
if [ -n "${url}" ]; then
620-
if [ "${_url}" != "arbitrary" ]; then
644+
if [ "${url}" != arbitrary ]; then
621645
printf '\r %s\r\n' "${url}"
622646
fi
623647
fi
@@ -670,9 +694,9 @@ POSIX_HERESTRING
670694
fi
671695

672696
_repo="$(repo_path website)"
673-
volumes="--volume=${_repo}/config:/hugo/config"
674-
volumes="${volumes} --volume=${_repo}/layouts:/hugo/layouts"
675-
volumes="${volumes} --volume=${_repo}/scripts:/hugo/scripts"
697+
volumes="--volume=${_repo}/config:/hugo/config:z"
698+
volumes="${volumes} --volume=${_repo}/layouts:/hugo/layouts:z"
699+
volumes="${volumes} --volume=${_repo}/scripts:/hugo/scripts:z"
676700
fi
677701
unset _project _repo
678702
done
@@ -682,7 +706,7 @@ for x in ${url_src_dst_vers}; do
682706
$x
683707
POSIX_HERESTRING
684708

685-
if [ "${_url}" != "arbitrary" ]; then
709+
if [ "${_url}" != arbitrary ]; then
686710
if [ ! -f "${_src}/_index.md" ]; then
687711
errr "Index file '${_src}/_index.md' does not exist."
688712
note "Is '${_src}' the correct source directory?"
@@ -693,9 +717,9 @@ POSIX_HERESTRING
693717
debg "Mounting '${_src}' at container path '${_dst}'"
694718

695719
if [ -z "${volumes}" ]; then
696-
volumes="--volume=${_src}:${_dst}"
720+
volumes="--volume=${_src}:${_dst}:z"
697721
else
698-
volumes="${volumes} --volume=${_src}:${_dst}"
722+
volumes="${volumes} --volume=${_src}:${_dst}:z"
699723
fi
700724

701725
if [ -n "${_ver}" ] && [ "${_ver}" != 'UNVERSIONED' ]; then
@@ -789,7 +813,7 @@ fi
789813
${WEBSITE_EXEC}
790814
EOF
791815
chmod +x "${tempfile}"
792-
volumes="${volumes} --volume=${tempfile}:/entrypoint"
816+
volumes="${volumes} --volume=${tempfile}:/entrypoint:z"
793817
readonly volumes
794818

795819
IFS='' read -r cmd <<EOF

0 commit comments

Comments
 (0)