Skip to content

feat: add siteopsSource parameter for cross-repo pipeline reuse#6

Merged
digimaun merged 3 commits intoAzure:mainfrom
digimaun:feature/siteops-source-param
Mar 17, 2026
Merged

feat: add siteopsSource parameter for cross-repo pipeline reuse#6
digimaun merged 3 commits intoAzure:mainfrom
digimaun:feature/siteops-source-param

Conversation

@digimaun
Copy link
Copy Markdown
Member

@digimaun digimaun commented Mar 16, 2026

Enable downstream repos to reference GHA and ADO pipeline templates
without a local siteops checkout. When siteopsSource is provided,
pip installs from the given source instead of local editable install.

Also includes:

  • SITE_OVERRIDES overlay generation rewritten in Python for arbitrary
    dot-notation nesting depth (replaces shell/jq single-level parser)
  • Conditional pip caching in ADO (enableCache parameter to skip
    Cache@2 in deployment jobs where caching scopes are unavailable)
  • GHA cache key uses siteops-source when pyproject.toml is absent

Add siteopsSource/siteops-source parameter to setup templates on both
ADO and GHA platforms. When provided, installs siteops from the given
pip source instead of local editable install, enabling downstream repos
to reference these templates cross-repo.

Backward compatible: defaults to empty string, preserving existing
pip install -e . behavior when no source is specified.

Changes:
- .github/actions/setup-siteops/action.yaml: siteops-source input
- .github/workflows/_siteops-deploy.yaml: siteops-source input, threaded
- .pipelines/templates/setup-siteops.yaml: siteopsSource parameter
- .pipelines/templates/siteops-deploy.yaml: siteopsSource parameter, threaded
Replace shell/jq dot-notation parser with Python + PyYAML for
generating sites.local overlay files. The previous implementation
only handled one level of nesting (e.g. parameters.clusterName).
The new implementation correctly expands any depth of dot-notation
keys (e.g. parameters.dataflowIdentity.clientId) into properly
nested YAML.

Both GHA and ADO templates updated symmetrically.
GHA: Use siteops-source as cache key when provided, falling back to
hashFiles(pyproject.toml) for local installs. Prevents weak/colliding
cache keys when cross-repo consumers lack pyproject.toml.

ADO: Same conditional cache key logic using siteopsSource parameter.

ADO: Add enableCache parameter (default true) to setup-siteops template.
The deploy template passes enableCache=false since ADO deployment jobs
cannot access pipeline caching scopes. This eliminates the post-job
Cache error entirely rather than masking it with continueOnError.
@digimaun digimaun merged commit b075268 into Azure:main Mar 17, 2026
4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants