According to ci-env description werf should define a set of WERF_* variables and perform some actions to integrate with CI/CD system.

werf uses following values for werf environment variables:


WERF_IMAGES_REPO value is taken from CI_REGISTRY_IMAGE gitlab environment variable.


WERF_TAG_GIT_TAG value is taken from CI_COMMIT_TAG gitlab environment variable.


WERF_TAG_GIT_BRANCH value is taken from CI_COMMIT_REF_NAME gitlab environment variable.


WERF_ADD_ANNOTATION_PROJECT_GIT value is taken from CI_PROJECT_URL gitlab environment variable and constructed as:$CI_PROJECT_URL


WERF_ADD_ANNOTATION_CI_COMMIT value is taken from CI_COMMIT_SHA gitlab environment variable and constructed as:$CI_COMMIT_SHA


WERF_ADD_ANNOTATION_GITLAB_CI_PIPELINE_URL value is taken from CI_PIPELINE_ID gitlab environment variable and constructed as:$CI_PROJECT_URL/pipelines/$CI_PIPELINE_ID


WERF_ADD_ANNOTATION_GITLAB_CI_JOB_URL value is taken from CI_JOB_ID gitlab environment variable and constructed as:$CI_PROJECT_URL/-/jobs/$CI_JOB_ID


GitLab has environments support. werf will detect current environment for the pipeline in gitlab and use it as environment parameter.

WERF_ENV value is taken from CI_ENVIRONMENT_SLUG gitlab environment variable.

Other variables

Other variables are configured in the common way described in the overview article:

How to use

GitLab CI is turned on in werf ci-env command by required positional argument:

werf ci-env gitlab --tagging-strategy ...