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

WERF_IMAGES_REPO value is taken from CI_REGISTRY_IMAGE gitlab environment variable.

WERF_TAG_GIT_TAG

WERF_TAG_GIT_TAG value is taken from CI_COMMIT_TAG gitlab environment variable.

WERF_TAG_GIT_BRANCH

WERF_TAG_GIT_BRANCH value is taken from CI_COMMIT_REF_NAME gitlab environment variable.

WERF_ADD_ANNOTATION_GIT_REPOSITORY_URL

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

project.werf.io/gitlab-url=$CI_PROJECT_URL

WERF_ENV

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 ...