Harness Introduces
Continuous Delivery As Code

When a beautiful user interface isn't enough, it's always good to have configuration-as-code as a backup.

By Steve Burton
February 20, 2018

In 2018, it’s no longer enough to have an amazingly simple, intuitive, and beautiful user interface.

Configuration-as-code is the new user developer experience and it’s a mandatory feature, especially for selling to DevOps teams.

So, without further ado, I’m pleased to announce Harness just shipped configuration-as-code, and what an amazingly simple, intuitive, and beautiful (YAML) API it is.

config as code

Using YAML you can now configure EVERYTHING (pipelines, triggers, workflows, environments, and services) in Harness.

Why Configuration As Code?

There are four major benefits to Configuration As Code:

  • Automation & Consistency (templates)
  • Version Control
  • Scalability
  • Traceability

In a typical enterprise, you might have several hundred apps and teams, so you can’t really use a UI to define all your deployment pipelines and config. Config-as-code is, therefore, a “no-brainer” for Continuous Delivery. I have a feeling you’ll start to see other vendors/markets adopt this capability (e.g. monitoring-as-code).

Enabling Configuration As Code With Harness

Start by navigating to “Setup > Configuration As Code”:

Harness Setup

Now enter your Git URL, branch, and account credentials:

Harness Git setup

You can choose between single or bi-directional sync with Git.

Lastly, copy the Webhook URL from the Harness Git setup screen and create a new webhook inside your Git account:

Git Webhooks

Modify the content type to “application/json” and everything is ready to go. Updates will automatically be sync’d between Harness and Git.

Declarative Pipelines At Your Fingertips

Let’s code a Continuous Delivery pipeline using Git.

The below pipeline has 4 stages and references 4 deployment workflows: Dev, QA, Manual approval, and Prod.

Harness Git pipeline

We create “CD pipeline.yaml” file within the folder harness/setup/applications/myapp/pipelines/, commit it to branch, and seconds later Harness is fully synced, and the new pipeline is available to view in the UI:

Pipeline Example

If we want to view or make edits to the pipeline YAML, we can click the config-as-code icon:

config icon

and we can view/edit the YAML in context of the pipeline like this:

Edit Pipeline

The same config-as-code can be done for creating new services, environments, workflows, and triggers. In short, declare everything is code.

Try Harness CD-As-A-Service

If you’re kicking off a new Continuous Delivery initiative or project be sure to sign up for our trial. Harness is available as SaaS or on-premises software.




➞ Back to Blog

Leave a Reply

Notify of