Nightly orchestrator that publishes eclipse-score/score documentation to the ubTrace instance at team.useblocks.com.
The GitHub Actions workflow at .github/workflows/nightly-ubtrace.yml runs at 02:00 UTC nightly and on workflow_dispatch. For each matrix ref (currently main plus tags strictly newer than v0.5.5):
- Checks out the orchestrator and
eclipse-score/score@<ref>side-by-side. - Installs Graphviz, Bazel, Python 3.12, and
uv. - Runs
bazel run //:ide_supportfrom inside the score checkout. This is score's own upstream target — it materializesscore/.venv_docs/(with allscore_docs_as_codeextensions + transitive Python deps) andscore/bazel-bin/ide_support.runfiles/(wherescore_plantumllooks for the plantuml jar). No patches to score'sMODULE.bazel. - Uses
uv pip install --target ubt-overlay --extra-index-url=https://pypi.useblocks.com/ --index-strategy unsafe-best-match ubt-sphinxto fetch theubt-sphinxbuilder (which is on the useblocks PyPI, not pypi.org) into a sibling overlay directory. - Applies
patches/score-main-conf.py.patchto score'sdocs/conf.pyto load theubt_sphinxextension and setubtrace_organization = "eclipse-score"andubtrace_project = "score". - Runs
python3.12 -m sphinx -b ubtrace ...withPYTHONPATHstitched as<.venv_docs/lib/python3.12/site-packages>:<ubt-overlay>so both the Bazel-managed extensions and ubt-sphinx are importable. bash upload.shtarsscore/docs/_build/ubtrace/eclipse-score/score/<ref>/and POSTs it tohttps://api.team.useblocks.com/api/v1/ingest/eclipse-score/score/<ref>?overwrite=true.
- Add a repo secret named
UBTRACE_INGEST_TOKENwithIngestpermission on theeclipse-score/scoreproject atteam.useblocks.com. - The schedule runs nightly. To trigger manually: Actions → Nightly ubTrace publish → Run workflow. The
refinput defaults tomainand overrides the matrix for that run.
ubt-sphinx is published only on https://pypi.useblocks.com/, which is uv-native and not a PEP 503 simple index. Bazel's pip.parse uses pip and can't resolve from it. So we let Bazel build the normal docs venv (which already has everything else score_sphinx_bundle needs, including the bazel-managed plantuml runfiles), and layer ubt-sphinx on top via uv pip install --target. Running Sphinx through system python3.12 (not the Bazel-wrapped launcher in .venv_docs/bin/python, which needs runfiles env to bootstrap) keeps both trees on PYTHONPATH without venv-detection issues.
The workflow uses whatever version of score_docs_as_code upstream eclipse-score/score@main (or the tag) currently pins — no override. When upstream bumps, you don't need to touch this orchestrator.
Edit TAG_MIN at the top of .github/workflows/nightly-ubtrace.yml. The bats tests in scripts/tests/list-refs.bats lock down the semantics: matched tags must be strictly newer than TAG_MIN (semver-aware — pre-releases of the cutoff like v0.5.5-rc.1 are excluded).
brew install bats-core shellcheck actionlint
bats scripts/tests/list-refs.bats
shellcheck scripts/list-refs.sh upload.sh scripts/tests/stubs/gh
actionlint .github/workflows/nightly-ubtrace.ymlWhen upstream eclipse-score/docs-as-code adopts ubt-sphinx as a direct dependency and score's conf.py loads it, delete patches/score-main-conf.py.patch, drop the Install ubt-sphinx ... and Apply score conf.py patch workflow steps, and trim PYTHONPATH to just <.venv_docs/lib/python3.12/site-packages>.