It is a command tool that runs given steps on given docker image.
Usage: squareci [options]
Options:
-c, --config Config file to read. It can be a valid yml or json file.
It it is not provided command tries to read .squareci.yml file or
.squareci.json file in current working directory. If none of them
have been provided then it raises an error.
-p, --path Current working dir. The folder that mounted to the docker
container. If it is not provided then cwd is used.
image: node:latest
runInParallel: true
exitOnFailure: true
before:
- name: Build
run: yarn build
steps:
- name: Lint
run: yarn lint
- name: Format Check
run: yarn format:check
- name: Unit Tests
run: yarn test
after:
- name: Notify!
run: echo 'Everything is done'
{
"image": "node:latest",
"runInParallel": true,
"exitOnFailure": true,
"before": [{ "name": "Build", "run": "yarn build" }],
"steps": [
{ "name": "Lint", "run": "yarn lint" },
{ "name": "Format Check", "run": "Format Check" },
{ "name": "Unit Tests", "run": "yarn test" }
],
"after": [{ "name": "Notify", "run": "echo 'everything is done'" }]
}
Docker image name. You can find more detailed info from here.
Whether steps
can be run in parallel. If it is true then steps stage are executed in parallel mode. Otherwise, squareci will run them step by step.
If it is set to true
then program stops on first failure regardless it is in parallel mode or not. Otherwise it runs all steps even there is an error in a step.
All tasks in here runs right before steps
execution. If it is an error on this stage, command doesn't run steps
.
Tasks to run in docker container.
All tasks in here runs right after steps
execution.
If the given task returns stderr
then it is failed. If there is no error then it can be assumed as succeeded.