Getting started

Short introduction to get started with your first build file

Create your first build file

To get started with hammerkit, you will need to create your first build file. Build files are usually called .hammerkit.yaml and can be created from scratch manually or by using the init command.

hammerkit init

If you created your build file with the init command, the build file will look like the example below.

.hammerkit.yaml
envs: {}

tasks:
  example:
    image: alpine
    cmds:
      - echo it's Hammer Time!

This build file contains an example command which prints a statement to the console inside an alpine container.

This requires to have a running docker deamon, if that's not the case, remove line 5 with the image property.

Run your first task

To run your first command, make sure your in the same directory as the build file is and run:

hammerkit example

This executes the echo command it's Hammer Time! and exits with code 0.

Conclusion

In this short introduction you created your first build file and executed your first task. The build file and the task in this example were very basic, to see the full functionality of hammerkit, take a look at the rest of the documentation.

Last updated