Skip to main content

deploy

Deploy a service to test or prod (v2 multi-pipeline orchestration).

v2: orchestrates 2 or 4 pipelines across the source project + IaC depending on whether this is a first-time or subsequent deploy. Detection: queries IaC for prior successful <repo>-<svc>-deploy-test runs. Subsequent path triggers the source project's <repo>-<svc>-deploy and exits (with --watch, also follows the auto-triggered IaC deploy-test). First-time path runs build → deploy → infra-build → deploy-test in sequence with fail-fast and prints a summary including the Public URL for services with ENABLE_PUBLIC_ENDPOINT=true.

Category: Deployment
Tags: cd pipeline azure-devops container-app deployment release

Usage

noclickops deploy <service> [test|prod] [--watch]

Flags

FlagDescription
testDeploy to the test environment (default).
prodDeploy to production.
--watchFor subsequent deploys, also poll + watch the IaC deploy-test run (auto-triggered by the source project deploy). First-time deploys always watch (chain requires it).
-h, --helpShow this help and exit.

Example

noclickops deploy frontend test --watch

Example output

noclickops deploy v1.7.3 — smk1 → test

==> Deploying 'smk1' → 'test' (FIRST-TIME — full chain, ~10 min)
[1/4] Source CI: build (~2-3 min)
↳ <source-project>/<repo>-smk1-build run 28572 …
succeeded (1m 3s)
[2/4] Source CI: deploy (~1-2 min)
↳ <source-project>/<repo>-smk1-deploy run 28573 …
succeeded (0m 42s)
[3/4] IaC: infrastructure build (~2-3 min)
↳ IaC/<repo>-smk1-infra-build run 28575 …
succeeded (0m 42s)
[4/4] IaC: provision + deploy (~3-5 min)
↳ IaC/<repo>-smk1-deploy-test run 28576 …
succeeded (3m 6s)

Deploy complete.
Container app: ca-abc100001-smk1 (rg-test-myteam-frontend-common)
(no public endpoint configured for this service)

# Subsequent re-run uses the resource-trigger path:
==> Deploying 'smk1' → 'test' (subsequent run, resource trigger expected)
[1/1] Source CI: deploy (~1-2 min)
↳ <source-project>/<repo>-smk1-deploy run 28577 …
succeeded (0m 42s)
✓ Deploy complete.

Auth

az login to the target's ADO tenant; user identity must have permission to run pipelines in both the source project and the IaC project.

Depends on

  • az
  • git

Exit codes

CodeMeaning
0All pipelines in the chain succeeded (or, for subsequent without --watch, the source project deploy succeeded).
1Service config missing, pipeline missing (PR-A or PR-B not merged), pipeline failed, or az error.

See also

Full --help output

Show full --help
noclickops v1.7.6 — deploy

Deploy a service to test or prod (v2 multi-pipeline orchestration).

v2: orchestrates 2 or 4 pipelines across the source project + IaC depending on whether this is a first-time or subsequent deploy. Detection: queries IaC for prior successful <repo>-<svc>-deploy-test runs. Subsequent path triggers the source project's <repo>-<svc>-deploy and exits (with --watch, also follows the auto-triggered IaC deploy-test). First-time path runs build → deploy → infra-build → deploy-test in sequence with fail-fast and prints a summary including the Public URL for services with ENABLE_PUBLIC_ENDPOINT=true.

Category: deploy
Tags: cd pipeline azure-devops container-app deployment release

Usage:
noclickops deploy <service> [test|prod] [--watch]

Flags:
test Deploy to the test environment (default).
prod Deploy to production.
--watch For subsequent deploys, also poll + watch the IaC deploy-test run (auto-triggered by the source project deploy). First-time deploys always watch (chain requires it).
-h, --help Show this help and exit.

Example:
noclickops deploy frontend test --watch

Example output:
noclickops deploy v1.7.3 — smk1 → test

==> Deploying 'smk1' → 'test' (FIRST-TIME — full chain, ~10 min)
[1/4] Source CI: build (~2-3 min)
↳ <source-project>/<repo>-smk1-build run 28572 …
succeeded (1m 3s)
[2/4] Source CI: deploy (~1-2 min)
↳ <source-project>/<repo>-smk1-deploy run 28573 …
succeeded (0m 42s)
[3/4] IaC: infrastructure build (~2-3 min)
↳ IaC/<repo>-smk1-infra-build run 28575 …
succeeded (0m 42s)
[4/4] IaC: provision + deploy (~3-5 min)
↳ IaC/<repo>-smk1-deploy-test run 28576 …
succeeded (3m 6s)

Deploy complete.
Container app: ca-abc100001-smk1 (rg-test-myteam-frontend-common)
(no public endpoint configured for this service)

# Subsequent re-run uses the resource-trigger path:
==> Deploying 'smk1' → 'test' (subsequent run, resource trigger expected)
[1/1] Source CI: deploy (~1-2 min)
↳ <source-project>/<repo>-smk1-deploy run 28577 …
succeeded (0m 42s)
✓ Deploy complete.

Auth:
az login to the target's ADO tenant; user identity must have permission to run pipelines in both the source project and the IaC project.

Depends on:
az git

Exit codes:
0 All pipelines in the chain succeeded (or, for subsequent without --watch, the source project deploy succeeded).
1 Service config missing, pipeline missing (PR-A or PR-B not merged), pipeline failed, or az error.

See also:
status info logs add-service