Skip to content

Commit

Permalink
Allow for local --BUILDKIT_PROJECT when running RUN_EARTHLY tests (#3…
Browse files Browse the repository at this point in the history
…989)

The BuildKit specified when running `+for-linux` and friends is not also
being used by `RUN_EARTHLY` tests which use the
`earthly-integration-test-base` image. This PR adds a similar argument
for tests based on the latter image.

```
earthly -P +test-no-qemu-group8 --BUILDKIT_PROJECT="../buildkit"
```
  • Loading branch information
mikejholly authored Apr 4, 2024
1 parent 83f08d6 commit 740d2d2
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
2 changes: 1 addition & 1 deletion Earthfile
Original file line number Diff line number Diff line change
Expand Up @@ -475,7 +475,7 @@ earthly-docker:
# if no dockerhub mirror is not set it will attempt to login to dockerhub using the provided docker hub username and token.
# Otherwise, it will attempt to login to the docker hub mirror using the provided username and password
earthly-integration-test-base:
FROM +earthly-docker
FROM --pass-args +earthly-docker
RUN apk update && apk add pcre-tools curl python3 bash perl findutils expect yq && apk add --upgrade sed
COPY scripts/acbtest/acbtest scripts/acbtest/acbgrep /bin/
ENV NO_DOCKER=1
Expand Down
4 changes: 3 additions & 1 deletion tests/integration-base/Earthfile
Original file line number Diff line number Diff line change
Expand Up @@ -8,14 +8,16 @@ test-base:
ARG DOCKERHUB_MIRROR_AUTH=false
ARG DOCKERHUB_MIRROR_AUTH_FROM_CLOUD_SECRETS=false
ARG DOCKERHUB_AUTH=false
ARG BUILDKIT_PROJECT

FROM ../..+earthly-integration-test-base \
--DOCKERHUB_MIRROR=$DOCKERHUB_MIRROR \
--DOCKERHUB_MIRROR_INSECURE=$DOCKERHUB_MIRROR_INSECURE \
--DOCKERHUB_MIRROR_HTTP=$DOCKERHUB_MIRROR_HTTP \
--DOCKERHUB_MIRROR_AUTH=$DOCKERHUB_MIRROR_AUTH \
--DOCKERHUB_MIRROR_AUTH_FROM_CLOUD_SECRETS=$DOCKERHUB_MIRROR_AUTH_FROM_CLOUD_SECRETS \
--DOCKERHUB_AUTH=$DOCKERHUB_AUTH
--DOCKERHUB_AUTH=$DOCKERHUB_AUTH \
--BUILDKIT_PROJECT=$BUILDKIT_PROJECT

# uncomment this to debug dockerhub rate-limiting issues
#RUN if !grep "registry-1.docker.io.mirror.corp.earthly.dev" /root/.docker/config.json >/dev/null; then echo "The earthly mirror was not setup correctly" && exit 1; fi

0 comments on commit 740d2d2

Please sign in to comment.