Skip to content

Force output on failure #988

@jamesalucas

Description

@jamesalucas

I am running unit tests under Earthly and everything is perfect when the unit tests succeed - a junit.xml file is written via an 'SAVE ARTIFACT AS LOCAL' statement and can be picked up by our CI server. However, when a test fails the command also fails and Earthly returns a non-zero exit code back to our CI server (which is good) but no output is written, so the CI server is unable to show which tests have failed.

Is there a way to force output to be written despite the build not succeeding?

I could get the command to return zero but then I would have to find a way to fail the CI build as the CI server (Gitlab) uses exit codes to determine the success/failure of a build.

Thanks

EDIT(by @vladaionescu): See workaround in this comment.
EDIT2(by @vladaionescu): A partial solution has been implemented. See this comment.

Metadata

Metadata

Assignees

Labels

category:ci-use-casesUse-cases relevant in the context of a CI pipelinetype:proposalA proposal for a new feature

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions