Skip to main content
Applicable to: All users using Gitops to configure Truefoundry resources. Requires Control Plane v0.132+ and TrueFoundry CLI v0.14.2+.

What Is Changing

The tfy apply CLI command now supports directory mode with --diffs-only and --ref flags, replacing the need for complex per-file CI/CD scripts. A single command now handles everything — detecting changed files, resolving dependencies between resources, and applying them in the correct order.

Before (per-file approach)

Previously, CI/CD pipelines required:
  • Shell scripts to detect which YAML files changed between commits
  • Manual sorting of files by dependency order (nesting level)
  • Separate handling for added, modified, and deleted files
  • Per-folder processing functions for each resource type
  • Third-party GitHub Actions (e.g. tj-actions/changed-files) to track changes
This resulted in 80–100+ lines of pipeline code and was fragile — dry runs would fail if a PR contained dependent resources (e.g. a workspace and an application inside it) because the resources were applied individually without dependency awareness.

After (single command)

The entire CI/CD pipeline is now two lines: Pull request (dry-run):
tfy apply --dir truefoundry --dry-run --show-diff --diffs-only --sync --ref <base-ref>
Merge to main (apply):
tfy apply --dir truefoundry --diffs-only --sync --ref <previous-commit>
The CLI internally resolves resource dependencies, so dry runs succeed even when a PR adds multiple interdependent resources at once.

What’s Improved

  • Dependency resolutiontfy apply now automatically determines the correct apply order for resources that depend on each other. Dry runs no longer fail when a single PR introduces a workspace along with the applications inside it.
  • Simpler pipelines — No more shell scripts, file-change detection logic, or per-folder processing. The full GitHub Actions workflow is now under 30 lines.
  • Consistent behavior — The same command works across GitHub Actions, Bitbucket Pipelines, Jenkins, and any other CI/CD system.
For complete CI/CD examples (GitHub Actions, Bitbucket Pipelines, Jenkins, and more), see the GitOps setup guide and the sample repository.

What You Need to Do

  1. Upgrade the TrueFoundry CLI to version 0.14.2 or greater:
    pip install -U "truefoundry"
    
  2. Verify your Control Plane is on version 0.132 or later.
  3. Update your CI/CD pipelines — replace the existing per-file scripts with the simplified commands. Refer to the GitOps setup guide and the sample repository for ready-to-use configs.
  4. Organize manifests under truefoundry/ — ensure all your YAML manifests are inside a truefoundry/ directory so tfy apply -d truefoundry picks them up. See the repository structure guide for details.

If you have any questions or run into anything unexpected during the migration, reach out and we’ll be happy to assist.