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
3 changes: 0 additions & 3 deletions .github/workflows/reusable-misc-tests-1.yml
Original file line number Diff line number Diff line change
Expand Up @@ -67,9 +67,6 @@ jobs:
done
- name: Execute interactive debugger test
run: ./scripts/tests/interactive-debugger/test-interactive.py --earthly ${{inputs.BUILT_EARTHLY_PATH}} --timeout 180
- name: "cloud-stored docker credential test (Earthly only)" # TODO Move to seperate earthly-only workflow file
run: FRONTEND=${{inputs.BINARY}} earthly=${{inputs.BUILT_EARTHLY_PATH}} ./scripts/tests/cloud-docker-credentials-integration.sh
if: github.event_name == 'push' || github.event.pull_request.head.repo.full_name == github.repository
- name: Execute version test
run: "${{inputs.BUILT_EARTHLY_PATH}} --version"
- name: Execute docker2earth test
Expand Down
5 changes: 3 additions & 2 deletions .github/workflows/reusable-misc-tests-2.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,9 @@ jobs:
misc-tests-2:
if: ${{!inputs.SKIP_JOB}}
runs-on: ${{inputs.RUNS_ON}}
permissions:
contents: read
packages: read
env:
FORCE_COLOR: 1
EARTHLY_TOKEN: "${{ secrets.EARTHLY_TOKEN }}"
Expand All @@ -57,8 +60,6 @@ jobs:
echo "EARTHLY_VERSION_FLAG_OVERRIDES=$EARTHLY_VERSION_FLAG_OVERRIDES" >> "$GITHUB_ENV"
- name: Run linux-amd64 specific tests
run: ${{inputs.SUDO}} ${{inputs.BUILT_EARTHLY_PATH}} --ci -P ./tests+ga-linux-amd64
- name: Execute tests requiring .git directory
run: go test ./analytics --tags=hasgitdirectory
- name: Execute earthly ${{inputs.BINARY}} command
run: (cd tests/docker && ${{inputs.SUDO}} ../../${{inputs.BUILT_EARTHLY_PATH}} docker-build --tag examples-test-docker:latest . && diff <(docker run --rm examples-test-docker:latest) <(echo "hello dockerfile") )
- name: Execute private image test (Earthly Only) # TODO move to separate workflow
Expand Down
64 changes: 0 additions & 64 deletions scripts/tests/cloud-docker-credentials-integration.sh

This file was deleted.

3 changes: 2 additions & 1 deletion tests/Earthfile
Original file line number Diff line number Diff line change
Expand Up @@ -802,7 +802,8 @@ ci-arg-test:
--output_contains="CI environment"

private-image-test:
FROM earthly/private-test:latest
# NOTE(jhorsts): I assume any private image is good - use dindtest.
FROM ghcr.io/earthbuild/dindtest:alpine-3.22-docker-28.3.0-r0
RUN --entrypoint echo hello world

gen-dockerfile-test:
Expand Down
1 change: 0 additions & 1 deletion tests/docker2earth/Dockerfile2
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
FROM golang:1.16
WORKDIR /go/src/github.com/alexellis/href-counter/
RUN go get -d -v golang.org/x/net/html
COPY app.go .
RUN go mod init
RUN CGO_ENABLED=0 GOOS=linux go build -a -installsuffix cgo -o app .
Expand Down
1 change: 0 additions & 1 deletion tests/docker2earth/args-before-from.Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@ ARG GO_MINOR=16
ARG GO_VERSION="${GO_MAJOR}.${GO_MINOR}"
FROM "${BASE}:${GO_VERSION}"
WORKDIR /go/src/github.com/alexellis/href-counter/
RUN go get -d -v golang.org/x/net/html
COPY app.go .
RUN go mod init
RUN CGO_ENABLED=0 GOOS=linux go build -a -installsuffix cgo -o app .
Expand Down
21 changes: 13 additions & 8 deletions tests/registry-certs/test.sh
Original file line number Diff line number Diff line change
Expand Up @@ -15,17 +15,18 @@ test -n "$frontend" || (>&2 echo "Error: frontend is empty" && exit 1)
# Cleanup previous run.
"$frontend" stop registry || true
"$frontend" rm registry || true
"$frontend" rm network registry-certs || true
"$frontend" network disconnect registry-certs earthly-buildkitd || true
"$frontend" network rm registry-certs || true
rm -rf "$testdir/certs" || true

# Create user defined network.
"$frontend" network create -d bridge registry-certs

# Start registry to get its IP address.
"$frontend" run --rm -d --network registry-certs --name registry registry:2
export REGISTRY_IP="$("$frontend" inspect -f {{range.NetworkSettings.Networks}}{{.IPAddress}}{{end}} registry)"
# Define network settings. I've chosen a subnet that is unlikely to conflict
# with default Docker networks.
export REGISTRY_IP="172.29.0.2"
export REGISTRY="$REGISTRY_IP"
"$frontend" stop registry
SUBNET="172.29.0.0/16"

# Create user defined network.
"$frontend" network create --subnet="$SUBNET" -d bridge registry-certs

# Generate certs.
"$earthly" \
Expand All @@ -44,6 +45,10 @@ export REGISTRY="$REGISTRY_IP"
-p "127.0.0.1:5443:443" \
--name registry registry:2

# Ensure buildkitd can connect to the registry-certs network so that
# build containers can communicate with the registry.
"$frontend" network connect registry-certs earthly-buildkitd

# Test.
set +e
"$earthly" --allow-privileged \
Expand Down
Loading