-
Notifications
You must be signed in to change notification settings - Fork 8
AppVeyorWaitForBuildJob Task
The AppVeyorWaitForBuildJob
task pauses a build until all the other jobs running under that build have completed. If there are no other jobs, it does nothing. If any of the other jobs fail, the task will also stop and fail the build. If the build is not running under AppVeyor, then this task does nothing.
The task uses the AppVeyor API to check if the current build has multiple jobs. If it has a single job, it does no work. If there are other jobs, it checks the status of each job every 10 seconds until all their status is not running
and not queued
. Once all the jobs have finished, the task completes successfully if all the jobs' final status are success
. If any final status is not success
, the task stops and fails the build.
You can control how often to check for an updated status with the CheckInternval
property.
The task reports to the user every 60 seconds that it is still waiting for background jobs to finish. You can control this interval with the ReportInterval
property.
To control which status the task considers "in progress", use the InProgressStatus
property. Use the SuccessStatus
property to control which status the task considers successful.
-
[String]ApiKeyID
(mandatory): the ID of the API key holding the AppVeyor bearer token to use to make requests to the AppVeyor API. Add API keys to your build with theAdd-WhiskeyApiKey
function. -
[TimeSpan]CheckInterval
: the interval to check if background jobs have finished. The default is00:00:10
(ten seconds). -
[TimeSpan]ReportInterval
: the interval to report to the user that the task is still checking for finished jobs. The default is00:01:00
(one minute). -
[String[]]InProgressStatus
: a list of status that denote a job is still running. The default isrunning
andqueued
. -
[String[]]SuccessStatus
: a list of status that denote when a job has completed successfully. The default issuccess
.
Build:
- AppVeyorWaitForBuildJobs:
ApiKeyID: AppVeyorBearerToken
Demonstrates the minimum requirements for using this task.
Build:
- AppVeyorWaitForBuildJobs:
ApiKeyID: AppVeyorBearerToken
CheckInterval: "00:00:30"
ReportInterval: "00:00:30"
Demonstrates how to customize how often to check for job status changes and how often to report to the user that the task is still running. In this example, both intervals are set to 30 seconds.
Build:
- AppVeyorWaitForBuildJobs:
ApiKeyID: AppVeyorBearerToken
InProgressStatus:
- running
- queued
- some_new_status
Demonstrates how to control what status the task should interpret to mean a job is still running. In this case, if a job reports its status as running
, queued
, or some_new_status
, the task will continue to wait until the job's status changes to something else.
Build:
- AppVeyorWaitForBuildJobs:
ApiKeyID: AppVeyorBearerToken
SuccessStatus:
- success
- failed
Demonstrates how to control what job status the task should interpret to mean the jobs succeeded. In this example, the task will succeed and your build will continue if other jobs succeed or fail. (We don't recommend doing this as it means a failure in another job won't stop the rest of your build from running.)
- Common Task Properties
- AppVeyorWaitForBuildJob
- CopyFile
- Delete
- DotNet
- Exec
- File
- GetPowerShellModule
- GitHubRelease
- InstallNodeJs
- LoadTask
- Log
- MergeFile
- MSBuild
- NuGetPack
- NuGetPush
- NuGetRestore
- NUnit2
- NUnit3
- Parallel
- Pester
- Pipeline
- PowerShell
- ProGetUniversalPackage
- PublishBitbucketServerTag
- PublishBuildMasterPackage
- PublishNodeModule
- PublishPowerShellModule
- PublishProGetAsset
- PublishProGetUniversalPackage
- SetVariable
- SetVariableFromPowerShellDataFile
- SetVariableFromXml
- TaskDefaults
- Version
- Zip