Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

TestResults should be published when build fails #114

Open
lodejard opened this issue Mar 6, 2019 · 0 comments
Open

TestResults should be published when build fails #114

lodejard opened this issue Mar 6, 2019 · 0 comments

Comments

@lodejard
Copy link
Contributor

lodejard commented Mar 6, 2019

In the build-ci.yaml file the script block has set -e which causes the step to fail when the first non-zero exit code is returned from a command.

This means the following line will correctly cause the build to fail if any unit tests fail:

docker run --name ${test_container_name} atlas-cli-test:0.1.$(Build.BuildId)

Unfortunately the following line must be run in order for the PublishTestResults task to be able to publish the trx files, which lets the build summary show test result details.

docker cp ${test_container_name}:/app/test/Microsoft.Atlas.CommandLine.Tests/TestResults/. $(Build.ArtifactStagingDirectory)/TestResults

It would be nice if the script run docker cp and docker rm commands even if the docker run failed dur to unit tests

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant