Skip to content

Commit

Permalink
Fix bad powershell like
Browse files Browse the repository at this point in the history
Add variable release option

Skip most of the tests while testing last portion of pipeline
  • Loading branch information
atruskie committed Apr 5, 2020
1 parent 24c0b81 commit de17dc6
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 3 deletions.
10 changes: 7 additions & 3 deletions azure-pipelines.yml
Original file line number Diff line number Diff line change
Expand Up @@ -47,11 +47,15 @@ stages:
$commit = Invoke-RestMethod -Method Get -Uri "https://api.github.com/repos/$(Build.Repository.Name)/commits/$(Build.SourceVersion)" -Headers @{Authorization="token ${env:AUDIO_ANALYSIS_CI}"}
$commit_message = $commit.commit.message
Write-Output "Analyzing commit message for [release] tag:`n$commit_message"
$is_manual_release = $commit_message -ilike '*\[release\]*'
$is_manual_release = $commit_message -ilike '*`[release`]*'
$ap_do_release = '$(AP_DO_RELEASE)'
Write-Output "AP_DO_RELEASE: $ap_do_release"
$is_variable_release = $ap_do_release.Length -gt 0
$is_weekly_release = '$(Build.Reason)' -ieq 'Schedule'
$should_release = $is_weekly_release -or $is_manual_release
$should_release = $is_weekly_release -or $is_manual_release -or $is_variable_release
Write-Output "##vso[task.setvariable variable=isManualRelease;isOutput=true]$is_manual_release"
Write-Output "##vso[task.setvariable variable=isWeeklyRelease;isOutput=true]$is_weekly_release"
Write-Output "##vso[task.setvariable variable=isVariableRelease;isOutput=true]$is_variable_release"
Write-Output "##vso[task.setvariable variable=shouldRelease;isOutput=true]$should_release"
env:
AUDIO_ANALYSIS_CI: $(AUDIO_ANALYSIS_CI)
Expand All @@ -75,7 +79,7 @@ stages:
downloadType: all
# avoid downloading cod coverage report
itemPattern: '**/*.(xz|zip|txt)'
displayName: Download previous build artefacts
displayName: Download previous build artifacts

# every build produced version vars, just pick the one from any
- pwsh: |
Expand Down
1 change: 1 addition & 0 deletions build/azure-pipelines-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -132,6 +132,7 @@ jobs:
--settings tests/Acoustics.Test/.runsettings
--collect:"XPlat Code Coverage"
--results-directory '$(Agent.TempDirectory)/Acoustics.Test_Results'
--filter "RuntimesTests"
--
RunConfiguration.DisableAppDomain=true
displayName: Run Acoustics.Test
Expand Down

0 comments on commit de17dc6

Please sign in to comment.