Skip to content

Commit

Permalink
fix(vsts): Make pom.xml changes and vsts pipeline changes count as pa…
Browse files Browse the repository at this point in the history
…ckage changes (#721)

changes to deps pom.xml should force run of iothub and provisioning, for instance
  • Loading branch information
timtay-microsoft authored Feb 29, 2020
1 parent 2dcda2d commit f5dae81
Showing 1 changed file with 10 additions and 3 deletions.
13 changes: 10 additions & 3 deletions vsts/determine_tests_to_run.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,13 @@ ForEach ($line in $($GitDiff -split "`r`n"))
}
else
{
# If code changes were made to vsts pipeline
if ($line.toLower().Contains("vsts"))
{
$Env:runIotHubTests = "true"
$Env:runProvisioningTests = "true"
}

# If code changes were made to provisioning sdk code or to provisioning e2e tests
if ($line.toLower().Contains("provisioning"))
{
Expand All @@ -46,21 +53,21 @@ ForEach ($line in $($GitDiff -split "`r`n"))
}

# If code changes were made to device client
if ($line.toLower().Contains("iot-device-client/src/main"))
if ($line.toLower().Contains("iot-device-client/src/main") -or $line.toLower().Contains("iot-device-client/pom.xml"))
{
$Env:runIotHubTests = "true"
$Env:runProvisioningTests = "true"
}

# If code changes were made to service client
if ($line.toLower().Contains("iot-service-client/src/main"))
if ($line.toLower().Contains("iot-service-client/src/main") -or $line.toLower().Contains("iot-service-client/pom.xml"))
{
$Env:runIotHubTests = "true"
$Env:runProvisioningTests = "true"
}

# Both provisioning and iot hub depend on deps package
if ($line.toLower().Contains("deps/src/main"))
if ($line.toLower().Contains("deps/src/main") -or $line.toLower().Contains("deps/pom.xml"))
{
$Env:runIotHubTests = "true"
$Env:runProvisioningTests = "true"
Expand Down

0 comments on commit f5dae81

Please sign in to comment.