Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 5 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -108,9 +108,9 @@ If you have any problems building, please consult the developer [FAQ][].

### Build status of nightly builds

| AppVeyor (Windows) | Travis CI (Linux / macOS) | Code Coverage Status |
|--------------------------|---------------------------|----------------------|
| [![av-nightly-image][]][av-nightly-site] | [![tv-nightly-image][]][tv-site] | [![cc-image][]][cc-site] |
| AppVeyor (Windows) | Travis CI (Linux) | Travis CI (macOS) | Code Coverage Status |
|--------------------------|-------------------|-------------------|----------------------|
| [![av-nightly-image][]][av-nightly-site] | [![linux-nightly-image][]][tv-site] | [![osx-nightly-image][]][tv-site] | [![cc-image][]][cc-site] |

[bd-linux]: docs/building/linux.md
[bd-windows]: docs/building/windows-core.md
Expand All @@ -122,7 +122,8 @@ If you have any problems building, please consult the developer [FAQ][].
[tv-site]: https://travis-ci.org/PowerShell/PowerShell/branches
[av-image]: https://ci.appveyor.com/api/projects/status/nsng9iobwa895f98/branch/master?svg=true
[av-site]: https://ci.appveyor.com/project/PowerShell/powershell
[tv-nightly-image]: https://jimtru1979.blob.core.windows.net/badges/DailyBuildStatus.svg
[linux-nightly-image]: https://jimtru1979.blob.core.windows.net/badges/DailyBuildStatus.Linux.svg
[osx-nightly-image]: https://jimtru1979.blob.core.windows.net/badges/DailyBuildStatus.OSX.svg
[av-nightly-image]: https://ci.appveyor.com/api/projects/status/46yd4jogtm2jodcq?svg=true
[av-nightly-site]: https://ci.appveyor.com/project/PowerShell/powershell-f975h
[cc-site]: https://codecov.io/gh/PowerShell/PowerShell
Expand Down
12 changes: 9 additions & 3 deletions tools/travis.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,8 @@ function Get-DailyBadge
#
# the best way to do this would be if travis-ci supported a webcall to get
# the status of cron_job builds, but it doesn't, so we have this
# also, since we can have a build on Linux which succeeds and one on OSX which
# doesn't we'll set the appropriate badge so the the README can pick it up
function Set-DailyBuildBadge
{
[CmdletBinding(SupportsShouldProcess=$true)]
Expand All @@ -40,7 +42,8 @@ function Set-DailyBuildBadge
$storageAccountKey = $Env:TestResultAccountKey

# this is the url referenced in README.MD which displays the badge
$Url = "https://jimtru1979.blob.core.windows.net/badges/DailyBuildStatus.svg"
$platform = if ( $IsOSX ) { "OSX" } else { "Linux" }
$Url = "https://jimtru1979.blob.core.windows.net/badges/DailyBuildStatus.${platform}.svg"

$body = $content
$bytes = ([System.Text.Encoding]::UTF8.GetBytes($body))
Expand Down Expand Up @@ -112,6 +115,8 @@ else
# Run a full build if the build was trigger via cron, api or the commit message contains `[Feature]`
$hasFeatureTag = $commitMessage -match '\[feature\]'
$isDailyBuild = $env:TRAVIS_EVENT_TYPE -eq 'cron' -or $env:TRAVIS_EVENT_TYPE -eq 'api'
# only update the build badge for the cron job
$cronBuild = $env:TRAVIS_EVENT_TYPE -eq 'cron'
$isFullBuild = $isDailyBuild -or $hasFeatureTag

if($Bootstrap.IsPresent)
Expand Down Expand Up @@ -198,6 +203,7 @@ else
}
}

# Determine whether the build passed
try {
# this throws if there was an error
Test-PSPesterResults -ResultObject $pesterPassThruObject
Expand All @@ -207,8 +213,8 @@ else
$resultError = $_
$result = "FAIL"
}
if ( $isDailyBuild ) {
# now update the badge if you've done a full build, these are not fatal issues
# update the badge if you've done a cron build, these are not fatal issues
if ( $cronBuild ) {
try {
$svgData = Get-DailyBadge -result $result
if ( ! $svgData ) {
Expand Down