en-US/about_Whiskey_Tasks.help.txt

TOPIC
    about_Whiskey_Tasks
 
SHORT DESCRIPTION
    This topic lists all Whiskey tasks and the global task properties
    (i.e. properties available on every task).
 
LONG DESCRIPTION
 
    ## Tasks
 
    Whiskey has the following tasks:
 
    * `CopyFile`: copies files.
    * `Delete`: deletes files.
    * `DotNet`: runs `dotnet` commands.
    * `Exec`: runs an executable/program.
    * `GetPowerShellModule`: installs a PowerShell module.
    * `GitHubRelease`: creates a release in GitHub and uploads files for that
      release.
    * `LoadTask`: loads custom tasks so they can be used in the current build.
    * `MergeFile`: merges files into a single file, using an optional text or
      binary separator. Source files can be optionally deleted.
    * `MSBuild`: runs MSBuild, the Microsoft build engine. Only supported on
      Windows.
    * `NodeLicenseChecker`: runs license checker, a Node module/command that
      scans and reports on Node module license metadata.
    * `Npm`: runs NPM commands.
    * `NuGetPack`: runs the `nuget.exe pack` command. Only supported on
      Windows.
    * `NuGetPush`: runs the `nuget.exe push` command. Only supported on
      Windows.
    * `NuGetRestore`: runs the `nuget.exe restore` command. Only supported on
      Windows.
    * `NUnit2`: tests .NET assemblies with NUnit 2. Only supported on Windows.
      Windows.
    * `NUnit3`: tests .NET assemblies with NUnit 3. Only supported on Windows.
    * `Parallel`: runs queues of tasks in parallel/asynchronously.
    * `Pester3`: runs PowerShell tests wth Pester 3. Only supported on Windows.
    * `Pester4`: runs PowerShell tests with Pester 4.
    * `Pipeline`: runs pipelines defined in the current whiskey.yml file.
    * `PowerShell`: executes a PowerShell script.
    * `ProGetUniversalPackage`: creates a universal ProGet package.
    * `PublishBitbucketServerTag`: tags a repository in Bitbucket Server.
    * `PublishBuildMasterPackage`: creates and deploys a package in BuildMaster.
    * `PublishNodeModule`: publishes a Node module (i.e. runs the `npm publish`
      command).
    * `PublishPowerShellModule`: publishes a PowerShell module.
    * `PublishProGetAsset`: publishes a file to a ProGet asset directory.
    * `PublishProGetUniversalPackage`: publishes a universal ProGet package to
      ProGet.
    * `SetVariable`: creates a variable that you can use in your whiskey.yml
      file.
    * `SetVariableFromPowerShellDataFile`: creates variables that you can use in
      in your whiskey.yml file by reading them from a PowerShell data file (i.e.
      .psd1 file or module manifest).
    * `SetVariableFromXml`: creates variables that you can use in your
      whiskey.yml file by reading their values from an XML file.
    * `TaskDefaults`: sets default task properties.
    * `Version`: sets the version number for the current build.
    * `Zip`: creates ZIP archives.
 
    ## Common Task Properties
 
    Every Whiskey task has these properties:
 
    * `OnlyBy`/`ExceptBy`: controls if a task runs if the build was started
      by a developer or a build server. By default, a task always runs. Valid
      values are `Developer` or `BuildServer`.
    * `OnlyDuring`/`ExceptDuring': controls if a task will run in the current
      run mode. Valid values are `Initialize`, `Build`, and `Clean`. Useful
      for having custom initialization tasks, cleaning tasks, etc. Make sure
      the task actually does work in the chosen mode. Some tasks don't have
      anything to clean or initialize, in which case these properties would
      have no affect.
    * `OnlyOnBranch`/`ExceptOnBranch`: controls what branch a task should run
      on. By default, a task runs on every branch. When a build is run by a
      developer, there is no branch information, so tasks that have this
      property will never run by a developer. Wildcards are supported.
    * `OnlyOnPlatform`/`ExceptOnPlatform`: controls the platforms on which the
      task will run. By default, a task runs on all platforms. Supported
      platforms are `Windows`, `Linux`, and `MacOS`. These properties may be
      set to a list of multiple platforms.
    * `WorkingDirectory`: the directory in which the task should run. By
      default, this is the directory of the whiskey.yml file.
    * `IfExists`/`UnlessExists`: controls if a task runs if/unless an item
      exists. You can use any PowerShell-supported path, e.g. env:ENV_NAME
      for environment variables, hklm:\path\to\key for registry keys, and
      path\to\file for files/directories. Relative paths are file system paths
      and are resolved from the directory of the build's whiskey.yml file or
      the task's working directory (given by its WorkingDirecotry property).
      Uses PowerShell's `Test-Path` cmdlet to determine if the path exists.
      Wildcards are supported.