From 70f8f59f0b6e12f3849e1a6059164190d83ceae6 Mon Sep 17 00:00:00 2001 From: Brian Deutsch Date: Mon, 7 Jul 2025 15:00:11 -0400 Subject: [PATCH 1/4] initial Signed-off-by: Brian Deutsch --- Makefile | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/Makefile b/Makefile index a3e48b957d74d..2165bf232143a 100644 --- a/Makefile +++ b/Makefile @@ -74,8 +74,8 @@ watch-cdocs: start: @make setup-build-scripts ## Build and run docs including external content. - @make dependencies @make update_websites_sources_module + @make dependencies @make server # Skip downloading any dependencies and run the site (hugo needs at the least node) @@ -153,6 +153,10 @@ update_websites_sources_module: node_modules/hugo-bin/vendor/hugo mod clean node_modules/hugo-bin/vendor/hugo mod tidy cat go.mod + node_modules/hugo-bin/vendor/hugo mod vendor + cp -rpv _vendor/github.com/DataDog/websites-sources/content/en/integrations/. content/en/integrations/ + rm -rf _vendor + ####################################################################################################################### # API Code Examples ####################################################################################################################### From ee16136112a63e82bec59d71782ba1b9a9a6b1f8 Mon Sep 17 00:00:00 2001 From: Brian Deutsch Date: Tue, 8 Jul 2025 12:57:58 -0400 Subject: [PATCH 2/4] only run the vendoring piece if we are in CI Signed-off-by: Brian Deutsch --- Makefile | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/Makefile b/Makefile index 2165bf232143a..65c09b7d373e9 100644 --- a/Makefile +++ b/Makefile @@ -153,9 +153,12 @@ update_websites_sources_module: node_modules/hugo-bin/vendor/hugo mod clean node_modules/hugo-bin/vendor/hugo mod tidy cat go.mod - node_modules/hugo-bin/vendor/hugo mod vendor - cp -rpv _vendor/github.com/DataDog/websites-sources/content/en/integrations/. content/en/integrations/ - rm -rf _vendor + @if [ -n "$(CI_COMMIT_REF_NAME)" ]; then \ + echo "In ci, vendoring integrations pages for placeholder generation"; \ + node_modules/hugo-bin/vendor/hugo mod vendor; \ + cp -rpv _vendor/github.com/DataDog/websites-sources/content/en/integrations/. content/en/integrations/; \ + rm -rf _vendor; \ + fi ####################################################################################################################### # API Code Examples From cd4bf4239df7fbc9c2cec7eecc11430f4f8b0d4c Mon Sep 17 00:00:00 2001 From: Brian Deutsch Date: Tue, 8 Jul 2025 13:11:25 -0400 Subject: [PATCH 3/4] adds a comment Signed-off-by: Brian Deutsch --- Makefile | 1 + 1 file changed, 1 insertion(+) diff --git a/Makefile b/Makefile index 65c09b7d373e9..850aa3d9726dc 100644 --- a/Makefile +++ b/Makefile @@ -86,6 +86,7 @@ start-no-pre-build: node_modules ## Build and run docs excluding external conte # Leave build scripts as is for local testing # This is useful for testing changes to the build scripts locally +# We aren't generating placeholders locally so the order of dependencies and sources module doesn't matter start-preserve-build: dependencies @make update_websites_sources_module @make server From 337996b35525771166d05728e6b641c949fbf496 Mon Sep 17 00:00:00 2001 From: Brian Deutsch Date: Tue, 8 Jul 2025 13:46:07 -0400 Subject: [PATCH 4/4] remove placeholders from make dependencies Signed-off-by: Brian Deutsch --- Makefile | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/Makefile b/Makefile index 850aa3d9726dc..b5236aee807a5 100644 --- a/Makefile +++ b/Makefile @@ -74,8 +74,8 @@ watch-cdocs: start: @make setup-build-scripts ## Build and run docs including external content. - @make update_websites_sources_module @make dependencies + @make update_websites_sources_module @make server # Skip downloading any dependencies and run the site (hugo needs at the least node) @@ -86,7 +86,6 @@ start-no-pre-build: node_modules ## Build and run docs excluding external conte # Leave build scripts as is for local testing # This is useful for testing changes to the build scripts locally -# We aren't generating placeholders locally so the order of dependencies and sources module doesn't matter start-preserve-build: dependencies @make update_websites_sources_module @make server @@ -117,7 +116,7 @@ node_modules: package.json yarn.lock # All the requirements for a full build dependencies: clean - make hugpython all-examples update_pre_build node_modules build-cdocs placeholders + make hugpython all-examples update_pre_build node_modules build-cdocs integrations_data/extracted/vector: $(call source_repo,vector,https://github.com/vectordotdev/vector.git,master,true,website/)