From ed2333df7fed77b023aadb82f5a554f2a2902220 Mon Sep 17 00:00:00 2001 From: Nico Alba Date: Wed, 3 Jun 2026 23:01:23 +0000 Subject: [PATCH 1/3] add cc to build --- unified-doc/build-docs.sh | 23 +++++++++++++++++++++-- unified-doc/docusaurus.config.ts | 25 ++++++++++++++++++++++--- 2 files changed, 43 insertions(+), 5 deletions(-) diff --git a/unified-doc/build-docs.sh b/unified-doc/build-docs.sh index 80d5b34..1046e11 100755 --- a/unified-doc/build-docs.sh +++ b/unified-doc/build-docs.sh @@ -17,6 +17,7 @@ # --zlan-branch=BRANCH Branch for netfoundry/zlan (default: main) # --platform-branch=BRANCH Branch for netfoundry/platform-doc (default: main) # --data-connector-branch=BRANCH Branch for netfoundry/nf-data-connector (default: main) +# --customer-connect-branch=BRANCH Branch for netfoundry/customer-connect-docs (default: main) # --clean Wipe _remotes and .docusaurus cache before building # --lint-only Run lint checks only; skip build # --qualifier=VALUE Append VALUE to output dir (e.g. --qualifier=-preview -> build-preview) @@ -31,10 +32,12 @@ # BB_REPO_TOKEN_ONPREM Bitbucket token for k8s-on-prem-installations (falls back to SSH) # BB_REPO_TOKEN_PLATFORM_DOC Bitbucket token for platform-doc (falls back to SSH) # BB_REPO_TOKEN_DATA_CONNECTOR Bitbucket token for nf-data-connector (falls back to SSH) +# BB_REPO_TOKEN_PLATFORM_DOC Bitbucket token for customer-connect-docs (falls back to SSH) # BB_USERNAME Bitbucket username (default: x-token-auth) # DOCUSAURUS_BUILD_MASK Hex bitmask: 0x1=openziti 0x2=frontdoor 0x4=selfhosted # 0x8=zrok 0x10=zlan 0x20=platform -# 0x40=data-connector 0xFF=all (default: 0xFF) +# 0x40=data-connector 0x80=llm-gateway 0x100=mcp-gateway +# 0x200=customer-connect 0x3FF=all (default: 0x3FF) # DOCUSAURUS_PUBLISH_ENV Set to 'prod' to use production Algolia index # NO_MINIFY Set to any value to pass --no-minify to Docusaurus # IS_VERCEL Set to 'true' on Vercel preview deployments @@ -62,6 +65,7 @@ BRANCH_SELFHOSTED="main" BRANCH_ZLAN="main" BRANCH_PLATFORM="main" BRANCH_DATA_CONNECTOR="main" +BRANCH_CUSTOMER_CONNECT="main" usage() { sed -n '/^# USAGE/,/^# =====/{ /^# =====/d; s/^# \{0,1\}//; p }' "$0" @@ -76,6 +80,7 @@ while [[ $# -gt 0 ]]; do --zlan-branch=*) BRANCH_ZLAN="${1#*=}"; shift ;; --platform-branch=*) BRANCH_PLATFORM="${1#*=}"; shift ;; --data-connector-branch=*) BRANCH_DATA_CONNECTOR="${1#*=}"; shift ;; + --customer-connect-branch=*) BRANCH_CUSTOMER_CONNECT="${1#*=}"; shift ;; --ziti-doc-branch) BRANCH_ZITI_DOC="${2:?--ziti-doc-branch requires a value}"; shift 2 ;; --zrok-branch) BRANCH_ZROK="${2:?--zrok-branch requires a value}"; shift 2 ;; --frontdoor-branch) BRANCH_FRONTDOOR="${2:?--frontdoor-branch requires a value}"; shift 2 ;; @@ -83,6 +88,7 @@ while [[ $# -gt 0 ]]; do --zlan-branch) BRANCH_ZLAN="${2:?--zlan-branch requires a value}"; shift 2 ;; --platform-branch) BRANCH_PLATFORM="${2:?--platform-branch requires a value}"; shift 2 ;; --data-connector-branch) BRANCH_DATA_CONNECTOR="${2:?--data-connector-branch requires a value}"; shift 2 ;; + --customer-connect-branch) BRANCH_CUSTOMER_CONNECT="${2:?--customer-connect-branch requires a value}"; shift 2 ;; --clean) CLEAN=1; shift ;; --lint-only) LINT_ONLY=1; shift ;; -h|--help) usage; exit 0 ;; @@ -109,6 +115,7 @@ echo " BRANCH_SELFHOSTED='$BRANCH_SELFHOSTED'" echo " BRANCH_ZLAN='$BRANCH_ZLAN'" echo " BRANCH_PLATFORM='$BRANCH_PLATFORM'" echo " BRANCH_DATA_CONNECTOR='$BRANCH_DATA_CONNECTOR'" +echo " BRANCH_CUSTOMER_CONNECT='$BRANCH_CUSTOMER_CONNECT'" echo " CLEAN=$CLEAN" echo " IS_VERCEL='${IS_VERCEL:-}'" echo " node: $(node --version 2>/dev/null || echo 'not found')" @@ -186,6 +193,16 @@ clone_or_update() { echo "🔑 Using SSH for nf-data-connector" >&2 fi ;; + *customer-connect-docs*) + if [ -n "${BB_REPO_TOKEN_PLATFORM_DOC:-}" ]; then + local bb_user="${BB_USERNAME:-x-token-auth}" + url="https://${bb_user}:${BB_REPO_TOKEN_PLATFORM_DOC}@bitbucket.org/netfoundry/customer-connect-docs.git" + echo "🔑 Using BB_REPO_TOKEN_PLATFORM_DOC token for customer-connect-docs" >&2 + else + url="git@bitbucket.org:netfoundry/customer-connect-docs.git" + echo "🔑 Using SSH for customer-connect-docs" >&2 + fi + ;; esac if [ -d "$target/.git" ]; then @@ -263,6 +280,7 @@ lint_docs() { "${script_dir}/_remotes/openziti/docusaurus/docs" "${script_dir}/_remotes/platform/docusaurus/docs" "${script_dir}/_remotes/data-connector/docusaurus/docs" + "${script_dir}/_remotes/customer-connect/docusaurus/docs" ) # 2. VERIFY FOLDERS @@ -393,7 +411,8 @@ clone_or_update "https://github.com/openziti/ziti-doc.git" clone_or_update "https://github.com/netfoundry/zlan.git" zlan "$BRANCH_ZLAN" clone_or_update "https://github.com/openziti/zrok.git" zrok "$BRANCH_ZROK" clone_or_update "https://bitbucket.org/netfoundry/platform-doc.git" platform "$BRANCH_PLATFORM" -clone_or_update "https://bitbucket.org/netfoundry/nf-data-connector.git" data-connector "$BRANCH_DATA_CONNECTOR" +clone_or_update "https://bitbucket.org/netfoundry/nf-data-connector.git" data-connector "$BRANCH_DATA_CONNECTOR" +clone_or_update "https://bitbucket.org/netfoundry/customer-connect-docs.git" customer-connect "$BRANCH_CUSTOMER_CONNECT" echo "Cleaning stale build artifacts from remotes..." find "$script_dir/_remotes" -type d \( -path "*/docusaurus/build" -o -path "*/docusaurus/.docusaurus" -o -path "*/website/build" -o -path "*/website/.docusaurus" \) -exec rm -rf {} + 2>/dev/null || true diff --git a/unified-doc/docusaurus.config.ts b/unified-doc/docusaurus.config.ts index f5dfb9f..d3d514d 100644 --- a/unified-doc/docusaurus.config.ts +++ b/unified-doc/docusaurus.config.ts @@ -26,6 +26,7 @@ import {onpremRedirects} from "./_remotes/selfhosted/docusaurus/docusaurus-plugi import {platformDocsPluginConfig} from "./_remotes/platform/docusaurus/docusaurus-plugin-platform-docs.ts"; import {openzitiDocsPluginConfig, openzitiRedirects} from "./_remotes/openziti/docusaurus/docusaurus-plugin-openziti-docs.ts"; import {dataconnectorDocsPluginConfig} from "./_remotes/data-connector/docusaurus/docusaurus-plugin-dataconnector-docs.ts"; +import {customerConnectDocsPluginConfig} from "./_remotes/customer-connect/docusaurus/docusaurus-plugin-customer-connect-docs.ts"; // This runs in Node.js - Don't use client-side code here (browser APIs, JSX...) const frontdoor = `./_remotes/frontdoor`; @@ -35,6 +36,7 @@ const zrokRoot = `./_remotes/zrok/website`; const zlan = `./_remotes/zlan`; const platform = `./_remotes/platform`; const dataConnector = `./_remotes/data-connector`; +const customerConnect = `./_remotes/customer-connect`; const llmGateway = `./docs/llm-gateway`; const mcpGateway = `./docs/mcp-gateway`; @@ -48,7 +50,7 @@ function routeBase(name: string) { return isVercel ? `docs/${name}` : name; } -const buildMask = parseInt(process.env.DOCUSAURUS_BUILD_MASK ?? "0x1FF", 16); +const buildMask = parseInt(process.env.DOCUSAURUS_BUILD_MASK ?? "0x3FF", 16); const BUILD_FLAGS = { NONE: 0x0, @@ -59,8 +61,9 @@ const BUILD_FLAGS = { ZLAN: 0x10, PLATFORM: 0x20, DATA_CONNECTOR: 0x40, - LLM_GATEWAY: 0x80, - MCP_GATEWAY: 0x100, + LLM_GATEWAY: 0x80, + MCP_GATEWAY: 0x100, + CUSTOMER_CONNECT: 0x200, }; function build(flag: number) { @@ -121,6 +124,7 @@ const REMARK_MAPPINGS = [ { from: '@dataconnectordocs', to: `${docsBase}dataconnector`}, { from: '@llmgatewaydocs', to: `${docsBase}llm-gateway`}, { from: '@mcpgatewaydocs', to: `${docsBase}mcp-gateway`}, + { from: '@customerconnectdocs', to: `${docsBase}customer-connect`}, { from: '@static', to: docsBase}, { from: '/openziti', to: `${docsBase}${routeBase('openziti')}` }, { from: '/frontdoor', to: `${docsBase}${routeBase('frontdoor')}` }, @@ -295,6 +299,7 @@ const config: Config = { '_remotes/openziti/docusaurus/static/', '_remotes/zlan/docusaurus/static/', '_remotes/platform/docusaurus/static/', + '_remotes/customer-connect/docusaurus/static/', `${zrokRoot}/static/`, `${zrokRoot}/docs/images` ], @@ -353,6 +358,7 @@ const config: Config = { '@staticdir': path.resolve(__dirname, `docusaurus/static`), '@platform': path.resolve(__dirname, `${platform}/docusaurus`), '@dataconnector': path.resolve(__dirname, `${dataConnector}/docusaurus`), + '@customerconnectdocs': path.resolve(__dirname, `${customerConnect}/docusaurus`), }, }, module: { @@ -376,6 +382,7 @@ const config: Config = { build(BUILD_FLAGS.ZROK) && ['@docusaurus/plugin-content-pages',{id: `zrok-pages`, path: `${zrokRoot}/src/pages`, routeBasePath: `/${routeBase('zrok')}`}], build(BUILD_FLAGS.PLATFORM) && ['@docusaurus/plugin-content-pages',{id: `platform-pages`, path: `${platform}/docusaurus/src/pages`, routeBasePath: `/${routeBase('platform')}`}], build(BUILD_FLAGS.DATA_CONNECTOR) && ['@docusaurus/plugin-content-pages',{id: `dataconnector-pages`, path: `${dataConnector}/docusaurus/src/pages`, routeBasePath: `/${routeBase('dataconnector')}`}], + build(BUILD_FLAGS.CUSTOMER_CONNECT) && ['@docusaurus/plugin-content-pages',{id: `customer-connect-pages`, path: `${customerConnect}/docusaurus/src/pages`, routeBasePath: `/${routeBase('customer-connect')}`}], build(BUILD_FLAGS.ZROK) && extendDocsPlugins(zrokDocsPluginConfig(zrokRoot, REMARK_MAPPINGS, routeBase('zrok'))), build(BUILD_FLAGS.SELFHOSTED) && [ '@docusaurus/plugin-content-docs', @@ -441,6 +448,11 @@ const config: Config = { routeBase('dataconnector'), ), ), + build(BUILD_FLAGS.CUSTOMER_CONNECT) && customerConnectDocsPluginConfig( + `${customerConnect}/docusaurus`, + REMARK_MAPPINGS, + routeBase('customer-connect'), + ), build(BUILD_FLAGS.LLM_GATEWAY) && [ '@docusaurus/plugin-content-docs', { @@ -501,6 +513,13 @@ const config: Config = { showNavLink: false, configuration: {url: `${docsBase}console-api-spec.yaml`, hideClientButton: true, hideTestRequestButton: true, searchHotKey: 'i'}, } as ScalarOptions], + build(BUILD_FLAGS.CUSTOMER_CONNECT) && ['@scalar/docusaurus', { + id: 'customer-connect-api', + label: 'API reference', + route: `/${routeBase('customer-connect')}/api-guides/openapi-reference`, + showNavLink: false, + configuration: {url: `${docsBase}customer-connect-api-spec.yaml`, hideClientButton: true, hideTestRequestButton: true, searchHotKey: 'i'}, + } as ScalarOptions], build(BUILD_FLAGS.FRONTDOOR) && ['@scalar/docusaurus', { id: 'frontdoor-api', label: 'API reference', From 44209a1f1424c35e7b4d696604eae628f0098880 Mon Sep 17 00:00:00 2001 From: Nico Alba Date: Wed, 3 Jun 2026 23:13:28 +0000 Subject: [PATCH 2/3] fix token --- unified-doc/build-docs.sh | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/unified-doc/build-docs.sh b/unified-doc/build-docs.sh index 1046e11..9728423 100755 --- a/unified-doc/build-docs.sh +++ b/unified-doc/build-docs.sh @@ -32,7 +32,7 @@ # BB_REPO_TOKEN_ONPREM Bitbucket token for k8s-on-prem-installations (falls back to SSH) # BB_REPO_TOKEN_PLATFORM_DOC Bitbucket token for platform-doc (falls back to SSH) # BB_REPO_TOKEN_DATA_CONNECTOR Bitbucket token for nf-data-connector (falls back to SSH) -# BB_REPO_TOKEN_PLATFORM_DOC Bitbucket token for customer-connect-docs (falls back to SSH) +# BB_REPO_TOKEN_CUSTOMER_CONNECT Bitbucket token for customer-connect-docs (falls back to SSH) # BB_USERNAME Bitbucket username (default: x-token-auth) # DOCUSAURUS_BUILD_MASK Hex bitmask: 0x1=openziti 0x2=frontdoor 0x4=selfhosted # 0x8=zrok 0x10=zlan 0x20=platform @@ -194,10 +194,10 @@ clone_or_update() { fi ;; *customer-connect-docs*) - if [ -n "${BB_REPO_TOKEN_PLATFORM_DOC:-}" ]; then + if [ -n "${BB_REPO_TOKEN_CUSTOMER_CONNECT:-}" ]; then local bb_user="${BB_USERNAME:-x-token-auth}" - url="https://${bb_user}:${BB_REPO_TOKEN_PLATFORM_DOC}@bitbucket.org/netfoundry/customer-connect-docs.git" - echo "🔑 Using BB_REPO_TOKEN_PLATFORM_DOC token for customer-connect-docs" >&2 + url="https://${bb_user}:${BB_REPO_TOKEN_CUSTOMER_CONNECT}@bitbucket.org/netfoundry/customer-connect-docs.git" + echo "🔑 Using BB_REPO_TOKEN_CUSTOMER_CONNECT token" >&2 else url="git@bitbucket.org:netfoundry/customer-connect-docs.git" echo "🔑 Using SSH for customer-connect-docs" >&2 From 8cc508ba79fac28d511c7ab55df4423bcb01668f Mon Sep 17 00:00:00 2001 From: Nico Alba Date: Wed, 3 Jun 2026 23:20:52 +0000 Subject: [PATCH 3/3] update branch --- unified-doc/build-docs.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/unified-doc/build-docs.sh b/unified-doc/build-docs.sh index 9728423..b9b9a3a 100755 --- a/unified-doc/build-docs.sh +++ b/unified-doc/build-docs.sh @@ -65,7 +65,7 @@ BRANCH_SELFHOSTED="main" BRANCH_ZLAN="main" BRANCH_PLATFORM="main" BRANCH_DATA_CONNECTOR="main" -BRANCH_CUSTOMER_CONNECT="main" +BRANCH_CUSTOMER_CONNECT="add-docs" usage() { sed -n '/^# USAGE/,/^# =====/{ /^# =====/d; s/^# \{0,1\}//; p }' "$0"