CI

CI=true

The CI variable is always true in LayerCI runners.

Common synonyms are also set for compatibility: IS_CI_MACHINE=true CI_MACHINE=true IN_CI_MACHINE=true IN_CI=true

GIT_TAG

GIT_TAG=v1.0.0

GIT_TAG is the result of running git describe --always in the repository.

GIT_COMMIT

GIT_COMMIT=111122223333444455556666777788889999aaaa

GIT_COMMIT is the result of running git rev-parse HEAD in the repository.

EXPOSE_WEBSITE_URL

EXPOSE_WEBSITE_URL=(uuid).cidemo.co

EXPOSE_WEBSITE_URL is the URL exposed by EXPOSE WEBSITE

It’s often used to link a frontend with a backend when running both with EXPOSE WEBSITE and RUN BACKGROUND

You can even reference this before EXPOSE WEBSITE is ever used, but the URL is only live after the run passes.

LAYERCI

LAYERCI=true

LAYERCI is always true in LayerCI test runs.

LAYERCI_BRANCH

LAYERCI_BRANCH=staging

LAYERCI_BRANCH is included if this commit was to a specific branch in the repository. LAYERCI_BRANCH is not included if this job is running due to an external pull request.

LAYERCI_JOB_ID

LAYERCI_JOB_ID=5

LAYERCI_JOB_ID always exists. It’s set to the ID of the current running job.

LAYERCI_PULL_REQUEST

LAYERCI_PULL_REQUEST=https://github.com/some/repo/pull_requests/5

LAYERCI_PULL_REQUEST may or may not exist. It’s a link to the pull request that triggered this pipeline.

LAYERCI_REPO_NAME

LAYERCI_REPO_NAME=somerepo

LAYERCI_REPO_NAME is the name of the repository. If the repository is at github.com/a/b, this would be “b”

LAYERCI_REPO_OWNER

LAYERCI_REPO_OWNER=repoowner

LAYERCI_REPO_OWNER is the name of the owner of this repository. If the repository is at github.com/a/b, this would be “a”

LAYERCI_ORG_NAME

LAYERCI_ORG_NAME=myorg

LAYERCI_ORG_NAME is the name of the current organization. If the dashboard is at layerci.com/myorg, this would be “myorg”

LAYERCI_RUNNER_ID

LAYERCI_RUNNER_ID=main-layerfile

LAYERCI_RUNNER_ID is the id of the current layerfile runner.

In a run with a single Layerfile in the root of the directory this will be main-layerfile