Werf for now only supports Gitlab CI system. Support for top-10 popular CI systems coming soon.

To use werf with any CI/CD system that does not supported yet user should perform procedures described in the what is ci-env by own script.

The behaviour of werf ci-env command should be resembled (without actual using of this command) prior running any werf command in the begin of CI/CD job. This is accoumplished by some actions and defining environment variables from the list of environment variables.

Ci-env procedures

Docker registry integration

According to docker registry integration procedure, variables to define:

Create temporal docker config in the current job dir:

mkdir .docker
export DOCKER_CONFIG=$(pwd)/.docker
export WERF_IMAGES_REPO=DOCKER_REGISTRY_REPO

Git integration

According to git integration procedure, variables to define:

CI/CD pipelines integration

According to CI/CD pipelines integration procedure, variables to define:

CI/CD configuration integration

According to CI/CD configuration integration procedure, variables to define:

Configure modes of operation in CI/CD systems

According to configure modes of operation in CI/CD systems procedure, variables to define:

Variables to define:

Ci-env script

Copy following script and place into werf-ci-env.sh in the root of the project:

mkdir .docker
export DOCKER_CONFIG=$(pwd)/.docker
export WERF_IMAGES_REPO=DOCKER_REGISTRY_REPO
docker login -u USER -p PASSWORD $WERF_IMAGES_REPO

export WERF_TAG_GIT_TAG=GIT_TAG
export WERF_TAG_GIT_BRANCH=GIT_BRANCH
export WERF_ADD_ANNOTATION_PROJECT_GIT="project.werf.io/git=https://cicd.domain.com/project/x"
export WERF_ADD_ANNOTATION_CI_COMMIT="ci.werf.io/commit=b9a1ddd366aa6a20a0fd43fb6612f349d33465ff"
export WERF_ENV=ENV
export WERF_GIT_TAG_STRATEGY_LIMIT=10
export WERF_GIT_TAG_STRATEGY_EXPIRY_DAYS=30
export WERF_LOG_COLOR_MODE=on
export WERF_LOG_PROJECT_DIR=1
export WERF_ENABLE_PROCESS_EXTERMINATOR=1
export WERF_LOG_TERMINAL_WIDTH=95

This script needs to be customized to your CI/CD system: change WERF_* environment variables values to the real ones. Consult with the following pages to get an idea and examples of how to retrieve real values for werf variables:

Copy following script and place into werf-ci-env-cleanup.sh:

rm -rf .docker

werf-ci-env.sh should be called in the beginning of everr CI/CD job prior running any werf commands. werf-ci-env-cleanup.sh should be called in the end of every CI/CD job.