From 1e020380707298a5b92bcbf81edf107b898992bb Mon Sep 17 00:00:00 2001 From: Matthew B White Date: Wed, 24 Jun 2020 09:11:52 +0100 Subject: [PATCH] [FABCN-420] Remove Azure pipeline warnings Moved to different download task Used new coverage merge tool to joing coverage together Signed-off-by: Matthew B White --- ci/azure-pipelines.yml | 23 +++++++++++++---------- 1 file changed, 13 insertions(+), 10 deletions(-) diff --git a/ci/azure-pipelines.yml b/ci/azure-pipelines.yml index 4375309fd..2075e6cdd 100644 --- a/ci/azure-pipelines.yml +++ b/ci/azure-pipelines.yml @@ -73,7 +73,9 @@ stages: set -ev node common/scripts/install-run-rush.js rebuild displayName: 'Full rebuild' - + - script: | + npx cobertura-merge -o merged_coverage.xml shimcrypto=./libraries/fabric-shim-crypto/coverage/cobertura-coverage.xml shim=./libraries/fabric-shim/coverage/cobertura-coverage.xml contractapi=./apis/fabric-contract-api/coverage/cobertura-coverage.xml -p + condition: or(succeeded(), failed()) - task: PublishTestResults@2 condition: or(succeeded(), failed()) # publish either way inputs: @@ -84,16 +86,16 @@ stages: condition: or(succeeded(), failed()) # publish either way inputs: codeCoverageTool: 'cobertura' - summaryFileLocation: '**/cobertura-coverage.xml' + summaryFileLocation: 'merged_coverage.xml' artifactName: 'Unit Test Coverage' - script: | mkdir -p $(Build.ArtifactStagingDirectory)/logs find . \( -type d -name 'node_modules' \) -prune -o -name '*.build*.log' -exec cp {} $(Build.ArtifactStagingDirectory)/logs \; displayName: 'Copy build logs' - - task: PublishBuildArtifacts@1 + - task: PublishPipelineArtifact@1 condition: or(succeeded(), failed()) # publish either way inputs: - pathToPublish: $(Build.ArtifactStagingDirectory)/logs + targetPath: $(Build.ArtifactStagingDirectory)/logs artifactName: 'Build logs' displayName: 'Publish build logs' @@ -103,13 +105,13 @@ stages: node common/scripts/install-run-rush.js publish --include-all --pack --release-folder $(Build.ArtifactStagingDirectory)/tgz --publish docker image save hyperledger/fabric-nodeenv | gzip > $(Build.ArtifactStagingDirectory)/fabric-nodeenv.tar.gz displayName: 'Package tgz and docker image' - - task: PublishBuildArtifacts@1 + - task: PublishPipelineArtifact@1 inputs: - pathToPublish: $(Build.ArtifactStagingDirectory)/tgz + targetPath: $(Build.ArtifactStagingDirectory)/tgz artifactName: node-tgz - - task: PublishBuildArtifacts@1 + - task: PublishPipelineArtifact@1 inputs: - pathToPublish: $(Build.ArtifactStagingDirectory)/fabric-nodeenv.tar.gz + targetPath: $(Build.ArtifactStagingDirectory)/fabric-nodeenv.tar.gz artifactName: nodeenv-docker-image # Run the FV tests but using the built material @@ -161,14 +163,15 @@ stages: - script: | mkdir -p $(Build.ArtifactStagingDirectory)/testlogs find . \( -type d -name 'node_modules' \) -prune -o -name '*.build*.log' -exec cp {} $(Build.ArtifactStagingDirectory)/testlogs \; + condition: or(succeeded(), failed()) displayName: 'Copy test logs' - - task: PublishBuildArtifacts@1 + - task: PublishPipelineArtifact@1 condition: or(succeeded(), failed()) # publish either way inputs: pathToPublish: $(Build.ArtifactStagingDirectory)/testlogs artifactName: 'Test logs' displayName: 'Publish test logs' - - task: PublishBuildArtifacts@1 + - task: PublishPipelineArtifact@1 condition: or(succeeded(), failed()) # publish either way inputs: pathToPublish: tools/toolchain/network/docker-compose/logs/docker.log