Builtin args
Builtin args are variables with values automatically filled-in by Earthly.
The value of a builtin arg can never be overridden. However, you can always have an additional ARG
, which takes as the default value, the value of the builtin arg. The additional arg can be overridden. Example
Important
In contrast to Dockerfile predefined args, Earthly builtin args need to be pre-declared before they can be used. For example
The following builtin args are available
Name | Description | Example value |
---|---|---|
| The git hash of the commit which built the currently running version of Earthly. |
|
| Whether the build is being executed in --ci mode. |
|
| Whether the build is being executed within Earthly CI. |
|
| The git author detected within the build context directory. If no git directory is detected, then the value is an empty string. |
|
| The git co-authors detected within the build context directory, separated by space. If no git directory is detected, then the value is an empty string. |
|
| The author timestamp, as unix seconds, of the git commit detected within the build context directory. If no git directory is detected, then the value is an empty string. |
|
| The git branch of the git commit detected within the build context directory. If no git directory is detected, then the value is an empty string. Must be enabled with the |
|
| The committer timestamp, as unix seconds, of the git commit detected within the build context directory. If no git directory is detected, then the value is an empty string. |
|
| The git hash detected within the build context directory. If no git directory is detected, then the value is an empty string. Take care when using this arg, as the frequently changing git hash may be cause for not using the cache. |
|
| The git URL detected within the build context directory. If no git directory is detected, then the value is an empty string. Please note that this may be inconsistent, depending on whether an HTTPS or SSH URL was used. |
|
| The git project name from within the git URL detected within the build context directory. If no git directory is detected, then the value is an empty string. |
|
| The git references of the git commit detected within the build context directory, separated by space. If no git directory is detected, then the value is an empty string. Must be enabled with the |
|
| The first 8 characters of the git hash detected within the build context directory. If no git directory is detected, then the value is an empty string. Take care when using this arg, as the frequently changing git hash may be cause for not using the cache. |
|
| Whether the target is being executed |
|
| Whether |
|
| The timestamp, as unix seconds, of the git commit detected within the build context directory. If no git directory is detected, then the value is |
|
| The name part of the canonical reference of the current target. | For the target |
| The project part of the canonical reference of the current target, but without the tag. | For the target |
| The project part of the canonical reference of the current target. | For the target |
| The tag part of the canonical reference of the current target, sanitized for safe use as a docker tag. This is guaranteed to be a valid docker tag, even if no canonical form exists, in which case, | For the target |
| The tag part of the canonical reference of the current target. Note that if the target has no canonical form, the value is an empty string. | For the target |
| The canonical reference of the current target. | For example, for a target named |
| The version of Earthly currently running. |
|
| The target processor architecture the target is being built for. |
|
| The target OS the target is being built for. |
|
| The target platform the target is being built for. |
|
| The target processor architecture variant the target is being built for. |
|
| The processor architecture the target is being built from. |
|
| The OS the target is being built from. |
|
| The platform the target is being built from. |
|
| The processor architecture variant the target is being built from. |
|
Note
The classical Dockerfile predefined args are currently not available in Earthly.
Last updated