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 | platform: [ string, ... ] | # Common list of target platforms for all images (for example ['linux/amd64', 'linux/arm64', 'linux/arm/v8']) |
5 | deploy: | # Settings for deployment |
... | ||
6 | helmChartDir: string |
#
Path to the helm chart directory of the project (default .helm )
|
7 | helmChartConfig: | # Override Chart.yaml configuration |
... | ||
8 | appVersion: string |
#
Override appVersion in Chart.yaml (default )
|
9 | helmRelease: string |
#
Release name template (default [[ project ]]-[[ env ]] )
|
10 | helmReleaseSlug: bool |
#
Release name slugification (default true )
|
11 | namespace: string |
#
Kubernetes namespace template (default [[ project ]]-[[ env ]] )
|
12 | namespaceSlug: bool |
#
Kubernetes namespace slugification (default true )
|
13 | cleanup: | # Settings for cleaning up irrelevant images |
... | ||
14 | disableKubernetesBasedPolicy: bool | # Disable a cleanup policy that allows not to remove images deployed in Kubernetes from the container registry |
15 | disableGitHistoryBasedPolicy: bool | # Disable a cleanup policy that allows not to remove images taking into account user-defined policies by the Git history (keepPolicies) |
16 | disableBuiltWithinLastNHoursPolicy: bool | # Disable a cleanup policy that allows not to remove images built in last hours (keepImagesBuiltWithinLastNHours) |
17 | keepImagesBuiltWithinLastNHours: uint |
#
The minimum number of hours that must elapse since the image is built (default 2 )
|
18 | keepPolicies: | # Set of policies to select relevant images using the Git history |
19 | - references: | # References to perform scanning on |
20 | branch: string || /REGEXP/ | # One or more git origin branches |
21 | tag: string || /REGEXP/ | # One or more git origin tags |
22 | 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 |
23 | last: int |
#
To select n last references last n references from those defined in the branch or tag (default -1 )
|
24 | in: duration string | # To select git tags that were created during the specified period or git branches that were active during the period |
25 | operator: And || Or |
#
Check both conditions or any of them (default And )
|
26 | imagesPerReference: | # The limit on the number of images for each reference contained in the set |
27 | last: int |
#
The number of images to search for each reference (default -1 )
|
28 | in: duration string | # The time frame in which werf searches for images |
29 | gitWorktree: | # Configure how werf handles git worktree of the project |
... | ||
30 | forceShallowClone: bool | # Force werf to use shallow clone despite restrictions |
31 | allowUnshallow: bool |
#
Allow werf to automatically convert project shallow git clone to full one during build process when needed (default true )
|
32 | allowFetchOriginBranchesAndTags: bool |
#
Allow werf to synchronize git branches and tags with remote origin during cleanup process when needed (default true )
|
33 | --- | # Dockerfile image section: optional, define as many image sections as you need |
... | ||
34 | image: string || [ string, ... ] ! | # One or more unique names for image |
35 | final: bool |
#
Mark image as final (default true ). More details here
|
36 | dockerfile: string ! | # Dockerfile path relative to the context PATH |
37 | staged: bool | # Enable layer-by-layer caching of Dockerfile instructions in container registry |
38 | context: string | # Build context PATH inside project directory |
39 | platform: [ string, ... ] | # List of target platforms for this image (for example ['linux/amd64', 'linux/arm64', 'linux/arm/v8']) |
40 | contextAddFiles: [ string, ... ] | # Untracked files and directories for adding to build context. The paths must be relative to context PATH |
41 | target: string | # Specific Dockerfile stage (last one by default, similar to the docker build --target option) |
42 | args: { name string: value string, ... } | # Variables for ARG dockerfile instructions (similar to the docker build --build-arg option) |
43 | addHost: [ string, ... ] | # Custom host-to-IP mapping (host:ip) (similar to the docker build --add-host option) |
44 | network: string | # The networking mode for the RUN instructions during build (similar to the docker build --network option) |
45 | ssh: string | # SSH agent socket or keys to the build (similar to the docker build --ssh option) |
46 | 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 |
47 | - id: string | # Secret unique identifier (mandatory only for the value type) |
48 | env: string | # A secret from an environment variable |
49 | src: string | # A secret from a file at the given path |
50 | value: string | # Custom string value |
51 | dependencies: | # Dependencies images for current image |
... | ||
52 | - image: string | # Dependency image name, which should be built before building current image |
53 | imports: | # Define target build args to import image information into current image (optional) |
54 | - type: string | # Type of image info: ImageName, ImageDigest, ImageRepo or ImageTag |
55 | targetBuildArg: string | # Name of build argument which will contain specified type of information about image |
56 | --- | # Stapel image section: optional, define as many image sections as you need |
... | ||
57 | image: string || [ string, ... ] ! | # One or more unique names for image |
58 | artifact: string | # The unique name for artifact (DEPRECATED). More details here |
59 | final: bool |
#
Mark image as final (default true ). More details here
|
60 | platform: [ string, ... ] | # List of target platforms for this image (for example ['linux/amd64', 'linux/arm64', 'linux/arm/v8']) |
61 | from: string | # The name of a base image. More details here |
62 | fromLatest: bool | # To use actual base image without caching. More details here |
63 | fromImage: string | # To use image as base image by image name. More details here |
64 | fromArtifact: string | # To use artifact as base image by artifact name (DEPRECATED) |
65 | fromCacheVersion: string | # Cache version. More details here |
66 | disableGitAfterPatch: bool | # Disable updating git sources (gitCache, gitLatestPatch stages). More details here |
67 | git: | # Set of directives to add source files from git repositories (both the project repository and any other). More details here |
... | ||
68 | - url: string | # The address of the remote repository. More details here |
69 | branch: string | # The branch name. More details here |
70 | commit: string | # The commit |
71 | tag: string | # The tag name |
72 | add: string | # A source path in a repository. More details here |
73 | to: string | # A destination path in image. More details here |
74 | owner: string | # The name or UID of the owner. More details here |
75 | group: string | # The name or GID of the owner’s group. More details here |
76 | includePaths: [ glob, ... ] | # Globs for including. More details here |
77 | excludePaths: [ glob, ... ] | # Globs for excluding. More details here |
78 | stageDependencies: | # The organization of restarting assembly instructions when defined changes occur in the git repository. More details here |
79 | install: [ glob, ... ] | # Globs for install stage |
80 | beforeSetup: [ glob, ... ] | # Globs for beforeSetup stage |
81 | setup: [ glob, ... ] | # Globs for setup stage |
82 | 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 |
83 | - id: string | # Secret unique identifier (mandatory only for the value type) |
84 | env: string | # A secret from an environment variable |
85 | src: string | # A secret from a file at the given path |
86 | value: string | # Custom string value |
87 | shell: | # Shell assembly instructions. More details here |
... | ||
88 | beforeInstall: [ string, ... ] | # Commands for beforeInstall stage. More details here |
89 | install: [ string, ... ] | # Commands for install stage. More details here |
90 | beforeSetup: [ string, ... ] | # Commands for beforeSetup stage. More details here |
91 | setup: [ string, ... ] | # Commands for setup stage. More details here |
92 | cacheVersion: string | # Common cache version. More details here |
93 | beforeInstallCacheVersion: string | # Cache version for beforeInstall stage. More details here |
94 | installCacheVersion: string | # Cache version for install stage. More details here |
95 | beforeSetupCacheVersion: string | # Cache version for beforeSetup stage. More details here |
96 | setupCacheVersion: string | # Cache version for setup stage. More details here |
97 | ansible: | # Ansible assembly instructions. More details here |
... | ||
98 | beforeInstall: [ task, ... ] | # Tasks for beforeInstall stage. More details here |
99 | install: [ task, ... ] | # Tasks for install stage. More details here |
100 | beforeSetup: [ task, ... ] | # Tasks for beforeSetup stage. More details here |
101 | setup: [ task, ... ] | # Tasks for setup stage. More details here |
102 | cacheVersion: string | # Common cache version. More details here |
103 | beforeInstallCacheVersion: string | # Cache version for beforeInstall stage. More details here |
104 | installCacheVersion: string | # Cache version for install stage. More details here |
105 | beforeSetupCacheVersion: string | # Cache version for beforeSetup stage. More details here |
106 | setupCacheVersion: string | # Cache version for setup stage. More details here |
107 | docker: | # Set of directives to effect on an image manifest. More details here |
... | ||
108 | 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. |
109 | USER: string | # The user name (or UID) and optionally the user group (or GID). More details here |
110 | WORKDIR: string | # The working directory. More details here |
111 | VOLUME: [ string, ... ] | # Mount points. More details here |
112 | ENV: { name string: value string, ... } | # The environment variables. More details here |
113 | LABEL: { name string: value string, ... } | # The metadata to an image. More details here |
114 | EXPOSE: [ string, ... ] | # To inform Docker that the container listens on the specified network ports at runtime. More details here |
115 | ENTRYPOINT: string | [ string, ... ] | # To configure a container that will run as an executable. Shell and exec forms are supported. More details here |
116 | 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 |
117 | HEALTHCHECK: string | # To tell Docker how to test a container to check that it is still working. More details here |
118 | mount: | # Mount points. More details here |
... | ||
119 | - from: tmp_dir || build_dir | # Service folder name |
120 | fromPath: string | # Absolute or relative path to an arbitrary file or folder on host |
121 | to: string | # Absolute path in image |
122 | import: | # Imports. More details here |
... | ||
123 | - artifact: string | # The artifact name from which you want to copy files (DEPRECATED) |
124 | image: string | # The image name from which you want to copy files |
125 | stage: string | # The stage name from which you want to copy files (the latest one by default) |
126 | before: string | # The stage name before which to perform importing files. At present, only install and setup stages are supported |
127 | after: string | # The stage name after which to perform importing files. At present, only install and setup stages are supported |
128 | add: string | # The absolute file or folder path in source image for copying |
129 | to: string | # The absolute path in destination image. In case of absence, destination path equals source path |
130 | owner: string | # The name or UID of the owner |
131 | group: string | # The name or GID of the owner’s group |
132 | includePaths: [ glob, ... ] | # Globs for including |
133 | excludePaths: [ glob, ... ] | # Globs for excluding |
134 | dependencies: | # Dependencies images for current image |
... | ||
135 | - image: string | # Dependency image name, which should be built before building current image |
136 | 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. |
137 | 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. |
138 | imports: | # Define target environment variables to import image information into current image (optional) |
139 | - type: string | # Type of image info: ImageName, ImageDigest, ImageRepo or ImageTag |
140 | targetEnv: string | # Name of environment variable which will contain specified type of information about image |