The effortless CI/CD framework that runs anywhere v0.6.0 Release Notes
Release Date: 2021-11-24 // over 2 years ago-
This version promotes a number of features that have been previously in Experimental and Beta status. To make use of the features in this version you need to declare
VERSION 0.6
at the top of your Earthfile. If a version is not declared, then Earthly's interpreter will assumeVERSION 0.5
.โก๏ธ If you are not ready to update your scripts to take advantage of
VERSION 0.6
, then you may upgrade Earthly anyway and your scripts should continue to work as before, provided that they either declareVERSION 0.5
or they don't declare a version at all.Declaring
VERSION 0.6
is equivalent toVERSION \ --use-copy-include-patterns \ --referenced-save-only \ --for-in \ --require-force-for-unsafe-saves \ --no-implicit-ignore \ 0.5
It is recommended to use
VERSION 0.6
instead as individual feature flags don't guarantee proper forwards-backwards compatibility. Note, however, that Earthly0.5.*
is not able to run aVERSION 0.6
Earthfile and will return an error.๐ For more information on the individual Earthfile feature flags see the Earthfile version-specific features page.
๐ Changed
๐ <!--changelog-parser-ignore-start-->
- ๐ What Earthly outputs locally has changed in a way that is not backwards compatible. For an artifact or an image to be produced locally it needs to be part of a
BUILD
chain (or be part of the target being directly built). Artifacts and images introduced throughFROM
orCOPY
are no longer output locally.
To update existing scripts, you may issue a duplicate
BUILD
in addition to aFROM
(or aCOPY
), should you wish for the referenced target to perform output.For example, the following script
FROM +some-target COPY +another-target/my-artifact ./
could become
FROM +some-target BUILD +some-target COPY +another-target/my-artifact ./ BUILD +another-target
in order to produce the same outputs.
For more details see #896.
- ๐ The syntax for passing build args has been changed.
Earthly v0.5 (old way)
FROM --build-arg NAME=john +some-target COPY --build-arg NAME=john +something/my-artifact ./ WITH DOCKER --build-arg NAME=john --load +another-target ... END
Earthly v0.6 (new way)
FROM +some-target --NAME=john COPY (+something/my-artifact --NAME=john) ./ WITH DOCKER --load (+another-target --NAME=john) ... END
Passing build args on the command-line has also changed similarly:
Earthly v0.5 (old way)
earthly --build-arg NAME=john +some-target
Earthly v0.6 (new way)
earthly +some-target --NAME=john
This change is part of the UDC proposal #581. The old way of passing args is deprecated and will be removed in a future version (however, it still works in 0.6). ๐ <!--changelog-parser-ignore-end-->
- If a
SAVE ARTIFACT
is unsafe (writing to a directory outside of the Earthfile directory), it'll require the--force
flag. .earthlyignore
no longer includes any implicit entries likeEarthfile
or.earthlyignore
. These will need to be specified explicitly. #1294- โก๏ธ Buildkit was updated to
d429b0b32606b5ea52e6be4a99b69d67b7c722b2
. This includes a number of bug fixes, including eliminating crashes due topanic failed to get edge
.
โ Added
- ๐ณ Earthly now performs local image outputs to the local Docker daemon through a built-in registry. This speeds up the process drastically as common layers no longer need to be transferred over #500.
- Earthly now enables additional parallelism to speed up certain operations that were previously serialized #888. Note that this setting was previously controlled by
--conversion-parallelism
flag or theEARTHLY_CONVERSION_PARALLELISM
environment variable while in experimental stage. It has now been moved as part of the Earthly config and has been promoted to GA. - ๐
COPY
transfers are sped up as only the necessary files are sent over to BuildKit #1062. - ๐ณ
WITH DOCKER
has been promoted to GA #576. - ๐ณ
FROM DOCKERFILE
has been promoted to GA. - ๐
LOCALLY
has been promoted to GA #580. - ๐
RUN --interactive
andRUN --interactive-keep
have been promoted to GA #693. - ๐
IF
andFOR
have been promoted to GA #779. - ๐ Support for Apple Silicon M1 has been promoted to GA #722.
- ๐ Multi-platform builds have been promoted to GA #536.
- Mounting secrets as files have been promoted as GA #579.
- ๐
VERSION
has been promoted to GA #991 - ๐ User-defined commands (UDCs) have been promoted to GA #581.
- ๐ Allow running
SAVE ARTIFACT
afterRUN --push
is now GA #586. SAVE ARTIFACT --if-exists
andCOPY --if-exists
have been promoted to GA #588.- ๐ Shared cache and
--ci
mode are now GA #11. - ๐ New builtin args
USERPLATFORM
,USEROS
,USERARCH
, andUSERVARIANT
which represent the platform, OS, architecture, and processor variant of the system Earthly is being called from #1251. Thanks to @akrantz01 for the contribution! - ๐ Config option for buildkit's
max_parallelism
configuration. Use this to increase parallelism for faster builds or decrease parallelism when resources are constraint. The default is 20. #1308 - ๐ Support for required ARGs (
ARG --required foo
) #904. Thanks to @camerondurham for the contribution! - ๐ Extended auto-completion to be build-arg aware. Typing
earthly +my-target --<tab><tab>
now prints possible build-args specific to+my-target
. #1330. - The console output now has an improved structure #1226.
๐ Fixed
- โ Eliminated some spurious warnings (
ReadDataPacket failed
,Failed to connect to terminal
,failed to read from stdin
and others) #1241. - ๐ Minor fixes related to the experimental Podman support #1239.
- ๐ Improved some error messages related to frontend detection #1250.
- ๐ Fixed Podman's ability to load OCI images #1287.
- ๐ Fixed homebrew installation on macOS 12. #1370, homebrew/earthly#13
- ๐
failed due to failed to autodetect a supported frontend
errors will now include underlying reason for failure - Cache export was not honoring
EARTHLY_MAX_REMOTE_CACHE
setting. - ๐ Buildkit logs were not being sent to
earthly-buildkitd
container's output. - ๐ kind required permissions were not available in earthly-buildkitd.
- ๐ What Earthly outputs locally has changed in a way that is not backwards compatible. For an artifact or an image to be produced locally it needs to be part of a