-
Notifications
You must be signed in to change notification settings - Fork 0
Home
Dot is a minimal CI system that is local first. It uses docker to run jobs defined in dot.yml file.
The dot.yml file mainly has 2 sections:
stagesjobs
Stages contain jobs. Each stage can have multiple jobs and each job must have one stage. Jobs defined in a stage run concurrently. Stages are executed in-order, as specified in the stages array.
stages:
- test
- security
- buildJobs define the actual process. A job is the basic unit of dot.
jobs:
- name: Run checks
stage: security
image: "docker.io/golangci/golangci-lint:latest"
variables:
- TEST: true
script:
- golangci-lint run ./...
condition: TESTA job definition can contain:
-
stage: Stage that the job belongs to. This stage should be defined understages. -
script: An array of commands to execute. These are executed usingshin the docker container. -
entrypoint: Optionally, an entrypoint can be specified to override the default entrypoint in a docker image. -
image: Docker image that will be used to run the scripts. -
variables: An array of key-value pairs. These variables are available insidescriptandcondition. -
condition: Dot uses expr to evaluate conditions. The job is executed only if the condition evaluates totrue.
Dot can be installed by downloading the latest binary from the releases section and adding it to your $PATH.
export PATH=$PATH:/path/to/dot
dot versionCreate a dot.yml file inside a folder.
stages:
- hello
jobs:
- name: Say Hello
stage: hello
image: "docker.io/debian:stable"
variables:
- WORLD: world!
script:
- echo Hello $WORLDRun dot in the same folder. Dot will download the image if it doesn't exist locally and the Say Hello job will print Hello world!.
Say Hello | {"status":"Pulling from library/debian","id":"stable"}
Say Hello | {"status":"Digest: sha256:ed69ce2733ba8a846f87106c07faadfa0506ff5020cce9489f753ee2cddaa3f7"}
{"status":"Status: Image is up to date for debian:stable"}
Say Hello | Hello world!
Dot can also be run using docker. There is a docker image available.
docker run -it -v /var/run/docker.sock:/var/run/docker.sock -v /path/to/project:/app ghcr.io/opnlabs/dot:latestHere it is important to mount the local docker socket so that dot has access to the host's docker daemon.