Rocket powered cross platform task runner delivering developer and ci build missions.
This project is at alpha MVP stage. It may be subject to change or redesign, but the hope is not to break any existing scripts using the tool.
There is a new work in progress Documentation Site. Additional documentation sources include this README, cli help (
cirocket --help
) and the sample config file generated by runningcirocket init mission
If you find and problem or want to contribute please see the contribution section below.
A project road map will be defined in due course covering steps towards a stable version 1.0.
The application can be installed via:
- Prebuilt release binaries
- Homebrew
- As a docker image
- Using the Go tool chain
- From source by cloning this repository
brew install nehemming/tap/cirocket
cirocket
is distributed as a deb
package and can be installed using the commands below. If a different version or architecture is required edit the file name as required.
curl -LO https://github.com/nehemming/cirocket/releases/download/v0.3.0/cirocket_0.3.0_linux_amd64.deb
dpkg -i cirocket_0.3.0_linux_amd64.deb
go install github.com/nehemming/cirocket@latest
git clone https://github.com/nehemming/cirocket.git
cd cirocket
go install
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:
- Launching local task scripts, known as missions.
- Assembling and running shared project blueprint scripts and using a runbook to tailor its steps and parameters.
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 . |
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
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. |
cirocket
can list available blueprints using the command:
cirocket list blueprints
cirocket
is a simple task runner application that uses a configuration file to specify the tasks.
Command line help is available with cirocket --help
To create a sample config file, along with some basic documentation run:
cirocket init mission
This will create a .cirocket.yml
file in the current working directory.
Here is example sample
Once edited the file can be run using
cirocket launch
Different mission files can be specified by adding to either command the --mission <filename>
flag.
cirocket
has a basic docker image available in packages.
To use the image, either pull it or include it in Dockerfile FROM statement.
docker pull ghcr.io/nehemming/cirocket:latest
The tool is best used with a mounted volume pointing at your project.
docker run --rm -ti -v /host/project:/project cirocket --dir /project init
TIP: The
--dir
flag switches to the supplied directory before running the tool.
We would welcome contributions to this project. Please read our CONTRIBUTION file for further details on how you can participate or report any issues.
This software is licensed under the Apache License.