diff --git a/Dockerfile.test.yml b/Dockerfile.test.yml index 4546a4a279..e672123b73 100644 --- a/Dockerfile.test.yml +++ b/Dockerfile.test.yml @@ -1,7 +1,15 @@ sut: build: . - command: "sudo -i -u linuxbrew /home/linuxbrew/.linuxbrew/bin/brew test-bot" + command: + - sh + - -xc + - | + sudo -E -u linuxbrew /home/linuxbrew/.linuxbrew/bin/brew test-bot + status=$$? + cp brew-test-bot.xml /tmp/test-bot/ + exit $$status environment: + - HOME=/home/linuxbrew - BUILD_REASON - BUILD_REPOSITORY_URI - BUILD_SOURCEVERSION diff --git a/azure-pipelines.yml b/azure-pipelines.yml index a0f5c5d0be..a3109338fe 100644 --- a/azure-pipelines.yml +++ b/azure-pipelines.yml @@ -36,7 +36,10 @@ jobs: pool: vmImage: ubuntu-16.04 steps: - - bash: docker-compose -f Dockerfile.test.yml run --rm -e HOMEBREW_GITHUB_API_TOKEN sut + - bash: docker-compose -f Dockerfile.test.yml build sut + displayName: Build Docker image + + - bash: docker-compose -f Dockerfile.test.yml run --rm -v $(Build.ArtifactStagingDirectory):/tmp/test-bot sut displayName: Run brew test-bot env: HOMEBREW_GITHUB_API_TOKEN: $(github.publicApiToken) @@ -46,4 +49,4 @@ jobs: condition: succeededOrFailed() inputs: testRunner: JUnit - testResultsFiles: brew-test-bot.xml + testResultsFiles: $(Build.ArtifactStagingDirectory)/brew-test-bot.xml