Pipelines as a Product

By Syncfusion®, Inc. · Last updated

Treat the pipeline as a product: call one shared template with inputs, give pipeline files owners with CODEOWNERS, and keep pinned versions fresh with Dependabot.

What you will learn

  • Call a shared template with inputs
  • Pin templates like actions
  • Write CODEOWNERS rules for pipeline files
  • Configure Dependabot for actions and packages

Pipelines as a Product

One repo, one pipeline: easy.

Twenty repos, twenty copied pipelines: a mess.

  • A fix in one copy never reaches the others.
  • Each team pins a different version.
  • Anyone can weaken their own copy, and nobody notices.

In this lesson you treat the pipeline like a product the team owns:

  • one shared template that every repo calls.
  • owners who review every pipeline change.
  • a bot that keeps versions fresh.

Simple lesson: write the pipeline once, own it, and keep it up to date.

A Real-World Example

Think about the school's question paper format.

  • The exam cell makes one template: header, sections, marks.
  • Every teacher fills in their own questions.
  • Only the exam cell can change the template.
  • When the board changes a rule, the exam cell updates the template once.

Now map it:

  • The template = a shared pipeline template.
  • Each teacher's questions = each repo's inputs, like the Node version.
  • The exam cell = the platform team, as CODEOWNERS.
  • Board rule updates = Dependabot pull requests.

Simple lesson: one owner, one template, many users.

Shared Templates

Template = a pipeline file other pipelines can call, with inputs.

PlatformThe templateCalling it
GitHub ActionsA workflow with on: workflow_call (a reusable workflow)A job with uses: ./.github/workflows/build-template.yml
Azure PipelinesA YAML file with parameters:A step with - template: templates/build.yml

Here is the team template used in this lesson:

  • Inputs (GitHub) or parameters (Azure) let each repo change a few things.
  • Everything else stays the same in every repo.

Real tools vs this lab: templates usually live in a separate, shared repo. GitHub calls them as org/repo/.github/workflows/file.yml@ref. Azure uses resources: repositories and template: file.yml@name. In this lab, the template sits in the same repo to keep it simple.

Simple lesson: call the template. Do not copy its steps.

Inputs Change the Behaviour

Pin a shared template from another repo to a tag or commit, just like actions. If you point at main, a bad change to the template breaks every repo at once.

Simple lesson: a few inputs per repo, one set of steps for all.

Owners for Pipeline Files

CODEOWNERS = a file that says who must review changes to which files.

  • Each line: a file pattern, then the owners.
  • The last matching line wins.
  • With branch protection, an owner's review becomes required.
  • Now an AI agent or a rushed teammate cannot quietly weaken the pipeline.
  • Azure Repos has the same idea: required reviewers for a path, in branch policies.

Simple lesson: the people who own the pipeline review every change to it.

Keep Versions Fresh

You pinned actions to SHAs in Pipeline Security. Pins get old.

Dependabot = a GitHub bot that opens pull requests to update versions.

  • One entry per kind of package: github-actions, npm, nuget.
  • Each update is a normal pull request, so your gates test it.
  • Azure DevOps has no built-in Dependabot. Teams often use Renovate, which works with both platforms.

Group small updates into one weekly pull request. Ten tiny pull requests a day get ignored. One tidy one a week gets reviewed.

Simple lesson: let a bot propose updates. Let your gates and reviewers decide.

  1. Add .github/CODEOWNERS to your starter repo with /.github/ @<your-username>.
  2. Add .github/dependabot.yml for github-actions, weekly.
  3. Push and wait a few days.

What you should see: Dependabot pull requests that update your pinned actions, with you asked to review.

Quick Check

Cheat Sheet

GitHub reusable workflow call:

jobs:
  build:
    uses: ./.github/workflows/build-template.yml
    with:
      node-version: '22'
      run-lint: true

Azure template call:

steps:
  - template: templates/build.yml
    parameters:
      version: '10'
      runLint: true

.github/CODEOWNERS:

* @shop/devs
/.github/workflows/ @shop/platform
azure-pipelines.yml @shop/platform

.github/dependabot.yml:

version: 2
updates:
  - package-ecosystem: github-actions
    directory: "/"
    schedule:
      interval: weekly
  - package-ecosystem: npm
    directory: "/"
    schedule:
      interval: weekly

Common mistakes

MistakeWrong ideaCorrect ideaWhat goes wrong
Copying pipelines between reposCopies are quickCall one templateFixes never spread
Template from mainAlways get the latestPin a tag or commitOne bad change breaks every repo
* rule last in CODEOWNERSOrder does not matterThe last match winsPipeline files lose their owner
No github-actions in DependabotPins never need updatesPins get oldKnown bugs stay in your actions
Dozens of single update pull requestsMore updates = saferGroup themPeople stop reviewing them

What to Remember

  • One shared template, called with a few inputs.
  • Pin templates like actions.
  • CODEOWNERS: pipeline files belong to the platform team. Last match wins.
  • Dependabot or Renovate keeps pins fresh, through normal pull requests.

Exercises

Next: Your Pipeline Pack