Skip to content

Commit

Permalink
chore: upload test results in pipeline (#4745)
Browse files Browse the repository at this point in the history
  • Loading branch information
timmy-wright authored Jul 31, 2024
1 parent b1e1f9b commit fe693f1
Showing 1 changed file with 12 additions and 1 deletion.
13 changes: 12 additions & 1 deletion .pipelines/templates/e2e-template.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,17 +8,20 @@ jobs:
- group: ab-e2e
steps:
- bash: |
set -ex
az login --identity
az account set -s $(AZURE_SUBSCRIPTION_ID)
displayName: Azure login
- bash: bash .pipelines/scripts/setup_go.sh
displayName: Setup go
- bash: |
set -ex
LOGGING_DIR="scenario-logs-$(date +%s)"
echo "setting logging dir to $LOGGING_DIR"
echo "##vso[task.setvariable variable=LOGGING_DIR]$LOGGING_DIR"
displayName: Set logging directory
- bash: |
set -ex
export PATH="/usr/local/go/bin:$PATH"
go version
Expand All @@ -33,7 +36,9 @@ jobs:
fi
cd e2e
go test -parallel 100 -timeout 90m -v ./...
mkdir -p bin
GOBIN=`pwd`/bin/ go install github.com/jstemmer/go-junit-report/v2@latest
go test -v -parallel 100 -timeout 90m -v ./... 2>&1 | ./bin/go-junit-report -iocopy -set-exit-code -out "$(Build.SourcesDirectory)/e2e/report.xml"
displayName: Run AgentBaker E2E
env:
VHD_BUILD_ID: $(VHD_BUILD_ID)
Expand All @@ -43,6 +48,12 @@ jobs:
- bash: mkdir -p $(System.DefaultWorkingDirectory)/e2e/$(LOGGING_DIR)
condition: always()
displayName: Create folder for scenario logs
- task: PublishTestResults@2
displayName: Upload test results
condition: succeededOrFailed()
inputs:
testRunner: JUnit
testResultsFiles: "$(Build.SourcesDirectory)/e2e/report.xml"
- publish: $(System.DefaultWorkingDirectory)/e2e/$(LOGGING_DIR)
artifact: $(LOGGING_DIR)
condition: always()
Expand Down

0 comments on commit fe693f1

Please sign in to comment.