0 | --- | # Meta section |
... | ||
1 | project: string ! | # Unique project name |
2 | configVersion: int ! | # Config syntax version. It should always be 1 for now |
3 | build: | # Common build settings |
... | ||
4 | cacheVersion: string | # Cache version |
5 | platform: [ string, ... ] | # Common list of target platforms for all images (for example ['linux/amd64', 'linux/arm64', 'linux/arm/v8']) |
6 | staged: bool | # Enable layer-by-layer caching of Dockerfile instructions in container registry globally for all images |
7 | imageSpec: | # Global image configuration options according to the OCI specification, which will be applied to all images. More details here |
... | ||
8 | author: string | # Author of the image |
9 | clearHistory: bool | # Remove all image build history |
10 | config: | # Common image configuration |
... | ||
11 | labels: { name string: value string, ... } | # List of labels to add |
12 | removeLabels: [ string || /REGEXP/, ... ] | # List of labels to remove |
13 | keepEssentialWerfLabels: bool | # Do not remove werf labels necessary for normal operation |
14 | deploy: | # Settings for deployment |
... | ||
15 | helmChartDir: string |
#
Path to the helm chart directory of the project (default .helm )
|
16 | helmChartConfig: | # Override Chart.yaml configuration |
... | ||
17 | appVersion: string | # Override appVersion in Chart.yaml |
18 | helmRelease: string |
#
Release name template (default [[ project ]]-[[ env ]] )
|
19 | helmReleaseSlug: bool |
#
Release name slugification (default true )
|
20 | namespace: string |
#
Kubernetes namespace template (default [[ project ]]-[[ env ]] )
|
21 | namespaceSlug: bool |
#
Kubernetes namespace slugification (default true )
|
22 | cleanup: | # Settings for cleaning up irrelevant images |
... | ||
23 | disable: bool | # Disable cleanup entirely. This prevents meta images from being published to the container registry. After disabling, you can run werf cleanup to remove existing meta images |
24 | disableKubernetesBasedPolicy: bool | # Disable a cleanup policy that allows not to remove images deployed in Kubernetes from the container registry |
25 | disableGitHistoryBasedPolicy: bool | # Disable a cleanup policy that allows not to remove images taking into account user-defined policies by the Git history (keepPolicies) |
26 | disableBuiltWithinLastNHoursPolicy: bool | # Disable a cleanup policy that allows not to remove images built in last hours (keepImagesBuiltWithinLastNHours) |
27 | keepImagesBuiltWithinLastNHours: uint |
#
The minimum number of hours that must elapse since the image is built (default 2 )
|
28 | keepPolicies: | # Set of policies to select relevant image versions using the Git history |
29 | - references: | # References to perform scanning on |
30 | branch: string || /REGEXP/ | # One or more git origin branches |
31 | tag: string || /REGEXP/ | # One or more git origin tags |
32 | limit: | # The set of rules to limit references on the basis of the date when the git tag was created or the activity in the git branch |
33 | last: int |
#
To select n last references from those defined in the branch or tag (default -1 )
|
34 | in: duration string | # To select git tags that were created during the specified period or git branches that were active during the period |
35 | operator: And || Or |
#
Check both conditions or any of them (default And )
|
36 | imagesPerReference: | # The limit on the number of image versions for each reference contained in the set |
37 | last: int |
#
The number of image versions to search for each reference (default -1 )
|
38 | in: duration string | # The time frame in which werf searches for images |
39 | gitWorktree: | # Configure how werf handles git worktree of the project |
... | ||
40 | forceShallowClone: bool | # Force werf to use shallow clone despite restrictions |
41 | allowUnshallow: bool |
#
Allow werf to automatically convert project shallow git clone to full one during build process when needed (default true )
|
42 | allowFetchOriginBranchesAndTags: bool |
#
Allow werf to synchronize git branches and tags with remote origin during cleanup process when needed (default true )
|
43 | --- | # Dockerfile image section: optional, define as many image sections as you need |
... | ||
44 | image: string || [ string, ... ] ! | # One or more unique names for image |
45 | final: bool |
#
Mark image as final (default true ). More details here
|
46 | dockerfile: string ! | # Dockerfile path relative to the context PATH |
47 | staged: bool | # Enable layer-by-layer caching of Dockerfile instructions in container registry |
48 | cacheVersion: string | # Cache version |
49 | context: string | # Build context PATH inside project directory |
50 | platform: [ string, ... ] | # List of target platforms for this image (for example ['linux/amd64', 'linux/arm64', 'linux/arm/v8']) |
51 | contextAddFiles: [ string, ... ] | # Untracked files and directories for adding to build context. The paths must be relative to context PATH |
52 | target: string | # Specific Dockerfile stage (last one by default, similar to the docker build --target option) |
53 | args: { name string: value string, ... } | # Variables for ARG dockerfile instructions (similar to the docker build --build-arg option) |
54 | addHost: [ string, ... ] | # Custom host-to-IP mapping (host:ip) (similar to the docker build --add-host option) |
55 | network: string | # The networking mode for the RUN instructions during build (similar to the docker build --network option) |
56 | ssh: string | # SSH agent socket or keys to the build (similar to the docker build --ssh option) (DEPRECATED). More details here |
57 | secrets: | # Secrets used in image build. Only one of the following options can be used in a single instance: env, src, or value. More details here |
58 | - id: string | # Secret unique identifier (mandatory only for the value type) |
59 | env: string | # A secret from an environment variable |
60 | src: string | # A secret from a file at the given path |
61 | value: string | # Custom string value |
62 | dependencies: | # Dependency images for current image |
... | ||
63 | - image: string | # Dependency image name, which should be built before building current image |
64 | imports: | # Define target build args to import image information into current image (optional) |
65 | - type: string | # Type of image info: ImageName, ImageDigest, ImageRepo or ImageTag |
66 | targetBuildArg: string | # Name of build argument which will contain specified type of information about image |
67 | imageSpec: | # Image configuration according to the OCI specification. More details here |
68 | author: string | # Author of the image |
69 | clearHistory: bool | # Remove all image build history |
70 | config: | # Common image configuration |
... | ||
71 | cmd: [string, ...] | # Set CMD. More details here |
72 | entrypoint: [string, ...] | # Set ENTRYPOINT. More details here |
73 | env: { name string: value string, ... } | # List of environment variables to add. More details here |
74 | expose: [string, ...] | # Set exposed ports. More details here |
75 | healthcheck: { test: [string, ...], interval: string, retries: int } | # Healthcheck configuration. Intervals are in seconds.. More details here |
76 | labels: { name string: value string, ... } | # List of labels to add |
77 | stopSignal: string | # Set STOPSIGNAL. More details here |
78 | user: string | # Set USER. More details here |
79 | volumes: [string, ...] | # List of volumes to add. More details here |
80 | workingDir: string | # Set WORKDIR. More details here |
81 | removeEnv: [ string || /REGEXP/, ... ] | # List of environment variables to remove |
82 | removeLabels: [ string || /REGEXP/, ... ] | # List of labels to remove |
83 | removeVolumes: [string, ...] | # List of volumes to remove |
84 | keepEssentialWerfLabels: bool | # Do not remove werf labels necessary for normal operation |
85 | clearCmd: bool | # Remove CMD |
86 | clearEntrypoint: bool | # Remove ENTRYPOINT |
87 | clearUser: bool | # Remove USER |
88 | clearWorkingDir: bool | # Remove WORKDIR |
89 | --- | # Stapel image section: optional, define as many image sections as you need |
... | ||
90 | image: string || [ string, ... ] ! | # One or more unique names for image |
91 | artifact: string | # The unique name for artifact (DEPRECATED). More details here |
92 | final: bool |
#
Mark image as final (default true ). More details here
|
93 | cacheVersion: string | # Cache version |
94 | platform: [ string, ... ] | # List of target platforms for this image (for example ['linux/amd64', 'linux/arm64', 'linux/arm/v8']) |
95 | from: string | # The name of a base image. More details here |
96 | fromLatest: bool | # To use actual base image without caching. More details here |
97 | fromImage: string | # To use image as base image by image name. More details here |
98 | fromArtifact: string | # To use artifact as base image by artifact name (DEPRECATED) |
99 | fromCacheVersion: string | # Cache version. More details here |
100 | disableGitAfterPatch: bool | # Disable updating git sources (gitCache, gitLatestPatch stages). More details here |
101 | git: | # Set of directives to add source files from git repositories (both the project repository and any other). More details here |
... | ||
102 | - url: string | # The address of the remote repository. More details here |
103 | basicAuth: string | # Basic authentication for the remote repository |
104 | - username: string | # Username |
105 | password: string | # Password source |
106 | - env: string | # Environment variable |
107 | file: string | # File path |
108 | value: string | # Custom string value |
109 | branch: string | # The branch name. More details here |
110 | commit: string | # The commit |
111 | tag: string | # The tag name |
112 | add: string | # A source path in a repository. More details here |
113 | to: string | # A destination path in image. More details here |
114 | owner: string | # The name or UID of the owner. More details here |
115 | group: string | # The name or GID of the owner’s group. More details here |
116 | includePaths: [ glob, ... ] | # Globs for including. More details here |
117 | excludePaths: [ glob, ... ] | # Globs for excluding. More details here |
118 | stageDependencies: | # The organization of restarting assembly instructions when defined changes occur in the git repository. More details here |
119 | install: [ glob, ... ] | # Globs for install stage |
120 | beforeSetup: [ glob, ... ] | # Globs for beforeSetup stage |
121 | setup: [ glob, ... ] | # Globs for setup stage |
122 | secrets: | # Secrets used in image build. Only one of the following options can be used in a single instance: env, src, or value. More details here |
123 | - id: string | # Secret unique identifier (mandatory only for the value type) |
124 | env: string | # A secret from an environment variable |
125 | src: string | # A secret from a file at the given path |
126 | value: string | # Custom string value |
127 | shell: | # Shell assembly instructions. More details here |
... | ||
128 | beforeInstall: [ string, ... ] | # Commands for beforeInstall stage. More details here |
129 | install: [ string, ... ] | # Commands for install stage. More details here |
130 | beforeSetup: [ string, ... ] | # Commands for beforeSetup stage. More details here |
131 | setup: [ string, ... ] | # Commands for setup stage. More details here |
132 | cacheVersion: string | # Common cache version. More details here |
133 | beforeInstallCacheVersion: string | # Cache version for beforeInstall stage. More details here |
134 | installCacheVersion: string | # Cache version for install stage. More details here |
135 | beforeSetupCacheVersion: string | # Cache version for beforeSetup stage. More details here |
136 | setupCacheVersion: string | # Cache version for setup stage. More details here |
137 | ansible: | # Ansible assembly instructions. More details here |
... | ||
138 | beforeInstall: [ task, ... ] | # Tasks for beforeInstall stage. More details here |
139 | install: [ task, ... ] | # Tasks for install stage. More details here |
140 | beforeSetup: [ task, ... ] | # Tasks for beforeSetup stage. More details here |
141 | setup: [ task, ... ] | # Tasks for setup stage. More details here |
142 | cacheVersion: string | # Common cache version. More details here |
143 | beforeInstallCacheVersion: string | # Cache version for beforeInstall stage. More details here |
144 | installCacheVersion: string | # Cache version for install stage. More details here |
145 | beforeSetupCacheVersion: string | # Cache version for beforeSetup stage. More details here |
146 | setupCacheVersion: string | # Cache version for setup stage. More details here |
147 | imageSpec: | # Image configuration according to the OCI specification. More details here |
148 | author: string | # Author of the image |
149 | clearHistory: bool | # Remove all image build history |
150 | config: | # Common image configuration |
... | ||
151 | cmd: [string, ...] | # Set CMD. More details here |
152 | entrypoint: [string, ...] | # Set ENTRYPOINT. More details here |
153 | env: { name string: value string, ... } | # List of environment variables to add. More details here |
154 | expose: [string, ...] | # Set exposed ports. More details here |
155 | healthcheck: { test: [string, ...], interval: string, retries: int } | # Healthcheck configuration. Intervals are in seconds.. More details here |
156 | labels: { name string: value string, ... } | # List of labels to add |
157 | stopSignal: string | # Set STOPSIGNAL. More details here |
158 | user: string | # Set USER. More details here |
159 | volumes: [string, ...] | # List of volumes to add. More details here |
160 | workingDir: string | # Set WORKDIR. More details here |
161 | removeEnv: [ string || /REGEXP/, ... ] | # List of environment variables to remove |
162 | removeLabels: [ string || /REGEXP/, ... ] | # List of labels to remove |
163 | removeVolumes: [string, ...] | # List of volumes to remove |
164 | keepEssentialWerfLabels: bool | # Do not remove werf labels necessary for normal operation |
165 | clearCmd: bool | # Remove CMD |
166 | clearEntrypoint: bool | # Remove ENTRYPOINT |
167 | clearUser: bool | # Remove USER |
168 | clearWorkingDir: bool | # Remove WORKDIR |
169 | docker: | # Set of directives to change the image manifest (DEPRECATED). Incompatible with the imageSpec directive. More details here |
... | ||
170 | exactValues: bool | # Set specified options values as-is, including unescaped quotes and spaces. Option affects only docker-server backend and does not affect buildah backend. |
171 | USER: string | # The user name (or UID) and optionally the user group (or GID). More details here |
172 | WORKDIR: string | # The working directory. More details here |
173 | VOLUME: [ string, ... ] | # Mount points. More details here |
174 | ENV: { name string: value string, ... } | # The environment variables. More details here |
175 | LABEL: { name string: value string, ... } | # The metadata to an image. More details here |
176 | EXPOSE: [ string, ... ] | # To inform Docker that the container listens on the specified network ports at runtime. More details here |
177 | ENTRYPOINT: string | [ string, ... ] | # To configure a container that will run as an executable. Shell and exec forms are supported. More details here |
178 | CMD: string | [ string, ... ] | # To provide default arguments for the ENTRYPOINT to configure a container that will run as an executable. Shell and exec forms are supported. More details here |
179 | HEALTHCHECK: string | # To tell Docker how to test a container to check that it is still working. More details here |
180 | mount: | # Mount points. More details here |
... | ||
181 | - from: tmp_dir || build_dir | # Service folder name |
182 | fromPath: string | # Absolute or relative path to an arbitrary file or folder on host |
183 | to: string | # Absolute path in image |
184 | import: | # Imports. More details here |
... | ||
185 | - artifact: string | # The artifact name from which you want to copy files (DEPRECATED) |
186 | image: string | # The image name from which you want to copy files (DEPRECATED) |
187 | from: string | # The source image for copying files: another image from `werf.yaml` (e.g. `backend`) or an external image with a tag/digest (e.g. `nginx:1.25`, `nginx@sha256:...`). |
188 | stage: string | # The stage name from which you want to copy files (the latest one by default) |
189 | before: string | # The stage name before which to perform importing files. At present, only install and setup stages are supported |
190 | after: string | # The stage name after which to perform importing files. At present, only install and setup stages are supported |
191 | add: string | # The absolute file or folder path in source image for copying |
192 | to: string | # The absolute path in destination image. In case of absence, destination path equals source path |
193 | owner: string | # The name or UID of the owner |
194 | group: string | # The name or GID of the owner’s group |
195 | includePaths: [ glob, ... ] | # Globs for including |
196 | excludePaths: [ glob, ... ] | # Globs for excluding |
197 | dependencies: | # Dependencies images for current image |
... | ||
198 | - image: string | # Dependency image name, which should be built before building current image |
199 | before: string | # The stage name before which image info should be imported (specify install or setup). Specified target env variables will be available at user stages after stage specified by this directive. |
200 | after: string | # The stage name after which image info should be imported (specify install or setup). Specified target env variables will be available at user stages after stage specified by this directive. |
201 | imports: | # Define target environment variables to import image information into current image (optional) |
202 | - type: string | # Type of image info: ImageName, ImageDigest, ImageRepo or ImageTag |
203 | targetEnv: string | # Name of environment variable which will contain specified type of information about image |