From 48227d1b84c97785161f1f6fa4c0bca84a98d037 Mon Sep 17 00:00:00 2001 From: Kieran Mann Date: Fri, 3 Jul 2026 09:34:13 -0700 Subject: [PATCH] test: rename RUN_EARTHLY test UDCs to RUN_EARTHBUILD Renames the internal test-harness User Defined Commands used across the integration test Earthfiles: RUN_EARTHLY -> RUN_EARTHBUILD RUN_EARTHLY_ARGS -> RUN_EARTHBUILD_ARGS DO_REMOTE_CACHE_EARTHLY -> DO_REMOTE_CACHE_EARTHBUILD These are purely internal test fixtures (function definitions and their `DO +...` invocations, including cross-file `tests+RUN_EARTHBUILD` and `../../+RUN_EARTHBUILD` references). No user-facing behavior, config, env vars, or released target/artifact names change. All 29 affected Earthfiles verified to parse via `earthly debug ast`. Reduces "earthly" line count by 529 (5408 -> 4879). Co-Authored-By: Claude Opus 4.8 (1M context) --- tests/Earthfile | 570 +++++++++--------- tests/autocompletion/install/Earthfile | 14 +- tests/autoskip/Earthfile | 264 ++++---- tests/command-to-function-rename/Earthfile | 12 +- tests/config/Earthfile | 16 +- .../functions-do-not-propagate-args/Earthfile | 8 +- tests/git-metadata/Earthfile | 6 +- tests/git-ssh-server/Earthfile | 26 +- tests/invalid/Earthfile | 8 +- tests/locally-in-command/Earthfile | 14 +- tests/locally-in-function/Earthfile | 14 +- tests/logbus/Earthfile | 2 +- .../pass-args-default-via-function/Earthfile | 6 +- tests/pass-args-default/Earthfile | 6 +- tests/pass-args-global-via-function/Earthfile | 6 +- tests/pass-args-global/Earthfile | 6 +- tests/pass-args-no-builtins/Earthfile | 6 +- .../Earthfile | 6 +- tests/private-https/Earthfile | 14 +- tests/propagate-args-to-base/Earthfile | 8 +- tests/public-https/Earthfile | 6 +- tests/raw-output/Earthfile | 2 +- tests/registry-certs/Earthfile | 8 +- tests/remote-cache/Earthfile | 12 +- tests/scrub-https-credentials/Earthfile | 10 +- tests/secret-provider-config/Earthfile | 14 +- tests/shell-out/Earthfile | 22 +- tests/version/Earthfile | 44 +- tests/warn-if-not-logged-in/Earthfile | 6 +- 29 files changed, 568 insertions(+), 568 deletions(-) diff --git a/tests/Earthfile b/tests/Earthfile index 43ac8edcce..fa85d41890 100644 --- a/tests/Earthfile +++ b/tests/Earthfile @@ -260,7 +260,7 @@ ast-test-input: SAVE ARTIFACT ./*.earth privileged-test: - DO +RUN_EARTHLY --earthfile=privileged.earth --extra_args="--allow-privileged" --target=+test + DO +RUN_EARTHBUILD --earthfile=privileged.earth --extra_args="--allow-privileged" --target=+test copy-test: RUN mkdir -p in/sub/1 in/sub/2 && \ @@ -268,23 +268,23 @@ copy-test: echo "1" > in/sub/1/file && \ echo "2" > in/sub/2/file && \ echo "sub" > in/sub/file - DO +RUN_EARTHLY --earthfile=copy.earth --output_does_not_contain="which does not expand to a home directory" + DO +RUN_EARTHBUILD --earthfile=copy.earth --output_does_not_contain="which does not expand to a home directory" copy-test-empty-src: - DO +RUN_EARTHLY --earthfile=copy.earth --target=+copy-empty-src - DO +RUN_EARTHLY --earthfile=copy.earth --target=+copy-empty-src-if-exists + DO +RUN_EARTHBUILD --earthfile=copy.earth --target=+copy-empty-src + DO +RUN_EARTHBUILD --earthfile=copy.earth --target=+copy-empty-src-if-exists copy-test-wildcard: - DO +RUN_EARTHLY --earthfile=copy.earth --target=+copy-wildcard + DO +RUN_EARTHBUILD --earthfile=copy.earth --target=+copy-wildcard copy-test-if-exists-wildcard: - DO +RUN_EARTHLY --earthfile=copy.earth --target=+copy-if-exists-wildcard + DO +RUN_EARTHBUILD --earthfile=copy.earth --target=+copy-if-exists-wildcard RUN mkdir existing_folder - DO +RUN_EARTHLY --earthfile=copy.earth --target="+copy-if-exists-wildcard-exists-empty" + DO +RUN_EARTHBUILD --earthfile=copy.earth --target="+copy-if-exists-wildcard-exists-empty" RUN touch existing_folder/foo - DO +RUN_EARTHLY --earthfile=copy.earth --target="+copy-if-exists-wildcard-exists" + DO +RUN_EARTHBUILD --earthfile=copy.earth --target="+copy-if-exists-wildcard-exists" copy-test-verbose-output: RUN mkdir -p subdir/a.txt && \ @@ -301,7 +301,7 @@ earthly --config \$earthly_config --verbose +copy 2>&1 | tee output.txt; earthly --config \$earthly_config --verbose +copy 2>&1 | tee output2.txt; " >/tmp/multiple-earthly-script && chmod +x /tmp/multiple-earthly-script - DO +RUN_EARTHLY --earthfile=copy-verbose.earth --exec_cmd=/tmp/multiple-earthly-script + DO +RUN_EARTHBUILD --earthfile=copy-verbose.earth --exec_cmd=/tmp/multiple-earthly-script # test that the first run sends a.txt and doesn't send any non-referenced files RUN cat output.txt | acbgrep 'sent data for a.txt (1 B)' @@ -314,74 +314,74 @@ earthly --config \$earthly_config --verbose +copy 2>&1 | tee output2.txt; RUN if grep "sent data for .*beta.txt" output2.txt >/dev/null; then echo "beta.txt should not have been sent"; exit 1; fi # test SAVE ARTIFACT AS LOCAL texts is output - DO +RUN_EARTHLY --earthfile=copy-verbose.earth --extra_args="--verbose" --target=+save --output_contains="received data for important-data .12 B." + DO +RUN_EARTHBUILD --earthfile=copy-verbose.earth --extra_args="--verbose" --target=+save --output_contains="received data for important-data .12 B." RUN ls -la important-data copy-keep-own-test: - DO +RUN_EARTHLY --target=+test-known-user --earthfile=copy-keep-own.earth - DO +RUN_EARTHLY --target=+test-unknown-user --earthfile=copy-keep-own.earth + DO +RUN_EARTHBUILD --target=+test-known-user --earthfile=copy-keep-own.earth + DO +RUN_EARTHBUILD --target=+test-unknown-user --earthfile=copy-keep-own.earth copy-tilde-test: RUN touch in - DO +RUN_EARTHLY --target=+copy-tilde-destination --earthfile=copy-tilde.earth --output_contains='destination path \"~/.\" contains a \"~\" which does not expand to a home directory' - DO +RUN_EARTHLY --target=+copy-tilde-in-destination --earthfile=copy-tilde.earth --output_contains='destination path \"/some/dir/~/.\" contains a \"~\" which does not expand to a home directory' - DO +RUN_EARTHLY --target=+copy-tilde-in-destination-prefix --earthfile=copy-tilde.earth --output_contains='destination path \"~some/dir.\" contains a \"~\" which does not expand to a home directory' - DO +RUN_EARTHLY --target=+copy-tilde-arg-in-destination --earthfile=copy-tilde.earth --output_contains='destination path \"/some/dir/~/.\" contains a \"~\" which does not expand to a home directory' - DO +RUN_EARTHLY --target=+copy-tilde-artifact --earthfile=copy-tilde.earth --output_contains='destination path \"/some/dir/~/.\" contains a \"~\" which does not expand to a home directory' - DO +RUN_EARTHLY --target=+copy-tilde-in-destination-not-prefix --earthfile=copy-tilde.earth --output_does_not_contain="which does not expand to a home directory" + DO +RUN_EARTHBUILD --target=+copy-tilde-destination --earthfile=copy-tilde.earth --output_contains='destination path \"~/.\" contains a \"~\" which does not expand to a home directory' + DO +RUN_EARTHBUILD --target=+copy-tilde-in-destination --earthfile=copy-tilde.earth --output_contains='destination path \"/some/dir/~/.\" contains a \"~\" which does not expand to a home directory' + DO +RUN_EARTHBUILD --target=+copy-tilde-in-destination-prefix --earthfile=copy-tilde.earth --output_contains='destination path \"~some/dir.\" contains a \"~\" which does not expand to a home directory' + DO +RUN_EARTHBUILD --target=+copy-tilde-arg-in-destination --earthfile=copy-tilde.earth --output_contains='destination path \"/some/dir/~/.\" contains a \"~\" which does not expand to a home directory' + DO +RUN_EARTHBUILD --target=+copy-tilde-artifact --earthfile=copy-tilde.earth --output_contains='destination path \"/some/dir/~/.\" contains a \"~\" which does not expand to a home directory' + DO +RUN_EARTHBUILD --target=+copy-tilde-in-destination-not-prefix --earthfile=copy-tilde.earth --output_does_not_contain="which does not expand to a home directory" cache-test: # Test that a file can be passed between runs through the mounted cache. - DO +RUN_EARTHLY --earthfile=cache1.earth --target=+test-pass-file --use_tmpfs=false - DO +RUN_EARTHLY --earthfile=cache2.earth --target=+test-pass-file --use_tmpfs=false + DO +RUN_EARTHBUILD --earthfile=cache1.earth --target=+test-pass-file --use_tmpfs=false + DO +RUN_EARTHBUILD --earthfile=cache2.earth --target=+test-pass-file --use_tmpfs=false # Test that a change to the contents of the mount does not cause a cache bust if everything else # is the same. - DO +RUN_EARTHLY --earthfile=cache1.earth --target=+test-no-bust-on-change --use_tmpfs=false - DO +RUN_EARTHLY --earthfile=cache2.earth --target=+test-no-bust-on-change --use_tmpfs=false # make a change - DO +RUN_EARTHLY --earthfile=cache1.earth --target=+test-no-bust-on-change --use_tmpfs=false \ + DO +RUN_EARTHBUILD --earthfile=cache1.earth --target=+test-no-bust-on-change --use_tmpfs=false + DO +RUN_EARTHBUILD --earthfile=cache2.earth --target=+test-no-bust-on-change --use_tmpfs=false # make a change + DO +RUN_EARTHBUILD --earthfile=cache1.earth --target=+test-no-bust-on-change --use_tmpfs=false \ --post_command=">output.txt 2>&1" # check that all is still cached if re-running the prev version RUN cat output.txt RUN cat output.txt | acbgrep '\*cached\* --> RUN echo hey' git-clone-test: - DO +RUN_EARTHLY --earthfile=git-clone.earth --target=+test + DO +RUN_EARTHBUILD --earthfile=git-clone.earth --target=+test builtin-args-test: ENV EARTHLY_CI_RUNNER=true - DO +RUN_EARTHLY --earthfile=builtin-args.earth --target=+builtin-args-test + DO +RUN_EARTHBUILD --earthfile=builtin-args.earth --target=+builtin-args-test RUN sed -i "1s/VERSION \(.*\)/VERSION --arg-scope-and-set \1/" Earthfile - DO +RUN_EARTHLY --target=+builtin-args-test + DO +RUN_EARTHBUILD --target=+builtin-args-test RUN sed -i "1s/VERSION \(.*\)/VERSION --earthly-ci-runner-arg \1/" Earthfile - DO +RUN_EARTHLY --target=+earthly-ci-runner-builtin-arg-test --extra_args="--build-arg EXPECTED_VALUE=false" + DO +RUN_EARTHBUILD --target=+earthly-ci-runner-builtin-arg-test --extra_args="--build-arg EXPECTED_VALUE=false" ENV EARTHLY_CI_RUNNER="" - DO +RUN_EARTHLY --target=+earthly-ci-runner-builtin-arg-test --extra_args="--build-arg EXPECTED_VALUE=false" + DO +RUN_EARTHBUILD --target=+earthly-ci-runner-builtin-arg-test --extra_args="--build-arg EXPECTED_VALUE=false" ENV EARTHLY_CI_RUNNER="false" - DO +RUN_EARTHLY --target=+earthly-ci-runner-builtin-arg-test --extra_args="--build-arg EXPECTED_VALUE=false" + DO +RUN_EARTHBUILD --target=+earthly-ci-runner-builtin-arg-test --extra_args="--build-arg EXPECTED_VALUE=false" builtin-args-invalid-default-test: - DO +RUN_EARTHLY --earthfile=builtin-args-invalid-default.earth --should_fail=true --target=+test --output_contains="arg default value supplied for built-in ARG" + DO +RUN_EARTHBUILD --earthfile=builtin-args-invalid-default.earth --should_fail=true --target=+test --output_contains="arg default value supplied for built-in ARG" RUN sed -i "1s/VERSION \(.*\)/VERSION --arg-scope-and-set \1/" Earthfile - DO +RUN_EARTHLY --should_fail=true --target=+test --output_contains="arg default value supplied for built-in ARG" + DO +RUN_EARTHBUILD --should_fail=true --target=+test --output_contains="arg default value supplied for built-in ARG" builtin-args-invalid-pass-test: - DO +RUN_EARTHLY --earthfile=builtin-args-invalid-pass.earth --should_fail=true --target=+test --output_contains="value cannot be specified for built-in build arg EARTHLY_VERSION" + DO +RUN_EARTHBUILD --earthfile=builtin-args-invalid-pass.earth --should_fail=true --target=+test --output_contains="value cannot be specified for built-in build arg EARTHLY_VERSION" RUN sed -i "1s/VERSION \(.*\)/VERSION --arg-scope-and-set \1/" Earthfile - DO +RUN_EARTHLY --should_fail=true --target=+test --output_contains="value cannot be specified for built-in build arg EARTHLY_VERSION" + DO +RUN_EARTHBUILD --should_fail=true --target=+test --output_contains="value cannot be specified for built-in build arg EARTHLY_VERSION" parser-smoke-test: - DO +RUN_EARTHLY --earthfile=parser-smoke.earth --target=+test + DO +RUN_EARTHBUILD --earthfile=parser-smoke.earth --target=+test excludes-test: RUN touch exclude-me.txt RUN touch do-not-exclude-me.txt RUN echo 'exclude-me.txt' > .earthlyignore - DO +RUN_EARTHLY --earthfile=excludes.earth --target=+test + DO +RUN_EARTHBUILD --earthfile=excludes.earth --target=+test secrets-optional-prefix-test: ENV SECRET1=foo ENV SECRET2=wrong RUN echo -n "secretfilecontents" > /root/my-secret-file - DO +RUN_EARTHLY \ + DO +RUN_EARTHBUILD \ --earthfile=secrets.earth \ --extra_args="--secret SECRET1 --secret SECRET2=bar --secret-file SECRET3=~/my-secret-file --build-arg SECRET_ID=\"\" --build-arg SECRET_ID_2=\"\"" \ --target=+test @@ -390,11 +390,11 @@ secrets-test: ENV SECRET1=foo ENV SECRET2=wrong RUN echo -n "secretfilecontents" > /root/my-secret-file - DO +RUN_EARTHLY \ + DO +RUN_EARTHBUILD \ --earthfile=secrets.earth \ --extra_args="--secret SECRET1 --secret SECRET2=bar --secret-file SECRET3=~/my-secret-file --build-arg SECRET_ID=\"\" --build-arg SECRET_ID_2=\"\"" \ --target=+test - DO +RUN_EARTHLY \ + DO +RUN_EARTHBUILD \ --earthfile=secrets.earth \ --extra_args="--secret SECRET1 --secret SECRET2=bar --build-arg SECRET_ID=\"\" --build-arg SECRET_ID_2=\"\"" \ --target=+test \ @@ -402,49 +402,49 @@ secrets-test: --output_contains='unable to lookup secret \"SECRET3\": not found' project-secrets-test: - DO +RUN_EARTHLY \ + DO +RUN_EARTHBUILD \ --earthfile=project-secrets-without-flag.earth \ --target=+without-flag \ --should_fail=true \ --output_contains="must be enabled in order to use PROJECT" - DO +RUN_EARTHLY \ + DO +RUN_EARTHBUILD \ --earthfile=project-secrets.earth \ --target=+local-override \ --extra_args="--secret foo/bar=override" \ --output_contains="my secret is override" - DO +RUN_EARTHLY \ + DO +RUN_EARTHBUILD \ --earthfile=project-secrets.earth \ --target=+basic \ --extra_args="--secret SECRET1=foo --secret SECRET2=bar" \ --output_contains="my secrets are foo and bar" secrets-args-precedence-test: - DO +RUN_EARTHLY --earthfile=secrets-args-precedence.earth --target=+test --extra_args="--secret foo=eggs" + DO +RUN_EARTHBUILD --earthfile=secrets-args-precedence.earth --target=+test --extra_args="--secret foo=eggs" build-arg-test: - DO +RUN_EARTHLY --earthfile=build-arg.earth + DO +RUN_EARTHBUILD --earthfile=build-arg.earth build-arg-explicit-global-test: - DO +RUN_EARTHLY --earthfile=build-arg-explicit-global.earth --target=+test-success - DO +RUN_EARTHLY --should_fail=true --earthfile=build-arg-explicit-global.earth \ + DO +RUN_EARTHBUILD --earthfile=build-arg-explicit-global.earth --target=+test-success + DO +RUN_EARTHBUILD --should_fail=true --earthfile=build-arg-explicit-global.earth \ --target=+test-failure \ --output_contains="invalid ARG arguments.*: global ARG can only be set in the base target" build-arg-dynamic-with-empty-base: - DO +RUN_EARTHLY --earthfile=build-arg-dynamic-with-empty-base.earth --target=+test + DO +RUN_EARTHBUILD --earthfile=build-arg-dynamic-with-empty-base.earth --target=+test #this test only works under linux/amd64 user-arg-test: - DO +RUN_EARTHLY --earthfile=user-arg.earth + DO +RUN_EARTHBUILD --earthfile=user-arg.earth lc-test: - DO +RUN_EARTHLY --earthfile=lc.earth --target=+test + DO +RUN_EARTHBUILD --earthfile=lc.earth --target=+test from-expose-test: - DO +RUN_EARTHLY --earthfile=from-expose.earth --extra_args="--no-output" --target=+test + DO +RUN_EARTHBUILD --earthfile=from-expose.earth --extra_args="--no-output" --target=+test scratch-test: - DO +RUN_EARTHLY --earthfile=scratch-test.earth --extra_args="--no-output" --target=+test + DO +RUN_EARTHBUILD --earthfile=scratch-test.earth --extra_args="--no-output" --target=+test build-earthly-test: # Test that build.earth is supported. @@ -457,7 +457,7 @@ build-earthly-test: host-bind-test: RUN mkdir /bind-test RUN echo "a" > /bind-test/a.txt - DO +RUN_EARTHLY --earthfile=host-bind.earth --target=+test + DO +RUN_EARTHBUILD --earthfile=host-bind.earth --target=+test RUN test -f /bind-test/b.txt RUN cat /bind-test/b.txt @@ -478,7 +478,7 @@ remote-test: -- --no-output github.com/EarthBuild/test-remote/builtin-args:main+test transitive-args-test: - DO +RUN_EARTHLY --earthfile=transitive-args.earth --extra_args="--build-arg SOMEARG=xyz" --target=+test + DO +RUN_EARTHBUILD --earthfile=transitive-args.earth --extra_args="--build-arg SOMEARG=xyz" --target=+test RUN ls RUN test -f ./abc RUN test -f ./xyz @@ -487,7 +487,7 @@ transitive-args-test: RUN cat ./xyz | acbgrep xyz transitive-args-test2: - DO +RUN_EARTHLY --earthfile=transitive-args.earth --target=+test + DO +RUN_EARTHBUILD --earthfile=transitive-args.earth --target=+test RUN ls RUN test -f ./abc && test -f ./default RUN cat ./abc | acbgrep abc @@ -520,14 +520,14 @@ non-transitive-args-test: star-test: RUN touch a.txt b.txt c.nottxt - DO +RUN_EARTHLY --earthfile=star.earth --target=+test + DO +RUN_EARTHBUILD --earthfile=star.earth --target=+test # TODO: This does not pass. star-test-todo: RUN touch a.txt b.txt c.nottxt - DO +RUN_EARTHLY --earthfile=star.earth --target=+test --use_tmpfs=false + DO +RUN_EARTHBUILD --earthfile=star.earth --target=+test --use_tmpfs=false RUN echo "a change" > c.nottxt - DO +RUN_EARTHLY --earthfile=star.earth --target=+test --use_tmpfs=false \ + DO +RUN_EARTHBUILD --earthfile=star.earth --target=+test --use_tmpfs=false \ --post_command=">output.txt" RUN cat output.txt RUN cached_lines=$(cat output.txt | grep cached | wc -l); \ @@ -542,7 +542,7 @@ dockerfile-test: -- --allow-privileged --no-output +test-all fail-test: - DO +RUN_EARTHLY --earthfile=fail.earth --should_fail=true --verbose=0 --target=+test --post_command="2>output.txt" + DO +RUN_EARTHBUILD --earthfile=fail.earth --should_fail=true --verbose=0 --target=+test --post_command="2>output.txt" RUN cat output.txt # The output of the failed command should have been printed twice. RUN cat output.txt | grep 'ZmFpbCA3YjcyZTAyNC01ZTIxLTRlMWItOTZlNC02NTVjMzk4NzYxMDcK' | test "$(wc -l)" -eq 2 @@ -550,7 +550,7 @@ fail-test: RUN cat output.txt | grep 'ERROR Earthfile:10:5' RUN cat output.txt | grep 'RUN echo "fail 7b72e024-5e21-4e1b-96e4-655c39876107" | base64; false' RUN cat output.txt | grep 'did not complete successfully. Exit code 1' - DO +RUN_EARTHLY --earthfile=fail.earth --should_fail=true --verbose=0 --target=+test-copy --post_command="2>output.txt" + DO +RUN_EARTHBUILD --earthfile=fail.earth --should_fail=true --verbose=0 --target=+test-copy --post_command="2>output.txt" RUN cat output.txt RUN cat output.txt | grep 'Repeating the failure error...' RUN cat output.txt | grep 'ERROR Earthfile:14:5' @@ -560,15 +560,15 @@ fail-test: allow-privileged-test: # test that privileged-tasks in remote repos dont run - DO +RUN_EARTHLY --earthfile=allow-privileged.earth --should_fail=true --extra_args="--allow-privileged" -target=+reject-privileged-in-remote-repo-triggered-by-from-locally - DO +RUN_EARTHLY --earthfile=allow-privileged.earth --should_fail=true --extra_args="--allow-privileged" -target=+reject-privileged-in-remote-repo-triggered-by-from-privileged - DO +RUN_EARTHLY --earthfile=allow-privileged.earth --should_fail=true --extra_args="--allow-privileged" -target=+reject-privileged-in-remote-repo-triggered-by-copy-locally - DO +RUN_EARTHLY --earthfile=allow-privileged.earth --should_fail=true --extra_args="--allow-privileged" -target=+reject-privileged-in-remote-repo-triggered-by-copy-privileged - DO +RUN_EARTHLY --earthfile=allow-privileged.earth --should_fail=true --extra_args="--allow-privileged" -target=+reject-privileged-in-remote-repo-triggered-by-build-locally - DO +RUN_EARTHLY --earthfile=allow-privileged.earth --should_fail=true --extra_args="--allow-privileged" -target=+reject-privileged-in-remote-repo-triggered-by-build-privileged - DO +RUN_EARTHLY --earthfile=allow-privileged.earth --should_fail=true --extra_args="--allow-privileged" -target=+reject-dedup + DO +RUN_EARTHBUILD --earthfile=allow-privileged.earth --should_fail=true --extra_args="--allow-privileged" -target=+reject-privileged-in-remote-repo-triggered-by-from-locally + DO +RUN_EARTHBUILD --earthfile=allow-privileged.earth --should_fail=true --extra_args="--allow-privileged" -target=+reject-privileged-in-remote-repo-triggered-by-from-privileged + DO +RUN_EARTHBUILD --earthfile=allow-privileged.earth --should_fail=true --extra_args="--allow-privileged" -target=+reject-privileged-in-remote-repo-triggered-by-copy-locally + DO +RUN_EARTHBUILD --earthfile=allow-privileged.earth --should_fail=true --extra_args="--allow-privileged" -target=+reject-privileged-in-remote-repo-triggered-by-copy-privileged + DO +RUN_EARTHBUILD --earthfile=allow-privileged.earth --should_fail=true --extra_args="--allow-privileged" -target=+reject-privileged-in-remote-repo-triggered-by-build-locally + DO +RUN_EARTHBUILD --earthfile=allow-privileged.earth --should_fail=true --extra_args="--allow-privileged" -target=+reject-privileged-in-remote-repo-triggered-by-build-privileged + DO +RUN_EARTHBUILD --earthfile=allow-privileged.earth --should_fail=true --extra_args="--allow-privileged" -target=+reject-dedup # test allowed-privileged tasks in remote repos work - DO +RUN_EARTHLY --earthfile=allow-privileged.earth --extra_args="--allow-privileged" --target=+allow-all + DO +RUN_EARTHBUILD --earthfile=allow-privileged.earth --extra_args="--allow-privileged" --target=+allow-all allow-privileged-import-test: RUN mkdir -p a/really/deep/subdir && echo "VERSION 0.8 @@ -577,44 +577,44 @@ subdirprivileged: RUN --privileged cat /proc/self/status | grep CapEff > output SAVE ARTIFACT output proc-status " > a/really/deep/subdir/Earthfile - DO +RUN_EARTHLY --earthfile=allow-privileged-import.earth --extra_args="--allow-privileged" --target=+test + DO +RUN_EARTHBUILD --earthfile=allow-privileged-import.earth --extra_args="--allow-privileged" --target=+test reject-privileged-import-test: - DO +RUN_EARTHLY --earthfile=reject-privileged-import.earth --should_fail=true --extra_args="--allow-privileged" --target=+test-reject-copy - DO +RUN_EARTHLY --earthfile=reject-privileged-import.earth --should_fail=true --extra_args="--allow-privileged" --target=+test-reject-cmd + DO +RUN_EARTHBUILD --earthfile=reject-privileged-import.earth --should_fail=true --extra_args="--allow-privileged" --target=+test-reject-copy + DO +RUN_EARTHBUILD --earthfile=reject-privileged-import.earth --should_fail=true --extra_args="--allow-privileged" --target=+test-reject-cmd pass-args-test: COPY pass-args-sub-dir.earth subdir/Earthfile COPY pass-args-root.earth Earthfile - DO +RUN_EARTHLY --target=./subdir+test-all --extra_args="--build-arg foo=bar" + DO +RUN_EARTHBUILD --target=./subdir+test-all --extra_args="--build-arg foo=bar" pass-args-defaults-test: - DO +RUN_EARTHLY --earthfile=pass-args-defaults.earth + DO +RUN_EARTHBUILD --earthfile=pass-args-defaults.earth # test arg can still be overridden from the cli RUN sed -i 's/hello/hellofromcli/g' Earthfile - DO +RUN_EARTHLY --extra_args="--build-arg foo=hellofromcli" + DO +RUN_EARTHBUILD --extra_args="--build-arg foo=hellofromcli" pass-args-no-builtins-via-function-test: - DO +RUN_EARTHLY --earthfile=pass-args-no-builtins-via-function.earth --target=+test --output_contains="MY_FUNC IS OK" + DO +RUN_EARTHBUILD --earthfile=pass-args-no-builtins-via-function.earth --target=+test --output_contains="MY_FUNC IS OK" required-arg-test: # test that build arg is required - DO +RUN_EARTHLY --earthfile=required-args.earth --should_fail=true --target=+test-accept-valid-required-arg + DO +RUN_EARTHBUILD --earthfile=required-args.earth --should_fail=true --target=+test-accept-valid-required-arg # test parser rejects required arg with default value - DO +RUN_EARTHLY --earthfile=required-args.earth --should_fail=true --target=+test-reject-default-val-required-arg - DO +RUN_EARTHLY --earthfile=required-args.earth --should_fail=true --extra_args="--build-arg req=val" --target=+test-reject-default-val-required-arg + DO +RUN_EARTHBUILD --earthfile=required-args.earth --should_fail=true --target=+test-reject-default-val-required-arg + DO +RUN_EARTHBUILD --earthfile=required-args.earth --should_fail=true --extra_args="--build-arg req=val" --target=+test-reject-default-val-required-arg # test valid required arg with build-arg provided - DO +RUN_EARTHLY --earthfile=required-args.earth --extra_args="--build-arg req=val" --target=+test-accept-valid-required-arg - DO +RUN_EARTHLY --earthfile=required-args.earth --target=+test-accept-valid-required-arg-build-arg-in-earthfile + DO +RUN_EARTHBUILD --earthfile=required-args.earth --extra_args="--build-arg req=val" --target=+test-accept-valid-required-arg + DO +RUN_EARTHBUILD --earthfile=required-args.earth --target=+test-accept-valid-required-arg-build-arg-in-earthfile fail-push-test: # test that an error code is correctly returned - DO +RUN_EARTHLY --earthfile=fail.earth --should_fail=true --verbose=0 --extra_args="--push" --target=+test-push \ + DO +RUN_EARTHBUILD --earthfile=fail.earth --should_fail=true --verbose=0 --extra_args="--push" --target=+test-push \ --output_contains="this-too-will-fail" fail-invalid-artifact-test: # test that the artifact fails to be copied - DO +RUN_EARTHLY --earthfile=fail-invalid-artifact.earth --should_fail=true --target="--artifact +test/foo /tmp/stuff" \ + DO +RUN_EARTHBUILD --earthfile=fail-invalid-artifact.earth --should_fail=true --target="--artifact +test/foo /tmp/stuff" \ --output_contains="cannot save artifact +test/foo, since it does not exist" wildcard-all: @@ -637,14 +637,14 @@ wildcard-all: wildcard-build: COPY --dir wildcard . - DO +RUN_EARTHLY --earthfile=wildcard-build.earth --target=+wildcard-build + DO +RUN_EARTHBUILD --earthfile=wildcard-build.earth --target=+wildcard-build RUN cat earthly.output | acbgrep 'hello world 1' RUN cat earthly.output | acbgrep 'hello world 2' RUN cat earthly.output | acbgrep 'hello world 3' RUN cat earthly.output | acbgrep -v 'not-test run' - DO +RUN_EARTHLY --earthfile=wildcard-build.earth --target=+wildcard-globstar --should_fail=true --output_contains="pattern not yet supported" + DO +RUN_EARTHBUILD --earthfile=wildcard-build.earth --target=+wildcard-globstar --should_fail=true --output_contains="pattern not yet supported" - DO +RUN_EARTHLY --earthfile=wildcard-build.earth --target=+wildcard-glob + DO +RUN_EARTHBUILD --earthfile=wildcard-build.earth --target=+wildcard-glob RUN cat earthly.output | acbgrep 'hello world 2' RUN cat earthly.output | acbgrep 'hello world 3' RUN cat earthly.output | acbgrep -v 'hello world 1' @@ -652,7 +652,7 @@ wildcard-build: wildcard-build-pwd: COPY wildcard . - DO +RUN_EARTHLY --earthfile=wildcard-build.earth --target=+wildcard-build-pwd + DO +RUN_EARTHBUILD --earthfile=wildcard-build.earth --target=+wildcard-build-pwd RUN cat earthly.output | acbgrep 'hello world 1' RUN cat earthly.output | acbgrep 'hello world 2' RUN cat earthly.output | acbgrep 'hello world 3' @@ -660,12 +660,12 @@ wildcard-build-pwd: wildcard-build-auto-skip: COPY wildcard . - DO +RUN_EARTHLY --earthfile=wildcard-build.earth --target=+wildcard-build-auto-skip + DO +RUN_EARTHBUILD --earthfile=wildcard-build.earth --target=+wildcard-build-auto-skip wildcard-build-pwd-rel: COPY wildcard subdir COPY wildcard-build.earth subdir/Earthfile - DO +RUN_EARTHLY --target=./subdir+wildcard-build-pwd + DO +RUN_EARTHBUILD --target=./subdir+wildcard-build-pwd RUN cat earthly.output | acbgrep 'hello world 1' RUN cat earthly.output | acbgrep 'hello world 2' RUN cat earthly.output | acbgrep 'hello world 3' @@ -676,20 +676,20 @@ wildcard-build-rel-dir: RUN mkdir -p /tmp/other-dir COPY wildcard /tmp/other-dir - DO +RUN_EARTHLY --earthfile=wildcard-build.earth --target=+wildcard-build-rel-dir + DO +RUN_EARTHBUILD --earthfile=wildcard-build.earth --target=+wildcard-build-rel-dir RUN cat earthly.output | acbgrep 'hello world 1' RUN cat earthly.output | acbgrep 'hello world 2' RUN cat earthly.output | acbgrep 'hello world 3' RUN cat earthly.output | acbgrep -v 'not-test run' wildcard-build-remote: - DO +RUN_EARTHLY --earthfile=wildcard-build.earth --target=+wildcard-remote + DO +RUN_EARTHBUILD --earthfile=wildcard-build.earth --target=+wildcard-remote RUN cat earthly.output | acbgrep 'hello world 1' RUN cat earthly.output | acbgrep 'hello world 2' RUN cat earthly.output | acbgrep 'hello world 3' RUN cat earthly.output | acbgrep -v 'not-test run' - DO +RUN_EARTHLY --earthfile=wildcard-build.earth --target=+wildcard-remote-glob + DO +RUN_EARTHBUILD --earthfile=wildcard-build.earth --target=+wildcard-remote-glob RUN cat earthly.output | acbgrep 'hello world 2' RUN cat earthly.output | acbgrep 'hello world 3' RUN cat earthly.output | acbgrep -v 'hello world 1' @@ -697,22 +697,22 @@ wildcard-build-remote: wildcard-copy: COPY --dir wildcard . - DO +RUN_EARTHLY --earthfile=wildcard-copy.earth --target=+wildcard-copy + DO +RUN_EARTHBUILD --earthfile=wildcard-copy.earth --target=+wildcard-copy RUN cat earthly.output | acbgrep -v 'not-test run' - DO +RUN_EARTHLY --earthfile=wildcard-copy.earth --target=+wildcard-globstar --should_fail=true --output_contains="pattern not yet supported" + DO +RUN_EARTHBUILD --earthfile=wildcard-copy.earth --target=+wildcard-globstar --should_fail=true --output_contains="pattern not yet supported" - DO +RUN_EARTHLY --earthfile=wildcard-copy.earth --target=+wildcard-glob + DO +RUN_EARTHBUILD --earthfile=wildcard-copy.earth --target=+wildcard-glob RUN cat earthly.output | acbgrep -v 'not-test run' wildcard-copy-pwd: COPY wildcard . - DO +RUN_EARTHLY --earthfile=wildcard-copy.earth --target=+wildcard-copy-pwd + DO +RUN_EARTHBUILD --earthfile=wildcard-copy.earth --target=+wildcard-copy-pwd RUN cat earthly.output | acbgrep -v 'not-test run' wildcard-copy-pwd-rel: COPY wildcard subdir COPY wildcard-copy.earth subdir/Earthfile - DO +RUN_EARTHLY --target=./subdir+wildcard-copy-pwd + DO +RUN_EARTHBUILD --target=./subdir+wildcard-copy-pwd RUN cat earthly.output | acbgrep -v 'not-test run' wildcard-copy-rel-dir: @@ -720,65 +720,65 @@ wildcard-copy-rel-dir: RUN mkdir -p /tmp/other-dir COPY wildcard /tmp/other-dir - DO +RUN_EARTHLY --earthfile=wildcard-copy.earth --target=+wildcard-copy-rel-dir + DO +RUN_EARTHBUILD --earthfile=wildcard-copy.earth --target=+wildcard-copy-rel-dir RUN cat earthly.output | acbgrep -v 'not-test run' wildcard-copy-remote: - DO +RUN_EARTHLY --earthfile=wildcard-copy.earth --target=+wildcard-remote + DO +RUN_EARTHBUILD --earthfile=wildcard-copy.earth --target=+wildcard-remote RUN cat earthly.output | acbgrep -v 'not-test run' - DO +RUN_EARTHLY --earthfile=wildcard-copy.earth --target=+wildcard-remote-glob + DO +RUN_EARTHBUILD --earthfile=wildcard-copy.earth --target=+wildcard-remote-glob RUN cat earthly.output | acbgrep -v 'not-test run' wildcard-copy-with-flags: COPY --dir wildcard . - DO +RUN_EARTHLY --earthfile=wildcard-copy.earth --target=+wildcard-if-exists + DO +RUN_EARTHBUILD --earthfile=wildcard-copy.earth --target=+wildcard-if-exists RUN cat earthly.output | acbgrep -v 'not-test run' - DO +RUN_EARTHLY --earthfile=wildcard-copy.earth --target=+wildcard-dir + DO +RUN_EARTHBUILD --earthfile=wildcard-copy.earth --target=+wildcard-dir RUN cat earthly.output | acbgrep -v 'not-test run' - DO +RUN_EARTHLY --earthfile=wildcard-copy.earth --target=+wildcard-with-artifact-args + DO +RUN_EARTHBUILD --earthfile=wildcard-copy.earth --target=+wildcard-with-artifact-args RUN cat earthly.output | acbgrep -v 'not-test run' - DO +RUN_EARTHLY --earthfile=wildcard-copy.earth --target=+wildcard-multi-with-artifact-args + DO +RUN_EARTHBUILD --earthfile=wildcard-copy.earth --target=+wildcard-multi-with-artifact-args RUN cat earthly.output | acbgrep -v 'not-test run' wildcard-copy-multi: COPY --dir wildcard . - DO +RUN_EARTHLY --earthfile=wildcard-copy.earth --target=+wildcard-multi + DO +RUN_EARTHBUILD --earthfile=wildcard-copy.earth --target=+wildcard-multi RUN cat earthly.output | acbgrep -v 'not-test run' - DO +RUN_EARTHLY --earthfile=wildcard-copy.earth --target=+wildcard-multi-mix + DO +RUN_EARTHBUILD --earthfile=wildcard-copy.earth --target=+wildcard-multi-mix RUN cat earthly.output | acbgrep -v 'not-test run' - DO +RUN_EARTHLY --earthfile=wildcard-copy.earth --target=+wildcard-multi-with-flags + DO +RUN_EARTHBUILD --earthfile=wildcard-copy.earth --target=+wildcard-multi-with-flags RUN cat earthly.output | acbgrep -v 'not-test run' wildcard-copy-with-args: COPY --dir wildcard . - DO +RUN_EARTHLY --earthfile=wildcard-copy.earth --target=+wildcard-with-args + DO +RUN_EARTHBUILD --earthfile=wildcard-copy.earth --target=+wildcard-with-args RUN cat earthly.output | acbgrep -v 'not-test run' - DO +RUN_EARTHLY --earthfile=wildcard-copy.earth --target=+wildcard-multi-with-args + DO +RUN_EARTHBUILD --earthfile=wildcard-copy.earth --target=+wildcard-multi-with-args RUN cat earthly.output | acbgrep -v 'not-test run' push-test: - DO +RUN_EARTHLY --earthfile=push.earth --target=+push-test \ + DO +RUN_EARTHBUILD --earthfile=push.earth --target=+push-test \ --output_contains="\(disabled\)" - DO +RUN_EARTHLY --earthfile=push.earth --extra_args="--push" --target=+push-test \ + DO +RUN_EARTHBUILD --earthfile=push.earth --extra_args="--push" --target=+push-test \ --output_contains="hello world" push-arg-test: - DO +RUN_EARTHLY --earthfile=push-arg.earth --target=+push-test \ + DO +RUN_EARTHBUILD --earthfile=push-arg.earth --target=+push-test \ --output_contains="shoop" - DO +RUN_EARTHLY --earthfile=push-arg.earth --extra_args="--push" --target=+push-test \ + DO +RUN_EARTHBUILD --earthfile=push-arg.earth --extra_args="--push" --target=+push-test \ --output_contains="real good" push-arg-indirect-test: - DO +RUN_EARTHLY --earthfile=push-arg.earth --target=+indirect-test \ + DO +RUN_EARTHBUILD --earthfile=push-arg.earth --target=+indirect-test \ --output_contains="shoop" - DO +RUN_EARTHLY --earthfile=push-arg.earth --extra_args="--push" --target=+indirect-test \ + DO +RUN_EARTHBUILD --earthfile=push-arg.earth --extra_args="--push" --target=+indirect-test \ --output_contains="shoop" ci-arg-test: - DO +RUN_EARTHLY --earthfile=ci-arg.earth --target=+ci-test \ + DO +RUN_EARTHBUILD --earthfile=ci-arg.earth --target=+ci-test \ --output_contains="local environment" - DO +RUN_EARTHLY --earthfile=ci-arg.earth --extra_args="--ci" --target=+ci-test \ + DO +RUN_EARTHBUILD --earthfile=ci-arg.earth --extra_args="--ci" --target=+ci-test \ --output_contains="CI environment" private-image-test: @@ -787,51 +787,51 @@ private-image-test: RUN --entrypoint echo hello world gen-dockerfile-test: - DO +RUN_EARTHLY --earthfile=gen-dockerfile.earth --extra_args="--no-output" --target=+all + DO +RUN_EARTHBUILD --earthfile=gen-dockerfile.earth --extra_args="--no-output" --target=+all comments-test: - DO +RUN_EARTHLY --earthfile=comments.earth --extra_args="--no-output" --target=+test + DO +RUN_EARTHBUILD --earthfile=comments.earth --extra_args="--no-output" --target=+test run-exec-form-test: - DO +RUN_EARTHLY --earthfile=run-exec-form.earth --extra_args="--no-output" --target=+test-exec-form-run + DO +RUN_EARTHBUILD --earthfile=run-exec-form.earth --extra_args="--no-output" --target=+test-exec-form-run chown-test: RUN echo "test" > ./a.txt - DO +RUN_EARTHLY --earthfile=chown.earth --target=+test + DO +RUN_EARTHBUILD --earthfile=chown.earth --target=+test dotenv-test: RUN echo "TEST_IN_DOTENV=this-should-not-appear-as-a-build-arg" >.env - DO +RUN_EARTHLY --earthfile=dotenv.earth --extra_args="--no-output" --target=+test-no-dotenv --output_contains="unexpected env .TEST_IN_DOTENV.: as of v0.7.0, --build-arg values must be defined in .arg" + DO +RUN_EARTHBUILD --earthfile=dotenv.earth --extra_args="--no-output" --target=+test-no-dotenv --output_contains="unexpected env .TEST_IN_DOTENV.: as of v0.7.0, --build-arg values must be defined in .arg" RUN touch .arg - DO +RUN_EARTHLY --earthfile=dotenv.earth --extra_args="--no-output" --target=+test-no-dotenv --output_does_not_contain="unexpected env .TEST_IN_DOTENV.: as of v0.7.0, --build-arg values must be defined in .arg" + DO +RUN_EARTHBUILD --earthfile=dotenv.earth --extra_args="--no-output" --target=+test-no-dotenv --output_does_not_contain="unexpected env .TEST_IN_DOTENV.: as of v0.7.0, --build-arg values must be defined in .arg" RUN echo "TEST_ARG_1=abracadabra" >.arg RUN echo "TEST_SEC_2=foo" >.secret RUN echo "TEST_ARG_3=bar" >>.arg - DO +RUN_EARTHLY --earthfile=dotenv.earth --extra_args="--no-output" --target=+test + DO +RUN_EARTHBUILD --earthfile=dotenv.earth --extra_args="--no-output" --target=+test # test non-standard .arg paths can be used RUN mv .arg .some-other-arg - DO +RUN_EARTHLY --earthfile=dotenv.earth --extra_args="--no-output" --target=+test-no-dotenv - DO +RUN_EARTHLY --earthfile=dotenv.earth --extra_args="--no-output --arg-file-path .some-other-arg" --target=+test - DO +RUN_EARTHLY --earthfile=dotenv.earth --extra_args="--no-output" --pre_command="export EARTHLY_ARG_FILE_PATH=.some-other-arg" --target=+test - DO +RUN_EARTHLY --earthfile=dotenv.earth --extra_args="--no-output --arg-file-path .this-should-fail" --should_fail="true" --target=+test --output_contains="open .this-should-fail: no such file or directory" - DO +RUN_EARTHLY --earthfile=dotenv.earth --extra_args="--no-output" --pre_command="export EARTHLY_ARG_FILE_PATH=.this-too-should-fail" --should_fail="true" --target=+test --output_contains="open .this-too-should-fail: no such file or directory" + DO +RUN_EARTHBUILD --earthfile=dotenv.earth --extra_args="--no-output" --target=+test-no-dotenv + DO +RUN_EARTHBUILD --earthfile=dotenv.earth --extra_args="--no-output --arg-file-path .some-other-arg" --target=+test + DO +RUN_EARTHBUILD --earthfile=dotenv.earth --extra_args="--no-output" --pre_command="export EARTHLY_ARG_FILE_PATH=.some-other-arg" --target=+test + DO +RUN_EARTHBUILD --earthfile=dotenv.earth --extra_args="--no-output --arg-file-path .this-should-fail" --should_fail="true" --target=+test --output_contains="open .this-should-fail: no such file or directory" + DO +RUN_EARTHBUILD --earthfile=dotenv.earth --extra_args="--no-output" --pre_command="export EARTHLY_ARG_FILE_PATH=.this-too-should-fail" --should_fail="true" --target=+test --output_contains="open .this-too-should-fail: no such file or directory" # --env-file takes precedence - DO +RUN_EARTHLY --earthfile=dotenv.earth --extra_args="--no-output --arg-file-path .some-other-arg" --pre_command="export EARTHLY_ARG_FILE_PATH=.this-should-be-ignored" --target=+test + DO +RUN_EARTHBUILD --earthfile=dotenv.earth --extra_args="--no-output --arg-file-path .some-other-arg" --pre_command="export EARTHLY_ARG_FILE_PATH=.this-should-be-ignored" --target=+test # test .secret can be renamed RUN mv .secret .some-other-secret - DO +RUN_EARTHLY --earthfile=dotenv.earth --extra_args="--no-output --arg-file-path .some-other-arg --secret-file-path .some-other-secret" --target=+test + DO +RUN_EARTHBUILD --earthfile=dotenv.earth --extra_args="--no-output --arg-file-path .some-other-arg --secret-file-path .some-other-secret" --target=+test # test .env values still affect earthly cli RUN echo EARTHLY_PUSH=1 > .env - DO +RUN_EARTHLY --earthfile=dotenv.earth --extra_args="--no-output" --target=+test-with-push + DO +RUN_EARTHBUILD --earthfile=dotenv.earth --extra_args="--no-output" --target=+test-with-push RUN mv .env .some-other-env - DO +RUN_EARTHLY --earthfile=dotenv.earth --extra_args="--no-output" --target=+test-no-push - DO +RUN_EARTHLY --earthfile=dotenv.earth --extra_args="--no-output --env-file-path .some-other-env" --target=+test-with-push + DO +RUN_EARTHBUILD --earthfile=dotenv.earth --extra_args="--no-output" --target=+test-no-push + DO +RUN_EARTHBUILD --earthfile=dotenv.earth --extra_args="--no-output --env-file-path .some-other-env" --target=+test-with-push stack-failure-test: RUN echo "TEST_ARG_1=abracadabra" >.arg @@ -840,12 +840,12 @@ stack-failure-test: RUN echo "THIS_IS_ALSO_A_SECRET=dont-display-this-either" >>.env # test for user accidentally putting a secret in .env (carried over from a v0.6.0 .env file) # test that only declared ARGs are displayed in output (and non-referenced .arg values which may actually be secrets aren't) - DO +RUN_EARTHLY --earthfile=stack-failure.earth --extra_args="--no-output" --output_contains="unknown flag .cause-interpreter-failure." --should_fail="true" --target=+fail + DO +RUN_EARTHBUILD --earthfile=stack-failure.earth --extra_args="--no-output" --output_contains="unknown flag .cause-interpreter-failure." --should_fail="true" --target=+fail RUN if grep dont-display-this earthly.output; then echo "secret was leaked!"; exit 1; fi RUN grep 'in.*+fail --TEST_ARG_1=abracadabra --TEST_ARG_2=foo' earthly.output # test missing target doesn't leak secret - DO +RUN_EARTHLY --earthfile=stack-failure.earth --extra_args="--no-output" --output_contains="target this-does-not-exist not found" --should_fail="true" --target=+this-does-not-exist + DO +RUN_EARTHBUILD --earthfile=stack-failure.earth --extra_args="--no-output" --output_contains="target this-does-not-exist not found" --should_fail="true" --target=+this-does-not-exist RUN if grep dont-display-this earthly.output; then echo "secret was leaked!"; exit 1; fi multi-stack-failure-test: @@ -853,42 +853,42 @@ multi-stack-failure-test: RUN echo "THIS_IS_SECRET=dont-display-this" >>.secret RUN echo "THIS_IS_ALSO_A_SECRET=dont-display-this-either" >>.env # test for user accidentally putting a secret in .env (carried over from a v0.6.0 .env file) - DO +RUN_EARTHLY --earthfile=multi-stack-failure.earth --extra_args="--no-output --build-arg BAR=bar" --output_contains="unknown flag .cause-interpreter-failure." --should_fail="true" --target=+fail + DO +RUN_EARTHBUILD --earthfile=multi-stack-failure.earth --extra_args="--no-output --build-arg BAR=bar" --output_contains="unknown flag .cause-interpreter-failure." --should_fail="true" --target=+fail RUN if grep dont-display-this earthly.output; then echo "secret was leaked!"; exit 1; fi RUN grep 'in.*+fail --BAR=bar --EMPTY= --FOO=foo' earthly.output - DO +RUN_EARTHLY --earthfile=multi-stack-failure.earth --extra_args="--no-output --build-arg BAR=bar --build-arg ANOTHER_ARG=another-value" --output_contains="unknown flag .cause-interpreter-failure." --should_fail="true" --target=+from-fail + DO +RUN_EARTHBUILD --earthfile=multi-stack-failure.earth --extra_args="--no-output --build-arg BAR=bar --build-arg ANOTHER_ARG=another-value" --output_contains="unknown flag .cause-interpreter-failure." --should_fail="true" --target=+from-fail RUN if grep dont-display-this earthly.output; then echo "secret was leaked!"; exit 1; fi RUN grep 'in.*+fail --BAR=bar --EMPTY= --FOO=foo' earthly.output RUN grep 'in.*+from-fail --ANOTHER_ARG=another-value' earthly.output env-test: - DO +RUN_EARTHLY --earthfile=env.earth --extra_args="--no-output" --target=+test + DO +RUN_EARTHBUILD --earthfile=env.earth --extra_args="--no-output" --target=+test env-home-test: - DO +RUN_EARTHLY --earthfile=env-home.earth --extra_args="--secret sshkey=not-actually-a-ssh-key --no-output" --target=+test + DO +RUN_EARTHBUILD --earthfile=env-home.earth --extra_args="--secret sshkey=not-actually-a-ssh-key --no-output" --target=+test no-cache-local-artifact-test: - DO +RUN_EARTHLY --earthfile=no-cache-local-artifact.earth --use_tmpfs=false --extra_args="--no-cache" --target=+test + DO +RUN_EARTHBUILD --earthfile=no-cache-local-artifact.earth --use_tmpfs=false --extra_args="--no-cache" --target=+test RUN mv file.txt old.txt - DO +RUN_EARTHLY --earthfile=no-cache-local-artifact.earth --use_tmpfs=false --extra_args="--no-cache" --target=+test + DO +RUN_EARTHBUILD --earthfile=no-cache-local-artifact.earth --use_tmpfs=false --extra_args="--no-cache" --target=+test RUN ! diff file.txt old.txt empty-git-test: RUN git init - DO +RUN_EARTHLY --earthfile=empty-git.earth --extra_args="--no-output" --target=+test-empty + DO +RUN_EARTHBUILD --earthfile=empty-git.earth --extra_args="--no-output" --target=+test-empty RUN git remote add origin https://github.com/earthly/earthly.git - DO +RUN_EARTHLY --earthfile=empty-git.earth --extra_args="--no-output" --target=+test-origin-no-hash + DO +RUN_EARTHBUILD --earthfile=empty-git.earth --extra_args="--no-output" --target=+test-origin-no-hash escape-test: RUN printf "content" >file-with-+.txt RUN printf "content" >regular-file.txt - DO +RUN_EARTHLY --earthfile=escape.earth + DO +RUN_EARTHBUILD --earthfile=escape.earth escape-dir-test: RUN mkdir ./dir-with-+-in-it COPY escape-dir2.earth ./dir-with-+-in-it/Earthfile - DO +RUN_EARTHLY --earthfile=escape-dir1.earth --extra_args="--no-output" --target=+test + DO +RUN_EARTHBUILD --earthfile=escape-dir1.earth --extra_args="--no-output" --target=+test eine-test-base: FROM docker:29.6.0-dind @@ -912,38 +912,38 @@ eine-privileged-test: END target-first-line: - DO +RUN_EARTHLY --earthfile=target-first-line.earth --extra_args="--no-output" --target=+test + DO +RUN_EARTHBUILD --earthfile=target-first-line.earth --extra_args="--no-output" --target=+test absolute-reference-with-relative: RUN mkdir -p /a/path/to/test/subdir # create a base Earthfile which is referenced by target-absolute-reference.earth RUN echo -e "VERSION 0.8\nFROM alpine:3.18\nRUN mkdir -p /dir/from/base" > /a/path/to/test/Earthfile - DO +RUN_EARTHLY --earthfile=absolute-reference-with-relative.earth --earthfile_dest=/a/path/to/test/subdir/Earthfile --extra_args="--no-output" --target=/a/path/to/test/subdir+test + DO +RUN_EARTHBUILD --earthfile=absolute-reference-with-relative.earth --earthfile_dest=/a/path/to/test/subdir/Earthfile --extra_args="--no-output" --target=/a/path/to/test/subdir+test end-comment: - DO +RUN_EARTHLY --earthfile=end-comment.earth --target=+test + DO +RUN_EARTHBUILD --earthfile=end-comment.earth --target=+test if-exists: - DO +RUN_EARTHLY --earthfile=if-exists.earth --target=+save-exist-local - DO +RUN_EARTHLY --earthfile=if-exists.earth --should_fail=true --target=+save-not-exist \ + DO +RUN_EARTHBUILD --earthfile=if-exists.earth --target=+save-exist-local + DO +RUN_EARTHBUILD --earthfile=if-exists.earth --should_fail=true --target=+save-not-exist \ --output_contains="save-not-exist" - DO +RUN_EARTHLY --earthfile=if-exists.earth --should_fail=true --target=+copy-not-exist \ + DO +RUN_EARTHBUILD --earthfile=if-exists.earth --should_fail=true --target=+copy-not-exist \ --output_contains="copy-not-exist" - DO +RUN_EARTHLY --earthfile=if-exists.earth --should_fail=true --target=+bad-wildcard-copy \ + DO +RUN_EARTHBUILD --earthfile=if-exists.earth --should_fail=true --target=+bad-wildcard-copy \ --output_contains="bad-wildcard-copy" - DO +RUN_EARTHLY --earthfile=if-exists.earth --should_fail=true --target=+bad-wildcard-save \ + DO +RUN_EARTHBUILD --earthfile=if-exists.earth --should_fail=true --target=+bad-wildcard-save \ --output_contains="bad-wildcard-save" - DO +RUN_EARTHLY --earthfile=if-exists.earth --target=+artifact-copy-exists - DO +RUN_EARTHLY --earthfile=if-exists.earth --target=+artifact-copy-not-exist - DO +RUN_EARTHLY --earthfile=if-exists.earth --target=+artifact-copy-not-exist-wildcard + DO +RUN_EARTHBUILD --earthfile=if-exists.earth --target=+artifact-copy-exists + DO +RUN_EARTHBUILD --earthfile=if-exists.earth --target=+artifact-copy-not-exist + DO +RUN_EARTHBUILD --earthfile=if-exists.earth --target=+artifact-copy-not-exist-wildcard RUN mkdir in && \ echo "this-file-does-exist" > ./in/this-file-does-exist && \ echo "so-does-this-one" > so-does-this-one - DO +RUN_EARTHLY --earthfile=if-exists.earth --target=+classic-copy-exists - DO +RUN_EARTHLY --earthfile=if-exists.earth --target=+classic-copy-not-exist + DO +RUN_EARTHBUILD --earthfile=if-exists.earth --target=+classic-copy-exists + DO +RUN_EARTHBUILD --earthfile=if-exists.earth --target=+classic-copy-not-exist file-copying: - DO +RUN_EARTHLY --earthfile=file-copying.earth + DO +RUN_EARTHBUILD --earthfile=file-copying.earth RUN find out-glob -printf '%P\n' | sort > result-glob RUN ls -la out-glob @@ -982,32 +982,32 @@ file-copying: RUN diff -ws expected-src-dest-dir-rename result-src-dest-dir-rename # Saving the root dir is not allowed. This should fail. - DO +RUN_EARTHLY --earthfile=file-copying.earth --should_fail=true --target=+test-dot-scratch + DO +RUN_EARTHBUILD --earthfile=file-copying.earth --should_fail=true --target=+test-dot-scratch save-artifact-dont-overwrite: RUN --no-cache echo hello > important-data - DO +RUN_EARTHLY --should_fail=true --earthfile=save-artifact-dont-overwrite.earth --extra_args="--version-flag-overrides=require-force-for-unsafe-saves" \ + DO +RUN_EARTHBUILD --should_fail=true --earthfile=save-artifact-dont-overwrite.earth --extra_args="--version-flag-overrides=require-force-for-unsafe-saves" \ --target=+dont-overwrite-abs-ref --post_command="> /tmp/output 2>&1" RUN cat /tmp/output | acbgrep 'Error.*path must be located under' - DO +RUN_EARTHLY --should_fail=true --earthfile=save-artifact-dont-overwrite.earth --extra_args="--version-flag-overrides=require-force-for-unsafe-saves" \ + DO +RUN_EARTHBUILD --should_fail=true --earthfile=save-artifact-dont-overwrite.earth --extra_args="--version-flag-overrides=require-force-for-unsafe-saves" \ --target=+dont-overwrite-rel-ref --post_command="> /tmp/output 2>&1" RUN cat /tmp/output | acbgrep 'Error.*path must be located under' - DO +RUN_EARTHLY --should_fail=true --earthfile=save-artifact-dont-overwrite.earth --extra_args="--version-flag-overrides=require-force-for-unsafe-saves" \ + DO +RUN_EARTHBUILD --should_fail=true --earthfile=save-artifact-dont-overwrite.earth --extra_args="--version-flag-overrides=require-force-for-unsafe-saves" \ --target=+dont-overwrite-rel-other-ref --post_command="> /tmp/output 2>&1" RUN cat /tmp/output | acbgrep 'Error.*path must be located under' - DO +RUN_EARTHLY --should_fail=true --earthfile=save-artifact-dont-overwrite.earth --extra_args="--version-flag-overrides=require-force-for-unsafe-saves" \ + DO +RUN_EARTHBUILD --should_fail=true --earthfile=save-artifact-dont-overwrite.earth --extra_args="--version-flag-overrides=require-force-for-unsafe-saves" \ --target=+dont-overwrite-root --post_command="> /tmp/output 2>&1" RUN cat /tmp/output | acbgrep 'Error.*path must be located under' - DO +RUN_EARTHLY --should_fail=true --earthfile=save-artifact-dont-overwrite.earth --extra_args="--version-flag-overrides=require-force-for-unsafe-saves" \ + DO +RUN_EARTHBUILD --should_fail=true --earthfile=save-artifact-dont-overwrite.earth --extra_args="--version-flag-overrides=require-force-for-unsafe-saves" \ --target=+dont-overwrite-root2 --post_command="> /tmp/output 2>&1" RUN cat /tmp/output | acbgrep 'Error.*path must be located under' - DO +RUN_EARTHLY --should_fail=true --earthfile=save-artifact-dont-overwrite.earth --extra_args="--version-flag-overrides=require-force-for-unsafe-saves" \ + DO +RUN_EARTHBUILD --should_fail=true --earthfile=save-artifact-dont-overwrite.earth --extra_args="--version-flag-overrides=require-force-for-unsafe-saves" \ --target=+dont-overwrite-root3 --post_command="> /tmp/output 2>&1" RUN cat /tmp/output | acbgrep 'Error.*path must be located under' @@ -1015,32 +1015,32 @@ save-artifact-dont-overwrite: save-artifact-force-overwrite: RUN --no-cache echo hello > /root/important-data - DO +RUN_EARTHLY --earthfile=save-artifact-overwrite.earth --extra_args="--version-flag-overrides=require-force-for-unsafe-saves" --target=+overwrite-root + DO +RUN_EARTHBUILD --earthfile=save-artifact-overwrite.earth --extra_args="--version-flag-overrides=require-force-for-unsafe-saves" --target=+overwrite-root RUN cat /root/base | acbgrep 88716877-039f-4dea-8ec3-84eb64f326c5 RUN cat /root/sub/data1 | acbgrep ff42c40d-034a-4855-8db7-febfa7322576 RUN cat /root/sub/data2 | acbgrep 2b4a653d-cdf6-4574-ac5e-f02bb6993365 RUN ! ls /root/important-data save-artifact-file-as-dot: - DO +RUN_EARTHLY --earthfile=save-artifact-dot.earth --target=+save-local-file-as-dot + DO +RUN_EARTHBUILD --earthfile=save-artifact-dot.earth --target=+save-local-file-as-dot RUN cat uuid | acbgrep eeee5a95-1506-428f-8ef0-94bbad5bd22b save-artifact-dir-as-dot: - DO +RUN_EARTHLY --earthfile=save-artifact-dot.earth --target=+save-local-dir-as-dot + DO +RUN_EARTHBUILD --earthfile=save-artifact-dot.earth --target=+save-local-dir-as-dot RUN cat the-data/file1 | acbgrep 7be91098-1823-41df-911b-2a8907fe5da7 RUN cat the-data/file2 | acbgrep b0359c17-d08b-411c-9db7-1333ef3673d0 run-no-cache: # Run twice to allow the second one to attempt to cache things - DO +RUN_EARTHLY --earthfile=run-no-cache.earth --use_tmpfs=false --target=+test + DO +RUN_EARTHBUILD --earthfile=run-no-cache.earth --use_tmpfs=false --target=+test # Fail if we cached any of the motd2 lines, which are after the --no-cache - DO +RUN_EARTHLY --earthfile=run-no-cache.earth --use_tmpfs=false --target=+test \ + DO +RUN_EARTHBUILD --earthfile=run-no-cache.earth --use_tmpfs=false --target=+test \ --grep_flags="-v" --output_contains="\\\*cached\\\* --> .* motd2" # Run twice to allow the second one to attempt to cache things - DO +RUN_EARTHLY --earthfile=run-no-cache.earth --use_tmpfs=false --target=+test-from + DO +RUN_EARTHBUILD --earthfile=run-no-cache.earth --use_tmpfs=false --target=+test-from # Fail if we cached any of the COPY motd2 lines, which are after the --no-cache - DO +RUN_EARTHLY --earthfile=run-no-cache.earth --use_tmpfs=false --target=+test-from \ + DO +RUN_EARTHBUILD --earthfile=run-no-cache.earth --use_tmpfs=false --target=+test-from \ --grep_flags="-v" --output_contains="\\\*cached\\\* --> .*motd2 \\\.\\\//" run-no-cache-save-artifact: @@ -1065,17 +1065,17 @@ done save-artifact-after-push: # test that save after push only outputs files before the RUN --push - DO +RUN_EARTHLY --earthfile=save-artifact-after-push.earth --target=+test + DO +RUN_EARTHBUILD --earthfile=save-artifact-after-push.earth --target=+test RUN test -f 1 && test "$(cat 1)" = "1" RUN ! test -f 2 RUN ! test -f surprise # test it is not possible to copy from a target containing a RUN --push - DO +RUN_EARTHLY --earthfile=save-artifact-after-push.earth --should_fail="true" --target=+copy-test \ + DO +RUN_EARTHBUILD --earthfile=save-artifact-after-push.earth --should_fail="true" --target=+copy-test \ --output_contains="not found" save-artifact-selective-test1: - DO +RUN_EARTHLY --earthfile=save-artifact-selective.earth --target=+test1 + DO +RUN_EARTHBUILD --earthfile=save-artifact-selective.earth --target=+test1 RUN test -f a && \ test -f b && \ test ! -f c && \ @@ -1083,7 +1083,7 @@ save-artifact-selective-test1: test ! -f e save-artifact-selective-test2: - DO +RUN_EARTHLY --earthfile=save-artifact-selective.earth --target=+test2 + DO +RUN_EARTHBUILD --earthfile=save-artifact-selective.earth --target=+test2 RUN test ! -f a && \ test ! -f b && \ test -f c && \ @@ -1091,7 +1091,7 @@ save-artifact-selective-test2: test ! -f e save-artifact-selective-test3: - DO +RUN_EARTHLY --earthfile=save-artifact-selective.earth --target=+test3 + DO +RUN_EARTHBUILD --earthfile=save-artifact-selective.earth --target=+test3 RUN test ! -f a && \ test ! -f b && \ test ! -f c && \ @@ -1099,7 +1099,7 @@ save-artifact-selective-test3: test ! -f e save-artifact-selective-test4: - DO +RUN_EARTHLY --earthfile=save-artifact-selective.earth --target=+test4 + DO +RUN_EARTHBUILD --earthfile=save-artifact-selective.earth --target=+test4 RUN test ! -f a && \ test ! -f b && \ test ! -f c && \ @@ -1107,7 +1107,7 @@ save-artifact-selective-test4: test -f e save-artifact-selective-test5: - DO +RUN_EARTHLY --earthfile=save-artifact-selective.earth --target=+test5 + DO +RUN_EARTHBUILD --earthfile=save-artifact-selective.earth --target=+test5 RUN test ! -f a && \ test ! -f b && \ test ! -f c && \ @@ -1125,7 +1125,7 @@ save-artifact-selective: BUILD +save-artifact-selective-test5 save-artifact-selective-referencing-remote-test1: - DO +RUN_EARTHLY --earthfile=save-artifact-selective-remote.earth --target=+test1 + DO +RUN_EARTHBUILD --earthfile=save-artifact-selective-remote.earth --target=+test1 RUN test -f a && \ test ! -f b && \ test ! -f c && \ @@ -1134,7 +1134,7 @@ save-artifact-selective-referencing-remote-test1: test ! -f testfile save-artifact-selective-referencing-remote-test2: - DO +RUN_EARTHLY --earthfile=save-artifact-selective-remote.earth --target=+test2 + DO +RUN_EARTHBUILD --earthfile=save-artifact-selective-remote.earth --target=+test2 RUN test ! -f a && \ test -f b && \ test ! -f c && \ @@ -1143,7 +1143,7 @@ save-artifact-selective-referencing-remote-test2: test ! -f testfile save-artifact-selective-referencing-remote-test3: - DO +RUN_EARTHLY --earthfile=save-artifact-selective-remote.earth --target=+test3 + DO +RUN_EARTHBUILD --earthfile=save-artifact-selective-remote.earth --target=+test3 RUN test ! -f a && \ test ! -f b && \ test -f c && \ @@ -1157,37 +1157,37 @@ save-artifact-selective-referencing-remote: BUILD +save-artifact-selective-referencing-remote-test3 save-remote-artifact-selective: - DO +RUN_EARTHLY --target=github.com/EarthBuild/test-remote/output/versioned:main+savelocal + DO +RUN_EARTHBUILD --target=github.com/EarthBuild/test-remote/output/versioned:main+savelocal RUN test -f ./output/testfile dont-save-indirect-remote-artifact: - DO +RUN_EARTHLY --target=github.com/EarthBuild/test-remote/output/versioned:main+copy-from-savelocal + DO +RUN_EARTHBUILD --target=github.com/EarthBuild/test-remote/output/versioned:main+copy-from-savelocal RUN test ! -f ./output/testfile remote-earthfile-must-have-version: - DO +RUN_EARTHLY --target=github.com/EarthBuild/test-remote/output/no-version:main+copy-from-savelocal --should_fail=true --output_contains="no version specified in github.com/EarthBuild/test-remote/output/no-version" + DO +RUN_EARTHBUILD --target=github.com/EarthBuild/test-remote/output/no-version:main+copy-from-savelocal --should_fail=true --output_contains="no version specified in github.com/EarthBuild/test-remote/output/no-version" RUN test ! -f ./output/testfile push-build: - DO +RUN_EARTHLY --earthfile=push-build.earth --target=+test --extra_args="--push" --post_command="> output 2>&1" + DO +RUN_EARTHBUILD --earthfile=push-build.earth --target=+test --extra_args="--push" --post_command="> output 2>&1" RUN cat output RUN cat output | perl -pe 'BEGIN {$status=1} END {exit $status} $status=0 if /\+test \| 0\n/;' RUN cat output | perl -pe 'BEGIN {$status=1} END {exit $status} $status=0 if /\+run1 \| 1\n/;' RUN cat output | perl -pe 'BEGIN {$status=1} END {exit $status} $status=0 if /\+run2 \| 2\n/;' test-earthly-mirror-was-setup: - DO +RUN_EARTHLY --verbose=false --earthfile=true.earth --target=+true --post_command="> /tmp/output 2>&1" + DO +RUN_EARTHBUILD --verbose=false --earthfile=true.earth --target=+true --post_command="> /tmp/output 2>&1" RUN acbgrep mirror.gcr.io /etc/buildkitd.toml build-arg-repeat: - DO +RUN_EARTHLY --earthfile=build-arg-repeat.earth --target=+build-all-1 + DO +RUN_EARTHBUILD --earthfile=build-arg-repeat.earth --target=+build-all-1 RUN test -f ./output/out-other-1 RUN test -f ./output/out-default-1 RUN cat ./output/out-other-1 | grep "A=other" RUN cat ./output/out-other-1 | grep "B=1" RUN cat ./output/out-default-1 | grep "A=default" RUN cat ./output/out-default-1 | grep "B=1" - DO +RUN_EARTHLY --earthfile=build-arg-repeat.earth --target=+build-all-2 + DO +RUN_EARTHBUILD --earthfile=build-arg-repeat.earth --target=+build-all-2 RUN test -f ./output/out-other-1 RUN test -f ./output/out-default-1 RUN cat ./output/out-other-1 | grep "A=other" @@ -1196,34 +1196,34 @@ build-arg-repeat: RUN cat ./output/out-default-1 | grep "B=1" arg-redeclare-error: - DO +RUN_EARTHLY --earthfile=arg-redeclare-error.earth --target=+test-working-global - DO +RUN_EARTHLY --earthfile=arg-redeclare-error.earth --target=+test-working-global-override - DO +RUN_EARTHLY --earthfile=arg-redeclare-error.earth --target=+test-working-default-override - DO +RUN_EARTHLY --earthfile=arg-redeclare-error.earth --target=+test-error-conflict --should_fail=true - DO +RUN_EARTHLY --earthfile=arg-redeclare-error.earth --target=+test-error-conflict-if --should_fail=true - DO +RUN_EARTHLY --earthfile=arg-global-after-local.earth --target=+base --should_fail=true --output_contains="Hint: 'foo' was already declared as a non-global ARG in this scope - did you mean to add '--global' to the original declaration?" + DO +RUN_EARTHBUILD --earthfile=arg-redeclare-error.earth --target=+test-working-global + DO +RUN_EARTHBUILD --earthfile=arg-redeclare-error.earth --target=+test-working-global-override + DO +RUN_EARTHBUILD --earthfile=arg-redeclare-error.earth --target=+test-working-default-override + DO +RUN_EARTHBUILD --earthfile=arg-redeclare-error.earth --target=+test-error-conflict --should_fail=true + DO +RUN_EARTHBUILD --earthfile=arg-redeclare-error.earth --target=+test-error-conflict-if --should_fail=true + DO +RUN_EARTHBUILD --earthfile=arg-global-after-local.earth --target=+base --should_fail=true --output_contains="Hint: 'foo' was already declared as a non-global ARG in this scope - did you mean to add '--global' to the original declaration?" arg-scope-requires-shellout-anywhere: - DO +RUN_EARTHLY --earthfile=arg-scope-requires-shellout-anywhere.earth --target=+base --should_fail=true + DO +RUN_EARTHBUILD --earthfile=arg-scope-requires-shellout-anywhere.earth --target=+base --should_fail=true arg-set: - DO +RUN_EARTHLY --earthfile=arg-set.earth --target=+base --should_fail=true --output_contains="Hint: 'foo' is an ARG and cannot be used with SET - try declaring 'LET foo = \\\$foo' first" + DO +RUN_EARTHBUILD --earthfile=arg-set.earth --target=+base --should_fail=true --output_contains="Hint: 'foo' is an ARG and cannot be used with SET - try declaring 'LET foo = \\\$foo' first" if: RUN touch exists-locally - DO +RUN_EARTHLY --earthfile=if.earth + DO +RUN_EARTHBUILD --earthfile=if.earth for: - DO +RUN_EARTHLY --earthfile=for.earth + DO +RUN_EARTHBUILD --earthfile=for.earth first-command: - DO +RUN_EARTHLY --earthfile=first-command.earth --target=+all-positive - DO +RUN_EARTHLY --earthfile=first-command.earth --should_fail=true --target=+start-with-run - DO +RUN_EARTHLY --earthfile=first-command.earth --should_fail=true --target=+start-with-if - DO +RUN_EARTHLY --earthfile=first-command.earth --should_fail=true --target=+start-with-non-from-target + DO +RUN_EARTHBUILD --earthfile=first-command.earth --target=+all-positive + DO +RUN_EARTHBUILD --earthfile=first-command.earth --should_fail=true --target=+start-with-run + DO +RUN_EARTHBUILD --earthfile=first-command.earth --should_fail=true --target=+start-with-if + DO +RUN_EARTHBUILD --earthfile=first-command.earth --should_fail=true --target=+start-with-non-from-target platform-output: - DO +RUN_EARTHLY --earthfile=platform-output.earth + DO +RUN_EARTHBUILD --earthfile=platform-output.earth RUN test -f ./out-arm RUN test -f ./out-arm64 RUN ! test -f ./out-amd64 @@ -1231,50 +1231,50 @@ platform-output: # command tests the 0.7 functionality of the COMMAND keyword, it is here for backward compatibility command: RUN echo "hello command" >./message.txt - DO +RUN_EARTHLY --earthfile=command.earth --target=+all-positive - DO +RUN_EARTHLY --earthfile=command.earth --should_fail=true --target=+test-function-fails + DO +RUN_EARTHBUILD --earthfile=command.earth --target=+all-positive + DO +RUN_EARTHBUILD --earthfile=command.earth --should_fail=true --target=+test-function-fails command-explicit-global: - DO +RUN_EARTHLY --earthfile=command-explicit-global.earth + DO +RUN_EARTHBUILD --earthfile=command-explicit-global.earth function: RUN echo "hello function" >./message.txt - DO +RUN_EARTHLY --earthfile=function.earth --target=+all-positive - DO +RUN_EARTHLY --earthfile=function.earth --should_fail=true --target=+test-command-fails + DO +RUN_EARTHBUILD --earthfile=function.earth --target=+all-positive + DO +RUN_EARTHBUILD --earthfile=function.earth --should_fail=true --target=+test-command-fails function-nested-global: - DO +RUN_EARTHLY --earthfile=function-nested-global.earth --target="+test-overriding --foo=expected" + DO +RUN_EARTHBUILD --earthfile=function-nested-global.earth --target="+test-overriding --foo=expected" duplicate: - DO +RUN_EARTHLY --earthfile=duplicate-target-names.earth --should_fail=true --target=+duplicate + DO +RUN_EARTHBUILD --earthfile=duplicate-target-names.earth --should_fail=true --target=+duplicate reserved: - DO +RUN_EARTHLY --earthfile=reserved-target-names.earth --should_fail=true --target=+reserved + DO +RUN_EARTHBUILD --earthfile=reserved-target-names.earth --should_fail=true --target=+reserved quotes-test: - DO +RUN_EARTHLY --earthfile=quotes.earth + DO +RUN_EARTHBUILD --earthfile=quotes.earth quotes-test-extra: COPY expected-quotes.txt expected - DO +RUN_EARTHLY --earthfile=quotes-extra.earth --target=+test + DO +RUN_EARTHBUILD --earthfile=quotes-extra.earth --target=+test RUN diff actual expected new-args: - DO +RUN_EARTHLY --earthfile=new-args.earth + DO +RUN_EARTHBUILD --earthfile=new-args.earth import: - DO +RUN_EARTHLY --earthfile=import.earth + DO +RUN_EARTHBUILD --earthfile=import.earth from-dockerfile-arg: - DO +RUN_EARTHLY --earthfile=from-dockerfile-arg.earth --target=+all + DO +RUN_EARTHBUILD --earthfile=from-dockerfile-arg.earth --target=+all RUN test "$(cat ./arg-value-default)" = "default" RUN test "$(cat ./arg-value-foo)" = "foo" RUN test "$(cat ./arg-value-bar)" = "bar" from-dockerfile-dockerignore: # feature flag off - DO +RUN_EARTHLY --earthfile=from-dockerfile-dockerignore.earth --target="+create-files --with_docker_ignore=\"true\"" - DO +RUN_EARTHLY --earthfile=from-dockerfile-dockerignore.earth --target=+image + DO +RUN_EARTHBUILD --earthfile=from-dockerfile-dockerignore.earth --target="+create-files --with_docker_ignore=\"true\"" + DO +RUN_EARTHBUILD --earthfile=from-dockerfile-dockerignore.earth --target=+image RUN test "$(cat output)" = "a.txt b.txt c.txt" @@ -1284,53 +1284,53 @@ c.txt" RUN sed -i "1s/VERSION \(.*\)/VERSION --use-docker-ignore \1/" Earthfile # no ignore files - DO +RUN_EARTHLY --target=+create-files - DO +RUN_EARTHLY --target=+image + DO +RUN_EARTHBUILD --target=+create-files + DO +RUN_EARTHBUILD --target=+image RUN test "$(cat output)" = "a.txt b.txt c.txt" RUN rm -rf .*ignore output # with only .dockerignore present - DO +RUN_EARTHLY --target="+create-files --with_docker_ignore=\"true\"" - DO +RUN_EARTHLY --target=+image + DO +RUN_EARTHBUILD --target="+create-files --with_docker_ignore=\"true\"" + DO +RUN_EARTHBUILD --target=+image RUN test "$(cat output)" = "b.txt c.txt" RUN rm -rf .*ignore output # with .earthlyignore present - DO +RUN_EARTHLY --target="+create-files --with_docker_ignore=\"true\" --with_earthly_ignore=\"true\"" - DO +RUN_EARTHLY --target=+image + DO +RUN_EARTHBUILD --target="+create-files --with_docker_ignore=\"true\" --with_earthly_ignore=\"true\"" + DO +RUN_EARTHBUILD --target=+image RUN test "$(cat output)" = "a.txt c.txt" RUN rm -rf .*ignore output # with .earthignore present - DO +RUN_EARTHLY --target="+create-files --with_docker_ignore=\"true\" --with_earth_ignore=\"true\"" - DO +RUN_EARTHLY --target=+image + DO +RUN_EARTHBUILD --target="+create-files --with_docker_ignore=\"true\" --with_earth_ignore=\"true\"" + DO +RUN_EARTHBUILD --target=+image RUN test "$(cat output)" = "a.txt b.txt" RUN rm -rf .*ignore output cache-mount-arg: - DO +RUN_EARTHLY --earthfile=cache-mount-arg.earth --use_tmpfs=false --target="+b-nomount --MYARG=123" - DO +RUN_EARTHLY --earthfile=cache-mount-arg.earth --use_tmpfs=false --target="+b-nomount --MYARG=1234" --post_command="2>output-nomount.txt" + DO +RUN_EARTHBUILD --earthfile=cache-mount-arg.earth --use_tmpfs=false --target="+b-nomount --MYARG=123" + DO +RUN_EARTHBUILD --earthfile=cache-mount-arg.earth --use_tmpfs=false --target="+b-nomount --MYARG=1234" --post_command="2>output-nomount.txt" RUN cat output-nomount.txt RUN cat output-nomount.txt | grep '\*cached\* --> RUN echo Doing something 1' RUN cat output-nomount.txt | grep '\*cached\* --> RUN echo Doing something 2'; test "$?" != 0 - DO +RUN_EARTHLY --earthfile=cache-mount-arg.earth --use_tmpfs=false --target="+b --MYARG=abc" - DO +RUN_EARTHLY --earthfile=cache-mount-arg.earth --use_tmpfs=false --target="+b --MYARG=abcd" --post_command="2>output.txt" + DO +RUN_EARTHBUILD --earthfile=cache-mount-arg.earth --use_tmpfs=false --target="+b --MYARG=abc" + DO +RUN_EARTHBUILD --earthfile=cache-mount-arg.earth --use_tmpfs=false --target="+b --MYARG=abcd" --post_command="2>output.txt" RUN cat output.txt RUN cat output.txt | grep '\*cached\* --> RUN echo Doing something 1' RUN cat output.txt | grep '\*cached\* --> RUN echo Doing something 2'; test "$?" != 0 - DO +RUN_EARTHLY --earthfile=cache-mount-arg.earth --use_tmpfs=false --target="+b-with-arg --MYARG=def" - DO +RUN_EARTHLY --earthfile=cache-mount-arg.earth --use_tmpfs=false --target="+b-with-arg --MYARG=defg" --post_command="2>output.txt" + DO +RUN_EARTHBUILD --earthfile=cache-mount-arg.earth --use_tmpfs=false --target="+b-with-arg --MYARG=def" + DO +RUN_EARTHBUILD --earthfile=cache-mount-arg.earth --use_tmpfs=false --target="+b-with-arg --MYARG=defg" --post_command="2>output.txt" RUN cat output.txt RUN cat output.txt | grep '\*cached\* --> RUN echo Doing something 1'; test "$?" != 0 RUN cat output.txt | grep '\*cached\* --> RUN echo Doing something 2'; test "$?" != 0 true-false-flag: - DO +RUN_EARTHLY --earthfile=true-false-flag.earth --extra_args="--allow-privileged" --post_command=">output.txt 2>&1" + DO +RUN_EARTHBUILD --earthfile=true-false-flag.earth --extra_args="--allow-privileged" --post_command=">output.txt 2>&1" RUN cat output.txt # test that the two privileged commands were run RUN test $( cat output.txt | grep -v echo | grep "I have the power" | wc -l) = "2" @@ -1338,13 +1338,13 @@ true-false-flag: RUN test $( cat output.txt | grep -v echo | grep "fight the power" | wc -l) = "1" true-false-flag-invalid: - DO +RUN_EARTHLY --earthfile=true-false-flag-invalid.earth --verbose=0 --should_fail=true --target=+run-false --post_command="2>output.txt" + DO +RUN_EARTHBUILD --earthfile=true-false-flag-invalid.earth --verbose=0 --should_fail=true --target=+run-false --post_command="2>output.txt" RUN cat output.txt RUN cat output.txt | grep "did not complete successfully. Exit code 1" - DO +RUN_EARTHLY --earthfile=true-false-flag-invalid.earth --verbose=0 --should_fail=true --target=+run-false-with-args --post_command="2>output2.txt" + DO +RUN_EARTHBUILD --earthfile=true-false-flag-invalid.earth --verbose=0 --should_fail=true --target=+run-false-with-args --post_command="2>output2.txt" RUN cat output2.txt RUN cat output2.txt | grep "did not complete successfully. Exit code 1" - DO +RUN_EARTHLY --earthfile=true-false-flag-invalid.earth --verbose=0 --should_fail=true --target=+run-maybe --post_command="2>output3.txt" + DO +RUN_EARTHBUILD --earthfile=true-false-flag-invalid.earth --verbose=0 --should_fail=true --target=+run-maybe --post_command="2>output3.txt" RUN cat output3.txt RUN cat output3.txt | grep 'invalid argument for flag .*--no-cache.*expected bool' @@ -1359,7 +1359,7 @@ implicit-ignores: echo "ignored/" > .earthlyignore && \ echo "test" > notignored/test && \ echo "test" > ignored/test - DO +RUN_EARTHLY --earthfile=no-implicit-ignore.earth + DO +RUN_EARTHBUILD --earthfile=no-implicit-ignore.earth help: # tests the hidden `--buildkit-volume-name` flag is only displayed when EARTHLY_SHOW_HIDDEN is enabled @@ -1371,7 +1371,7 @@ help: doc: # Detailed doc formatting coverage lives in cmd/earthly/subcmd/doc_cmds_test.go. # Keep this as a full CLI smoke test. - DO +RUN_EARTHLY --earthfile=target-docs.earth --extra_args="doc" --target="" --post_command=">output.txt" + DO +RUN_EARTHBUILD --earthfile=target-docs.earth --extra_args="doc" --target="" --post_command=">output.txt" RUN pcregrep --multiline "TARGETS: \+documented-target documented-target is a target with documentation @@ -1382,7 +1382,7 @@ doc: doc-recipe-block: # Detailed recipe block output coverage lives in cmd/earthly/subcmd/doc_cmds_test.go. # Keep this as a full CLI smoke test for the --long path. - DO +RUN_EARTHLY --earthfile=doc-recipe-block.earth --extra_args="doc --long" --target="" --post_command=">output.txt" + DO +RUN_EARTHBUILD --earthfile=doc-recipe-block.earth --extra_args="doc --long" --target="" --post_command=">output.txt" RUN grep 'REQUIRED ARGS:' output.txt RUN grep 'IMAGES:' output.txt @@ -1399,7 +1399,7 @@ ls-subdir: RUN diff expected actual no-network: - DO +RUN_EARTHLY --earthfile=no-network.earth --target=+test --should_fail=true --output_contains="wget: bad address .earthly.dev." + DO +RUN_EARTHBUILD --earthfile=no-network.earth --target=+test --should_fail=true --output_contains="wget: bad address .earthly.dev." ssh: ARG FRONTEND=docker @@ -1430,27 +1430,27 @@ server: kill -9 $webserverpid || true host: - DO +RUN_EARTHLY --earthfile=host.earth --target=+add-single-host - DO +RUN_EARTHLY --earthfile=host.earth --target=+add-multiple-host - DO +RUN_EARTHLY --earthfile=host.earth --target=+add-ipv6 - DO +RUN_EARTHLY --earthfile=host.earth --target=+expand-args + DO +RUN_EARTHBUILD --earthfile=host.earth --target=+add-single-host + DO +RUN_EARTHBUILD --earthfile=host.earth --target=+add-multiple-host + DO +RUN_EARTHBUILD --earthfile=host.earth --target=+add-ipv6 + DO +RUN_EARTHBUILD --earthfile=host.earth --target=+expand-args host-invalid: - DO +RUN_EARTHLY --earthfile=host.earth --should_fail=true --target=+invalid-ip --output_contains="invalid HOST ip" - DO +RUN_EARTHLY --earthfile=host.earth --should_fail=true --target=+only-host --output_contains="invalid number of arguments for HOST" - DO +RUN_EARTHLY --earthfile=host.earth --should_fail=true --target=+only-ip --output_contains="invalid number of arguments for HOST" + DO +RUN_EARTHBUILD --earthfile=host.earth --should_fail=true --target=+invalid-ip --output_contains="invalid HOST ip" + DO +RUN_EARTHBUILD --earthfile=host.earth --should_fail=true --target=+only-host --output_contains="invalid number of arguments for HOST" + DO +RUN_EARTHBUILD --earthfile=host.earth --should_fail=true --target=+only-ip --output_contains="invalid number of arguments for HOST" mtime: RUN echo test > file - DO +RUN_EARTHLY --earthfile=mtime.earth + DO +RUN_EARTHBUILD --earthfile=mtime.earth build-after-from: - DO +RUN_EARTHLY --earthfile=build-after-from.earth --target=+all + DO +RUN_EARTHBUILD --earthfile=build-after-from.earth --target=+all RUN test -f ./hello.txt test-works-without-earthly-server: # first warm-up the cache - DO +RUN_EARTHLY --verbose=false --earthfile=true.earth --target=+true + DO +RUN_EARTHBUILD --verbose=false --earthfile=true.earth --target=+true RUN echo "#!/bin/sh set -e @@ -1463,32 +1463,32 @@ test-works-without-earthly-server: done date +%s > start-time " > /tmp/precommand && chmod +x /tmp/precommand - DO +RUN_EARTHLY --verbose=false --pre_command=/tmp/precommand --post_command=" && date +%s > end-time" --earthfile=true.earth --target=+true + DO +RUN_EARTHBUILD --verbose=false --pre_command=/tmp/precommand --post_command=" && date +%s > end-time" --earthfile=true.earth --target=+true RUN if grep "failed sending analytics" earthly.output; then echo "analytics should have failed silently, but didnt" && exit 1; fi RUN export duration=$(echo "$(cat end-time) - $(cat start-time)" | bc) && test "$duration" -lt 120 || (echo "it took $duration seconds to run +true, which is too long" && exit 1) test-init-unsupported: COPY yaml-project yaml-project WORKDIR ./yaml-project - DO +RUN_EARTHLY --extra_args "init" --should_fail=true --output_contains "no supported projects found" + DO +RUN_EARTHBUILD --extra_args "init" --should_fail=true --output_contains "no supported projects found" test-init-golang: COPY go-project go-project WORKDIR ./go-project - DO +RUN_EARTHLY --extra_args "init" + DO +RUN_EARTHBUILD --extra_args "init" RUN if [ "$(tail -c 2 Earthfile)" == "$(printf '\n\n')" ]; then \ echo "Earthfile (from 'earthly init') has trailing newlines"; \ exit 1; \ fi - DO +RUN_EARTHLY --target "+build" - DO +RUN_EARTHLY --target "+test" + DO +RUN_EARTHBUILD --target "+build" + DO +RUN_EARTHBUILD --target "+test" test-aws-flag-envs: ENV AWS_ACCESS_KEY_ID=aws-access-key ENV AWS_SECRET_ACCESS_KEY=aws-secret-key ENV AWS_SESSION_TOKEN=aws-token ENV AWS_REGION=us-west-1 - DO +RUN_EARTHLY --earthfile=aws-flag.earth --target=+basic + DO +RUN_EARTHBUILD --earthfile=aws-flag.earth --target=+basic RUN cat earthly.output | acbgrep "AWS_SESSION_TOKEN=aws-token" RUN cat earthly.output | acbgrep "AWS_ACCESS_KEY_ID=aws-access-key" RUN cat earthly.output | acbgrep "AWS_REGION=us-west-1" @@ -1498,16 +1498,16 @@ test-aws-flag-envs: # # test-aws-oidc tests expected errors for misusing of oidc flag # # for happy path test go to /tests/oidc # test-aws-oidc: -# DO +RUN_EARTHLY --earthfile=aws-flag.earth --target=+oidc --should_fail=true --output_contains="RUN --aws-oidc requires the --run-with-aws-oidc feature flag" -# DO +RUN_EARTHLY --earthfile=aws-flag.earth --extra_args="--allow-privileged" --target=+oidc-with-docker --should_fail=true --output_contains="RUN --aws-oidc requires the --run-with-aws-oidc feature flag" +# DO +RUN_EARTHBUILD --earthfile=aws-flag.earth --target=+oidc --should_fail=true --output_contains="RUN --aws-oidc requires the --run-with-aws-oidc feature flag" +# DO +RUN_EARTHBUILD --earthfile=aws-flag.earth --extra_args="--allow-privileged" --target=+oidc-with-docker --should_fail=true --output_contains="RUN --aws-oidc requires the --run-with-aws-oidc feature flag" # # enable flag # RUN sed -i "1s/VERSION \(.*\)/VERSION --run-with-aws-oidc \1/" Earthfile # # empty oidc flag -# DO +RUN_EARTHLY --target=+oidc --should_fail=true --output_contains="role-arn must be specified" -# DO +RUN_EARTHLY --extra_args="--allow-privileged" --target=+oidc-with-docker --should_fail=true --output_contains="role-arn must be specified" +# DO +RUN_EARTHBUILD --target=+oidc --should_fail=true --output_contains="role-arn must be specified" +# DO +RUN_EARTHBUILD --extra_args="--allow-privileged" --target=+oidc-with-docker --should_fail=true --output_contains="role-arn must be specified" # # invalid oidc flag -# DO +RUN_EARTHLY --target=+oidc --extra_args="--build-arg OIDC=\"foo=bar\"" --should_fail=true --output_contains="invalid value for oidc flag: 1 error(s) decoding" -# DO +RUN_EARTHLY --extra_args="--allow-privileged" --target=+oidc-with-docker --extra_args="--build-arg OIDC=\"foo=bar\"" --should_fail=true --output_contains="invalid value for oidc flag: 1 error(s) decoding" +# DO +RUN_EARTHBUILD --target=+oidc --extra_args="--build-arg OIDC=\"foo=bar\"" --should_fail=true --output_contains="invalid value for oidc flag: 1 error(s) decoding" +# DO +RUN_EARTHBUILD --extra_args="--allow-privileged" --target=+oidc-with-docker --extra_args="--build-arg OIDC=\"foo=bar\"" --should_fail=true --output_contains="invalid value for oidc flag: 1 error(s) decoding" test-aws-flag-configs: RUN mkdir -p /root/.aws @@ -1517,116 +1517,116 @@ aws_secret_access_key = aws-secret-key aws_session_token = aws-token" > /root/.aws/credentials RUN echo "[default] region = us-west-1" > /root/.aws/config - DO +RUN_EARTHLY --earthfile=aws-flag.earth --target=+basic + DO +RUN_EARTHBUILD --earthfile=aws-flag.earth --target=+basic RUN cat earthly.output | acbgrep "AWS_SESSION_TOKEN=aws-token" RUN cat earthly.output | acbgrep "AWS_ACCESS_KEY_ID=aws-access-key" RUN cat earthly.output | acbgrep "AWS_REGION=us-west-1" RUN cat earthly.output | acbgrep "AWS_SECRET_ACCESS_KEY=aws-secret-key" test-aws-flag-none: - DO +RUN_EARTHLY --earthfile=aws-flag.earth --target=+basic --should_fail=true --output_contains="failed to load AWS credentials" + DO +RUN_EARTHBUILD --earthfile=aws-flag.earth --target=+basic --should_fail=true --output_contains="failed to load AWS credentials" test-reserved-label: - DO +RUN_EARTHLY \ + DO +RUN_EARTHBUILD \ --earthfile=reserved-label.earth \ --target=+test1 \ --should_fail=true \ --output_contains="LABEL keys starting with .dev.earthly.. are reserved" test-cache-mount-mode: - DO +RUN_EARTHLY \ + DO +RUN_EARTHBUILD \ --earthfile=cache-mount-mode.earth \ --target=+test-chmod \ --post_command="--mode=0004 " \ --output_contains="d------r-- /cache-folder" - DO +RUN_EARTHLY \ + DO +RUN_EARTHBUILD \ --earthfile=cache-mount-mode.earth \ --target=+test-chmod \ --post_command="--mode=0777 " \ --output_contains="drwxrwxrwx /cache-folder" - DO +RUN_EARTHLY \ + DO +RUN_EARTHBUILD \ --earthfile=cache-mount-mode.earth \ --target=+test-mode \ --post_command="--mode=0777 " \ --output_contains="drwxrwxrwx /cache-folder" - DO +RUN_EARTHLY \ + DO +RUN_EARTHBUILD \ --earthfile=cache-mount-mode.earth \ --target=+test-default \ --output_contains="drw-r--r-- /cache-folder" test-cache-mode: - DO +RUN_EARTHLY \ + DO +RUN_EARTHBUILD \ --earthfile=cache-mode.earth \ --target=+test \ --post_command="--mode=0004 " \ --output_contains="d------r-- /cache-folder" - DO +RUN_EARTHLY \ + DO +RUN_EARTHBUILD \ --earthfile=cache-mode.earth \ --target=+test \ --post_command="--mode=0777 " \ --output_contains="drwxrwxrwx /cache-folder" - DO +RUN_EARTHLY \ + DO +RUN_EARTHBUILD \ --earthfile=cache-mode.earth \ --target=+test-default \ --output_contains="drw-r--r-- /cache-folder" test-shared-cache: COPY --dir shared-cache/lib1 lib1 - DO +RUN_EARTHLY \ + DO +RUN_EARTHBUILD \ --earthfile=shared-cache/Earthfile \ --target=+test \ --extra_args=" --secret=content=filecontents " \ --output_contains="filecontents" test-cache-persist: - DO +RUN_EARTHLY \ + DO +RUN_EARTHBUILD \ --earthfile=cache-persist.earth \ --target=+test-persisted \ --output_contains="| test persisted ok" - DO +RUN_EARTHLY \ + DO +RUN_EARTHBUILD \ --earthfile=cache-persist.earth \ --target=+test-non-persisted \ --output_contains="| test non persisted ok" - DO +RUN_EARTHLY \ + DO +RUN_EARTHBUILD \ --earthfile=cache-persist-no-flag.earth \ --target=+test-persisted \ --output_contains="| test persisted ok" test-visited-upfront-hash-collection: - DO +RUN_EARTHLY \ + DO +RUN_EARTHBUILD \ --earthfile=visited-upfront-hash-collection.earth \ --target=+parallel DO +TEST_PARALLELIZATION - DO +RUN_EARTHLY \ + DO +RUN_EARTHBUILD \ --earthfile=visited-upfront-hash-collection.earth \ --target=+parallel-dynamic-arg DO +TEST_PARALLELIZATION - DO +RUN_EARTHLY \ + DO +RUN_EARTHBUILD \ --earthfile=visited-upfront-hash-collection.earth \ --target=+parallel-dynamic-let DO +TEST_PARALLELIZATION - DO +RUN_EARTHLY \ + DO +RUN_EARTHBUILD \ --earthfile=visited-upfront-hash-collection.earth \ --target=+parallel-dynamic-set DO +TEST_PARALLELIZATION test-exec-stats: - DO +RUN_EARTHLY \ + DO +RUN_EARTHBUILD \ --earthfile=stats.earth \ --target=+sleep \ --extra_args=" --exec-stats " \ --output_contains="total CPU:.*total memory:.*" test-platform-expansion: - DO +RUN_EARTHLY --earthfile=platform-expansion.earth + DO +RUN_EARTHBUILD --earthfile=platform-expansion.earth # test-ssh-command-config-via-remote-target tests that we can set a custom ssh_command # The test intentionally sets a bad cipher type, then tests that buildkit fails, and the failure message @@ -1643,7 +1643,7 @@ ssh-add /root/dont-steal-my-key earthly --config \$earthly_config config git \"{github.com: {auth: ssh, user: git, strict_host_key_checking: false, ssh_command: ssh -c badcipher}}\" earthly --config \$earthly_config github.com/earthly/earthly+base 2>&1 | tee output.txt; " >/tmp/run-earthly-with-bad-ssh-cipher && chmod +x /tmp/run-earthly-with-bad-ssh-cipher - DO +RUN_EARTHLY --exec_cmd=/tmp/run-earthly-with-bad-ssh-cipher + DO +RUN_EARTHBUILD --exec_cmd=/tmp/run-earthly-with-bad-ssh-cipher RUN cat output.txt | acbgrep "Unknown cipher type 'badcipher'" test-ssh-command-config-via-git-clone-earthfile-command: @@ -1665,7 +1665,7 @@ ssh-add /root/dont-steal-my-key earthly --config \$earthly_config config git \"{github.com: {auth: ssh, user: git, strict_host_key_checking: false, ssh_command: ssh -c badcipher}}\" earthly --config \$earthly_config +test 2>&1 | tee output.txt; " >/tmp/run-earthly-with-bad-ssh-cipher && chmod +x /tmp/run-earthly-with-bad-ssh-cipher - DO +RUN_EARTHLY --exec_cmd=/tmp/run-earthly-with-bad-ssh-cipher + DO +RUN_EARTHBUILD --exec_cmd=/tmp/run-earthly-with-bad-ssh-cipher RUN cat output.txt | acbgrep "Unknown cipher type 'badcipher'" TEST_PARALLELIZATION: @@ -1681,7 +1681,7 @@ TEST_PARALLELIZATION: echo "parallelization checked"; \ fi -RUN_EARTHLY: +RUN_EARTHBUILD: FUNCTION ARG earthfile="" ARG earthfile_dest="./Earthfile" diff --git a/tests/autocompletion/install/Earthfile b/tests/autocompletion/install/Earthfile index c61eba184f..faab82fd30 100644 --- a/tests/autocompletion/install/Earthfile +++ b/tests/autocompletion/install/Earthfile @@ -11,7 +11,7 @@ test-bash-non-root-fallback-dir: ARG path="/home/bambi/.local/share/bash-completion/completions" RUN mkdir -p "$path" USER bambi - DO --pass-args +RUN_EARTHLY + DO --pass-args +RUN_EARTHBUILD RUN grep '^complete' "$path/earthly" && \ grep -i 'successfully enabled bash-completion' out.txt @@ -22,7 +22,7 @@ test-bash-non-root-no-overwrite: echo "can't touch this" > "$path/earthly" && \ md5sum "$path/earthly" > /tmp/sum USER bambi - DO --pass-args +RUN_EARTHLY + DO --pass-args +RUN_EARTHBUILD RUN md5sum /tmp/sum && \ grep -i 'bash-completion already present' out.txt @@ -33,7 +33,7 @@ test-bash-non-root-custom-dir: ARG path="$BASH_COMPLETION_USER_DIR/bash-completion/completions" RUN mkdir -p "$path" USER bambi - DO --pass-args +RUN_EARTHLY + DO --pass-args +RUN_EARTHBUILD RUN grep '^complete' "$path/earthly" && grep -i 'successfully enabled bash-completion' out.txt test-bash-non-root-xdg-dir: @@ -41,7 +41,7 @@ test-bash-non-root-xdg-dir: ARG path="$XDG_DATA_HOME/bash-completion/completions" RUN mkdir -p "$path" USER bambi - DO --pass-args +RUN_EARTHLY + DO --pass-args +RUN_EARTHBUILD RUN grep '^complete' "$path/earthly" && grep -i 'successfully enabled bash-completion' out.txt test-bash-root-no-home-entries: @@ -53,7 +53,7 @@ test-bash-root-no-home-entries: mkdir -p /root/.local/share/bash-completion/completions # for clarity USER root - DO --pass-args +RUN_EARTHLY + DO --pass-args +RUN_EARTHBUILD RUN test -z "$(find /root -name earthly -type f)" test-all: @@ -62,9 +62,9 @@ test-all: BUILD +test-bash-non-root-xdg-dir BUILD +test-bash-root-no-home-entries -RUN_EARTHLY: +RUN_EARTHBUILD: FUNCTION ARG exec_cmd=/tmp/bootstrap-script - DO ../../+RUN_EARTHLY \ + DO ../../+RUN_EARTHBUILD \ --should_fail=false \ --exec_cmd=$exec_cmd diff --git a/tests/autoskip/Earthfile b/tests/autoskip/Earthfile index a87d15aa9f..637de07825 100644 --- a/tests/autoskip/Earthfile +++ b/tests/autoskip/Earthfile @@ -49,15 +49,15 @@ test-group3: test-files: RUN echo hello > my-file - DO --pass-args +RUN_EARTHLY_ARGS --earthfile=simple.earth --target=+mytarget --output_contains="I was run" + DO --pass-args +RUN_EARTHBUILD_ARGS --earthfile=simple.earth --target=+mytarget --output_contains="I was run" RUN if ! grep "SSB3YXMgcnVuCg" earthly.output >/dev/null; then echo "base64 encoded RUN echo command is missing from output" && exit 1; fi - DO --pass-args +RUN_EARTHLY_ARGS --earthfile=simple.earth --target=+mytarget --output_does_not_contain="I was run" + DO --pass-args +RUN_EARTHBUILD_ARGS --earthfile=simple.earth --target=+mytarget --output_does_not_contain="I was run" RUN if grep "SSB3YXMgcnVuCg" earthly.output >/dev/null; then echo "base64 encoded RUN echo command should not have been displayed" && exit 1; fi # change the input file, and validate it runs RUN echo world > my-file - DO --pass-args +RUN_EARTHLY_ARGS --earthfile=simple.earth --target=+mytarget --output_contains="I was run" + DO --pass-args +RUN_EARTHBUILD_ARGS --earthfile=simple.earth --target=+mytarget --output_contains="I was run" RUN if ! grep "SSB3YXMgcnVuCg" earthly.output >/dev/null; then echo "base64 encoded RUN echo command is missing from output" && exit 1; fi test-with-subdir: @@ -65,268 +65,268 @@ test-with-subdir: RUN mkdir subdir COPY subdir/test.earth subdir/Earthfile RUN echo abc > subdir/a-test-file - DO --pass-args +RUN_EARTHLY_ARGS --target=+all --output_contains="0bee89b07a248e27c83fc3d5951213c1" - DO --pass-args +RUN_EARTHLY_ARGS --target=+all --output_does_not_contain="0bee89b07a248e27c83fc3d5951213c1" --output_contains="Target .* has already been run. Skipping." + DO --pass-args +RUN_EARTHBUILD_ARGS --target=+all --output_contains="0bee89b07a248e27c83fc3d5951213c1" + DO --pass-args +RUN_EARTHBUILD_ARGS --target=+all --output_does_not_contain="0bee89b07a248e27c83fc3d5951213c1" --output_contains="Target .* has already been run. Skipping." RUN echo 123 > subdir/a-test-file - DO --pass-args +RUN_EARTHLY_ARGS --target=+all --output_contains="ba1f2511fc30423bdbb183fe33f3dd0f" - DO --pass-args +RUN_EARTHLY_ARGS --target=+all --output_does_not_contain="ba1f2511fc30423bdbb183fe33f3dd0f" --output_contains="Target .* has already been run. Skipping." + DO --pass-args +RUN_EARTHBUILD_ARGS --target=+all --output_contains="ba1f2511fc30423bdbb183fe33f3dd0f" + DO --pass-args +RUN_EARTHBUILD_ARGS --target=+all --output_does_not_contain="ba1f2511fc30423bdbb183fe33f3dd0f" --output_contains="Target .* has already been run. Skipping." test-requires-project: RUN echo hello > my-file - DO --pass-args +RUN_EARTHLY_ARGS --earthfile=no-project.earth --target=+no-project --output_contains="I was run" + DO --pass-args +RUN_EARTHBUILD_ARGS --earthfile=no-project.earth --target=+no-project --output_contains="I was run" - DO --pass-args +RUN_EARTHLY_ARGS --earthfile=no-project.earth --target=+no-project --extra_args="--auto-skip-db-path=" --output_contains="I was run" + DO --pass-args +RUN_EARTHBUILD_ARGS --earthfile=no-project.earth --target=+no-project --extra_args="--auto-skip-db-path=" --output_contains="I was run" test-wait: - DO --pass-args +RUN_EARTHLY_ARGS --earthfile=wait.earth --target=+test --output_contains="not skipped" - DO --pass-args +RUN_EARTHLY_ARGS --earthfile=wait.earth --target=+test --output_contains="Target .* has already been run. Skipping." + DO --pass-args +RUN_EARTHBUILD_ARGS --earthfile=wait.earth --target=+test --output_contains="not skipped" + DO --pass-args +RUN_EARTHBUILD_ARGS --earthfile=wait.earth --target=+test --output_contains="Target .* has already been run. Skipping." test-if-else: - DO --pass-args +RUN_EARTHLY_ARGS --earthfile=if-else.earth --target=+test --output_contains="condition ok" - DO --pass-args +RUN_EARTHLY_ARGS --earthfile=if-else.earth --target=+test --output_contains="Target .* has already been run. Skipping." + DO --pass-args +RUN_EARTHBUILD_ARGS --earthfile=if-else.earth --target=+test --output_contains="condition ok" + DO --pass-args +RUN_EARTHBUILD_ARGS --earthfile=if-else.earth --target=+test --output_contains="Target .* has already been run. Skipping." - DO --pass-args +RUN_EARTHLY_ARGS --earthfile=if-else.earth --target=+test-eval --output_contains="condition ok" - DO --pass-args +RUN_EARTHLY_ARGS --earthfile=if-else.earth --target=+test-eval --output_contains="Target .* has already been run. Skipping." + DO --pass-args +RUN_EARTHBUILD_ARGS --earthfile=if-else.earth --target=+test-eval --output_contains="condition ok" + DO --pass-args +RUN_EARTHBUILD_ARGS --earthfile=if-else.earth --target=+test-eval --output_contains="Target .* has already been run. Skipping." - DO --pass-args +RUN_EARTHLY_ARGS --earthfile=if-else.earth --target=+test-eval-2 --output_contains="condition ok" - DO --pass-args +RUN_EARTHLY_ARGS --earthfile=if-else.earth --target=+test-eval-2 --output_contains="Target .* has already been run. Skipping." + DO --pass-args +RUN_EARTHBUILD_ARGS --earthfile=if-else.earth --target=+test-eval-2 --output_contains="condition ok" + DO --pass-args +RUN_EARTHBUILD_ARGS --earthfile=if-else.earth --target=+test-eval-2 --output_contains="Target .* has already been run. Skipping." test-for-in: - DO --pass-args +RUN_EARTHLY_ARGS --earthfile=for.earth --target=+test --output_contains="hello 3" - DO --pass-args +RUN_EARTHLY_ARGS --earthfile=for.earth --target=+test --output_contains="Target .* has already been run. Skipping." + DO --pass-args +RUN_EARTHBUILD_ARGS --earthfile=for.earth --target=+test --output_contains="hello 3" + DO --pass-args +RUN_EARTHBUILD_ARGS --earthfile=for.earth --target=+test --output_contains="Target .* has already been run. Skipping." - DO --pass-args +RUN_EARTHLY_ARGS --earthfile=for.earth --target=+test-vars --output_contains="hello foo" - DO --pass-args +RUN_EARTHLY_ARGS --earthfile=for.earth --target=+test-vars --output_contains="Target .* has already been run. Skipping." + DO --pass-args +RUN_EARTHBUILD_ARGS --earthfile=for.earth --target=+test-vars --output_contains="hello foo" + DO --pass-args +RUN_EARTHBUILD_ARGS --earthfile=for.earth --target=+test-vars --output_contains="Target .* has already been run. Skipping." RUN sed -i s/baz/boo/g Earthfile - DO --pass-args +RUN_EARTHLY_ARGS --target=+test-vars --output_contains="hello foo" - DO --pass-args +RUN_EARTHLY_ARGS --target=+test-vars --output_contains="Target .* has already been run. Skipping." + DO --pass-args +RUN_EARTHBUILD_ARGS --target=+test-vars --output_contains="hello foo" + DO --pass-args +RUN_EARTHBUILD_ARGS --target=+test-vars --output_contains="Target .* has already been run. Skipping." test-copy-glob: - DO --pass-args +RUN_EARTHLY_ARGS --earthfile=copy-glob.earth --should_fail=true --target=+globstar --output_contains="globstar (\*\*) not supported" + DO --pass-args +RUN_EARTHBUILD_ARGS --earthfile=copy-glob.earth --should_fail=true --target=+globstar --output_contains="globstar (\*\*) not supported" COPY --dir glob . - DO --pass-args +RUN_EARTHLY_ARGS --earthfile=copy-glob.earth --target=+dir --output_contains="glob/subdir/hello.txt" - DO --pass-args +RUN_EARTHLY_ARGS --earthfile=copy-glob.earth --target=+dir --output_contains="Target .* has already been run. Skipping." + DO --pass-args +RUN_EARTHBUILD_ARGS --earthfile=copy-glob.earth --target=+dir --output_contains="glob/subdir/hello.txt" + DO --pass-args +RUN_EARTHBUILD_ARGS --earthfile=copy-glob.earth --target=+dir --output_contains="Target .* has already been run. Skipping." - DO --pass-args +RUN_EARTHLY_ARGS --earthfile=copy-glob.earth --target=+glob --output_contains="glob/subdir/hello.txt" - DO --pass-args +RUN_EARTHLY_ARGS --earthfile=copy-glob.earth --target=+glob --output_contains="Target .* has already been run. Skipping." + DO --pass-args +RUN_EARTHBUILD_ARGS --earthfile=copy-glob.earth --target=+glob --output_contains="glob/subdir/hello.txt" + DO --pass-args +RUN_EARTHBUILD_ARGS --earthfile=copy-glob.earth --target=+glob --output_contains="Target .* has already been run. Skipping." - DO --pass-args +RUN_EARTHLY_ARGS --earthfile=copy-glob.earth --target=+glob-mid-path --output_contains="glob/subdir/hello.txt" - DO --pass-args +RUN_EARTHLY_ARGS --earthfile=copy-glob.earth --target=+glob-mid-path --output_contains="Target .* has already been run. Skipping." + DO --pass-args +RUN_EARTHBUILD_ARGS --earthfile=copy-glob.earth --target=+glob-mid-path --output_contains="glob/subdir/hello.txt" + DO --pass-args +RUN_EARTHBUILD_ARGS --earthfile=copy-glob.earth --target=+glob-mid-path --output_contains="Target .* has already been run. Skipping." - DO --pass-args +RUN_EARTHLY_ARGS --earthfile=copy-glob.earth --target=+glob-dir --output_contains="glob/subdir/hello.txt" - DO --pass-args +RUN_EARTHLY_ARGS --earthfile=copy-glob.earth --target=+glob-dir --output_contains="Target .* has already been run. Skipping." + DO --pass-args +RUN_EARTHBUILD_ARGS --earthfile=copy-glob.earth --target=+glob-dir --output_contains="glob/subdir/hello.txt" + DO --pass-args +RUN_EARTHBUILD_ARGS --earthfile=copy-glob.earth --target=+glob-dir --output_contains="Target .* has already been run. Skipping." RUN echo data > glob/subdir/new.txt - DO --pass-args +RUN_EARTHLY_ARGS --earthfile=copy-glob.earth --target=+glob-dir --output_contains="glob/subdir/new.txt" + DO --pass-args +RUN_EARTHBUILD_ARGS --earthfile=copy-glob.earth --target=+glob-dir --output_contains="glob/subdir/new.txt" test-expand-args: COPY glob/hello.txt . - DO --pass-args +RUN_EARTHLY_ARGS --earthfile=expand-args.earth --target=+basic --output_contains="COPY hello.txt" - DO --pass-args +RUN_EARTHLY_ARGS --earthfile=expand-args.earth --target=+basic --output_contains="Target .* has already been run. Skipping." + DO --pass-args +RUN_EARTHBUILD_ARGS --earthfile=expand-args.earth --target=+basic --output_contains="COPY hello.txt" + DO --pass-args +RUN_EARTHBUILD_ARGS --earthfile=expand-args.earth --target=+basic --output_contains="Target .* has already been run. Skipping." - DO --pass-args +RUN_EARTHLY_ARGS --earthfile=expand-args.earth --target=+dynamic-build --output_contains="dynamic target ok" - DO --pass-args +RUN_EARTHLY_ARGS --earthfile=expand-args.earth --target=+dynamic-build --output_contains="Target .* has already been run. Skipping." + DO --pass-args +RUN_EARTHBUILD_ARGS --earthfile=expand-args.earth --target=+dynamic-build --output_contains="dynamic target ok" + DO --pass-args +RUN_EARTHBUILD_ARGS --earthfile=expand-args.earth --target=+dynamic-build --output_contains="Target .* has already been run. Skipping." - DO --pass-args +RUN_EARTHLY_ARGS --earthfile=expand-args.earth --target=+dynamic-arg --output_contains="hello bar" - DO --pass-args +RUN_EARTHLY_ARGS --earthfile=expand-args.earth --target=+dynamic-arg --output_contains="Target .* has already been run. Skipping." + DO --pass-args +RUN_EARTHBUILD_ARGS --earthfile=expand-args.earth --target=+dynamic-arg --output_contains="hello bar" + DO --pass-args +RUN_EARTHBUILD_ARGS --earthfile=expand-args.earth --target=+dynamic-arg --output_contains="Target .* has already been run. Skipping." test-build-args: - DO --pass-args +RUN_EARTHLY_ARGS --earthfile=expand-args.earth --target=+build-args --output_contains="hello 3 4" - DO --pass-args +RUN_EARTHLY_ARGS --earthfile=expand-args.earth --target=+build-args --output_contains="Target .* has already been run. Skipping." + DO --pass-args +RUN_EARTHBUILD_ARGS --earthfile=expand-args.earth --target=+build-args --output_contains="hello 3 4" + DO --pass-args +RUN_EARTHBUILD_ARGS --earthfile=expand-args.earth --target=+build-args --output_contains="Target .* has already been run. Skipping." - DO --pass-args +RUN_EARTHLY_ARGS --earthfile=expand-args.earth --target=+build-args-2 --post_command="--foo=5 --bar=6" --output_contains="hello 5 6" - DO --pass-args +RUN_EARTHLY_ARGS --earthfile=expand-args.earth --target=+build-args-2 --post_command="--foo=5 --bar=6" --output_contains="Target .* has already been run. Skipping." - DO --pass-args +RUN_EARTHLY_ARGS --earthfile=expand-args.earth --target=+build-args-2 --post_command="--foo=5 --bar=7" --output_does_not_contain="Target .* has already been run. Skipping." + DO --pass-args +RUN_EARTHBUILD_ARGS --earthfile=expand-args.earth --target=+build-args-2 --post_command="--foo=5 --bar=6" --output_contains="hello 5 6" + DO --pass-args +RUN_EARTHBUILD_ARGS --earthfile=expand-args.earth --target=+build-args-2 --post_command="--foo=5 --bar=6" --output_contains="Target .* has already been run. Skipping." + DO --pass-args +RUN_EARTHBUILD_ARGS --earthfile=expand-args.earth --target=+build-args-2 --post_command="--foo=5 --bar=7" --output_does_not_contain="Target .* has already been run. Skipping." test-pass-args: - DO --pass-args +RUN_EARTHLY_ARGS --earthfile=expand-args.earth --target=+pass-args --post_command="--foo=3 --bar=4" --output_contains="hello 3 4" - DO --pass-args +RUN_EARTHLY_ARGS --earthfile=expand-args.earth --target=+pass-args --post_command="--foo=3 --bar=4" --output_contains="Target .* has already been run. Skipping." - DO --pass-args +RUN_EARTHLY_ARGS --earthfile=expand-args.earth --target=+pass-args --post_command="--foo=3 --bar=5" --output_does_not_contain="Target .* has already been run. Skipping." + DO --pass-args +RUN_EARTHBUILD_ARGS --earthfile=expand-args.earth --target=+pass-args --post_command="--foo=3 --bar=4" --output_contains="hello 3 4" + DO --pass-args +RUN_EARTHBUILD_ARGS --earthfile=expand-args.earth --target=+pass-args --post_command="--foo=3 --bar=4" --output_contains="Target .* has already been run. Skipping." + DO --pass-args +RUN_EARTHBUILD_ARGS --earthfile=expand-args.earth --target=+pass-args --post_command="--foo=3 --bar=5" --output_does_not_contain="Target .* has already been run. Skipping." test-copy-target-args: - DO --pass-args +RUN_EARTHLY_ARGS --earthfile=expand-args.earth --target=+copy-target-args --output_contains="+copy-target-args | hello" - DO --pass-args +RUN_EARTHLY_ARGS --earthfile=expand-args.earth --target=+copy-target-args --output_contains="Target .* has already been run. Skipping." + DO --pass-args +RUN_EARTHBUILD_ARGS --earthfile=expand-args.earth --target=+copy-target-args --output_contains="+copy-target-args | hello" + DO --pass-args +RUN_EARTHBUILD_ARGS --earthfile=expand-args.earth --target=+copy-target-args --output_contains="Target .* has already been run. Skipping." RUN sed -i s/--foo=hello/--foo=changed/g Earthfile - DO --pass-args +RUN_EARTHLY_ARGS --target=+copy-target-args --output_contains="+copy-target-args | changed" - DO --pass-args +RUN_EARTHLY_ARGS --target=+copy-target-args --output_contains="Target .* has already been run. Skipping." + DO --pass-args +RUN_EARTHBUILD_ARGS --target=+copy-target-args --output_contains="+copy-target-args | changed" + DO --pass-args +RUN_EARTHBUILD_ARGS --target=+copy-target-args --output_contains="Target .* has already been run. Skipping." - DO --pass-args +RUN_EARTHLY_ARGS --earthfile=expand-args.earth --target=+copy-target-dynamic --output_contains="+copy-target-dynamic | goodbye" - DO --pass-args +RUN_EARTHLY_ARGS --earthfile=expand-args.earth --target=+copy-target-dynamic --output_contains="Target .* has already been run. Skipping." + DO --pass-args +RUN_EARTHBUILD_ARGS --earthfile=expand-args.earth --target=+copy-target-dynamic --output_contains="+copy-target-dynamic | goodbye" + DO --pass-args +RUN_EARTHBUILD_ARGS --earthfile=expand-args.earth --target=+copy-target-dynamic --output_contains="Target .* has already been run. Skipping." - DO --pass-args +RUN_EARTHLY_ARGS --earthfile=expand-args.earth --target=+copy-target-dynamic-2 --output_contains="+copy-target-dynamic-2 | foobar" - DO --pass-args +RUN_EARTHLY_ARGS --earthfile=expand-args.earth --target=+copy-target-dynamic-2 --output_contains="Target .* has already been run. Skipping." + DO --pass-args +RUN_EARTHBUILD_ARGS --earthfile=expand-args.earth --target=+copy-target-dynamic-2 --output_contains="+copy-target-dynamic-2 | foobar" + DO --pass-args +RUN_EARTHBUILD_ARGS --earthfile=expand-args.earth --target=+copy-target-dynamic-2 --output_contains="Target .* has already been run. Skipping." test-copy-target-args-quoted: - DO --pass-args +RUN_EARTHLY_ARGS --earthfile=expand-args.earth --target=+copy-target-args-quoted --output_contains="hello world" - DO --pass-args +RUN_EARTHLY_ARGS --earthfile=expand-args.earth --target=+copy-target-args-quoted --output_contains="Target .* has already been run. Skipping." + DO --pass-args +RUN_EARTHBUILD_ARGS --earthfile=expand-args.earth --target=+copy-target-args-quoted --output_contains="hello world" + DO --pass-args +RUN_EARTHBUILD_ARGS --earthfile=expand-args.earth --target=+copy-target-args-quoted --output_contains="Target .* has already been run. Skipping." test-arg-matrix: - DO --pass-args +RUN_EARTHLY_ARGS --earthfile=matrix.earth --target=+arg-matrix --output_contains="Hello Bob. From Todd" - DO --pass-args +RUN_EARTHLY_ARGS --earthfile=matrix.earth --target=+arg-matrix --output_contains="Target .* has already been run. Skipping." + DO --pass-args +RUN_EARTHBUILD_ARGS --earthfile=matrix.earth --target=+arg-matrix --output_contains="Hello Bob. From Todd" + DO --pass-args +RUN_EARTHBUILD_ARGS --earthfile=matrix.earth --target=+arg-matrix --output_contains="Target .* has already been run. Skipping." RUN sed -i s/Bill/Sam/g Earthfile - DO --pass-args +RUN_EARTHLY_ARGS --target=+arg-matrix --output_contains="Hello Sam. From Todd" - DO --pass-args +RUN_EARTHLY_ARGS --target=+arg-matrix --output_contains="Target .* has already been run. Skipping." + DO --pass-args +RUN_EARTHBUILD_ARGS --target=+arg-matrix --output_contains="Hello Sam. From Todd" + DO --pass-args +RUN_EARTHBUILD_ARGS --target=+arg-matrix --output_contains="Target .* has already been run. Skipping." test-expand-let: COPY glob/hello.txt . - DO --pass-args +RUN_EARTHLY_ARGS --earthfile=expand-let.earth --target=+basic --output_contains="COPY hello.txt" - DO --pass-args +RUN_EARTHLY_ARGS --earthfile=expand-let.earth --target=+basic --output_contains="Target .* has already been run. Skipping." + DO --pass-args +RUN_EARTHBUILD_ARGS --earthfile=expand-let.earth --target=+basic --output_contains="COPY hello.txt" + DO --pass-args +RUN_EARTHBUILD_ARGS --earthfile=expand-let.earth --target=+basic --output_contains="Target .* has already been run. Skipping." - DO --pass-args +RUN_EARTHLY_ARGS --earthfile=expand-let.earth --target=+dynamic-build --output_contains="dynamic target ok" - DO --pass-args +RUN_EARTHLY_ARGS --earthfile=expand-let.earth --target=+dynamic-build --output_contains="Target .* has already been run. Skipping." + DO --pass-args +RUN_EARTHBUILD_ARGS --earthfile=expand-let.earth --target=+dynamic-build --output_contains="dynamic target ok" + DO --pass-args +RUN_EARTHBUILD_ARGS --earthfile=expand-let.earth --target=+dynamic-build --output_contains="Target .* has already been run. Skipping." - DO --pass-args +RUN_EARTHLY_ARGS --earthfile=expand-let.earth --target=+dynamic-arg --output_contains="hello bar" - DO --pass-args +RUN_EARTHLY_ARGS --earthfile=expand-let.earth --target=+dynamic-arg --output_contains="Target .* has already been run. Skipping." + DO --pass-args +RUN_EARTHBUILD_ARGS --earthfile=expand-let.earth --target=+dynamic-arg --output_contains="hello bar" + DO --pass-args +RUN_EARTHBUILD_ARGS --earthfile=expand-let.earth --target=+dynamic-arg --output_contains="Target .* has already been run. Skipping." test-copy-target-let: - DO --pass-args +RUN_EARTHLY_ARGS --earthfile=expand-let.earth --target=+copy-target-dynamic --output_contains="+copy-target-dynamic | goodbye" - DO --pass-args +RUN_EARTHLY_ARGS --earthfile=expand-let.earth --target=+copy-target-dynamic --output_contains="Target .* has already been run. Skipping." + DO --pass-args +RUN_EARTHBUILD_ARGS --earthfile=expand-let.earth --target=+copy-target-dynamic --output_contains="+copy-target-dynamic | goodbye" + DO --pass-args +RUN_EARTHBUILD_ARGS --earthfile=expand-let.earth --target=+copy-target-dynamic --output_contains="Target .* has already been run. Skipping." - DO --pass-args +RUN_EARTHLY_ARGS --earthfile=expand-let.earth --target=+copy-target-dynamic-2 --output_contains="+copy-target-dynamic-2 | foobar" - DO --pass-args +RUN_EARTHLY_ARGS --earthfile=expand-let.earth --target=+copy-target-dynamic-2 --output_contains="Target .* has already been run. Skipping." + DO --pass-args +RUN_EARTHBUILD_ARGS --earthfile=expand-let.earth --target=+copy-target-dynamic-2 --output_contains="+copy-target-dynamic-2 | foobar" + DO --pass-args +RUN_EARTHBUILD_ARGS --earthfile=expand-let.earth --target=+copy-target-dynamic-2 --output_contains="Target .* has already been run. Skipping." test-expand-set: COPY glob/hello.txt . - DO --pass-args +RUN_EARTHLY_ARGS --earthfile=expand-set.earth --target=+basic --output_contains="COPY hello.txt" - DO --pass-args +RUN_EARTHLY_ARGS --earthfile=expand-set.earth --target=+basic --output_contains="Target .* has already been run. Skipping." + DO --pass-args +RUN_EARTHBUILD_ARGS --earthfile=expand-set.earth --target=+basic --output_contains="COPY hello.txt" + DO --pass-args +RUN_EARTHBUILD_ARGS --earthfile=expand-set.earth --target=+basic --output_contains="Target .* has already been run. Skipping." - DO --pass-args +RUN_EARTHLY_ARGS --earthfile=expand-set.earth --target=+dynamic-build --output_contains="dynamic target ok" - DO --pass-args +RUN_EARTHLY_ARGS --earthfile=expand-set.earth --target=+dynamic-build --output_contains="Target .* has already been run. Skipping." + DO --pass-args +RUN_EARTHBUILD_ARGS --earthfile=expand-set.earth --target=+dynamic-build --output_contains="dynamic target ok" + DO --pass-args +RUN_EARTHBUILD_ARGS --earthfile=expand-set.earth --target=+dynamic-build --output_contains="Target .* has already been run. Skipping." - DO --pass-args +RUN_EARTHLY_ARGS --earthfile=expand-set.earth --target=+dynamic-arg --output_contains="hello bar" - DO --pass-args +RUN_EARTHLY_ARGS --earthfile=expand-set.earth --target=+dynamic-arg --output_contains="Target .* has already been run. Skipping." + DO --pass-args +RUN_EARTHBUILD_ARGS --earthfile=expand-set.earth --target=+dynamic-arg --output_contains="hello bar" + DO --pass-args +RUN_EARTHBUILD_ARGS --earthfile=expand-set.earth --target=+dynamic-arg --output_contains="Target .* has already been run. Skipping." test-copy-target-set: - DO --pass-args +RUN_EARTHLY_ARGS --earthfile=expand-set.earth --target=+copy-target-dynamic --output_contains="+copy-target-dynamic | goodbye" - DO --pass-args +RUN_EARTHLY_ARGS --earthfile=expand-set.earth --target=+copy-target-dynamic --output_contains="Target .* has already been run. Skipping." + DO --pass-args +RUN_EARTHBUILD_ARGS --earthfile=expand-set.earth --target=+copy-target-dynamic --output_contains="+copy-target-dynamic | goodbye" + DO --pass-args +RUN_EARTHBUILD_ARGS --earthfile=expand-set.earth --target=+copy-target-dynamic --output_contains="Target .* has already been run. Skipping." - DO --pass-args +RUN_EARTHLY_ARGS --earthfile=expand-set.earth --target=+copy-target-dynamic-2 --output_contains="+copy-target-dynamic-2 | foobar" - DO --pass-args +RUN_EARTHLY_ARGS --earthfile=expand-set.earth --target=+copy-target-dynamic-2 --output_contains="Target .* has already been run. Skipping." + DO --pass-args +RUN_EARTHBUILD_ARGS --earthfile=expand-set.earth --target=+copy-target-dynamic-2 --output_contains="+copy-target-dynamic-2 | foobar" + DO --pass-args +RUN_EARTHBUILD_ARGS --earthfile=expand-set.earth --target=+copy-target-dynamic-2 --output_contains="Target .* has already been run. Skipping." test-try-catch: - DO --pass-args +RUN_EARTHLY_ARGS --earthfile=try-catch.earth --target=+basic --output_contains="Artifact +basic/hello.txt output as hello.txt" - DO --pass-args +RUN_EARTHLY_ARGS --earthfile=try-catch.earth --target=+basic --output_contains="Target .* has already been run. Skipping." + DO --pass-args +RUN_EARTHBUILD_ARGS --earthfile=try-catch.earth --target=+basic --output_contains="Artifact +basic/hello.txt output as hello.txt" + DO --pass-args +RUN_EARTHBUILD_ARGS --earthfile=try-catch.earth --target=+basic --output_contains="Target .* has already been run. Skipping." test-no-cache: - DO --pass-args +RUN_EARTHLY_ARGS --earthfile=simple.earth --target=+no-cache --should_fail=true --extra_args="--no-cache" --output_contains="no-cache cannot be used" - DO --pass-args +RUN_EARTHLY_ARGS --earthfile=simple.earth --target=+no-cache --should_fail=true --extra_args="--no-cache" --output_does_not_contain="Target .* has already been run. Skipping." + DO --pass-args +RUN_EARTHBUILD_ARGS --earthfile=simple.earth --target=+no-cache --should_fail=true --extra_args="--no-cache" --output_contains="no-cache cannot be used" + DO --pass-args +RUN_EARTHBUILD_ARGS --earthfile=simple.earth --target=+no-cache --should_fail=true --extra_args="--no-cache" --output_does_not_contain="Target .* has already been run. Skipping." test-push: - DO --pass-args +RUN_EARTHLY_ARGS --earthfile=simple.earth --target=+simple --extra_args="--push" --output_contains="hello" - DO --pass-args +RUN_EARTHLY_ARGS --earthfile=simple.earth --target=+simple --extra_args="--push" --output_contains="Target .* has already been run. Skipping." + DO --pass-args +RUN_EARTHBUILD_ARGS --earthfile=simple.earth --target=+simple --extra_args="--push" --output_contains="hello" + DO --pass-args +RUN_EARTHBUILD_ARGS --earthfile=simple.earth --target=+simple --extra_args="--push" --output_contains="Target .* has already been run. Skipping." test-shell-out: - DO --pass-args +RUN_EARTHLY_ARGS --earthfile=shell-out.earth --target=+shell-out - DO --pass-args +RUN_EARTHLY_ARGS --earthfile=shell-out.earth --target=+shell-out --output_contains="Target .* has already been run. Skipping." + DO --pass-args +RUN_EARTHBUILD_ARGS --earthfile=shell-out.earth --target=+shell-out + DO --pass-args +RUN_EARTHBUILD_ARGS --earthfile=shell-out.earth --target=+shell-out --output_contains="Target .* has already been run. Skipping." - DO --pass-args +RUN_EARTHLY_ARGS --earthfile=shell-out.earth --target=+shell-out-target --should_fail=true --output_contains="dynamic target" - DO --pass-args +RUN_EARTHLY_ARGS --earthfile=shell-out.earth --target=+shell-out-target-2 --should_fail=true --output_contains="dynamic target" + DO --pass-args +RUN_EARTHBUILD_ARGS --earthfile=shell-out.earth --target=+shell-out-target --should_fail=true --output_contains="dynamic target" + DO --pass-args +RUN_EARTHBUILD_ARGS --earthfile=shell-out.earth --target=+shell-out-target-2 --should_fail=true --output_contains="dynamic target" RUN echo "foo" > my-file - DO --pass-args +RUN_EARTHLY_ARGS --earthfile=shell-out.earth --target=+shell-out-copy --should_fail=true --output_contains="dynamic COPY source" + DO --pass-args +RUN_EARTHBUILD_ARGS --earthfile=shell-out.earth --target=+shell-out-copy --should_fail=true --output_contains="dynamic COPY source" test-copy-if-exists: - DO --pass-args +RUN_EARTHLY_ARGS --earthfile=simple.earth --target=+copy-if-exists - DO --pass-args +RUN_EARTHLY_ARGS --earthfile=simple.earth --target=+copy-if-exists --output_contains="Target .* has already been run. Skipping." + DO --pass-args +RUN_EARTHBUILD_ARGS --earthfile=simple.earth --target=+copy-if-exists + DO --pass-args +RUN_EARTHBUILD_ARGS --earthfile=simple.earth --target=+copy-if-exists --output_contains="Target .* has already been run. Skipping." RUN echo "foo" > my-file - DO --pass-args +RUN_EARTHLY_ARGS --earthfile=simple.earth --target=+copy-if-exists --output_does_not_contain="Target .* has already been run. Skipping." + DO --pass-args +RUN_EARTHBUILD_ARGS --earthfile=simple.earth --target=+copy-if-exists --output_does_not_contain="Target .* has already been run. Skipping." test-remote-targets: - DO --pass-args +RUN_EARTHLY_ARGS --earthfile=remote-target.earth --target=+valid-copy - DO --pass-args +RUN_EARTHLY_ARGS --earthfile=remote-target.earth --target=+valid-copy --output_contains="Target .* has already been run. Skipping." + DO --pass-args +RUN_EARTHBUILD_ARGS --earthfile=remote-target.earth --target=+valid-copy + DO --pass-args +RUN_EARTHBUILD_ARGS --earthfile=remote-target.earth --target=+valid-copy --output_contains="Target .* has already been run. Skipping." - DO --pass-args +RUN_EARTHLY_ARGS --earthfile=remote-target.earth --target=+valid-copy-sha - DO --pass-args +RUN_EARTHLY_ARGS --earthfile=remote-target.earth --target=+valid-copy-sha --output_contains="Target .* has already been run. Skipping." + DO --pass-args +RUN_EARTHBUILD_ARGS --earthfile=remote-target.earth --target=+valid-copy-sha + DO --pass-args +RUN_EARTHBUILD_ARGS --earthfile=remote-target.earth --target=+valid-copy-sha --output_contains="Target .* has already been run. Skipping." - DO --pass-args +RUN_EARTHLY_ARGS --earthfile=remote-target.earth --target=+valid-from - DO --pass-args +RUN_EARTHLY_ARGS --earthfile=remote-target.earth --target=+valid-from --output_contains="Target .* has already been run. Skipping." + DO --pass-args +RUN_EARTHBUILD_ARGS --earthfile=remote-target.earth --target=+valid-from + DO --pass-args +RUN_EARTHBUILD_ARGS --earthfile=remote-target.earth --target=+valid-from --output_contains="Target .* has already been run. Skipping." - DO --pass-args +RUN_EARTHLY_ARGS --earthfile=remote-target.earth --target=+valid-from-sha - DO --pass-args +RUN_EARTHLY_ARGS --earthfile=remote-target.earth --target=+valid-from-sha --output_contains="Target .* has already been run. Skipping." + DO --pass-args +RUN_EARTHBUILD_ARGS --earthfile=remote-target.earth --target=+valid-from-sha + DO --pass-args +RUN_EARTHBUILD_ARGS --earthfile=remote-target.earth --target=+valid-from-sha --output_contains="Target .* has already been run. Skipping." - DO --pass-args +RUN_EARTHLY_ARGS --earthfile=remote-target.earth --target=+invalid-copy-branch --should_fail=true --output_contains="complete Git SHA or an explicit tag" + DO --pass-args +RUN_EARTHBUILD_ARGS --earthfile=remote-target.earth --target=+invalid-copy-branch --should_fail=true --output_contains="complete Git SHA or an explicit tag" - DO --pass-args +RUN_EARTHLY_ARGS --earthfile=remote-target.earth --target=+valid-build - DO --pass-args +RUN_EARTHLY_ARGS --earthfile=remote-target.earth --target=+valid-build --output_contains="Target .* has already been run. Skipping." + DO --pass-args +RUN_EARTHBUILD_ARGS --earthfile=remote-target.earth --target=+valid-build + DO --pass-args +RUN_EARTHBUILD_ARGS --earthfile=remote-target.earth --target=+valid-build --output_contains="Target .* has already been run. Skipping." - DO --pass-args +RUN_EARTHLY_ARGS --earthfile=remote-target.earth --target=+invalid-build --should_fail=true --output_contains="complete Git SHA or an explicit tag" + DO --pass-args +RUN_EARTHBUILD_ARGS --earthfile=remote-target.earth --target=+invalid-build --should_fail=true --output_contains="complete Git SHA or an explicit tag" test-from-dockerfile: RUN mkdir /dist COPY Dockerfile /dist RUN echo "foo" > /dist/my-file - DO --pass-args +RUN_EARTHLY_ARGS --earthfile=from-dockerfile.earth --target=+local - DO --pass-args +RUN_EARTHLY_ARGS --earthfile=from-dockerfile.earth --target=+local --output_contains="Target .* has already been run. Skipping." + DO --pass-args +RUN_EARTHBUILD_ARGS --earthfile=from-dockerfile.earth --target=+local + DO --pass-args +RUN_EARTHBUILD_ARGS --earthfile=from-dockerfile.earth --target=+local --output_contains="Target .* has already been run. Skipping." - DO --pass-args +RUN_EARTHLY_ARGS --earthfile=from-dockerfile.earth --target=+local-target - DO --pass-args +RUN_EARTHLY_ARGS --earthfile=from-dockerfile.earth --target=+local-target --output_contains="Target .* has already been run. Skipping." + DO --pass-args +RUN_EARTHBUILD_ARGS --earthfile=from-dockerfile.earth --target=+local-target + DO --pass-args +RUN_EARTHBUILD_ARGS --earthfile=from-dockerfile.earth --target=+local-target --output_contains="Target .* has already been run. Skipping." - DO --pass-args +RUN_EARTHLY_ARGS --earthfile=from-dockerfile.earth --target=+remote - DO --pass-args +RUN_EARTHLY_ARGS --earthfile=from-dockerfile.earth --target=+remote --output_contains="Target .* has already been run. Skipping." + DO --pass-args +RUN_EARTHBUILD_ARGS --earthfile=from-dockerfile.earth --target=+remote + DO --pass-args +RUN_EARTHBUILD_ARGS --earthfile=from-dockerfile.earth --target=+remote --output_contains="Target .* has already been run. Skipping." test-import: COPY --dir imported . RUN echo "hello" > imported/my-file - DO --pass-args +RUN_EARTHLY_ARGS --earthfile=import.earth --target=+basic - DO --pass-args +RUN_EARTHLY_ARGS --earthfile=import.earth --target=+basic --output_contains="Target .* has already been run. Skipping." + DO --pass-args +RUN_EARTHBUILD_ARGS --earthfile=import.earth --target=+basic + DO --pass-args +RUN_EARTHBUILD_ARGS --earthfile=import.earth --target=+basic --output_contains="Target .* has already been run. Skipping." RUN echo "bye-bye" > imported/my-file - DO --pass-args +RUN_EARTHLY_ARGS --earthfile=import.earth --target=+basic --output_does_not_contain="Target .* has already been run. Skipping." + DO --pass-args +RUN_EARTHBUILD_ARGS --earthfile=import.earth --target=+basic --output_does_not_contain="Target .* has already been run. Skipping." - DO --pass-args +RUN_EARTHLY_ARGS --earthfile=import.earth --target=+remote - DO --pass-args +RUN_EARTHLY_ARGS --earthfile=import.earth --target=+remote --output_contains="Target .* has already been run. Skipping." + DO --pass-args +RUN_EARTHBUILD_ARGS --earthfile=import.earth --target=+remote + DO --pass-args +RUN_EARTHBUILD_ARGS --earthfile=import.earth --target=+remote --output_contains="Target .* has already been run. Skipping." - DO --pass-args +RUN_EARTHLY_ARGS --earthfile=import.earth --target=+global - DO --pass-args +RUN_EARTHLY_ARGS --earthfile=import.earth --target=+global --output_contains="Target .* has already been run. Skipping." + DO --pass-args +RUN_EARTHBUILD_ARGS --earthfile=import.earth --target=+global + DO --pass-args +RUN_EARTHBUILD_ARGS --earthfile=import.earth --target=+global --output_contains="Target .* has already been run. Skipping." test-build-flag: - DO --pass-args tests+RUN_EARTHLY --extra_args="--auto-skip-db-path=test.db" --earthfile=build-flag.earth --target=+basic + DO --pass-args tests+RUN_EARTHBUILD --extra_args="--auto-skip-db-path=test.db" --earthfile=build-flag.earth --target=+basic RUN cat earthly.output | acbgrep 'hello from a' RUN cat earthly.output | acbgrep 'hello from b' - DO --pass-args tests+RUN_EARTHLY --extra_args="--auto-skip-db-path=test.db" --earthfile=build-flag.earth --target=+basic + DO --pass-args tests+RUN_EARTHBUILD --extra_args="--auto-skip-db-path=test.db" --earthfile=build-flag.earth --target=+basic RUN cat earthly.output | acbgrep 'hello from a' RUN cat earthly.output | acbgrep -v 'hello from b' RUN cat earthly.output | acbgrep 'Target +b .* has already been run' - DO --pass-args tests+RUN_EARTHLY --extra_args="--auto-skip-db-path=test.db" --earthfile=build-flag.earth --target=+remote + DO --pass-args tests+RUN_EARTHBUILD --extra_args="--auto-skip-db-path=test.db" --earthfile=build-flag.earth --target=+remote RUN cat earthly.output | acbgrep 'Hello World' RUN cat earthly.output | acbgrep 'hello from b' - DO --pass-args tests+RUN_EARTHLY --extra_args="--auto-skip-db-path=test.db" --earthfile=build-flag.earth --target=+remote + DO --pass-args tests+RUN_EARTHBUILD --extra_args="--auto-skip-db-path=test.db" --earthfile=build-flag.earth --target=+remote RUN cat earthly.output | acbgrep -v 'Hello World' RUN cat earthly.output | acbgrep 'Target github.com/EarthBuild/test-remote:6accddaba346aeda062ab47bae62e65dcdcc513f+basic .* has already been run' RUN cat earthly.output | acbgrep 'hello from b' test-multi-platform-build-failure: COPY build-multiplatform-failure.earth Earthfile - DO --pass-args tests+RUN_EARTHLY --extra_args="--auto-skip-db-path=test.db" --target=+test --should_fail=true + DO --pass-args tests+RUN_EARTHBUILD --extra_args="--auto-skip-db-path=test.db" --target=+test --should_fail=true # test that the first run didn't write to hash entry to test.db; running a second time should also fail - DO --pass-args tests+RUN_EARTHLY --extra_args="--auto-skip-db-path=test.db" --target=+test --should_fail=true + DO --pass-args tests+RUN_EARTHBUILD --extra_args="--auto-skip-db-path=test.db" --target=+test --should_fail=true test-flag-conflict: - DO --pass-args tests+RUN_EARTHLY --extra_args="--auto-skip-db-path=test.db --auto-skip --no-auto-skip" \ + DO --pass-args tests+RUN_EARTHBUILD --extra_args="--auto-skip-db-path=test.db --auto-skip --no-auto-skip" \ --earthfile=build-flag.earth --target=+basic --should_fail=true \ --output_contains="\-\-no-auto-skip cannot be used with \-\-auto-skip" test-init-failure: - DO --pass-args tests+RUN_EARTHLY --extra_args="--auto-skip-db-path=/tmp --auto-skip" \ + DO --pass-args tests+RUN_EARTHBUILD --extra_args="--auto-skip-db-path=/tmp --auto-skip" \ --earthfile=build-flag.earth --target=+basic \ --output_contains="Failed to initialize auto-skip database" @@ -338,12 +338,12 @@ test-arg-change: RUN acbtest "$V1" != "$V2" # Ensure that the values are kept distinct. COPY arg-change.earth Earthfile RUN sed -i "s//$V1/g" Earthfile - DO --pass-args tests+RUN_EARTHLY --extra_args="--auto-skip-db-path=test.db" --target=+expand-args-from --output_contains="VERSION_ID=$V1" + DO --pass-args tests+RUN_EARTHBUILD --extra_args="--auto-skip-db-path=test.db" --target=+expand-args-from --output_contains="VERSION_ID=$V1" RUN sed -i "s/$V1/$V2/g" Earthfile - DO --pass-args tests+RUN_EARTHLY --extra_args="--auto-skip-db-path=test.db" --target=+expand-args-from --output_contains="VERSION_ID=$V2" + DO --pass-args tests+RUN_EARTHBUILD --extra_args="--auto-skip-db-path=test.db" --target=+expand-args-from --output_contains="VERSION_ID=$V2" -RUN_EARTHLY_ARGS: +RUN_EARTHBUILD_ARGS: FUNCTION ARG extra_args - DO --pass-args tests+RUN_EARTHLY \ + DO --pass-args tests+RUN_EARTHBUILD \ --extra_args="--auto-skip --auto-skip-db-path=test.db $extra_args" diff --git a/tests/command-to-function-rename/Earthfile b/tests/command-to-function-rename/Earthfile index 7321820642..2c6cc3b331 100644 --- a/tests/command-to-function-rename/Earthfile +++ b/tests/command-to-function-rename/Earthfile @@ -14,25 +14,25 @@ test-calls-from-other-file: RUN mkdir -p some/subdir COPY caller.earth Earthfile COPY command.earth some/subdir/Earthfile - DO --pass-args +RUN_EARTHLY_ARGS --target=+test-successful-command + DO --pass-args +RUN_EARTHBUILD_ARGS --target=+test-successful-command COPY function.earth some/subdir/Earthfile - DO --pass-args +RUN_EARTHLY_ARGS --target=+test-successful-function + DO --pass-args +RUN_EARTHBUILD_ARGS --target=+test-successful-function test-failed-calls: WORKDIR /my/test RUN mkdir -p some/subdir COPY caller.earth Earthfile COPY function.earth some/subdir/Earthfile - DO --pass-args +RUN_EARTHLY_ARGS --should_fail=true --target=+test-failed-command + DO --pass-args +RUN_EARTHBUILD_ARGS --should_fail=true --target=+test-failed-command COPY command.earth some/subdir/Earthfile - DO --pass-args +RUN_EARTHLY_ARGS --should_fail=true --target=+test-failed-function + DO --pass-args +RUN_EARTHBUILD_ARGS --should_fail=true --target=+test-failed-function -RUN_EARTHLY_ARGS: +RUN_EARTHBUILD_ARGS: COMMAND ARG earthfile ARG target ARG should_fail=false - DO --pass-args tests+RUN_EARTHLY \ + DO --pass-args tests+RUN_EARTHBUILD \ --earthfile=$earthfile \ --target=$target \ --should_fail=$should_fail diff --git a/tests/config/Earthfile b/tests/config/Earthfile index e6828eac7f..d885891af7 100644 --- a/tests/config/Earthfile +++ b/tests/config/Earthfile @@ -43,23 +43,23 @@ test: # test earthly runs when no default config is present RUN ! test -f /root/.earthly/config.yml - DO --pass-args +RUN_EARTHLY_ARGS --earthfile="hello.earth" --target="+hello" --output_contains="greetings" + DO --pass-args +RUN_EARTHBUILD_ARGS --earthfile="hello.earth" --target="+hello" --output_contains="greetings" # test earthly can write to default config location RUN earthly config global.cache_size_mb 10 RUN test "$(cat /root/.earthly/config.yml)" = "$(cat expected-1.yml)" # test earthly fails when explicitly set to use a different config that doesn't exist - DO --pass-args +RUN_EARTHLY_ARGS --extra_args="--config=this-does-not-exist.yml" --earthfile="hello.earth" --target="+hello" --should_fail="true" --output_contains="failed to read from this-does-not-exist.yml" + DO --pass-args +RUN_EARTHBUILD_ARGS --extra_args="--config=this-does-not-exist.yml" --earthfile="hello.earth" --target="+hello" --should_fail="true" --output_contains="failed to read from this-does-not-exist.yml" # test earthly runs with new cache percentage setting RUN earthly config global.cache_size_pct 50 - DO --pass-args +RUN_EARTHLY_ARGS --earthfile="hello.earth" --target="+hello" --output_contains="greetings" + DO --pass-args +RUN_EARTHBUILD_ARGS --earthfile="hello.earth" --target="+hello" --output_contains="greetings" # test that it still runs alongside a size settings RUN earthly config global.cache_size_mb 100 RUN test "$(cat /root/.earthly/config.yml)" = "$(cat expected-6.yml)" - DO --pass-args +RUN_EARTHLY_ARGS --earthfile="hello.earth" --target="+hello" --output_contains="greetings" + DO --pass-args +RUN_EARTHBUILD_ARGS --earthfile="hello.earth" --target="+hello" --output_contains="greetings" RUN touch /tmp/config.yml RUN chmod 400 /tmp/config.yml @@ -68,10 +68,10 @@ test: RUN addgroup -S testgroup RUN adduser -S -G testgroup testuser - # required to allow testuser to call +RUN_EARTHLY_ARGS + # required to allow testuser to call +RUN_EARTHBUILD_ARGS RUN chmod 0777 /tmp/earthbuild-script - # required to allow testuser to call +RUN_EARTHLY_ARGS + # required to allow testuser to call +RUN_EARTHBUILD_ARGS USER testuser WORKDIR /home/testuser @@ -111,7 +111,7 @@ test: RUN echo "config test passed" -RUN_EARTHLY_ARGS: +RUN_EARTHBUILD_ARGS: FUNCTION ARG earthfile ARG target="+all" @@ -119,7 +119,7 @@ RUN_EARTHLY_ARGS: ARG exec_cmd ARG should_fail=false ARG output_contains - DO --pass-args tests+RUN_EARTHLY \ + DO --pass-args tests+RUN_EARTHBUILD \ --earthfile=$earthfile \ --target=$target \ --should_fail=$should_fail \ diff --git a/tests/functions-do-not-propagate-args/Earthfile b/tests/functions-do-not-propagate-args/Earthfile index ceed8d14d5..3a5054df4b 100644 --- a/tests/functions-do-not-propagate-args/Earthfile +++ b/tests/functions-do-not-propagate-args/Earthfile @@ -8,13 +8,13 @@ test-all: test-v07: COPY propagate.earth Earthfile RUN sed -i "s/VERSION_STRING_TO_REPLACE/VERSION --use-function-keyword 0.7/g" Earthfile - DO --pass-args +RUN_EARTHLY --target=+test --contains-output="A was not propagated" + DO --pass-args +RUN_EARTHBUILD --target=+test --contains-output="A was not propagated" test-v08: COPY propagate.earth Earthfile RUN sed -i "s/VERSION_STRING_TO_REPLACE/VERSION 0.8/g" Earthfile - DO --pass-args +RUN_EARTHLY --target=+test --contains-output="A was not propagated" + DO --pass-args +RUN_EARTHBUILD --target=+test --contains-output="A was not propagated" -RUN_EARTHLY: +RUN_EARTHBUILD: FUNCTION - DO --pass-args ..+RUN_EARTHLY + DO --pass-args ..+RUN_EARTHBUILD diff --git a/tests/git-metadata/Earthfile b/tests/git-metadata/Earthfile index ed4b6e46ff..de8632faa0 100644 --- a/tests/git-metadata/Earthfile +++ b/tests/git-metadata/Earthfile @@ -137,14 +137,14 @@ EARTHLY_GIT_BRANCH_OVERRIDE=branch-override earthly --config \$earthly_config -- --build-arg flag_on=false \ git.example.com/testuser/repo/flag_off:main+test-git-metadata " >/tmp/test-earthly-script && chmod +x /tmp/test-earthly-script - DO --pass-args +RUN_EARTHLY_ARGS --pre_command=start-sshd --exec_cmd=/tmp/test-earthly-script + DO --pass-args +RUN_EARTHBUILD_ARGS --pre_command=start-sshd --exec_cmd=/tmp/test-earthly-script -RUN_EARTHLY_ARGS: +RUN_EARTHBUILD_ARGS: FUNCTION ARG earthfile ARG pre_command ARG exec_cmd - DO ..+RUN_EARTHLY \ + DO ..+RUN_EARTHBUILD \ --earthfile=$earthfile \ --pre_command=$pre_command \ --exec_cmd=$exec_cmd diff --git a/tests/git-ssh-server/Earthfile b/tests/git-ssh-server/Earthfile index 352b2311ab..72348bc990 100644 --- a/tests/git-ssh-server/Earthfile +++ b/tests/git-ssh-server/Earthfile @@ -39,7 +39,7 @@ rm -rf therepo3 earthly --config \$earthly_config --verbose -D +test earthly --config \$earthly_config --verbose -D git.example.com/testuser/repo:main+hello " >/tmp/test-earthly-script && chmod +x /tmp/test-earthly-script - DO --pass-args +RUN_EARTHLY_ARGS --pre_command=start-sshd --earthfile=git-clone-private-ssh.earth --exec_cmd=/tmp/test-earthly-script + DO --pass-args +RUN_EARTHBUILD_ARGS --pre_command=start-sshd --earthfile=git-clone-private-ssh.earth --exec_cmd=/tmp/test-earthly-script test-ed25519-only: FROM --pass-args ./setup+server \ @@ -66,7 +66,7 @@ ssh git@git.example.com | grep \"Hi git! You've successfully authenticated, but earthly --config \$earthly_config --verbose -D +test earthly --config \$earthly_config --verbose -D git.example.com/testuser/repo:main+hello " >/tmp/test-earthly-script && chmod +x /tmp/test-earthly-script - DO --pass-args +RUN_EARTHLY_ARGS --pre_command=start-sshd --earthfile=git-clone-private-ssh.earth --exec_cmd=/tmp/test-earthly-script + DO --pass-args +RUN_EARTHBUILD_ARGS --pre_command=start-sshd --earthfile=git-clone-private-ssh.earth --exec_cmd=/tmp/test-earthly-script test-server-both-user-rsa-only: FROM --pass-args ./setup+server \ @@ -93,7 +93,7 @@ ssh git@git.example.com | grep \"Hi git! You've successfully authenticated, but earthly --config \$earthly_config --verbose -D +test earthly --config \$earthly_config --verbose -D git.example.com/testuser/repo:main+hello " >/tmp/test-earthly-script && chmod +x /tmp/test-earthly-script - DO --pass-args +RUN_EARTHLY_ARGS --pre_command=start-sshd --earthfile=git-clone-private-ssh.earth --exec_cmd=/tmp/test-earthly-script + DO --pass-args +RUN_EARTHBUILD_ARGS --pre_command=start-sshd --earthfile=git-clone-private-ssh.earth --exec_cmd=/tmp/test-earthly-script test-server-both-with-missing-keyscan: FROM --pass-args ./setup+server \ @@ -128,7 +128,7 @@ if earthly --config \$earthly_config --verbose -D git.example.com/testuser/repo: fi cat output.txt | grep 'no known_hosts entries found for git.example.com; falling back to https' " >/tmp/test-earthly-script && chmod +x /tmp/test-earthly-script - DO --pass-args +RUN_EARTHLY_ARGS --pre_command=start-sshd --earthfile=git-clone-private-ssh.earth --exec_cmd=/tmp/test-earthly-script + DO --pass-args +RUN_EARTHBUILD_ARGS --pre_command=start-sshd --earthfile=git-clone-private-ssh.earth --exec_cmd=/tmp/test-earthly-script test-server-both-with-only-rsa-keyscan: FROM --pass-args ./setup+server \ @@ -156,7 +156,7 @@ cat ~/.ssh/known_hosts earthly --config \$earthly_config --verbose -D +test earthly --config \$earthly_config --verbose -D git.example.com/testuser/repo:main+hello " >/tmp/test-earthly-script && chmod +x /tmp/test-earthly-script - DO --pass-args +RUN_EARTHLY_ARGS --pre_command=start-sshd --earthfile=git-clone-private-ssh.earth --exec_cmd=/tmp/test-earthly-script + DO --pass-args +RUN_EARTHBUILD_ARGS --pre_command=start-sshd --earthfile=git-clone-private-ssh.earth --exec_cmd=/tmp/test-earthly-script test-server-both-with-only-ed25519-keyscan: FROM --pass-args ./setup+server \ @@ -184,7 +184,7 @@ cat ~/.ssh/known_hosts earthly --config \$earthly_config --verbose -D +test earthly --config \$earthly_config --verbose -D git.example.com/testuser/repo:main+hello " >/tmp/test-earthly-script && chmod +x /tmp/test-earthly-script - DO --pass-args +RUN_EARTHLY_ARGS --pre_command=start-sshd --earthfile=git-clone-private-ssh.earth --exec_cmd=/tmp/test-earthly-script + DO --pass-args +RUN_EARTHBUILD_ARGS --pre_command=start-sshd --earthfile=git-clone-private-ssh.earth --exec_cmd=/tmp/test-earthly-script test-configured-ssh-no-keyscan: FROM --pass-args ./setup+server \ @@ -227,7 +227,7 @@ earthly --config \$earthly_config config 'git.\"git.example.com\"' '{\"auth\": \ earthly --config \$earthly_config --verbose -D +test earthly --config \$earthly_config --verbose -D git.example.com/testuser/repo:main+hello " >/tmp/test-earthly-script && chmod +x /tmp/test-earthly-script - DO --pass-args +RUN_EARTHLY_ARGS --pre_command=start-sshd --earthfile=git-clone-private-ssh.earth --exec_cmd=/tmp/test-earthly-script + DO --pass-args +RUN_EARTHBUILD_ARGS --pre_command=start-sshd --earthfile=git-clone-private-ssh.earth --exec_cmd=/tmp/test-earthly-script test-server-with-unhashed-keyscan: FROM --pass-args ./setup+server \ @@ -257,7 +257,7 @@ cat /tmp/known_hosts.old | awk '{printf \"git.example.com %s %s\\n\", \$2, \$3}' earthly --config \$earthly_config --verbose -D +test earthly --config \$earthly_config --verbose -D git.example.com/testuser/repo:main+hello " >/tmp/test-earthly-script && chmod +x /tmp/test-earthly-script - DO --pass-args +RUN_EARTHLY_ARGS --pre_command=start-sshd --earthfile=git-clone-private-ssh.earth --exec_cmd=/tmp/test-earthly-script + DO --pass-args +RUN_EARTHBUILD_ARGS --pre_command=start-sshd --earthfile=git-clone-private-ssh.earth --exec_cmd=/tmp/test-earthly-script test-with-custom-matcher: FROM --pass-args ./setup+server \ @@ -304,7 +304,7 @@ cat output.txt | grep $(echo MTIzM2MwODQtNGNmNS00Nzk3LWE0YzUtZWI2NTM1NGVlN2Vl | earthly --config \$earthly_config --verbose -D funnyserver/repo:main+hello 2>&1 | tee output.txt cat output.txt | grep $(echo MTIzM2MwODQtNGNmNS00Nzk3LWE0YzUtZWI2NTM1NGVlN2Vl | base64 -d) " >/tmp/test-earthly-script && chmod +x /tmp/test-earthly-script - DO --pass-args +RUN_EARTHLY_ARGS --pre_command=start-sshd --earthfile=from-funnyserver.earth --exec_cmd=/tmp/test-earthly-script + DO --pass-args +RUN_EARTHBUILD_ARGS --pre_command=start-sshd --earthfile=from-funnyserver.earth --exec_cmd=/tmp/test-earthly-script test-git-clone-command-with-custom-matcher: FROM --pass-args ./setup+server \ @@ -333,7 +333,7 @@ ssh-add -l test \"\$(cat status)\" = \"0\" grep 57043e67e8ad8367799dd70c5f78ff42 output.txt " >/tmp/test-earthly-script && chmod +x /tmp/test-earthly-script - DO --pass-args +RUN_EARTHLY_ARGS --pre_command=start-sshd --earthfile=git-clone-funnyserver.earth --exec_cmd=/tmp/test-earthly-script + DO --pass-args +RUN_EARTHBUILD_ARGS --pre_command=start-sshd --earthfile=git-clone-funnyserver.earth --exec_cmd=/tmp/test-earthly-script test-custom-matcher-non-standard-port-and-no-host-checking: FROM --pass-args ./setup+server \ @@ -373,7 +373,7 @@ grep 57043e67e8ad8367799dd70c5f78ff42 output2.txt # finally make sure we can reference it remotely via the cli earthly --config \$earthly_config --verbose -D git.example.com/testuser/repo+hello " >/tmp/test-earthly-script && chmod +x /tmp/test-earthly-script - DO --pass-args +RUN_EARTHLY_ARGS --pre_command=start-sshd --earthfile=git-clone-self-hosted.earth --exec_cmd=/tmp/test-earthly-script + DO --pass-args +RUN_EARTHBUILD_ARGS --pre_command=start-sshd --earthfile=git-clone-self-hosted.earth --exec_cmd=/tmp/test-earthly-script all: @@ -389,12 +389,12 @@ all: BUILD +test-git-clone-command-with-custom-matcher BUILD +test-custom-matcher-non-standard-port-and-no-host-checking -RUN_EARTHLY_ARGS: +RUN_EARTHBUILD_ARGS: FUNCTION ARG earthfile ARG pre_command ARG exec_cmd - DO ..+RUN_EARTHLY \ + DO ..+RUN_EARTHBUILD \ --earthfile=$earthfile \ --pre_command=$pre_command \ --exec_cmd=$exec_cmd diff --git a/tests/invalid/Earthfile b/tests/invalid/Earthfile index 334b5a9889..bdfd4b5c95 100644 --- a/tests/invalid/Earthfile +++ b/tests/invalid/Earthfile @@ -6,22 +6,22 @@ IMPORT .. AS tests WORKDIR /test test-trailing-backslash: - DO --pass-args +RUN_EARTHLY_ARGS --earthfile=trailing-backslash.earth --should_fail=true --target=+base + DO --pass-args +RUN_EARTHBUILD_ARGS --earthfile=trailing-backslash.earth --should_fail=true --target=+base test-leading-whitespace: - DO --pass-args +RUN_EARTHLY_ARGS --earthfile=leading-whitespace.earth --should_fail=true --target=+base --output_contains="syntax error" + DO --pass-args +RUN_EARTHBUILD_ARGS --earthfile=leading-whitespace.earth --should_fail=true --target=+base --output_contains="syntax error" test-all: BUILD +test-trailing-backslash BUILD +test-leading-whitespace -RUN_EARTHLY_ARGS: +RUN_EARTHBUILD_ARGS: FUNCTION ARG earthfile ARG target ARG should_fail=false ARG output_contains - DO --pass-args tests+RUN_EARTHLY \ + DO --pass-args tests+RUN_EARTHBUILD \ --earthfile=$earthfile \ --target=$target \ --should_fail=$should_fail \ diff --git a/tests/locally-in-command/Earthfile b/tests/locally-in-command/Earthfile index 58a980652d..bcef8d0579 100644 --- a/tests/locally-in-command/Earthfile +++ b/tests/locally-in-command/Earthfile @@ -16,16 +16,16 @@ test-command-in-sub-dir: COPY target-that-calls-command.earth /the-test/Earthfile COPY other-target-that-calls-command.earth /the-test/other/path/Earthfile RUN touch /this-file-exists-locally - DO --pass-args +RUN_EARTHLY_ARGS --target=/the-test+test + DO --pass-args +RUN_EARTHBUILD_ARGS --target=/the-test+test RUN test "$(cat /the-test/data)" = "I am running in /the-test" - DO --pass-args +RUN_EARTHLY_ARGS --target=/the-test+test --should-fail=true + DO --pass-args +RUN_EARTHBUILD_ARGS --target=/the-test+test --should-fail=true # cleanup RUN rm /the-test/data RUN find /the-test | grep -v data # next test a target that calls the same UDC from a different location - DO --pass-args +RUN_EARTHLY_ARGS --target=/the-test+test-other + DO --pass-args +RUN_EARTHBUILD_ARGS --target=/the-test+test-other RUN ! test -f /the-test/data RUN test "$(cat /the-test/other/path/data)" = "I am running in /the-test/other/path" @@ -34,7 +34,7 @@ test-command-in-sub-dir: RUN find /the-test | grep -v data # finally test both targets that call the same locally command result in both files being created - DO --pass-args +RUN_EARTHLY_ARGS --target=/the-test+test-both + DO --pass-args +RUN_EARTHBUILD_ARGS --target=/the-test+test-both RUN test "$(cat /the-test/data)" = "I am running in /the-test" RUN test "$(cat /the-test/other/path/data)" = "I am running in /the-test/other/path" @@ -44,15 +44,15 @@ test-udc-that-calls-other-udc: COPY command.earth some/subdir/Earthfile COPY command-that-calls-command.earth some/subdir/submarine/Earthfile COPY target-that-calls-command-that-calls-command.earth Earthfile - DO --pass-args +RUN_EARTHLY_ARGS --target=+test + DO --pass-args +RUN_EARTHBUILD_ARGS --target=+test RUN test "$(cat data)" = "I am running in /my/test" -RUN_EARTHLY_ARGS: +RUN_EARTHBUILD_ARGS: FUNCTION ARG earthfile ARG target ARG should_fail=false - DO --pass-args tests+RUN_EARTHLY \ + DO --pass-args tests+RUN_EARTHBUILD \ --earthfile=$earthfile \ --target=$target \ --should_fail=$should_fail diff --git a/tests/locally-in-function/Earthfile b/tests/locally-in-function/Earthfile index 9ab21561d0..c2e9079746 100644 --- a/tests/locally-in-function/Earthfile +++ b/tests/locally-in-function/Earthfile @@ -16,16 +16,16 @@ test-function-in-sub-dir: COPY target-that-calls-function.earth /the-test/Earthfile COPY other-target-that-calls-function.earth /the-test/other/path/Earthfile RUN touch /this-file-exists-locally - DO --pass-args +RUN_EARTHLY_ARGS --target=/the-test+test + DO --pass-args +RUN_EARTHBUILD_ARGS --target=/the-test+test RUN test "$(cat /the-test/data)" = "I am running in /the-test" - DO --pass-args +RUN_EARTHLY_ARGS --target=/the-test+test --should-fail=true + DO --pass-args +RUN_EARTHBUILD_ARGS --target=/the-test+test --should-fail=true # cleanup RUN rm /the-test/data RUN find /the-test | grep -v data # next test a target that calls the same function from a different location - DO --pass-args +RUN_EARTHLY_ARGS --target=/the-test+test-other + DO --pass-args +RUN_EARTHBUILD_ARGS --target=/the-test+test-other RUN ! test -f /the-test/data RUN test "$(cat /the-test/other/path/data)" = "I am running in /the-test/other/path" @@ -34,7 +34,7 @@ test-function-in-sub-dir: RUN find /the-test | grep -v data # finally test both targets that call the same locally function result in both files being created - DO --pass-args +RUN_EARTHLY_ARGS --target=/the-test+test-both + DO --pass-args +RUN_EARTHBUILD_ARGS --target=/the-test+test-both RUN test "$(cat /the-test/data)" = "I am running in /the-test" RUN test "$(cat /the-test/other/path/data)" = "I am running in /the-test/other/path" @@ -44,15 +44,15 @@ test-function-that-calls-other-function: COPY function.earth some/subdir/Earthfile COPY function-that-calls-function.earth some/subdir/submarine/Earthfile COPY target-that-calls-function-that-calls-function.earth Earthfile - DO --pass-args +RUN_EARTHLY_ARGS --target=+test + DO --pass-args +RUN_EARTHBUILD_ARGS --target=+test RUN test "$(cat data)" = "I am running in /my/test" -RUN_EARTHLY_ARGS: +RUN_EARTHBUILD_ARGS: FUNCTION ARG earthfile ARG target ARG should_fail=false - DO --pass-args tests+RUN_EARTHLY \ + DO --pass-args tests+RUN_EARTHBUILD \ --earthfile=$earthfile \ --target=$target \ --should_fail=$should_fail diff --git a/tests/logbus/Earthfile b/tests/logbus/Earthfile index 331a491be7..06b1e17cf3 100644 --- a/tests/logbus/Earthfile +++ b/tests/logbus/Earthfile @@ -9,7 +9,7 @@ test-all: BUILD +test-manifest test-manifest: - DO tests+RUN_EARTHLY --earthfile=manifest.earth --extra_args="--no-output --logstream-debug-manifest-file man.json" + DO tests+RUN_EARTHBUILD --earthfile=manifest.earth --extra_args="--no-output --logstream-debug-manifest-file man.json" RUN cat man.json | jq '.commands | length' | acbgrep 16 RUN cat man.json | jq '.commands[]' | jq 'select(.name | contains("COPY"))' | jq '.dependsOn[0].referencedName' | acbgrep 'src' RUN cat man.json | jq '.commands[]' | jq 'select(.name | contains("COPY"))' | jq '.dependsOn | length' | acbgrep 1 diff --git a/tests/pass-args-default-via-function/Earthfile b/tests/pass-args-default-via-function/Earthfile index 40ee6821f2..f08ac49138 100644 --- a/tests/pass-args-default-via-function/Earthfile +++ b/tests/pass-args-default-via-function/Earthfile @@ -6,14 +6,14 @@ test: COPY root.earth Earthfile COPY sub.earth sub/Earthfile COPY subsub.earth sub/submarine/Earthfile - DO --pass-args +RUN_EARTHLY_ARGS --target=+test + DO --pass-args +RUN_EARTHBUILD_ARGS --target=+test -RUN_EARTHLY_ARGS: +RUN_EARTHBUILD_ARGS: FUNCTION ARG earthfile ARG target ARG should_fail=false - DO --pass-args ..+RUN_EARTHLY \ + DO --pass-args ..+RUN_EARTHBUILD \ --earthfile=$earthfile \ --target=$target \ --should_fail=$should_fail diff --git a/tests/pass-args-default/Earthfile b/tests/pass-args-default/Earthfile index f6afaf9b2f..8856e30954 100644 --- a/tests/pass-args-default/Earthfile +++ b/tests/pass-args-default/Earthfile @@ -5,14 +5,14 @@ test: RUN mkdir sub COPY root.earth Earthfile COPY sub.earth sub/Earthfile - DO --pass-args +RUN_EARTHLY_ARGS --target=+test + DO --pass-args +RUN_EARTHBUILD_ARGS --target=+test -RUN_EARTHLY_ARGS: +RUN_EARTHBUILD_ARGS: FUNCTION ARG earthfile ARG target ARG should_fail=false - DO --pass-args ..+RUN_EARTHLY \ + DO --pass-args ..+RUN_EARTHBUILD \ --earthfile=$earthfile \ --target=$target \ --should_fail=$should_fail diff --git a/tests/pass-args-global-via-function/Earthfile b/tests/pass-args-global-via-function/Earthfile index 40ee6821f2..f08ac49138 100644 --- a/tests/pass-args-global-via-function/Earthfile +++ b/tests/pass-args-global-via-function/Earthfile @@ -6,14 +6,14 @@ test: COPY root.earth Earthfile COPY sub.earth sub/Earthfile COPY subsub.earth sub/submarine/Earthfile - DO --pass-args +RUN_EARTHLY_ARGS --target=+test + DO --pass-args +RUN_EARTHBUILD_ARGS --target=+test -RUN_EARTHLY_ARGS: +RUN_EARTHBUILD_ARGS: FUNCTION ARG earthfile ARG target ARG should_fail=false - DO --pass-args ..+RUN_EARTHLY \ + DO --pass-args ..+RUN_EARTHBUILD \ --earthfile=$earthfile \ --target=$target \ --should_fail=$should_fail diff --git a/tests/pass-args-global/Earthfile b/tests/pass-args-global/Earthfile index f6afaf9b2f..8856e30954 100644 --- a/tests/pass-args-global/Earthfile +++ b/tests/pass-args-global/Earthfile @@ -5,14 +5,14 @@ test: RUN mkdir sub COPY root.earth Earthfile COPY sub.earth sub/Earthfile - DO --pass-args +RUN_EARTHLY_ARGS --target=+test + DO --pass-args +RUN_EARTHBUILD_ARGS --target=+test -RUN_EARTHLY_ARGS: +RUN_EARTHBUILD_ARGS: FUNCTION ARG earthfile ARG target ARG should_fail=false - DO --pass-args ..+RUN_EARTHLY \ + DO --pass-args ..+RUN_EARTHBUILD \ --earthfile=$earthfile \ --target=$target \ --should_fail=$should_fail diff --git a/tests/pass-args-no-builtins/Earthfile b/tests/pass-args-no-builtins/Earthfile index f6afaf9b2f..8856e30954 100644 --- a/tests/pass-args-no-builtins/Earthfile +++ b/tests/pass-args-no-builtins/Earthfile @@ -5,14 +5,14 @@ test: RUN mkdir sub COPY root.earth Earthfile COPY sub.earth sub/Earthfile - DO --pass-args +RUN_EARTHLY_ARGS --target=+test + DO --pass-args +RUN_EARTHBUILD_ARGS --target=+test -RUN_EARTHLY_ARGS: +RUN_EARTHBUILD_ARGS: FUNCTION ARG earthfile ARG target ARG should_fail=false - DO --pass-args ..+RUN_EARTHLY \ + DO --pass-args ..+RUN_EARTHBUILD \ --earthfile=$earthfile \ --target=$target \ --should_fail=$should_fail diff --git a/tests/pass-args-via-function-with-override/Earthfile b/tests/pass-args-via-function-with-override/Earthfile index 40ee6821f2..f08ac49138 100644 --- a/tests/pass-args-via-function-with-override/Earthfile +++ b/tests/pass-args-via-function-with-override/Earthfile @@ -6,14 +6,14 @@ test: COPY root.earth Earthfile COPY sub.earth sub/Earthfile COPY subsub.earth sub/submarine/Earthfile - DO --pass-args +RUN_EARTHLY_ARGS --target=+test + DO --pass-args +RUN_EARTHBUILD_ARGS --target=+test -RUN_EARTHLY_ARGS: +RUN_EARTHBUILD_ARGS: FUNCTION ARG earthfile ARG target ARG should_fail=false - DO --pass-args ..+RUN_EARTHLY \ + DO --pass-args ..+RUN_EARTHBUILD \ --earthfile=$earthfile \ --target=$target \ --should_fail=$should_fail diff --git a/tests/private-https/Earthfile b/tests/private-https/Earthfile index d316991c47..2616c2a5db 100644 --- a/tests/private-https/Earthfile +++ b/tests/private-https/Earthfile @@ -35,7 +35,7 @@ earthly --config \$earthly_config config git \"{selfsigned.example.com: {auth: #earthly --config \$earthly_config -VD --git-username=testuser --git-password=keepitsecret +test earthly --config \$earthly_config -VD --git-username=testuser --git-password=keepitsecret selfsigned.example.com/testuser/repo:main+hello " >> /tmp/test-earthly-script - DO --pass-args +RUN_EARTHLY_ARGS --pre_command=start-nginx-with-git --earthfile=git-clone-private-https.earth --exec_cmd=/tmp/test-earthly-script + DO --pass-args +RUN_EARTHBUILD_ARGS --pre_command=start-nginx-with-git --earthfile=git-clone-private-https.earth --exec_cmd=/tmp/test-earthly-script git-clone-private-https-set-by-config-command: @@ -45,7 +45,7 @@ earthly --config \$earthly_config config git \"{selfsigned.example.com: {auth: earthly --config \$earthly_config --verbose -D +test earthly --config \$earthly_config --verbose -D selfsigned.example.com/testuser/repo:main+hello " >> /tmp/test-earthly-script - DO --pass-args +RUN_EARTHLY_ARGS --pre_command=start-nginx-with-git --earthfile=git-clone-private-https.earth --exec_cmd=/tmp/test-earthly-script + DO --pass-args +RUN_EARTHBUILD_ARGS --pre_command=start-nginx-with-git --earthfile=git-clone-private-https.earth --exec_cmd=/tmp/test-earthly-script git-clone-private-https-set-by-config-file: @@ -62,7 +62,7 @@ EOF earthly --config \$earthly_config --verbose -D +test earthly --config \$earthly_config --verbose -D selfsigned.example.com/testuser/repo:main+hello " >> /tmp/test-earthly-script - DO --pass-args +RUN_EARTHLY_ARGS --pre_command=start-nginx-with-git --earthfile=git-clone-private-https.earth --exec_cmd=/tmp/test-earthly-script + DO --pass-args +RUN_EARTHBUILD_ARGS --pre_command=start-nginx-with-git --earthfile=git-clone-private-https.earth --exec_cmd=/tmp/test-earthly-script git-clone-private-https-set-by-netrc: @@ -75,7 +75,7 @@ password keepitsecret\" > ~/.netrc earthly --config \$earthly_config --verbose -D +test earthly --config \$earthly_config --verbose -D selfsigned.example.com/testuser/repo:main+hello " >> /tmp/test-earthly-script - DO --pass-args +RUN_EARTHLY_ARGS --pre_command=start-nginx-with-git --earthfile=git-clone-private-https.earth --exec_cmd=/tmp/test-earthly-script + DO --pass-args +RUN_EARTHBUILD_ARGS --pre_command=start-nginx-with-git --earthfile=git-clone-private-https.earth --exec_cmd=/tmp/test-earthly-script git-clone-private-https-with-pattern-substitute: FROM +git-clone-private-https-base @@ -87,14 +87,14 @@ cat \$earthly_config earthly --config \$earthly_config --verbose -D +test earthly --config \$earthly_config --verbose -D selfsigned.example.com/testuser/testproject/testsubproject/nestedrepo:main+hello " >> /tmp/test-earthly-script - DO --pass-args +RUN_EARTHLY_ARGS --pre_command=start-nginx-with-git --earthfile=git-clone-private-https-nestedrepo.earth --exec_cmd=/tmp/test-earthly-script + DO --pass-args +RUN_EARTHBUILD_ARGS --pre_command=start-nginx-with-git --earthfile=git-clone-private-https-nestedrepo.earth --exec_cmd=/tmp/test-earthly-script -RUN_EARTHLY_ARGS: +RUN_EARTHBUILD_ARGS: FUNCTION ARG earthfile ARG pre_command ARG exec_cmd - DO ..+RUN_EARTHLY \ + DO ..+RUN_EARTHBUILD \ --earthfile=$earthfile \ --pre_command=$pre_command \ --exec_cmd=$exec_cmd diff --git a/tests/propagate-args-to-base/Earthfile b/tests/propagate-args-to-base/Earthfile index 1d470e1fe9..d308f8f2d6 100644 --- a/tests/propagate-args-to-base/Earthfile +++ b/tests/propagate-args-to-base/Earthfile @@ -8,13 +8,13 @@ test-all: test-v07: COPY propagate.earth Earthfile RUN sed -i "s/VERSION_STRING_TO_REPLACE/VERSION --use-function-keyword 0.7/g" Earthfile - DO --pass-args +RUN_EARTHLY --target=+test + DO --pass-args +RUN_EARTHBUILD --target=+test DO +CHECK_OUTPUT test-v08: COPY propagate.earth Earthfile RUN sed -i "s/VERSION_STRING_TO_REPLACE/VERSION --use-function-keyword --arg-scope-and-set 0.7/g" Earthfile - DO --pass-args +RUN_EARTHLY --target=+test + DO --pass-args +RUN_EARTHBUILD --target=+test DO +CHECK_OUTPUT CHECK_OUTPUT: @@ -24,6 +24,6 @@ CHECK_OUTPUT: RUN acbgrep "under FUNC2, the global is $(echo "set when calling FUNC2" | base64)" earthly.output RUN acbgrep "under target, the global is $(echo "set when calling target" | base64)" earthly.output -RUN_EARTHLY: +RUN_EARTHBUILD: FUNCTION - DO --pass-args ..+RUN_EARTHLY + DO --pass-args ..+RUN_EARTHBUILD diff --git a/tests/public-https/Earthfile b/tests/public-https/Earthfile index 269f7b6c8e..fae84c56a2 100644 --- a/tests/public-https/Earthfile +++ b/tests/public-https/Earthfile @@ -31,14 +31,14 @@ git-clone-public-https-empty-netrc: earthly --config \$earthly_config --verbose -D +test earthly --config \$earthly_config --verbose -D selfsigned.example.com/testuser/repo:main+hello " >> /tmp/test-earthly-script - DO --pass-args +RUN_EARTHLY_ARGS --pre_command=start-nginx-with-git --earthfile=git-clone-public-https.earth --exec_cmd=/tmp/test-earthly-script + DO --pass-args +RUN_EARTHBUILD_ARGS --pre_command=start-nginx-with-git --earthfile=git-clone-public-https.earth --exec_cmd=/tmp/test-earthly-script -RUN_EARTHLY_ARGS: +RUN_EARTHBUILD_ARGS: FUNCTION ARG earthfile ARG pre_command ARG exec_cmd - DO ..+RUN_EARTHLY \ + DO ..+RUN_EARTHBUILD \ --earthfile=$earthfile \ --pre_command=$pre_command \ --exec_cmd=$exec_cmd diff --git a/tests/raw-output/Earthfile b/tests/raw-output/Earthfile index 956edd55f8..ad4f3511a4 100644 --- a/tests/raw-output/Earthfile +++ b/tests/raw-output/Earthfile @@ -6,7 +6,7 @@ IMPORT .. AS tests WORKDIR /test test-all: - DO tests+RUN_EARTHLY --earthfile=manifest.earth --target=+gha + DO tests+RUN_EARTHBUILD --earthfile=manifest.earth --target=+gha RUN acbgrep '^::group::' earthly.output RUN acbgrep -v '^should have prefix' earthly.output RUN acbgrep '^::endgroup::' earthly.output diff --git a/tests/registry-certs/Earthfile b/tests/registry-certs/Earthfile index b0fca63620..2837e8827c 100644 --- a/tests/registry-certs/Earthfile +++ b/tests/registry-certs/Earthfile @@ -37,16 +37,16 @@ all: test-push-pull: FROM +test-base # Running with tmpfs mount = no local cache. - DO --pass-args +DO_REMOTE_CACHE_EARTHLY --target=+test-push - DO --pass-args +DO_REMOTE_CACHE_EARTHLY --target=+test-pull + DO --pass-args +DO_REMOTE_CACHE_EARTHBUILD --target=+test-push + DO --pass-args +DO_REMOTE_CACHE_EARTHBUILD --target=+test-pull test-connect: FROM +test-base COPY ./certs/domain.crt ./test.ca - DO --pass-args +DO_REMOTE_CACHE_EARTHLY --target=+test-connect + DO --pass-args +DO_REMOTE_CACHE_EARTHBUILD --target=+test-connect # Work around the lack of variable overriding, since the base image already includes EARTHLY_ADDITIONAL_BUILDKIT_CONFIG -DO_REMOTE_CACHE_EARTHLY: +DO_REMOTE_CACHE_EARTHBUILD: FUNCTION ARG EARTHLY_ADDITIONAL_BUILDKIT_CONFIG diff --git a/tests/remote-cache/Earthfile b/tests/remote-cache/Earthfile index cb332610b6..65d785edea 100644 --- a/tests/remote-cache/Earthfile +++ b/tests/remote-cache/Earthfile @@ -19,7 +19,7 @@ all: test1: RUN echo "content" >./input # Running with tmpfs mount = no local cache. - DO --pass-args +DO_REMOTE_CACHE_EARTHLY --target=+test1 + DO --pass-args +DO_REMOTE_CACHE_EARTHBUILD --target=+test1 # Not cached - before copy. RUN nl=$(cat ./output | grep "execute-test1-run-before-copy" | grep -v "echo" | wc -l) && acbtest "$nl" -eq 1 @@ -28,7 +28,7 @@ test1: RUN nl=$(cat ./output | grep "execute-test1-run-after-copy" | grep -v "echo" | wc -l) && acbtest "$nl" -eq 1 # No change & re-run - should only have 1 line output and not re-echo. - DO --pass-args +DO_REMOTE_CACHE_EARTHLY --target=+test1 + DO --pass-args +DO_REMOTE_CACHE_EARTHBUILD --target=+test1 RUN nl=$(cat ./output | grep -F '*cached* --> RUN echo "execute-test1-run-before-copy"' | wc -l) && acbtest "$nl" -eq 1 RUN nl=$(cat ./output | grep "execute-test1-run-before-copy" | grep -v "echo" | wc -l) && acbtest "$nl" -eq 0 @@ -38,7 +38,7 @@ test1: RUN nl=$(cat ./output | grep "execute-test1-run-after-copy" | grep -v "echo" | wc -l) && acbtest "$nl" -eq 0 RUN echo "other content" >./input - DO --pass-args +DO_REMOTE_CACHE_EARTHLY --target=+test1 + DO --pass-args +DO_REMOTE_CACHE_EARTHBUILD --target=+test1 # Cached. RUN nl=$(cat ./output | grep -F '*cached* --> RUN echo "execute-test1-run-before-copy"' | wc -l) && acbtest "$nl" -eq 1 @@ -51,8 +51,8 @@ test2: RUN echo "a" COPY --dir test2 test2 # Running with tmpfs mount = no local cache. - DO --pass-args +DO_REMOTE_CACHE_EARTHLY --target=+test2 - DO --pass-args +DO_REMOTE_CACHE_EARTHLY --target=+test2 + DO --pass-args +DO_REMOTE_CACHE_EARTHBUILD --target=+test2 + DO --pass-args +DO_REMOTE_CACHE_EARTHBUILD --target=+test2 # TODO FIXME the remote-cache caching isn't always working; we will ignore these checks until the flakiness is fixed. RUN (cat ./output | grep '\*cached\* --> RUN npm install') || echo "WARNING: RUN command not cached" RUN (cat ./output | grep '\*cached\* --> COPY test2/dist dist') || echo "WARNING: COPY classical command not cached" @@ -67,7 +67,7 @@ test3: -- --no-output --strict --use-inline-cache --save-inline-cache --push +test3 # Work around the lack of variable overriding, since the base image already includes EARTHLY_ADDITIONAL_BUILDKIT_CONFIG -DO_REMOTE_CACHE_EARTHLY: +DO_REMOTE_CACHE_EARTHBUILD: FUNCTION ARG target diff --git a/tests/scrub-https-credentials/Earthfile b/tests/scrub-https-credentials/Earthfile index e3a8ceb500..8c4ed765f1 100644 --- a/tests/scrub-https-credentials/Earthfile +++ b/tests/scrub-https-credentials/Earthfile @@ -20,7 +20,7 @@ earthly --config \$earthly_config config git \"{selfsigned.example.com: {auth: h earthly --config \$earthly_config --verbose --debug +gitclone >output.txt 2>&1 " >/tmp/test-earthly-script && chmod +x /tmp/test-earthly-script - DO --pass-args +RUN_EARTHLY_ARGS --pre_command=start-nginx-with-git --earthfile=scrub-credentials.earth --exec_cmd=/tmp/test-earthly-script + DO --pass-args +RUN_EARTHBUILD_ARGS --pre_command=start-nginx-with-git --earthfile=scrub-credentials.earth --exec_cmd=/tmp/test-earthly-script RUN cat output.txt | grep -vw echo | grep 'gitclone done' RUN cat output.txt && \ @@ -45,7 +45,7 @@ cat \$earthly_config earthly --config \$earthly_config --verbose --debug selfsigned.example.com/repo:main+hello >output.txt 2>&1 " >/tmp/test-earthly-script && chmod +x /tmp/test-earthly-script - DO --pass-args +RUN_EARTHLY_ARGS --pre_command=start-nginx-with-git --exec_cmd=/tmp/test-earthly-script + DO --pass-args +RUN_EARTHBUILD_ARGS --pre_command=start-nginx-with-git --exec_cmd=/tmp/test-earthly-script # make sure the password doesn't appear anywhere RUN cat output.txt && \ @@ -78,7 +78,7 @@ if [ \$exit_code -eq 0 ]; then fi " >/tmp/test-earthly-script && chmod +x /tmp/test-earthly-script - DO --pass-args +RUN_EARTHLY_ARGS --exec_cmd=/tmp/test-earthly-script + DO --pass-args +RUN_EARTHBUILD_ARGS --exec_cmd=/tmp/test-earthly-script RUN grep 'failed to fetch remote' output.txt # test the failure message correctly scrubs the credentials @@ -94,12 +94,12 @@ fi echo "OK: password was not leaked"; \ fi -RUN_EARTHLY_ARGS: +RUN_EARTHBUILD_ARGS: FUNCTION ARG earthfile ARG pre_command ARG exec_cmd - DO ..+RUN_EARTHLY \ + DO ..+RUN_EARTHBUILD \ --earthfile=$earthfile \ --pre_command=$pre_command \ --exec_cmd=$exec_cmd diff --git a/tests/secret-provider-config/Earthfile b/tests/secret-provider-config/Earthfile index 064c05a5ee..6e5e3c11b0 100644 --- a/tests/secret-provider-config/Earthfile +++ b/tests/secret-provider-config/Earthfile @@ -14,12 +14,12 @@ earthly --config \$earthly_config --verbose -D +test test: FROM +base-secret-provider - DO --pass-args +RUN_EARTHLY_ARGS --earthfile=test.earth --exec_cmd=/tmp/test-earthly-script + DO --pass-args +RUN_EARTHBUILD_ARGS --earthfile=test.earth --exec_cmd=/tmp/test-earthly-script RUN test "$(cat output/value)" = "my secret is williwaw; don't tell anyone." test-binary: FROM +base-secret-provider - DO --pass-args +RUN_EARTHLY_ARGS --earthfile=test-binary.earth --exec_cmd=/tmp/test-earthly-script + DO --pass-args +RUN_EARTHBUILD_ARGS --earthfile=test-binary.earth --exec_cmd=/tmp/test-earthly-script base-secret-provider-with-flag: RUN echo "#!/bin/sh @@ -31,7 +31,7 @@ earthly --config \$earthly_config --verbose -D +test test-with-flag: FROM +base-secret-provider-with-flag - DO --pass-args +RUN_EARTHLY_ARGS --earthfile=test.earth --exec_cmd=/tmp/test-earthly-script + DO --pass-args +RUN_EARTHBUILD_ARGS --earthfile=test.earth --exec_cmd=/tmp/test-earthly-script RUN test "$(cat output/value)" = "my secret is WILLIWAW; don't tell anyone." base-secret-provider-with-env: @@ -44,12 +44,12 @@ earthly --config \$earthly_config --verbose -D +test test-with-env: FROM +base-secret-provider-with-env - DO --pass-args +RUN_EARTHLY_ARGS --earthfile=test.earth --exec_cmd=/tmp/test-earthly-script + DO --pass-args +RUN_EARTHBUILD_ARGS --earthfile=test.earth --exec_cmd=/tmp/test-earthly-script RUN test "$(cat output/value)" = "my secret is jvyyvjnj; don't tell anyone." test-with-project-secrets: FROM +base-secret-provider-with-flag - DO --pass-args +RUN_EARTHLY_ARGS --earthfile=test-with-project-secrets.earth --exec_cmd=/tmp/test-earthly-script + DO --pass-args +RUN_EARTHBUILD_ARGS --earthfile=test-with-project-secrets.earth --exec_cmd=/tmp/test-earthly-script RUN test "$(cat output/value)" = "my secret is org/project; don't tell anyone." test-all: @@ -59,12 +59,12 @@ test-all: BUILD +test-with-env BUILD +test-with-project-secrets -RUN_EARTHLY_ARGS: +RUN_EARTHBUILD_ARGS: FUNCTION ARG earthfile ARG pre_command ARG exec_cmd - DO ..+RUN_EARTHLY \ + DO ..+RUN_EARTHBUILD \ --earthfile=$earthfile \ --pre_command=$pre_command \ --exec_cmd=$exec_cmd diff --git a/tests/shell-out/Earthfile b/tests/shell-out/Earthfile index 87d2fbeeb6..687a546653 100644 --- a/tests/shell-out/Earthfile +++ b/tests/shell-out/Earthfile @@ -13,35 +13,35 @@ test-all: BUILD +test-new-shellout-errors-are-detected test-old: - DO --pass-args +RUN_EARTHLY_ARGS --earthfile=old.earth --target=+test - DO --pass-args +RUN_EARTHLY_ARGS --earthfile=old-no-middle-shell-out.earth --target=+test - DO --pass-args +RUN_EARTHLY_ARGS --earthfile=old-ignore-shellout-errors.earth --target=+test - DO --pass-args +RUN_EARTHLY_ARGS --earthfile=old-fail1.earth --target=+test --should_fail=true --output_contains="/valid-\$.echo file..: not found" - DO --pass-args +RUN_EARTHLY_ARGS --earthfile=old-fail2.earth --target=+test --should_fail=true --output_contains="invalid ARG key definition \$key" + DO --pass-args +RUN_EARTHBUILD_ARGS --earthfile=old.earth --target=+test + DO --pass-args +RUN_EARTHBUILD_ARGS --earthfile=old-no-middle-shell-out.earth --target=+test + DO --pass-args +RUN_EARTHBUILD_ARGS --earthfile=old-ignore-shellout-errors.earth --target=+test + DO --pass-args +RUN_EARTHBUILD_ARGS --earthfile=old-fail1.earth --target=+test --should_fail=true --output_contains="/valid-\$.echo file..: not found" + DO --pass-args +RUN_EARTHBUILD_ARGS --earthfile=old-fail2.earth --target=+test --should_fail=true --output_contains="invalid ARG key definition \$key" test-old2: - DO --pass-args +RUN_EARTHLY_ARGS --earthfile=old2.earth --target=+test + DO --pass-args +RUN_EARTHBUILD_ARGS --earthfile=old2.earth --target=+test test-old-works-with-new: COPY old.earth Earthfile RUN sed -i "1s/VERSION .*/VERSION 0.8/" Earthfile - DO --pass-args +RUN_EARTHLY_ARGS --target=+test + DO --pass-args +RUN_EARTHBUILD_ARGS --target=+test test-new-shellout-errors-are-detected: COPY old-ignore-shellout-errors.earth Earthfile RUN sed -i "1s/VERSION .*/VERSION 0.8/" Earthfile - DO --pass-args +RUN_EARTHLY_ARGS --target=+test --should_fail=true + DO --pass-args +RUN_EARTHBUILD_ARGS --target=+test --should_fail=true test-new: - DO --pass-args +RUN_EARTHLY_ARGS --earthfile=new.earth --target=+test + DO --pass-args +RUN_EARTHBUILD_ARGS --earthfile=new.earth --target=+test -RUN_EARTHLY_ARGS: +RUN_EARTHBUILD_ARGS: FUNCTION ARG earthfile ARG target ARG should_fail=false ARG output_contains - DO tests+RUN_EARTHLY \ + DO tests+RUN_EARTHBUILD \ --earthfile=$earthfile \ --target=$target \ --should_fail=$should_fail \ diff --git a/tests/version/Earthfile b/tests/version/Earthfile index a03aef6c4c..7a39b8e1a3 100644 --- a/tests/version/Earthfile +++ b/tests/version/Earthfile @@ -6,68 +6,68 @@ IMPORT .. AS tests WORKDIR /test test-single-line: - DO --pass-args +RUN_EARTHLY_ARGS --earthfile=single-line.earth --target=+test + DO --pass-args +RUN_EARTHBUILD_ARGS --earthfile=single-line.earth --target=+test test-single-line-with-args: - DO --pass-args +RUN_EARTHLY_ARGS --earthfile=single-line-with-args.earth --target=+test + DO --pass-args +RUN_EARTHBUILD_ARGS --earthfile=single-line-with-args.earth --target=+test test-single-line-with-comment: - DO --pass-args +RUN_EARTHLY_ARGS --earthfile=single-line-with-comment.earth --target=+test + DO --pass-args +RUN_EARTHBUILD_ARGS --earthfile=single-line-with-comment.earth --target=+test test-multi-line: - DO --pass-args +RUN_EARTHLY_ARGS --earthfile=multi-line.earth --target=+test + DO --pass-args +RUN_EARTHBUILD_ARGS --earthfile=multi-line.earth --target=+test test-multi-line-with-comment: - DO --pass-args +RUN_EARTHLY_ARGS --earthfile=multi-line-with-comment.earth --target=+test + DO --pass-args +RUN_EARTHBUILD_ARGS --earthfile=multi-line-with-comment.earth --target=+test test-multi-line-with-comment2: - DO --pass-args +RUN_EARTHLY_ARGS --earthfile=multi-line-with-comment2.earth --target=+test + DO --pass-args +RUN_EARTHBUILD_ARGS --earthfile=multi-line-with-comment2.earth --target=+test test-multi-line-with-comment3: - DO --pass-args +RUN_EARTHLY_ARGS --earthfile=multi-line-with-comment3.earth --target=+test + DO --pass-args +RUN_EARTHBUILD_ARGS --earthfile=multi-line-with-comment3.earth --target=+test test-multi-line-with-comment4: - DO --pass-args +RUN_EARTHLY_ARGS --earthfile=multi-line-with-comment4.earth --target=+test + DO --pass-args +RUN_EARTHBUILD_ARGS --earthfile=multi-line-with-comment4.earth --target=+test test-multi-line-with-args: - DO --pass-args +RUN_EARTHLY_ARGS --earthfile=multi-line-with-args.earth --target=+test + DO --pass-args +RUN_EARTHBUILD_ARGS --earthfile=multi-line-with-args.earth --target=+test test-multi-line-with-args2: - DO --pass-args +RUN_EARTHLY_ARGS --earthfile=multi-line-with-args2.earth --target=+test + DO --pass-args +RUN_EARTHBUILD_ARGS --earthfile=multi-line-with-args2.earth --target=+test test-multi-line-with-newline: - DO --pass-args +RUN_EARTHLY_ARGS --earthfile=multi-line-with-empty-newline.earth --target=+test + DO --pass-args +RUN_EARTHBUILD_ARGS --earthfile=multi-line-with-empty-newline.earth --target=+test test-no-feature-flag-overrides: - DO --pass-args +RUN_EARTHLY_ARGS --should_fail=true --earthfile=invalid-feature-flag-override.earth --target=+test --output_contains="bool flag .--referenced-save-only. cannot have an argument" + DO --pass-args +RUN_EARTHBUILD_ARGS --should_fail=true --earthfile=invalid-feature-flag-override.earth --target=+test --output_contains="bool flag .--referenced-save-only. cannot have an argument" test-version-only-import: RUN mkdir subdir RUN echo "VERSION 0.8" > subdir/Earthfile - DO --pass-args +RUN_EARTHLY_ARGS --earthfile=version-only-import.earth --target=+test + DO --pass-args +RUN_EARTHBUILD_ARGS --earthfile=version-only-import.earth --target=+test # test-version-only-without-newline tests that earthly will still work with non-POSIX text files test-version-only-without-newline: - DO --pass-args +RUN_EARTHLY_ARGS --earthfile=version-only.earth --target=+base + DO --pass-args +RUN_EARTHBUILD_ARGS --earthfile=version-only.earth --target=+base RUN test "$(cat Earthfile | wc -l)" = "0" # check Earthfile doesn't contain a newline test-comment-and-whitespace-before-version: - DO --pass-args +RUN_EARTHLY_ARGS --earthfile=comment-and-whitespace-before-version.earth --target=+test + DO --pass-args +RUN_EARTHBUILD_ARGS --earthfile=comment-and-whitespace-before-version.earth --target=+test test-whitespace-then-version: - DO --pass-args +RUN_EARTHLY_ARGS --earthfile=whitespace-then-version.earth --target=+test + DO --pass-args +RUN_EARTHBUILD_ARGS --earthfile=whitespace-then-version.earth --target=+test test-invalid-versions: - DO --pass-args +RUN_EARTHLY_ARGS --should_fail=true --earthfile=invalid-major-version.earth --target=+base + DO --pass-args +RUN_EARTHBUILD_ARGS --should_fail=true --earthfile=invalid-major-version.earth --target=+base RUN acbgrep 'invalid VERSION in Earthfile, supported versions are 0.6, 0.7, or 0.8' earthly.output - DO --pass-args +RUN_EARTHLY_ARGS --should_fail=true --earthfile=invalid-minor-version.earth --target=+base + DO --pass-args +RUN_EARTHBUILD_ARGS --should_fail=true --earthfile=invalid-minor-version.earth --target=+base RUN acbgrep 'invalid VERSION in Earthfile, supported versions are 0.6, 0.7, or 0.8' earthly.output - DO --pass-args +RUN_EARTHLY_ARGS --should_fail=true --earthfile=invalid-patch-version.earth --target=+base + DO --pass-args +RUN_EARTHBUILD_ARGS --should_fail=true --earthfile=invalid-patch-version.earth --target=+base RUN acbgrep 'unexpected VERSION arguments; should be VERSION \[flags\] .' earthly.output - DO --pass-args +RUN_EARTHLY_ARGS --should_fail=true --earthfile=invalid-format-version.earth --target=+base + DO --pass-args +RUN_EARTHBUILD_ARGS --should_fail=true --earthfile=invalid-format-version.earth --target=+base RUN acbgrep 'unexpected VERSION arguments; should be VERSION \[flags\] .' earthly.output test-all: @@ -89,12 +89,12 @@ test-all: BUILD +test-invalid-versions BUILD +test-no-feature-flag-overrides -RUN_EARTHLY_ARGS: +RUN_EARTHBUILD_ARGS: FUNCTION ARG earthfile ARG target ARG should_fail=false - DO --pass-args tests+RUN_EARTHLY \ + DO --pass-args tests+RUN_EARTHBUILD \ --earthfile=$earthfile \ --target=$target \ --should_fail=$should_fail diff --git a/tests/warn-if-not-logged-in/Earthfile b/tests/warn-if-not-logged-in/Earthfile index a1bd6597aa..65039b8c7c 100644 --- a/tests/warn-if-not-logged-in/Earthfile +++ b/tests/warn-if-not-logged-in/Earthfile @@ -12,15 +12,15 @@ RUN rm -f /root/.docker/config.json test: RUN mkdir sub COPY hello.earth Earthfile - DO --pass-args +RUN_EARTHLY_ARGS --target=+hello --should_fail=maybe # there's a chance we actually get rate limited + DO --pass-args +RUN_EARTHBUILD_ARGS --target=+hello --should_fail=maybe # there's a chance we actually get rate limited RUN acbgrep 'Warning: you are not logged into registry-1.docker.io, you may experience rate-limiting when pulling images' earthly.output -RUN_EARTHLY_ARGS: +RUN_EARTHBUILD_ARGS: FUNCTION ARG earthfile ARG target ARG should_fail=false - DO --pass-args ..+RUN_EARTHLY \ + DO --pass-args ..+RUN_EARTHBUILD \ --earthfile=$earthfile \ --target=$target \ --should_fail=$should_fail