Detect CI
SetCI=true on custom runners so the CLI uses its CI defaults, including
noninteractive behavior and cache writes. Provider-specific Git metadata
detection uses the provider’s own environment variables.
Saving caches
By default, Momentic does not write step caches on configured protected branches, includinggitMainBranch. CI enables cache writes through the
--save-cache option’s environment default. If your runner does not set CI,
pass --save-cache explicitly:
Git metadata
Momentic collects Git metadata for cache isolation, run traceability, and integration status posts. It reads metadata via thegit CLI or
provider-specific handling. If your CI runner doesn’t have git or runs in a
shallow state, provide metadata yourself via env vars.
MOMENTIC_GIT_OVERRIDE=true: must be set to enable git metadata overridesGIT_COMMIT_SHA: the full commit SHAGIT_COMMIT_SHA_SHORT: the short commit SHA (if not provided, Momentic derives it from the full SHA)GIT_COMMIT_TIMESTAMP: the current commit timestamp in ISO 8601 formatGIT_BRANCH_NAME: the current branch nameGIT_ORIGIN_URL: the git origin URLGIT_COMMIT_AUTHOR_NAME: the commit author’s nameGIT_COMMIT_MESSAGE: the commit messageLAST_COMMIT_ON_MAIN_SHA: the full commit SHA of the last commit on main. When using git, this is the output of runninggit merge-base main HEAD. On main, this is the current commit SHA.LAST_COMMIT_ON_MAIN_TIMESTAMP: the commit timestamp ofLAST_COMMIT_ON_MAIN_SHAin ISO 8601 format.MERGED_GIT_BRANCH_NAME: when on main, the name of the branch that was merged to create the current commit. This is usually derived from pull/merge requests using our GitHub/GitLab integrations.GITHUB_REPOSITORY: the GitHub repository name in the formatowner/repo(if applicable)GITLAB_PROJECT_PATH: the GitLab project path in the formatgroup/subgroup/repo(if applicable)GIT_USERNAME: the username of the current git user (if applicable)GIT_EMAIL: the email of the current git user (if applicable)GIT_NAME: the name of the current git user (if applicable)