Getting Started

Getting Started

This tutorial will take less than 2 minutes.

Installation

To start off, you need to have togomak installed on your system. If you haven't installed it yet, check out the GitHub Releases (opens in a new tab) to find an appropriate version for your system, or you could take a look at the installation too.

Project Initialization

Create a new directory for your Togomak project and navigate to it in your terminal.

mkdir my-first-togomak-pipeline
cd my-first-togomak-pipeline

Initializing

Create a file called togomak.hcl, this is a bare minimum pipeline that is required for togomak to identify it as a valid pipeline.

togomak.hcl
togomak {
  version = 2
}

You may give a shot executing it now,

INFO[0000] togomak (version=dev)
INFO[0000] took 0s

Adding stages

Now, let's create your first Togomak stage. Add the following code to your togomak.hcl file:

togomak.hcl
...
 
stage "hello_world" {
  script = "echo hello world"
}

Run your pipeline

You can run your pipeline, by either using togomak run or just togomak

togomak

🎉 Congratulations

You just ran your first togomak pipeline! 〽️

So, what's next? If you have another 5 minutes, check out the tutorial on Stages to get an idea on the parallelism, dependency trees that togomak implements, or check out the use of Functions and Templating.