Concepts

Features

cirocket is a task runner that is designed to support developers' local and ci build processes in a platform agnostic way.

It provides two modes of operation:

  1. Launching local task scripts, known as missions.
  2. Assembling and running shared project blueprint scripts and using a runbook to tailor its steps and parameters.

Launching missions

Launch scripts are typically used to run local build/test/venerability scripts or to prepare a project for pushing to a public repo. In a ci environment cirocket can help sequence the build steps, report code coverage, Fossa checks etc.

Examples used by the authors can be found at cirocket-config.

The launch command features:

  • Simple Yaml based configuration splitting missions into a hierarchal tree of stages and tasks.
  • Stages (made up of tasks) run either in the order defined in the configuration file or follow a sequence that specifies the specific stages and order iin which to run.
  • Tasks operations can perform file operations, run external applications or evaluate Go templates.
  • Tasks may be defined to run sequentially or concurrently.
  • Templated configuration using environment variables, parameters with variable substitution using Go template.
  • Supports nested include files, that can be located locally or downloaded from a web url.
  • Fallback failure tasks can be specified to run in the case a stage or task fails.
  • Restricting execution of tasks to only run on certain platforms. I.e. if you run from Linux, you may want to execute a shell script but on windows use a power shell one instead.

Launch features are delivered through two commands.

Command Description
cirocket init mission Creates a starting mission script that is ready for you to edit. The default script created is called .cirocket.yml and is placed in the current working directory. It will NOT overwrite an existing script. The arg --mission [path] allows an alterative local file to be specified.
cirocket launch Runs the mission script, either identified by --mission [path] or the default .cirocket.yml.

Supported task types

Type Description
cleaner cleans up files matching on of the file glob specs.
copy copies files matching a source glob pattern into the destination folder.
fetch fetches url bases resources and makes a local copy.
mkdir creates directories as needed from the dirs list.
move moves files matching the source glob specs to the destination folder.
remove deletes files matching on of the file glob specs.
run executes a program and awaits its response.
template processes an input template to generate output.

Use the command below to list the supported types

cirocket list tasktypes

Assembling blueprints

Blueprints are essentially template cirocket scripts that c an be run to carry out common project or development tasks. The example script contained in this project creates a new hello world project and builds it.

Blueprints are intended to replace a reliance of shell history or adhoc shell./ batch scripts to accomplish common tasks.

Blueprint features:

  • Simple Yaml based configuration.
  • Supports all the features of the launch command.
  • Blueprints can be local or stored on the web (including github.com repositories).
  • Tailored execution using a Yaml runbook scripts

Launch features are delivered through two commands.

Command Description
cirocket init runbook [blueprint] Finds the blue print and creates a new Yaml runbook file ready for local editing.
cirocket assemble [blueprint] Locates and runs the blueprint. If --runbook [runbook_path] is specified the selected runbook will be used to control the blueprint build.

List blueprints

cirocket can list available blueprints using the command:

cirocket list blueprints