Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions .buildkite/blog-examples-test.sh
Original file line number Diff line number Diff line change
Expand Up @@ -10,5 +10,5 @@ fi

"$earthly" --version

"$earthly" github.com/earthly/earthly-example-scala/simple:main+test
"$earthly" github.com/earthly/earthly-example-scala/simple:main+docker
"$earthly" github.com/EarthBuild/earthly-example-scala/simple:main+test
"$earthly" github.com/EarthBuild/earthly-example-scala/simple:main+docker
2 changes: 1 addition & 1 deletion .github/workflows/reusable-misc-tests-1.yml
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ jobs:
run: |-
${{inputs.SUDO}} ${{inputs.BINARY}} stop earthly-buildkitd || true && \
for i in 1 2 3 4; do
${{inputs.SUDO}} ${{inputs.BUILT_EARTHLY_PATH}} github.com/earthly/hello-world+hello & \
${{inputs.SUDO}} ${{inputs.BUILT_EARTHLY_PATH}} github.com/EarthBuild/hello-world+hello & \
pids[${i}]=$!
done && \
for pid in ${pids[*]}; do
Expand Down
2 changes: 1 addition & 1 deletion Earthfile
Original file line number Diff line number Diff line change
Expand Up @@ -852,7 +852,7 @@ examples-2:
BUILD ./examples/rust+docker
BUILD ./examples/multiplatform+all
BUILD ./examples/multiplatform-cross-compile+build-all-platforms
BUILD github.com/earthly/hello-world:main+hello
BUILD github.com/EarthBuild/hello-world:main+hello
BUILD ./examples/cache-command/npm+docker
BUILD ./examples/cache-command/mvn+docker

Expand Down
6 changes: 3 additions & 3 deletions ast/tests/command.ast.json
Original file line number Diff line number Diff line change
Expand Up @@ -435,7 +435,7 @@
{
"command": {
"args": [
"github.com/earthly/earthly-command-example:main+COPY_CAT"
"github.com/EarthBuild/earthly-command-example:main+COPY_CAT"
],
"name": "DO"
}
Expand Down Expand Up @@ -608,7 +608,7 @@
{
"command": {
"args": [
"github.com/earthly/earthly-command-example:main+TOUCH",
"github.com/EarthBuild/earthly-command-example:main+TOUCH",
"--file=something"
],
"name": "DO"
Expand Down Expand Up @@ -638,7 +638,7 @@
{
"command": {
"args": [
"github.com/earthly/earthly-command-example:main+TOUCH"
"github.com/EarthBuild/earthly-command-example:main+TOUCH"
],
"name": "DO"
}
Expand Down
6 changes: 3 additions & 3 deletions ast/tests/import.ast.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,15 +3,15 @@
{
"command": {
"args": [
"github.com/earthly/earthly-command-example:main"
"github.com/EarthBuild/earthly-command-example:main"
],
"name": "IMPORT"
}
},
{
"command": {
"args": [
"github.com/earthly/earthly-command-example:import",
"github.com/EarthBuild/earthly-command-example:import",
"AS",
"command-import"
],
Expand All @@ -21,7 +21,7 @@
{
"command": {
"args": [
"github.com/earthly/hello-world:main",
"github.com/EarthBuild/hello-world:main",
"AS",
"hello-dolly"
],
Expand Down
2 changes: 1 addition & 1 deletion contrib/earthfile-syntax-highlighting-emacs/README.md
Original file line number Diff line number Diff line change
@@ -1 +1 @@
Hosted on [earthly-emacs repo](https://github.com/earthly/earthly-emacs)
Hosted on [earthly-emacs repo](https://github.com/EarthBuild/earthly-emacs)
2 changes: 1 addition & 1 deletion contrib/earthfile-syntax-highlighting-intellij/README.md
Original file line number Diff line number Diff line change
@@ -1 +1 @@
Hosted on [earthly-intellij-plugin repo](https://github.com/earthly/earthly-intellij-plugin).
Hosted on [earthly-intellij-plugin repo](https://github.com/EarthBuild/earthly-intellij-plugin).
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
Hosted on [earthfile-grammar repo](https://github.com/earthly/earthfile-grammar).
Hosted on [earthfile-grammar repo](https://github.com/EarthBuild/earthfile-grammar).

The grammar in this repo is shared by the vscode, github, and intellij syntax highlighting releases.
8 changes: 4 additions & 4 deletions docs/alt-installation/alt-installation.md
Original file line number Diff line number Diff line change
Expand Up @@ -248,15 +248,15 @@ For a full list of configuration options, see the [Configuration reference](../e
To verify that the installation works correctly, you can issue a simple build of an existing hello-world project

```bash
earthly github.com/earthly/hello-world:main+hello
earthly github.com/EarthBuild/hello-world:main+hello
```

You should see the output

```
github.com/earthly/hello-world:main+hello | --> RUN [echo 'Hello, world!']
github.com/earthly/hello-world:main+hello | Hello, world!
github.com/earthly/hello-world:main+hello | Target github.com/earthly/hello-world:main+hello built successfully
github.com/EarthBuild/hello-world:main+hello | --> RUN [echo 'Hello, world!']
github.com/EarthBuild/hello-world:main+hello | Hello, world!
github.com/EarthBuild/hello-world:main+hello | Target github.com/EarthBuild/hello-world:main+hello built successfully
=========================== SUCCESS ===========================
```

Expand Down
16 changes: 8 additions & 8 deletions docs/examples/examples.md
Original file line number Diff line number Diff line change
Expand Up @@ -99,23 +99,23 @@ As a distinct example of a complete build, you can take a look at Earthly's own

GitBook currently has a bug where any references to an "Earthfile" gets confused with "docs/Earthfile" and somehow appends a /README.md

e.g. https://github.com/earthly/earthly/blob/main/Earthfile is changed to https://github.com/earthly/earthly/blob/main/Earthfile/README.md
e.g. https://github.com/EarthBuild/earthbuild/blob/main/Earthfile is changed to https://github.com/EarthBuild/earthbuidl/blob/main/Earthfile/README.md

Here's a snip from an support request with gitbook:

On Thu, Dec 23, 2021 at 7:15:12 UTC, GitBook Support <[email protected]> wrote:

There is a file:

https://github.com/earthly/earthly/blob/main/Earthfile
https://github.com/EarthBuild/earthbuild/blob/main/Earthfile

And you want to reference it directly in your GitBook space as a link.

The problem here is that GitBook is thrown off by the fact it has a folder under the docs root. Remember you documentation root is set to /docs.

So when it sees that reference, it assumes you are referencing a default README.md file under that folder. The folder I am talking about is this one:

https://github.com/earthly/earthly/tree/main/docs/earthfile
https://github.com/EarthBuild/earthbuild/tree/main/docs/earthfile

Now, the question is, if there's an easy way out of this.

Expand All @@ -126,11 +126,11 @@ Here's a snip from an support request with gitbook:
One not very ideal workaround I thought of is to temporarily switch to shortened URLs for those that fail because of this scenario.


* [Earthfile](https://github.com/earthly/earthly/blob/main/Earthfile) - the root build file
* [buildkitd/Earthfile](https://github.com/earthly/earthly/blob/main/buildkitd/Earthfile) - the build of the BuildKit daemon
* [AST/parser/Earthfile](https://github.com/earthly/earthly/blob/main/ast/parser/Earthfile) - the build of the parser, which generates .go files
* [tests/Earthfile](https://github.com/earthly/earthly/blob/main/tests/Earthfile) - system and smoke tests
* [earthfile-grammar/Earthfile](https://github.com/earthly/earthfile-grammar/blob/main/Earthfile) - the build of the VS Code extension
* [Earthfile](https://github.com/EarthBuild/earthbuild/blob/main/Earthfile) - the root build file
* [buildkitd/Earthfile](https://github.com/EarthBuild/earthbuild/blob/main/buildkitd/Earthfile) - the build of the BuildKit daemon
* [AST/parser/Earthfile](https://github.com/EarthBuild/earthbuild/blob/main/ast/parser/Earthfile) - the build of the parser, which generates .go files
* [tests/Earthfile](https://github.com/EarthBuild/earthbuild/blob/main/tests/Earthfile) - system and smoke tests
* [earthfile-grammar/Earthfile](https://github.com/EarthBuild/earthfile-grammar/blob/main/Earthfile) - the build of the VS Code extension
-->

* [Earthfile](https://tinyurl.com/yt3d3cx6) - the root build file
Expand Down
6 changes: 3 additions & 3 deletions docs/guides/importing.md
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ target2:
When importing from other repositories, making use of the `IMPORT` command helps to keep the Earthfile clean and readable. The `IMPORT` command takes an Earthfile reference, and optionally an import alias. For example:

```Dockerfile
IMPORT github.com/earthly/hello-world:main AS hello-world
IMPORT github.com/EarthBuild/hello-world:main AS hello-world

...

Expand All @@ -49,7 +49,7 @@ my-target:
COPY hello-world+hello/hello.txt ./
```

In this example, the target `my-target` uses the import alias `hello-world` to reference a GitHub repository called `github.com/earthly/hello-world`, and the target `hello` within that repository. The `AS hello-world` part is optional, and is only needed if the import alias is different from the repository name.
In this example, the target `my-target` uses the import alias `hello-world` to reference a GitHub repository called `github.com/EarthBuild/hello-world`, and the target `hello` within that repository. The `AS hello-world` part is optional, and is only needed if the import alias is different from the repository name.

`BUILD` is used to simply issue the build of the referenced target. Commands like `COPY` or `FROM` can be used to import artifacts or images, respectively.

Expand All @@ -70,7 +70,7 @@ my-target:
Importing can also be done inline, without the need for an `IMPORT` command. This is useful for importing a single target or artifact from a remote repository. For example:

```Dockerfile
BUILD github.com/earthly/hello-world:main+hello
BUILD github.com/EarthBuild/hello-world:main+hello
COPY ./some/other/dir+my-target/out.txt ./
```

Expand Down
10 changes: 5 additions & 5 deletions docs/guides/integration.md
Original file line number Diff line number Diff line change
Expand Up @@ -138,7 +138,7 @@ WORKDIR /scala-example
RUN apk add openjdk11 bash wget postgresql-client
```

[Full file](https://github.com/earthly/earthly-example-scala/blob/main/integration/Earthfile)
[Full file](https://github.com/EarthBuild/earthly-example-scala/blob/main/integration/Earthfile)

{% sample lang="Project Files" %}
We then install SBT
Expand Down Expand Up @@ -212,7 +212,7 @@ docker:
ENTRYPOINT ["java","-cp","target/scala-2.12/scala-example-assembly-1.0.jar","Main"]
SAVE IMAGE scala-example:latest
```
[Full file](https://github.com/earthly/earthly-example-scala/blob/main/integration/Earthfile)
[Full file](https://github.com/EarthBuild/earthly-example-scala/blob/main/integration/Earthfile)

{% endmethod %}

Expand Down Expand Up @@ -252,7 +252,7 @@ We can now run our tests both locally and in the CI pipeline, in a reproducible
+integration-test | Removing local-postgres-ui ... done
+integration-test | Removing local-postgres ... done
+integration-test | Removing network scala-example_default
+integration-test | Target github.com/earthly/earthly-example-scala/integration:main+integration-test built successfully
+integration-test | Target github.com/EarthBuild/earthly-example-scala/integration:main+integration-test built successfully
...
```
This means that if an integration test fails in the build pipeline, you can easily reproduce it locally.
Expand Down Expand Up @@ -307,7 +307,7 @@ We can then run this and check that our application with its dependencies, produ
+smoke-test | Removing local-postgres-ui ... done
+smoke-test | Removing local-postgres ... done
+smoke-test | Removing network scala-example_default
+smoke-test | Target github.com/earthly/earthly-example-scala/integration:main+smoke-test built successfully
+smoke-test | Target github.com/EarthBuild/earthly-example-scala/integration:main+smoke-test built successfully
=========================== SUCCESS ===========================
...
```
Expand All @@ -327,7 +327,7 @@ all:
``` bash
> earthly -P +all
...
+all | Target github.com/earthly/earthly-example-scala/integration:main+all built successfully
+all | Target github.com/EarthBuild/earthly-example-scala/integration:main+all built successfully
=========================== SUCCESS ===========================
```

Expand Down
4 changes: 2 additions & 2 deletions docs/guides/podman.md
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ global:

Then, you can run a basic hello world example to see earthly using the appropriate container frontend.
```bash
> earthly github.com/earthly/hello-world:main+hello
> earthly github.com/EarthBuild/hello-world:main+hello
1. Init 🚀
————————————————————————————————————————————————————————————————————————————————

Expand Down Expand Up @@ -106,7 +106,7 @@ To fix this issue, try removing or renaming the `~/.docker/config.json` file.
### Earthly CLI - no frontend initialized
Seeing the error on startup means the check for podman has failed.
```bash
> earthly github.com/earthly/hello-world:main+hello
> earthly github.com/EarthBuild/hello-world:main+hello
1. Init 🚀
————————————————————————————————————————————————————————————————————————————————

Expand Down
14 changes: 7 additions & 7 deletions examples/grpc/Earthfile
Original file line number Diff line number Diff line change
Expand Up @@ -8,20 +8,20 @@ WORKDIR /example-grpc
#
# This example spans 5 different git repositories, each containing an Earthfile:
#
# 1) https://github.com/earthly/earthly-example-proto
# 1) https://github.com/EarthBuild/earthly-example-proto
# This repository contains the api.proto definition along with an Earthfile
# which installs the various protoc tools required to generate the go, python,
# and ruby code.
#
# 2) https://github.com/earthly/earthly-example-proto-server
# 2) https://github.com/EarthBuild/earthly-example-proto-server
# This repository contains a server written in go along with an Earthfile
# that pulls in the auto-generated go code from repo 1.
#
# 3) https://github.com/earthly/earthly-example-proto-python-client
# 3) https://github.com/EarthBuild/earthly-example-proto-python-client
# This repository contains a client written in python along with an Earthfile
# that pulls in the auto-generated python code from repo 1.
#
# 4) https://github.com/earthly/earthly-example-proto-ruby-client
# 4) https://github.com/EarthBuild/earthly-example-proto-ruby-client
# This repository contains a client written in ruby along with an Earthfile
# that pulls in the auto-generated python code from repo 1.

Expand All @@ -37,9 +37,9 @@ WORKDIR /example-grpc
test:
FROM earthly/dind:alpine-3.19-docker-25.0.5-r0
WITH DOCKER \
--load kvserver:latest=github.com/earthly/earthly-example-proto-server:main+kvserver-docker \
--load kv-py-client:latest=github.com/earthly/earthly-example-proto-python-client:main+kvclient-docker \
--load kv-rb-client:latest=github.com/earthly/earthly-example-proto-ruby-client:main+kv-ruby-client-docker \
--load kvserver:latest=github.com/EarthBuild/earthly-example-proto-server:main+kvserver-docker \
--load kv-py-client:latest=github.com/EarthBuild/earthly-example-proto-python-client:main+kvclient-docker \
--load kv-rb-client:latest=github.com/EarthBuild/earthly-example-proto-ruby-client:main+kv-ruby-client-docker \
--platform linux/amd64 # Ruby and Python(evidence suggests?) seem to have a hard time building in Docker on M1. https://github.com/grpc/grpc/issues/26664
RUN --mount=type=cache,target=/go/pkg \
docker run --name server --network=host -d kvserver:latest && \
Expand Down
2 changes: 1 addition & 1 deletion examples/import/Earthfile
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
VERSION 0.8
IMPORT ./some/local/path AS lib
IMPORT github.com/earthly/hello-world:main # if alias is not provided, defaults to last element in path (in this case, hello-world)
IMPORT github.com/EarthBuild/hello-world:main # if alias is not provided, defaults to last element in path (in this case, hello-world)

build:
FROM lib+base-image
Expand Down
4 changes: 2 additions & 2 deletions examples/import/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,14 +9,14 @@ build:
DO ./some/local/path+PRINT --string="IMPORT example"
COPY ./some/local/path+get-file/file.txt ./
RUN cat file.txt
BUILD github.com/earthly/hello-world:main+hello
BUILD github.com/EarthBuild/hello-world:main+hello
```

can be refactored as:

```Dockerfile
IMPORT ./some/local/path AS lib
IMPORT github.com/earthly/hello-world:main
IMPORT github.com/EarthBuild/hello-world:main

build:
DO lib+PRINT --string="IMPORT example"
Expand Down
4 changes: 2 additions & 2 deletions examples/multirepo/Earthfile
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@ WORKDIR /example-multirepo

docker:
RUN npm install -g http-server
COPY github.com/earthly/earthly-example-multirepo-static:main+html/* ./
COPY github.com/earthly/earthly-example-multirepo-js:main+build/* ./
COPY github.com/EarthBuild/earthly-example-multirepo-static:main+html/* ./
COPY github.com/EarthBuild/earthly-example-multirepo-js:main+build/* ./
EXPOSE 8080
ENTRYPOINT ["http-server", "."]
SAVE IMAGE --push earthly/examples:multirepo
10 changes: 5 additions & 5 deletions examples/multirepo/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@
In this example, we will walk through a simple multirepo setup that can be used with Earthly. The entire code of this exercise is available in the

* This directory
* This referenced [project of HTML static files](https://github.com/earthly/earthly-example-multirepo-static)
* This referenced [project of JS files](https://github.com/earthly/earthly-example-multirepo-js)
* This referenced [project of HTML static files](https://github.com/EarthBuild/earthly-example-multirepo-static)
* This referenced [project of JS files](https://github.com/EarthBuild/earthly-example-multirepo-js)

In this example, let's assume that we have a web application where HTML files are held in one repository and JS file are held in another. The complete application is a combination of both.

Expand Down Expand Up @@ -37,17 +37,17 @@ and load `http://127.0.0.1:8080` in your browser.
Notice how the build is able to reference other repositories and copy artifacts from specific build targets. For example, the line

```Dockerfile
COPY github.com/earthly/earthly-example-multirepo-static+html/* ./
COPY github.com/EarthBuild/earthly-example-multirepo-static+html/* ./
```

references the `html` target of the repository `github.com/earthly/earthly-example-multirepo-static` and copies all its artifacts in the current build environment. Earthly takes care of cloning that repository, executing its build for the `html` target and extracting the artifacts to be used here.
references the `html` target of the repository `github.com/EarthBuild/earthly-example-multirepo-static` and copies all its artifacts in the current build environment. Earthly takes care of cloning that repository, executing its build for the `html` target and extracting the artifacts to be used here.

This command is also cache-aware. If the HEAD of the repository points to a different Git hash, Earthly knows to re-clone and build the repository again, using as much cache as relevant, depending on which files have changed.

You can also specify a specific tag or branch of the remote repository, to help keep builds consistent and avoid surprising changes. For that, you can use the syntax

```Dockerfile
COPY github.com/earthly/earthly-example-multirepo-static:v0.1.1+html/* ./
COPY github.com/EarthBuild/earthly-example-multirepo-static:v0.1.1+html/* ./
```

where `v0.1.1` is a tag or branch specifier.
Expand Down
Loading
Loading