Skip to main content
Version: 2.4

Deployment Process

This page explains how to download, package, and install configuration — from a whole package to a single story.

There are two ways to install:

WayStepsWhen to use
Direct installValidate → Diff → Install from the package directoryQuick deployment. The server compares the package with the target at install time.
Artifact-based deploymentCreate artifact → Publish → Install from the artifactControlled releases. The artifact is built against the target, so you can review its content before installing.

An artifact is always built as a diff against the selected target. There is no separate full or incremental mode. What the artifact contains depends on the target's current state and on the filters you give artifact create.

What varies is how the content is prepared and which items are in scope. There are four strategies:

StrategyScopeWhen to use
Whole packageEverything matching package.yaml.Initial deployment, baseline, environment reset.
Diff to targetThe whole package, with only the differences from the target in the artifact.Regular update of a known environment.
Diff between branchesOnly files changed between two Git refs.CI/CD feature release.
Change SetDownload of the items tracked by a Change Set, combined with a branch diff for the artifact.Story-level release from parallel development.

See also:


Key concepts​

Installation artifact​

An installation artifact is a ZIP carrying the configuration changes prepared for a chosen target. It is ready for review, publishing, and installation.

Artifacts are written to a separate, non-versioned directory (by default build/). Add it to .gitignore, because artifacts are build outputs, not source.

build/
AllConfig-1.1.0-prod.zip
SDWAN-1.5.0-test.zip

Direct install​

tsm package install <package-directory> zips the directory and sends it to the target. The server computes the diff at install time and applies it. This is convenient, but it does not produce an artifact you can review beforehand.


The deployment pipeline​

Both ways use the same server-side checks. With an artifact, the diff is computed when the artifact is created. With a direct install, it is computed at install time.

The examples select the target with the global --context option.

Validate​

tsm --context prod package validate AllConfig

Parses package.yaml, resolves dependencies, and checks for structural or compatibility issues. No changes are made. If validation fails, stop here.

Diff​

tsm --context prod package diff AllConfig

Compares the package content with the current state of the target environment. The output shows which items would be added, modified, removed, or left unchanged.

Install​

# Direct install from the package directory
tsm --context prod package install AllConfig --notes "Release 1.0.0"

# Install from an artifact
tsm --context prod package install --file build/AllConfig-1.1.0-prod.zip --notes "Release 1.1.0"

Applies the configuration to the target environment and creates an Installed Package record for traceability. Add --dry-run to run only the validation.


Strategy 1: Whole package​

Takes everything that matches the package.yaml definition: every area, ConfigType and entity type. Use it either as a direct install or through an artifact.

When to use​

  • first-time deployment to a new environment
  • baseline release where you want a complete, known state
  • reset of an environment to match the package

How it works​

Step 1: Download configuration from the source environment​

tsm --context dev package download AllConfig

This downloads all items matching package.yaml into the local package directory, organized by area and entity type.

Step 2: Commit to Git​

git add AllConfig
git commit -m "AllConfig 1.0.0 — initial baseline"

Step 3: Validate, diff, install​

tsm --context prod package validate AllConfig
tsm --context prod package diff AllConfig
tsm --context prod package install AllConfig \
--notes "AllConfig 1.0.0 — initial production deployment"

On a new target the diff shows all items as added. On an existing target it shows a mix of added, modified, and unchanged items.


Strategy 2: Diff to target environment​

An artifact built without any Git selection contains the changes between the local package and the target environment. The diff is computed when the artifact is created, so you can review the exact set of changes before installing.

When to use​

  • regular update of a known, running environment
  • you want to review and approve the exact set of changes before installation
  • you want to publish the artifact to a repository for controlled rollout

How it works​

Step 1: Download updated configuration​

tsm --context dev package download AllConfig

Step 2: Commit and bump version​

git add AllConfig
git commit -m "AllConfig 1.1.0 — ordering form improvements"

Update version in package.yaml for the new release.

Step 3: Create the artifact​

tsm --context prod package artifact create AllConfig

The CLI compares the package with the target selected by --context and writes the artifact to build/{packageId}-{version}-{environment}.zip. Use --out to choose another location. Inspect the result before installing.

Step 4: Publish the artifact (optional)​

tsm package artifact publish build/AllConfig-1.1.0-prod.zip \
--repository nexus \
--notes "AllConfig 1.1.0 — ordering form improvements, PROJ-456"

This uploads the artifact to an artifact repository registered in the CLI configuration, for use by deployment pipelines or other teams. See Installation Artifacts for the repository requirements.

Step 5: Install from the artifact​

tsm --context prod package install --file build/AllConfig-1.1.0-prod.zip \
--notes "AllConfig 1.1.0 — ordering form improvements, PROJ-456"

Filtering by area or entity type​

Narrow the artifact with --area-code and --entity-types:

# Only the ordering area
tsm --context prod package artifact create AllConfig --area-code ordering

# Only Forms and Process definitions
tsm --context prod package artifact create AllConfig --entity-types Form,ProcessDefinition

Review, publish, and install the filtered artifact the same way.


Strategy 3: Diff between Git branches​

Takes the files that changed between two Git refs, for example a feature branch against the main branch. The artifact is still computed against the target.

When to use​

  • a CI/CD pipeline deploys a feature branch
  • you want to release what was developed in a branch and nothing else
  • a pull request is reviewed and the team wants to know what would be installed

How it works​

Step 1: Create the artifact from a branch diff​

tsm --context test package artifact create AllConfig \
--branch-diff main..feature/ordering-improvements

The CLI reads which configuration files changed between the two refs, computes the server diff, and writes the artifact. The result is not an intersection with the target's changes, and it does not guarantee that the content applies to a different target.

Step 2: Publish and install​

tsm package artifact publish build/AllConfig-1.1.0-test.zip --repository nexus

tsm --context test package install --file build/AllConfig-1.1.0-test.zip \
--notes "Feature: ordering improvements (branch: feature/ordering-improvements)"

CI/CD integration​

# Example CI step (pseudo-YAML)
steps:
- name: Create artifact from branch diff
run: |
tsm --context $TARGET package artifact create AllConfig \
--branch-diff origin/main..HEAD \
--out build/AllConfig-$TARGET.zip

- name: Publish
run: |
tsm package artifact publish build/AllConfig-$TARGET.zip --repository nexus

- name: Install
run: |
tsm --context $TARGET package install \
--file build/AllConfig-$TARGET.zip \
--notes "CI deploy: $CI_COMMIT_REF_NAME ($CI_COMMIT_SHORT_SHA)"

Strategy 4: Change Set​

A Change Set tracks the entities touched by one story or task. tsm package download --changeset adds those items to the package directory, and --branch-diff limits the artifact to the story.

When to use​

  • several developers work in parallel on the same project
  • each story must be releasable on its own
  • you want entities tracked automatically instead of selecting files by hand

How it works​

Step 1: Create a Change Set​

tsm changeset create \
--code US-1234 \
--name "SD-WAN site setup form and provisioning"

Step 2: Develop​

Work in the development environment. Configuration changes are tracked under the active Change Set.

Step 3: Review and submit​

tsm changeset show US-1234
tsm changeset submit US-1234

Step 4: Create a Git branch and download the Change Set items​

git checkout -b feature/US-1234

tsm --context dev package download SDWAN --changeset US-1234

The download adds the items tracked by the Change Set to the package directory. An item that already exists is overwritten, other files stay as they are. Commit the downloaded items:

git add SDWAN
git commit -m "US-1234: SD-WAN site setup form and provisioning"

Step 5: Create the artifact​

tsm --context test package artifact create SDWAN \
--branch-diff main..feature/US-1234

--branch-diff limits the artifact to the files this branch changed. Without it, the artifact would contain every difference between the whole package directory and the target, including work of other stories that is already on main. Alternatively, make sure the package directory contains only the content of this story.

Step 6: Merge and install​

Merge the feature branch into main (pull request, code review), then install the artifact:

tsm --context test package install --file build/SDWAN-1.5.0-test.zip \
--notes "US-1234: SD-WAN site setup and provisioning"

After a successful install, close the Change Set:

tsm changeset close US-1234

For the whole Change Set lifecycle, see Change Sets and Change Set Workflow.


Choosing a strategy​

QuestionStrategy
First deployment or an environment reset?Whole package
Do you track stories with Change Sets?Change Set
Does a CI/CD pipeline deploy from a feature branch?Diff between branches
Regular update of a known environment?Diff to target

Summary​

  • Install either directly from the package directory or from an artifact built with tsm package artifact create.
  • An artifact is always a diff against the target selected by --context. Review it before installing.
  • --branch-diff selects the changed files between two Git refs, and --area-code and --entity-types narrow the content.
  • A --changeset download combined with --branch-diff gives story-level content.
  • Artifacts live in a non-versioned directory (build/) and can be published to a registered repository with tsm package artifact publish.
  • Always describe the release in --notes, for traceability.

For executable CLI setup and examples, use the CLI handbook.