Skip to main content
Version: 1.2

Create a Feature Repository

A feature repository stores feature and feature-related definitions.

Feature repositories typically use Git to allow for DevOps best practices, such as continuous integration.

Typically, you will want to create a workspace or select an existing one, prior to creating a feature repository. While creating an associated workspace is not required prior to creating a feature repository, an associated workspace is required to apply changes to a feature repository.

Prerequisites​

Prior to creating a new feature repository, follow these steps:

  • Install the Tecton CLI, if it is not already installed.
  • Authenticate to your account, using tecton login.

Creating a new feature repository​

To initialize a new feature repository, create a directory where the repository will be stored, which can be anywhere within your git source tree. Then, run tecton init in this directory:

$ tecton init
Feature repository root set to /Users/alice/src/my_feature_repository

Understanding the .tecton file​

When you run tecton init, Tecton creates a .tecton file in your directory. This file serves several important purposes:

  • Marks the repository root: The .tecton file identifies the root directory of your Tecton feature repository
  • Defines CLI scope: When running Tecton CLI commands like tecton plan or tecton apply, the CLI processes all objects in .py files within folders that contain a .tecton file
  • Sets repository boundaries: The .tecton file defines the scope of what Tecton considers part of your feature repository

The .tecton file is essential for Tecton CLI functionality and should not be manually edited or removed.

In addition to the .tecton file, tecton init also creates a repo.yaml file (the Repo Config file). You can learn more about configuring this file in the Configure Feature Repositories documentation.

tip

The .tecton file works in conjunction with the .tectonignore file, which can specify files or path expressions to ignore during plan or apply operations (similar to Git's .gitignore). Learn more about skipping files using .tectonignore.

note

When using a previously created Tecton feature repository, you do not need to run tecton init. Instead, clone the repository via Git or otherwise.

Was this page helpful?