Browse documentation

ICE syntax

Header

Every Codinamo pipeline source starts with the ICE language version and Codinamo realm:

ICE-1.0.0
codinamo >= 1.0.0

Pipeline section

@pipeline {
    name: "build"
    description: "Build application"
    environment: "default"
    continueOnError: false
}

Triggers

The @triggers section declares how the pipeline may be started. A pipeline without any trigger cannot be run.

@pipeline {
    name: "build"

    @triggers {
        manual: {}
    }

    @actions { ... }
    @flow { ... }
}
manual: {}

Lets people start the pipeline from the web app, the API, and codi pipeline run. It takes no options. When you start a manual run you can choose the branch and the commit to build; they reach the run as CODINAMO_BRANCH and CODINAMO_COMMIT_SHA. See Variables and expressions.

push: { branches: […​] }

Starts the pipeline when one of these branches of the project repository receives commits: a git push, a pull request merged into it, or a pipeline committed from the editor. Branches accept , which matches inside one path segment (release/ matches release/2.0), and , which crosses segments (release/ also matches release/2.0/hotfix). push: {} without branches means the default branch. The run belongs to the person who pushed, needs their permission to run the pipeline, and receives CODINAMO_BRANCH, CODINAMO_COMMIT_SHA and CODINAMO_BEFORE_SHA. A push that updates several branches starts one run per matching branch. Deleting a branch or pushing tags starts nothing.

@triggers {
    manual: {}
    push: { branches: ["main", "release/*"] }
}

To push without starting pipelines, put [skip ci] or [ci skip] in the commit message.

pullRequest: {}

Lets branches choose the pipeline to validate the pull requests they receive. It takes no options: which branches use it is set on each branch. See Pull requests.

schedule: { name: { cron: "…​" } }

Starts the pipeline at fixed times. Each entry is a named schedule; separate them with commas, without a comma after the last one. A schedule runs as the Scheduler account assigned to it in the Schedules tab, and does not run until it has one. See Scheduled pipelines.

@triggers {
    manual: {}
    schedule: {
        task_qa: { cron: "0 3 * * *", branch: "develop", variables: "qa" },
        task_prod: { cron: "0 5 * * 1", timezone: "America/Sao_Paulo", variables: "prod", secrets: "prod" }
    }
}
Option Required Meaning

cron

Yes

Five fields: minute, hour, day of month, month, day of week. A schedule runs at most every 5 minutes.

timezone

No

IANA time zone in which the cron expression is read, such as America/Sao_Paulo. UTC when absent.

branch

No

Branch to build. The default branch of the repository when absent.

variables

No

Name of a variable group of the workspace. The group selected in the pipeline when absent.

secrets

No

Name of a secret group of the workspace. The group selected in the pipeline when absent.

The schedule name starts with a letter and contains only letters, numbers, and underscores. env is reserved for environments and is not accepted yet.

New pipelines declare manual: {} automatically. If you remove it, the Run pipeline button disappears and codi pipeline run fails with MANUAL_TRIGGER_NOT_DECLARED.

Actions

Actions are bindings to functions in the action namespace:

@actions {
    clone: action.GIT_CLONE({
        params: {
            repositoryUrl: "https://example.com/repository.git",
            recursive: true
        }
    })
}

The binding name must start with a letter and contain only letters, numbers, and underscores. It becomes the action reference name.

Parameter values can be strings, numbers, booleans, null, lists, and objects.

Runtime values are written as expressions and remain unchanged when the source is parsed or regenerated by the editor:

@actions {
    build: action.MAVEN_BUILD({
        params: {
            sourceDir: "${clone.repository_path}"
        }
    })
}

Graph flow

One edge per statement:

@flow {
    clone -> build
    build -> publish
}

Sequential chain:

@flow {
    clone -> build -> publish
}

Fan-out and join:

@flow {
    clone -> build -> [image, checksum] -> publish
}

The canonical writer may expand a chain into individual sorted edges while preserving graph semantics.

Diagnostics

Parse diagnostics include source line and column. A document from another realm or an unsupported ICE version is rejected before it can replace the saved graph.