Skip to main content

add-service

Scaffold a new service (Copier pipeline + auto-merge BOTH PRs).

v2: triggers <repo>-add-service in the source project, watches it (~1 min), then auto-merges BOTH downstream PRs — PR-A in the source repo (service code) AND PR-B in IaC/platform-infrastructure (deploy YAML). Without PR-B merged, the first deploy fails with 'pipeline not found'. v1.5.x missed PR-B entirely; v2 closes that gap. --no-merge skips both merges; the user takes ownership of completing them.

Category: Service lifecycle
Tags: scaffold copier pipeline new-service auto-merge two-pr iac

Usage

noclickops add-service <service-name> [--persistent-storage] [--public-endpoint] [--no-merge]

Flags

FlagDescription
--persistent-storageProvision a persistent volume for the service (default off).
--public-endpointExpose via Front Door at <svc>.<dns-zone> (default internal-only).
--no-mergeTrigger the pipeline and return after it succeeds — don't auto-merge either PR.
-h, --helpShow this help and exit.

Example

noclickops add-service backend --public-endpoint

Example output

noclickops add-service v1.7.3 — scaffolding 'smk1' (~1-3 min, 4 steps)

[1/4] Trigger add-service pipeline (~30-60s) params: persistent_storage=false public_endpoint=false
↳ <source-project>/<repo>-add-service run 28544 …
succeeded (0m 43s)
[2/4] Wait for PR-A in source repo (~10-30s) found #4837 … merged
[3/4] Wait for PR-B in IaC/platform-infra (~10-30s) found #4838 … merged
[4/4] Sync local main (~5s) ok

✓ Done. services/smk1 is on main.
Source PR #4837 merged; infrastructure PR #4838 merged.

Next:
noclickops clean-sample smk1 # optional — strip the OIDC starter
noclickops deploy smk1 test # first-time deploy (~6-10 min)

Auth

az login to the target's ADO tenant; user must be able to vote + complete PRs in both the source project AND IaC.

Depends on

  • az
  • git

Exit codes

CodeMeaning
0Service scaffolded; both PRs auto-merged (or pipeline succeeded with --no-merge).
1Pipeline failed, PR-A merge failed, or PR-B didn't appear within the 5 min poll window.

See also

Full --help output

Show full --help
noclickops v1.7.6 — add-service

Scaffold a new service (Copier pipeline + auto-merge BOTH PRs).

v2: triggers <repo>-add-service in the source project, watches it (~1 min), then auto-merges BOTH downstream PRs — PR-A in the source repo (service code) AND PR-B in IaC/platform-infrastructure (deploy YAML). Without PR-B merged, the first deploy fails with 'pipeline not found'. v1.5.x missed PR-B entirely; v2 closes that gap. --no-merge skips both merges; the user takes ownership of completing them.

Category: service-lifecycle
Tags: scaffold copier pipeline new-service auto-merge two-pr iac

Usage:
noclickops add-service <service-name> [--persistent-storage] [--public-endpoint] [--no-merge]

Flags:
--persistent-storage Provision a persistent volume for the service (default off).
--public-endpoint Expose via Front Door at <svc>.<dns-zone> (default internal-only).
--no-merge Trigger the pipeline and return after it succeeds — don't auto-merge either PR.
-h, --help Show this help and exit.

Example:
noclickops add-service backend --public-endpoint

Example output:
noclickops add-service v1.7.3 — scaffolding 'smk1' (~1-3 min, 4 steps)

[1/4] Trigger add-service pipeline (~30-60s) params: persistent_storage=false public_endpoint=false
↳ <source-project>/<repo>-add-service run 28544 …
succeeded (0m 43s)
[2/4] Wait for PR-A in source repo (~10-30s) found #4837 … merged
[3/4] Wait for PR-B in IaC/platform-infra (~10-30s) found #4838 … merged
[4/4] Sync local main (~5s) ok

✓ Done. services/smk1 is on main.
Source PR #4837 merged; infrastructure PR #4838 merged.

Next:
noclickops clean-sample smk1 # optional — strip the OIDC starter
noclickops deploy smk1 test # first-time deploy (~6-10 min)

Auth:
az login to the target's ADO tenant; user must be able to vote + complete PRs in both the source project AND IaC.

Depends on:
az git

Exit codes:
0 Service scaffolded; both PRs auto-merged (or pipeline succeeded with --no-merge).
1 Pipeline failed, PR-A merge failed, or PR-B didn't appear within the 5 min poll window.

See also:
status merge-pr clean-sample deploy