Pipelines

Draw the route a snapshot takes through your environments, add the apps that follow it, and keep every version of the route.

A pipeline is the route a snapshot takes on its way to production: a line of stages, one per environment, such as dev, staging and prod. It gives the team one place that says what runs in each stage right now, which snapshot is on its way, and who may change the route. The model is explained in Pipelines and promotion.

Before you start you need at least two environments, an app with a deployment in each, and a team to own the pipeline.

A pipeline does three jobs. It judges each snapshot in the stage it runs (qualification: soak, tests, no open incident, sign-off). It gates what may enter a stage, because each stage's rules are asked on every arrival, next to your guardrails. And it moves snapshots on: by itself when the next stage arrives by auto-promotion (below), or when a person promotes (below).

What is not built yet

The pipeline's Preview environments settings are saved and shown, and nothing makes a preview from them yet; previews follow each deployment's own settings. Stage settings that are stored and not yet acted on are listed in Stage rules.

Reviews of changes

When Changes need a review is on, who may skip the review and who may approve depend on the person's role, not on the reviewers' labels alone.

  • Owners of the organization and admins who belong to the pipeline's owner team may skip the review. Their save (PUT /pipelines/{id}, a restore of an earlier version) applies at once, and the version is recorded as applied without review (appliedWithoutReview on the version, with createdBy saying who), in the pipeline's History and in the audit log.
  • Anyone else, including an admin of another team, does not save a version: the edit is kept as a draft made on the version they edited, and the call answers 202 with the draft. A stage following its preset (Keep linked) goes the same way, one pipeline at a time: a pipeline the person may not manage is skipped, one whose review they may not skip gets a draft, and the audit log lists which pipelines followed, drafted or were skipped.
  • Admins need review too (changeReview.adminsNeedReview, off by default). When on, owners' and owner-team admins' changes become drafts as well, and a different eligible approver must approve them.
  • Approvers are the organization's owners (on any pipeline), admins who belong to the pipeline's owner team, and anyone in a team the review settings name (a team of the organization, a count and not the author: that many approvals from people in the team). A team is resolved to its id when the settings are saved and matched by it, never by name; a name that is no team is refused (400 pipeline.reviewer_team). An admin outside the owner team cannot approve. Nobody approves their own draft, and nobody reviews twice. Someone who may not review a draft is refused with 403 pipeline.review_refused, and the refusal is in the audit log. One approval from an owner or an owner-team admin is enough; otherwise every reviewer rule must be met. A decline ends the draft.
  • Only a person who signed in skips or gives a review. A change made with an API token or by an agent never skips the review, even when its owner could, and reviewing or withdrawing with a token or as an agent is refused (403 pipeline.person_only).
  • Loosening review is itself reviewed. Turning review off, turning off Admins need review too, dropping a reviewer, asking for fewer approvals, letting the author review or giving the pipeline to another team is applied directly only by someone who may skip the review. For anyone else PUT /pipelines/{id}/settings answers 202 with a settings draft. Asking for more review applies at once.
  • A draft keeps the rules as they stood when it was made, so loosening the settings afterwards does not loosen what a draft already needs. It records the owner team, the reviewers and the switch.

GET /pipelines/{id}/drafts lists the open drafts, each with changes (the difference against the version it was made on), approvers (who may approve, in words), reviews (who decided, how, with their note and whether they were an owner or owner-team admin) and state. A reviewer decides one with POST /pipelines/{id}/drafts/{draftId}/reviews (approve or decline; it takes pipeline:read, because the draft's own rule says who may decide). The approval that settles a graph draft saves it as the next version, with the author as who saved it and the reviewer as who reviewed it. A graph draft made on a version the pipeline has since left is superseded, and a new draft from the same person on the same pipeline supersedes their earlier open one. Drafts and reviews are in Activity.

Notifications

Each target is a Slack channel, an email address or a team, with when it hears: every event (a run starting in a stage, qualifying, being rejected, held by a release, rolled back or replaced), approvals waiting (a request for approvals opened for a deployment in one of the pipeline's stages), or stuck (a run under way that has not moved for the stuck after time, told once for each time it last moved). Slack channels get a message, teams get a notice in each member's inbox, and an address gets an email. Each event is told once however often it is looked at.

Auto-promotion

When a snapshot qualifies in a stage (see Qualification and sign-off), and a main route leads from that stage to a stage whose Arrival is auto_promote, Wardn promotes it to the deployments of that stage that hold the same apps, with no one acting:

  1. The verdict moving to qualified is recorded with an event. A stage with no qualification rules qualifies a snapshot as soon as it runs; a stage with a Soak and no soak rule of its own qualifies it once it has run healthy that long. The soak of the stage a snapshot leaves is the one that counts.
  2. For each deployment it goes to, one durable job is queued, keyed by the snapshot and the deployment. However many qualifications race or the event is repeated, the snapshot is promoted once. Only the snapshot the stage runs now is promoted; one it has moved on from is not carried forward.
  3. The job asks the guardrails, through the same engine that judges every deploy and the Evaluator. A guardrail, an active freeze, or a fact source that cannot be read yet holds the promotion: Activity shows it as waiting, with why, and the job looks again after 30 seconds, then 1, 2 and 4 minutes, and every 5 minutes after that. It never skips the stage and never gives up.
  4. When nothing holds it, the exact snapshot is copied to the next deployment (a new snapshot with origin promotion that names its source), the decision is stored and linked from Activity, and the snapshot is delivered the normal way.
  5. A worker that stops half way leaves the copy it made; the job runs again, finds it and delivers it, and does not make a second.

A route that asks for more than qualified is not followed, and a stage that arrives by request, and the first stage, which follows its deployments, are not reached this way. Promotions into a deployment are listed on its Snapshots tab and in Activity as deployment.promote with auto: true.

Promote by hand

A stage that arrives by request takes a snapshot only when a person promotes it, and a person may also promote ahead of an auto-promotion. Either way the exact snapshot of the stage before is copied to the deployments that hold the same apps. Nothing is rendered again. Two screens do it.

Promote ad hocPromote along the pipeline
WhereReleases › Promote ad hoc, or Promote on a snapshot of the deployment's Snapshots tab (not offered on the snapshot it runs now)Releases › Promote, in two steps: choose, then Review and request
What it makesOne new snapshot per target, delivered at onceA release: the same copy, wave by wave, as a durable workflow with a number such as R-142
WavesNoneFrom the stage's Rollout (waves)
APIPOST /deployments/{deploymentId}/promotions (promoteSnapshot), release:raisePOST /releases with kind: pipeline (raiseRelease), release:raise on every target

Both ask the policy engine the same questions as any arrival: your guardrails, any freeze, and the rules of the stage the target sits in (Stage rules). That includes the route's own check: when the route into the stage requires Qualified there, a snapshot that has not qualified in the stage before holds the promotion with the requirement "Qualified in QA", for example.

Open Releases and choose Promote ad hoc. Under From pick the deployment of the stage the snapshot is in; its snapshots are listed with their Checks and the Verdict the stage gave them. Tick the one you want. (A snapshot that qualified in QA is the one the route into prod wants.)

Under Target deployments tick the deployments to land on. Only deployments that hold exactly the same apps are offered. The What holds it column says what would stop each one, What moves compares each app with what the target runs now, and Rules that apply lists the guardrails and stage rules it would meet. Add a Reason if you want one kept in Activity, then choose Promote now.

For a tracked release with waves, a change request form and approvers, use Use a pipeline instead (or Releases › Promote). Step 1 of 2 asks for the snapshot, the apps and the target deployments and shows the waves of the stage; step 2 collects the Title, Change type, Change ticket, Customer impact and Rollback plan, then Request promotion raises the release. The screen takes the snapshot from its address (/releases/promote?snapshot=<snapshot id>).

If a rule holds the promotion, Promote now says which. A person who holds release:bypass may fill Bypass reason to pass a blocked rule once; it is recorded in Activity with the rule it passed. A rule that cannot be judged yet, because a fact it reads is unknown, makes a release wait and ask again; it never skips the rule.

Promotions into a deployment are listed on its Snapshots tab and by GET /deployments/{deploymentId}/promotions (listDeploymentPromotions, snapshot:read), each naming the snapshot it copies and who promoted it, and are in Activity as deployment.promote. The recipe A QA stage with sign-off goes through it end to end.

How a pipeline is made

PartMeaning
StageOne environment in the line. A pipeline has 1 to 20 stages, and each environment is used by one stage of a pipeline. A stage name is 1 to 48 characters and unique in the pipeline.
ArrivalHow a snapshot is promoted into the stage: auto_promote (after the stage before it qualifies it, optionally after a soak) or request (when a person asks). The first stage has no incoming route and so no arrival choice: the stage page shows its deployments' own sync setting in a read-only Sync row, and the stored value is request.
SoakHow long a snapshot should run healthy in a stage, from 0 seconds to 30 days. Stored with the stage.
Main routeThe arrow from one stage to the next. The main routes join every stage into a single line, with no loops.
Hotfix routeAn arrow that skips ahead from a stage to a later one, for an urgent fix. It does not replace the main route.
Route gateWhat a snapshot must show in the stage a route leaves: qualified, ran or none. The label is the text drawn on the arrow, up to 100 characters.
AppsThe apps that travel the pipeline. An app belongs to one pipeline.
Owner teamThe team that owns the pipeline. Its members read it; its owners edit it.

A deployment is in a pipeline when one of its apps is carried by a pipeline that has a stage in the deployment's environment. If several pipelines match, the first by name is used. That is how a deployment's Overview can say "Set by the Payments pipeline, QA stage" under Gets new snapshots by.

Create a pipeline

Open Pipelines in the sidebar and choose New pipeline.

Under Start from, pick a preset (Wardn ships four), Copy a pipeline of your team's to duplicate it, or Blank to begin with one dev stage. A preset fills in stages and rules, and everything stays editable. Each stage row also has an Agent read select, filled from the preset: the agent that reads snapshots in that stage for the person who signs off (see Stage rules). The list is your organization's agents.

Under Basics, give it a Name (up to 63 characters), a Description and an Owner team. Owners of that team edit the pipeline and its stages.

Under Apps, add the apps it moves. The hint on the form says an app belongs to one pipeline; an app that no pipeline carries can still be promoted ad hoc.

Under Stages, check the table: each stage shows the environment it is bound to and Arrives by (Deployment sync for the first stage, otherwise Auto-promote, By request or the preset's choice). From your environments is a start that makes one stage per environment, development first and production last, each named after its environment: the first by request, the ones between by auto-promote with the default qualification, and production by request with one approver. An Add stage row under the table picks an environment no stage uses yet and appends a stage that arrives by request; drag a row, or use its arrows, to change the order. A preset binds each stage to the first free environment of its class; a stage with no matching environment gets a picker. Guardrails that will also apply lists the guardrails that reach the environments you chose.

Choose Create pipeline. The app opens its graph. This is version 1.

The graph

Pipelines › (a pipeline) opens the Graph tab: the stages as cards joined by arrows, drawn left to right. Each arrow shows its gate ("Auto-promote", "After 4h soak", "Ready for prod", "By request" or the label you set), and a hotfix route is drawn separately from the main line. The toolbar has Add a stage, Add route and Tidy up; a draft shows a Draft indicator until you save.

  • Add a stage lists the environments that no stage of this pipeline uses yet.
  • Add a hotfix route by drawing a connection from a stage to a later one. The server refuses any connection that does not skip forward.
  • Choose a stage to edit its name, environment, How a snapshot enters and its rules in the side panel, or open the full stage editor with the pencil.
  • Chips on a stage show its deployments, whether they are healthy, the environment label and the apps it carries.

Saving writes a new version. Every saved version is kept as it was saved, so an old version can be read, compared and restored.

api "$WARDN_API_URL/api/v1/pipelines/$PIPELINE_ID"                    # the newest version
api "$WARDN_API_URL/api/v1/pipelines/$PIPELINE_ID?version=2"          # an older one

api -X PUT "$WARDN_API_URL/api/v1/pipelines/$PIPELINE_ID" -d '{
  "expectedVersion": 3,
  "summary": "Add a hotfix route",
  "graph": { "stages": [ ... ], "routes": [ ... ] }
}'

expectedVersion is the version you started from. If someone saved in between, Wardn answers 409 pipeline.version_conflict and tells you the current version, so two people never overwrite each other. Saving needs pipeline:manage.

Graph rules

The server refuses a graph that breaks one of these, and says which:

  • 1 to 20 stages and at most 60 routes.
  • One stage per environment, and unique stage names.
  • One main route out of a stage and one into it, joining all stages into one line from the first to the last.
  • A hotfix route goes from a stage to a later stage, and two routes never join the same pair.
  • The first stage is not auto_promote.

Apps

The Apps tab answers "which snapshot does each stage run right now?". It has two views.

  • By app has a row per app and a cell per stage: the number of deployments and the snapshot all of them run, or Mixed when they differ. Search by app or image.
  • By stage lists each stage's deployments with their health (Healthy, Degraded, Progressing) and snapshot.

Use Add an app to add apps, and remove one from its row. Removing an app only takes it out of the pipeline; its deployments keep running. Adding an app that another pipeline carries shows a Moves from chip and needs pipeline:manage on that pipeline.

api "$WARDN_API_URL/api/v1/pipelines/$PIPELINE_ID/apps"
api -X POST "$WARDN_API_URL/api/v1/pipelines/$PIPELINE_ID/apps" -d '{"appIds": ["'"$APP_ID"'"]}'
api -X DELETE "$WARDN_API_URL/api/v1/pipelines/$PIPELINE_ID/apps/$APP_ID"
api "$WARDN_API_URL/api/v1/pipeline-memberships?appId=$APP_ID"        # which pipeline carries an app

History

The History tab lists runs: one snapshot's trip through the pipeline, with where it is now, who started it, the stages it passed and the version of the pipeline it started on. Filter by status (In progress, Waiting, Landed, Rejected or rolled back), by who started it, or search by snapshot, app or person. A run keeps the version it started on, even if you save a new version later.

The tab fills as snapshots run in the stages of the pipeline: a run starts when a snapshot first runs in a stage, moves on as stages qualify or reject it, shows a release that paused or failed as what it waits on, and ends where it lands, is rejected, rolled back or replaced. Use Apps to see which snapshot each stage runs now.

Settings

The Settings tab holds:

SectionWhat it does
GeneralName, description, owner team and the apps.
Who can do whatThe pipeline's owners, with Add who. Owners can edit the pipeline and decide who else may act on it.
Changes to the pipelineChanges need a review with the reviewers and how many each, and Running releases: Keep the version they started with or Move to the new version. With a review required, a save is kept as a draft (202 with the draft) and becomes the next version when the reviewers approve it: see Reviews of changes.
VersionsEvery saved version with what changed and who saved it. View a version's diff, or Restore it; a restore saves a copy as the newest version.
Preview environmentsA short-lived deployment per pull request. Stored for the pipeline; use the deployment's own preview settings to run previews.
NotificationsUp to 20 targets (Slack channel, email, team) and when to post: every event of a run, approvals waiting, or a run stuck for as long as you say. See Notifications.
Danger zoneArchive this pipeline. Its apps are released and can join another pipeline.

Presets

A preset is a saved starting point. Open Pipelines › Presets (or Manage presets on the list) to see them. A preset has a kind:

KindHolds
pipelineA whole line of stages, each tied to a class of environment (the person picks the environment).
stageOne stage's rules. Apply it from a stage with Apply a preset.
rolloutWaves and failure handling for a stage.
guardrailStored for guardrails.

Wardn ships four pipeline presets in every organization, and a few stage and rollout presets (QA sign-off, GitOps auto, Request with approval, Waves by region). They are read only; copy one to change it.

Pipeline presetStages
Dev → staging → QA → proddev follows its deployments, staging auto-promote after a 4 hour soak, QA auto-promote with a tests rule and a one-person sign-off, prod by request with one approver and waves by region.
Auto-promote pipelinedev follows its deployments, staging auto-promote after 4 hours, prod auto-promote after 24 hours.
Approval pipelineEvery stage by request with one approver.
Tenant wavesstaging by request, prod by request with one approver and waves by tenant label.

A preset has an owner team (or the platform team), is shared with everyone or with named teams, and counts the pipelines created from it (Used by). Keeping a stage linked to its preset records the link, but a linked stage does not yet follow later changes to the preset.

Reading presets needs pipeline:read; making, changing and deleting your own needs pipeline:create. A preset not shared with you is a 404.

The environment's view

An environment's Pipelines tab lists the pipelines that have a stage there, with the team, what rolls in and what waits, and Reaches it by. Apps in the environment that no pipeline carries are listed separately. See Environments.

Permissions

ActionPermission
See a pipeline, its apps, runs, versions and settingspipeline:read (a member of the owner team reads it; so does anyone granted it)
Createpipeline:create
Save a version, change settings, add or remove apps, restore a version, archivepipeline:manage (the pipeline's owners)
Make, change or delete a presetpipeline:create
Promote a snapshot to a deployment, or raise a releaserelease:raise on the target deployment
Sign off a snapshot in a stagesnapshot:signoff on the deployment (Qualification)

A pipeline you cannot read answers 404. A member of the owner team who may not edit gets 403. See Roles and grants.

Next

Related: Pipelines and promotion, Qualification and sign-off, Releases, Approvals, Environments, Roadmap.

On this page