-
Notifications
You must be signed in to change notification settings - Fork 0
Task Reference
The exported alias Task.Publish_PowerShellUniversal loads one InvokeBuild task
file containing the tasks documented on this page.
Low-level tasks perform one packaging, publishing, or validation operation.
Compound tasks sequence only operations exported by this module. Build and
package workflows owned by the consumer repository remain explicit in the
consumer build.yaml.
- publish_packed_module_to_universal_server
- publish_module_from_psresource_repos_to_universal_server
- package_universal_automation_repository
- publish_universal_automation_repository_to_server
- assert_universal_deployment_succeeded
- publish_psu_pull_module_from_psresourcerepo
- publish_psu_push_repository
- Compound task dependency boundary
- Common parameters
Uploads the module NuGet package directly to the PowerShell Universal module deployment endpoint.
- The module has been built and packed.
-
<OutputDirectory>/<ProjectName>.<ModuleVersion>.nupkgexists. -
UniversalServerUrlandUniversalServerAppTokenare available.
BuildWorkflow:
deploy:
- pack
- publish_packed_module_to_universal_serverThe deployment is synchronous and targets the output PowerShell resource
repository on the server.
Installs the built module from a PowerShell resource repository configured on the PowerShell Universal server.
- Resolve the configured repository URL.
- Create a local repository directory when the URL is a relative or absolute filesystem path.
- Query the server for the configured repository name.
- Create or reconcile the repository.
- Trigger a synchronous module installation.
- Remove the repository when auto-remove is enabled.
BuildWorkflow:
deploy:
- pack
- publish_module_from_psresource_repos_to_universal_serverCreates an offline PowerShell Universal automation repository zip containing
the built module and all transitively resolved RequiredModules. Module
dependencies are processed through an iterative queue rather than nested
recursive calls. First-discovery order is preserved, while a later occurrence
replaces the selected module only when it resolves to a higher version.
- The module build has completed.
- The built module manifest is available.
- Every required module can be resolved from
PSModulePath.
- Staging directory:
<OutputDirectory>/<UniversalRepositoryStagingDirectoryName> - Zip package:
<OutputDirectory>/<ProjectName>.<ModuleVersion>.zip, unlessUniversalRepositoryZipNameoverrides it.
BuildWorkflow:
pack:
- build
- package_module_nupkg
- package_universal_automation_repositoryThe package includes a top-level repository.psd1 and versioned module folders
under Modules.
Uploads the offline automation repository zip to the PowerShell Universal deployment endpoint.
-
package_universal_automation_repositoryhas created the zip package. -
UniversalServerUrlandUniversalServerAppTokenare available.
BuildWorkflow:
deploy_repository:
- pack
- publish_universal_automation_repository_to_serverThe task sends UniversalRepositoryAsModule and UniversalUnpinned as
deployment query parameters. For the complete repository layout generated by
this module, use UniversalRepositoryAsModule: false.
Queries recent PowerShell Universal notifications and throws when PSU reports a deployment-related error after the deployment start time.
BuildWorkflow:
deploy_repository:
- pack
- publish_universal_automation_repository_to_server
- assert_universal_deployment_succeededThe deployment tasks record their start time in the current InvokeBuild session. When no start time is available, the assertion checks the configured lookback window.
The task fails on newer deployment, module, or configuration notifications
whose level is Error or whose text contains failed, error, or
Invalid configuration.
An optional notification filter can restrict matches to a module or project identifier when deployments run concurrently.
UniversalServer:
UniversalDeploymentNotificationFilter: MyModuleWhen errors are found, the task writes each timestamp, level, title, and description to the build log before throwing a terminating error containing the same summary.
Provides a single workflow entry that runs:
publish_module_from_psresource_repos_to_universal_serverassert_universal_deployment_succeeded
BuildWorkflow:
deploy:
- pack
- publish_psu_pull_module_from_psresourcerepoUse this task when PSU should pull the project module and its packaged dependencies from the configured PowerShell resource repository. The consumer workflow remains responsible for building and packaging those artifacts.
Provides a single workflow entry that runs:
package_universal_automation_repositorypublish_universal_automation_repository_to_serverassert_universal_deployment_succeeded
BuildWorkflow:
deploy:
- build
- publish_psu_push_repositoryUse this task when the build should assemble and push the complete offline automation repository layout. The consumer workflow remains responsible for producing the built module consumed by the repository packaging task.
The compound tasks do not reference consumer workflows such as build, test,
pack, or publish, and do not depend on unrelated external task modules.
This keeps their internal sequence stable when a consumer changes its workflow
names or packaging strategy.
The task file exposes these values through Sampler properties and environment variables:
| Parameter | Purpose |
|---|---|
OutputDirectory |
Base build output directory. |
UniversalServerUrl |
PowerShell Universal server URL. |
UniversalServerAppToken |
Deployment application token. |
UniversalPSResourceRepositoryName |
Resource repository name. |
UniversalPSResourceRepositoryUrl |
Resource repository URL or path. |
UniversalPSResourceRepositoryAutoRemove |
Controls repository cleanup. |
UniversalRepositoryStagingDirectoryName |
Offline repository staging directory name. |
UniversalRepositoryZipName |
Offline repository zip file name. |
UniversalRepositoryAsModule |
Deployment endpoint asModule value. |
UniversalUnpinned |
Deployment endpoint unpinned value. |
UniversalDeploymentNotificationDelaySeconds |
Delay before querying notifications. |
UniversalDeploymentNotificationLookbackSeconds |
Fallback lookback window when no deployment start time is recorded. |
UniversalDeploymentNotificationFilter |
Optional title or description filter for deployment errors. |
See Configuration for defaults and precedence.