-
Notifications
You must be signed in to change notification settings - Fork 386
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
EARTHLY_GIT_AUTHOR and CO_AUTHOR args (#2260)
Adds `EARTHLY_GIT_AUTHOR` and `EARTHLY_GIT_CO_AUTHORS` args, when the `--earthly-git-author-args` feature flag is set. Signed-off-by: Alex Couture-Beil <alex@earthly.dev>
- Loading branch information
Showing
7 changed files
with
134 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,10 +1,19 @@ | ||
VERSION 0.6 | ||
VERSION --earthly-git-author-args 0.6 | ||
|
||
# Note: this is tests both locally and remotely | ||
# the population of git metadata occurs in two **different** functions respectively: | ||
# - gitutil/detectgit.go: Metadata (locally-reference) | ||
# - buildcontext/git.go: resolveGitProject (remotely-referenced) | ||
|
||
test-git-metadata: | ||
FROM alpine | ||
ARG --required expectedsha | ||
ARG EARTHLY_GIT_SHORT_HASH | ||
ARG EARTHLY_GIT_HASH | ||
ARG EARTHLY_GIT_AUTHOR | ||
ARG EARTHLY_GIT_CO_AUTHORS | ||
RUN test "$EARTHLY_GIT_HASH" = "$expectedsha" | ||
RUN test -n "$EARTHLY_GIT_SHORT_HASH" | ||
RUN echo "$EARTHLY_GIT_HASH" | grep "$EARTHLY_GIT_SHORT_HASH" | ||
RUN test "$EARTHLY_GIT_AUTHOR" = "onlyspammersemailthis@earthly.dev" | ||
RUN test "$EARTHLY_GIT_CO_AUTHORS" = "testy@earthly.dev cover@earthly.dev" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters