Update release test yaml to use new build script (#1233)

* Update release test yaml to use new build script

* Pass the build flag to test job ensure that the test project is built

* Add environmental variables to run ASC E2E tests
This commit is contained in:
Abhipsa Misra 2020-02-12 11:33:08 -08:00 коммит произвёл GitHub
Родитель fbd3fcad57
Коммит 04eb67184e
Не найден ключ, соответствующий данной подписи
Идентификатор ключа GPG: 4AEE18F83AFDEB23
2 изменённых файлов: 11 добавлений и 28 удалений

Просмотреть файл

@ -175,6 +175,7 @@ Function RunTests($message, $framework = "*", $filterTestCategory = "*")
# By specifying the root dir, the test runner will run all tests in test projects in the VS solution there
Set-Location $rootDir
Write-Host "Invoking expression: $runTestCmd ----------"
Invoke-Expression $runTestCmd
if ($LASTEXITCODE -ne 0)

Просмотреть файл

@ -37,43 +37,30 @@ phases:
displayName: 'Start TPM Simulator'
inputs:
containerregistrytype: 'Container Registry'
command: 'Run an image'
imageName: aziotbld/testtpm
containerName: 'testtpm-instance'
ports: |
127.0.0.1:2321:2321
127.0.0.1:2322:2322
restartPolicy: unlessStopped
- task: Docker@1
displayName: 'Start Test Proxy'
inputs:
containerregistrytype: 'Container Registry'
command: 'Run an image'
imageName: aziotbld/testproxy
containerName: 'testproxy-instance'
ports: '127.0.0.1:8888:8888'
restartPolicy: unlessStopped
- script: |
# Run dotnet first experience.
dotnet new
# List active docker containers
docker ps -a
# Start build
pwsh -NoProfile -command ".\build.ps1 -configuration Release -e2etests" $@ "; exit \$LASTEXITCODE"
pwsh -NoProfile -command ".\build.ps1 -configuration Release -build -e2etests" $@ "; exit \$LASTEXITCODE"
displayName: build
env:
IOTHUB_CONN_STRING_CSHARP: $(IOTHUB-CONN-STRING-CSHARP)
@ -98,23 +85,23 @@ phases:
FAR_AWAY_IOTHUB_HOSTNAME: $(FAR-AWAY-IOTHUB-HOSTNAME)
CUSTOM_ALLOCATION_POLICY_WEBHOOK: $(CUSTOM-ALLOCATION-POLICY-WEBHOOK)
IOTHUB_PROXY_SERVER_ADDRESS: 127.0.0.1:8888
LA_AAD_TENANT: $(LA-AAD-TENANT)
LA_AAD_APP_ID: $(LA-AAD-APP-ID)
LA_AAD_APP_CERT_BASE64: $(LA-AAD-APP-CERT-BASE64)
LA_WORKSPACE_ID: $(LA-WORKSPACE-ID)
- task: CopyFiles@2
displayName: 'Copy files to the artifacts folder'
inputs:
SourceFolder: '$(Build.SourcesDirectory)'
Contents: '**/*.trx'
TargetFolder: '$(Build.ArtifactStagingDirectory)'
condition: always()
- task: PublishBuildArtifacts@1
displayName: 'Publish Artifact: testresults_linux'
inputs:
ArtifactName: testresults_linux
condition: always()
- task: PublishTestResults@2
@ -123,7 +110,6 @@ phases:
testRunner: VSTest
testRunTitle: 'Linux Tests'
testResultsFiles: '**/*.trx'
condition: always()
### Windows build ###
@ -168,14 +154,6 @@ phases:
displayName: 'Install Squid'
- script: |
choco install -y netfx-4.5.2-devpack
displayName: 'Install .NET 4.5.2 Targetting Pack'
- script: |
rem Run dotnet first experience.
dotnet new
rem List active docker containers
docker ps -a
@ -183,7 +161,7 @@ phases:
start /D .\vsts\TpmSimulator Simulator.exe
build.cmd -configuration Release -nobuild -nounittests -nopackage -e2etests
build.cmd -configuration Release -build -e2etests
displayName: build
env:
@ -209,6 +187,10 @@ phases:
FAR_AWAY_IOTHUB_HOSTNAME: $(FAR-AWAY-IOTHUB-HOSTNAME)
CUSTOM_ALLOCATION_POLICY_WEBHOOK: $(CUSTOM-ALLOCATION-POLICY-WEBHOOK)
IOTHUB_PROXY_SERVER_ADDRESS: 127.0.0.1:3128
LA_AAD_TENANT: $(LA-AAD-TENANT)
LA_AAD_APP_ID: $(LA-AAD-APP-ID)
LA_AAD_APP_CERT_BASE64: $(LA-AAD-APP-CERT-BASE64)
LA_WORKSPACE_ID: $(LA-WORKSPACE-ID)
- task: CopyFiles@2
displayName: 'Copy TRX files to the artifacts folder'