< Back

New-BMPackage

Sun Jan 12, 2020 7:13 pm

NAME New-BMPackage



SYNOPSIS

Creates a new package for a release.





SYNTAX

New-BMPackage -Session <Object> -Release <Object> [-PackageNumber <String>] [-Variable <Hashtable>]

[<CommonParameters>]



New-BMPackage -Session <Object> -ReleaseNumber <String> -Application <Object> [-PackageNumber <String>] [-Variable

<Hashtable>] [<CommonParameters>]





DESCRIPTION

The `New-BMPackage` creates a new package/version/build of an application. In order to deploy an application, the

application must have a release. Then you create packages in that release, and each package is then deployed using

the release's pipeline.





PARAMETERS

-Session <Object>

An object that represents the instance of BuildMaster to connect to. Use the `New-BMSession` function to

creates a session object.



Required? true

Position? named

Default value

Accept pipeline input? false

Accept wildcard characters? false



-Release <Object>

The release where the package should be created. Can be:



* a release object with an `id` property

* the release ID as an integer



Required? true

Position? named

Default value

Accept pipeline input? false

Accept wildcard characters? false



-ReleaseNumber <String>

The release number where the package should be created. Release numbers are unique within an application and

can be duplicated between applications. If you use this parameter to identify the release, you must also

provide a value for the `Application` parameter.



Required? true

Position? named

Default value

Accept pipeline input? false

Accept wildcard characters? false



-Application <Object>

The application where the release identified by the `ReleaseNumber` parameter can be found. Can be:



* An application object with a `Application_Id`, `id`, `Application_Name`, or `name` properties.

* The application ID as an integer.

* The application name as a string.



Required? true

Position? named

Default value

Accept pipeline input? false

Accept wildcard characters? false



-PackageNumber <String>

The package number/name. If not provided, BuildMaster generates one based on the release settings.



Required? false

Position? named

Default value

Accept pipeline input? false

Accept wildcard characters? false



-Variable <Hashtable>

Any package variables to set. Package variables are unique to each package.



Required? false

Position? named

Default value

Accept pipeline input? false

Accept wildcard characters? false



<CommonParameters>

This cmdlet supports the common parameters: Verbose, Debug,

ErrorAction, ErrorVariable, WarningAction, WarningVariable,

OutBuffer, PipelineVariable, and OutVariable. For more information, see

about_CommonParameters (https:/go.microsoft.com/fwlink/?LinkID=113216).



INPUTS



OUTPUTS



-------------------------- EXAMPLE 1 --------------------------



PS C:\\>New-BMPackage -Session $session -Release $release



Demonstrates how to create a new package in the `$release` release. BuildMaster detects what application based on

the release (since releases are always tied to applications). Verion numbers and package numbers are incremented

and handled based on the release settings.



The `$release` parameter can be:



* A release object with an `id` property.

* A release ID integer.









-------------------------- EXAMPLE 2 --------------------------



PS C:\\>New-BMPackage -Session $session -ReleaseName '53' -Application $applicatoin



Demonstrates how to create a new package by using the release's name. Since release names are only unique within

an application, you must also specify the application via the `Application` parameter.









-------------------------- EXAMPLE 3 --------------------------



PS C:\\>New-BMPackage -Session $session -Release $release -PacakgeName '56.develop' -Variable @{ ProGetPackageName

= '17.1.54+developer.deadbee' }



Demonstrates how to create a release with a specific name, `56.develop`, and with a package-level variable,

`ProGetPackageName`.











RELATED LINKS