Developer Environment Setup
Set up a local environment for Harness Template Library development.
Developing for the Harness Template Library (HTL) requires a local environment with Docker, Terraform or OpenTofu, and Git installed. Choose either the DevContainer or the local container-based Makefile workflow described below to get set up.
Before you begin
Container engine: A supported version of Docker or a Docker-compatible engine.
Git: Git installed locally so you can clone the Harness Template Library repository.
Terraform or OpenTofu: Required for template development. Both DevContainer and Makefile workflows supply these inside the container, so a local install is optional.
Use the DevContainer in this repository
This repository includes support for DevContainers. To install this into your environment, you need the following:
A supported version of Docker or a Docker-compatible engine
The DevContainers extension for VS Code, or a compatible extension for your IDE
Once your development environment is ready, clone this repository into your IDE. For VS Code installations, you are prompted to reopen the workspace in a new container.
To modify the DevContainer, edit the devcontainer.json file at the root of this repository, then reload.
Local container-based development
A robust Makefile configuration is included within this repository. The command file contains frequently used shortcuts and commands. To use this solution, you need the following:
A supported version of Docker or a Docker-compatible engine
Makeinstalled for your OS: Windows, or Mac with Xcode command line tools installed or with Homebrew GNU Make
Go to Local Testing Using Make to review the testing workflow in detail.
To get the current list of available commands, enter make help in a Terminal session in this directory:
Next steps
Your local environment is ready for Harness Template Library development. Continue with the following:
Local Testing Using Make: Run the full test suite against your templates locally.
Using mise: Manage Terraform and OpenTofu tool versions consistently.
Create a new template in a custom HTL: Build your first template once your environment is set up.
Last updated
Was this helpful?