Releases: webmd-health-services/BuildMasterAutomation
4.1.0
Added
- Added support for
Release
andBuild
variables to theGet-BMVariable
,Set-BMVariable
, andRemove-BMVariale
functions.
Changed
- Tested against BuildMaster 2023.15.
Fixed
- Some files contained character sequences that cause anti-virus software, Cortex XDR, to crash PowerShell.
Get-BMVariable
doesn't return anything when using-ValueOnly
and that value is an integer.Get-BMVariable
fails to find variables if the variable's value is an empty string.Get-BMVariable
fails to get vector variables that contain empty items.Set-BMVariable
's-Raw
parameter was documented but never implemented.Set-BMVariables
fails to set a variable to an empty string value.Remove-BMVariable
fails to remove a variable with an empty string value.
4.0.0
Upgrade Instructions
This release contains breaking changes. Please read these upgrade instructions carefully before upgrading.
- The
Get-BMVariable
function now converts OtterScript vector and map expressions to native PowerShell array and
hashtable types respectively. Use the new-Raw
switch to retain the previous behavior where variable values are
always returned as a string in their OtterScript expression form. - The
Get-BMVariable
function'sVariable
parameter has been renamed toName
. Replace all usages ofVariable
withName
.
Added
ConvertFrom-BMOtterScriptExpression
converts OtterScript expressions into their equivalent PowerShell objects.ConvertTo-BMOtterScriptExpression
converts PowerShell objects into their equivalent OtterScript expressions.
Changes
- The
Get-BMVariable
function by default now converts all OtterScript variables to PowerShell objects before returning
them. Use theRaw
flag to return the OtterScript variable as a string. - The
Get-BMVariable
function'sVariable
parameter has been renamed toName
. - The
Set-BMVariable
function now converts all provided arrays and hashtables to their respective OtterScript
equivalents.
3.2.0
3.1.0
Added
Get-BMRaft
adds aRaft_Prefix
property to objects it returns.
Changes
Get-BMEnvironment
ensures that returned objects always have aparentName
property.Set-BMRelease
now works around a bug/feature in BuildMaster that fails to change a release's pipeline.
Fixed
- Some expected/handled errors are not ignored.
Deprecated
- The
Set-BMRaft
function'sEnvironment
parameter. BuildMaster does not support setting the environment for a raft.
This parameter was added because of a typo in the BuildMaster docs.
3.0.1
Upgrade Instructions
This is a continuation of the types of changes made in 2.0.0. See that release's changelog for upgrade instructions.
- These functions now write an error if an item doesn't exist (for
Get
,Remove
, andSet
functions) or if an item
already exists (forNew
functions). Add-ErrorAction Ignore
to existing usages to preserve previous behavior:Set-BMRelease
Set-BMVariable
Stop-BMRelease
Added
Parameters
Application
to theDisable-BMApplication
function. This parameter accepts an application name, id, or application
object and replaces the now-obsoleteID
parameter.Set-BMVariable
:Application
: accepts application ids, names, or application objects.ApplicationGroup
: accepts application group ids, names, or application group objects.Environment
: accepts environment ids, names, or environment objects.Server
: accepts server ids, names, or server objects.ServerRole
: accepts server role ids, names, or server names.
Application
to theStop-BMRelease
function. This parameter accepts an application name, id, or application object
and replaces the now-obsoleteID
parameter.
Changed
- Updated
Get-BMVariable
andRemove-BMVariable
so they can get and remove variables for applications and application groups, which works around a bug in the BuildMaster Variables API.
Deprecated
- The
ID
parameter on theDisable-BMApplication
function. Use the newApplication
parameter instead. - The following parameters on
Set-BMVariable
:ApplicationName
; useApplication
instead.ApplicationGroupName
; useApplicationGroup
instead.EnvironmentName
; useEnvironment
instead.ServerName
; useServer
instead.ServerRoleName
; useServerRole
instead.
ApplicationID
on theStop-BMRelease
function. Use the newApplication
parameter instead.
2.0.1
Upgrade Instructions
This is a continuation of the types of changes made in 2.0.0. See that release's changelog for upgrade instructions.
- These functions now write an error if an item doesn't exist (for
Get
,Remove
, andSet
functions) or if an item
already exists (forNew
functions). Add-ErrorAction Ignore
to existing usages to preserve previous behavior:Set-BMRelease
Set-BMVariable
Stop-BMRelease
Added
Parameters
Application
to theDisable-BMApplication
function. This parameter accepts an application name, id, or application
object and replaces the now-obsoleteID
parameter.Set-BMVariable
:Application
: accepts application ids, names, or application objects.ApplicationGroup
: accepts application group ids, names, or application group objects.Environment
: accepts environment ids, names, or environment objects.Server
: accepts server ids, names, or server objects.ServerRole
: accepts server role ids, names, or server names.
Application
to theStop-BMRelease
function. This parameter accepts an application name, id, or application object
and replaces the now-obsoleteID
parameter.
Changed
- Updated
Get-BMVariable
andRemove-BMVariable
so they can get and remove variables for applications and application groups, which works around a bug in the BuildMaster Variables API.
Deprecated
- The
ID
parameter on theDisable-BMApplication
function. Use the newApplication
parameter instead. - The following parameters on
Set-BMVariable
:ApplicationName
; useApplication
instead.ApplicationGroupName
; useApplicationGroup
instead.EnvironmentName
; useEnvironment
instead.ServerName
; useServer
instead.ServerRoleName
; useServerRole
instead.
ApplicationID
on theStop-BMRelease
function. Use the newApplication
parameter isntead.
3.0.0
Minimum supported version of BuildMaster is now 7.0.
Upgrade Instructions
This release contains breaking changes. Please read these upgrade instructions carefully before upgrading.
BuildMaster no longer supports active/inactive environments.
- Remove usages of the
Disable-BMEnvironment
andEnable-BMEnvironment
functions. - Remove usages of the
Get-BMEnvironment
andRemove-Environment
functions'Force
switch, which was used to operate on inactive environments.
These functions were updated to use BuildMaster's Infrastructure Management API. For each, check API key usages to ensure the key has access to that API and check that property usages on any return objects are using the correct names.
Get-BMEnvironment
Remove-BMEnvironment
BuildMaster no longer supports active/inactive applications.
- Remove usages of the
Active_Indicator
property on application objects.
Changed
- The
Get-BMEnvironment
function now uses the BuildMaster Infrastructure Management API. Property names on return object may be different. Different API key permissions are required. - The
Remove-BMEnvironment
function now uses the BuildMaster Infrastructure Management API. Different API key permissions are required.
Removed
Functions
Disable-BMEnvironment
Enable-BMEnvironment
Parameters
Force
switch fromGet-BMEnvironment
andRemove-BMEnvironment
.
2.0.0
Supported Versions
This version of BuildMasterAutomation is only supported on BuildMaster 6.2. Some of it may work on older or newer
versions, but we've only tested against BuildMaster 6.2.33.
Known Issues
The Get-BMVariable
function fails to get variables from applications or application groups, due to a bug in the
BuildMaster Variables Mangement API.
Upgrade Instructions
This release contains breaking changes. Please read these upgrade instructions carefully before upgrading.
This release adds support for BuildMaster 6.2.33, which contains breaking changes from version 6.1.
- These functions now write an error if an item doesn't exist (for
Get
,Remove
, andSet
functions) or if an item
already exists (forNew
functions). Add-ErrorAction Ignore
to existing usages to preserve previous behavior:Disable-BMEnvironment
Enable-BMEnvironment
Get-BMApplication
Get-BMApplicationGroup
Get-BMDeployment
Get-BMEnvironment
Get-BMRelease
Get-BMServer
Get-BMServerRole
New-BMApplication
Remove-BMServer
Remove-BMServerRole
Remove-BMVariable
Set-BMRelease
- Remove usages of the
Get-BMDeployment
function'sBuild
,Release
, andApplication
parameters. The BuildMaster
Release and build deployment API no longer
supports getting deploys for builds, releases, and applications. - Remove usages of the
Get-BMPipeline
function'sID
parameter. BuildMaster pipelines no longer have ids, just
names. - Update usages of the
Get-BMPipeline
function to pass a pipeline name to theName
parameter instead of an id. - Objects returned by
Get-BMPipeline
are now raft item objects. Check usages to ensure you're using correct
properties. - Remove usages of the
New-BMApplication
function'sAllowMultipleActiveBuilds
switch. This functionality was
removed from BuildMaster. - Rename usages of
New-BMPipeline
toSet-BMPipeline
. Set-BMPipeline
(néeNew-BMPipeline
) now creates or updates a pipeline. Inspect usages to see the impact of this
new behavior.- Update usages of the
Set-BMPipeline
(néeNew-BMPipeline
) function'sStage
parameter to pass stage objects
instead of strings of XML. Use the newNew-BMPipelineStageObject
andNew-BMPipelineStageTargetObject
functions to
create the objects you should pass. - Update usages of the
Set-BMPipeline
(néeNew-BMPipeline
) function: its newRaft
parameter is required. To use
BuildMaster's default raft, pass1
as the value. - Add
-PassThru
to usages of theSet-BMPipeline
(néeNew-BMPipeline
) function that expect a return value.
TheSet-BMPipeline
(néeNew-BMPipeline
) function no longer returns the pipeline object by default. - Update usages of
Set-BMRelease
to pass a pipeline name or pipeline object to the newPipeline
paramter and remove
usages of thePipelineID
parameter.
Added
Functions
Add-BMParameter
, for adding values to a parameter hashtable (i.e. a hashtable that will be used as the body of a
request to a BuildMaster API endpoint). If the value is$null
, however, it won't be added.ConvertFrom-BMNativeApiByteValue
for convertingbyte[]
values returned by the BuildMaster native API into their
original strings.Get-BMBuild
for getting builds. It replaces the now obsoleteGet-BMPackage
function.Get-BMObjectName
for getting the name of an object that was returned by the BuildMaster API.Get-BMRaft
for getting rafts.Get-BMRaftItem
for getting raft items.New-BMBuild
for creating builds. It replaces the now obsoleteNew-BMPackage
function.New-BMPipelinePostDeploymentOptionsObject
for creating a post-deployment options object to use when creating a
pipeline.New-BMPipelineStageObject
for creating a stage object that can be passed to theSet-BMPipeline
function'sStage
parameter.New-BMPipelineStageTargetObject
for creating a target object that can be passed to theNew-BMPipelineStageObject
function'sTarget
parameter.Publish-BMReleaseBuild
. It replaces the now obsoletePublish-BMReleasePackage
function.Remove-BMApplication
function for deleting applications.Remove-BMEnvironment
for deleting an environment.Remove-BMPipeline
function for removing pipelines.Remove-BMRaft
for removing a raft.Remove-BMRaftItem
function for deleting raft items.Set-BMRaft
for creating and updating rafts.Set-BMRaftItem
for creating and/or updating a raft item.
Parameters
Add-BMObjectParameter
:AsID
to only set a parameter from an object's id, ignoring any names.AsName
to only set a parameter from an object's name, ignoring any ids.
Get-BMApplication
:Application
: accepts an application id, name, or application object. Wildcards supported when passing a name.ApplicationGroup
: accepts an application group id, name, or application group object. Wildcards supported when
passing a name.
Get-BMDeployment
:Deployment
, which accepts a deployment id or deployment object.Get-BMEnvironment
:Environment
, which accepts environment ids, names, or environment objects. Wildcards supported
when passing a name.Get-BMPipeline
:Application
:, for setting the application for the pipeline; accepts an application id, name, or application
object. Wildcards supported when passing a name.Raft
parameter to theGet-BMPipeline
function for only getting pipelines in a specific raft.
Get-BMServer
:Server
, which accepts server ids, names, or server objects. Wildcards supported when passing a name.Get-BMServerRole
:ServerRole
, which accepts server ids, names, or server objects. Wildcards supported when passing
a name.Get-BMVariable
andRemove-BMVariable
(wildcards supported when passing a name to any of these parameters):Application
: accepts application ids, names, or application objects.ApplicationGroup
: accepts application group ids, names, or application group objects.Environment
: accepts environment ids, names, or environment objects.Server
: accepts server ids, names, or server objects.ServerRole
: accepts server role ids, names, or server names.
New-BMApplication
:ApplicationGroup
: for assigning the application group to a new application; accepts application group ids, names,
or application group objects. Wildcards supported when passing a name.Raft
: for setting the raft in which the application's scripts, pipelines, etc. will be saved.
New-Environment
:PassThru
, for returning the environment.New-BMSession
:Url
, which is the URL to BuildMaster;Url
replaces the now obsoleteUri
parameter.Remove-BMServer
:Server
, which accepts server ids, names, or server objects. Wildcards supported when passed a
name.Remove-BMServerRole
:ServerRole
, which accepts server role ids, names, or server objects. Wildcards supported when
passed a name.Set-BMPipeline
(néeNew-BMPipeline
):PostDeploymentOption
: configures a pipeline's post-deployment options. Use the
New-BMPipelinePostDeploymentOptionsObject
to create a post-deployment options object.EnforceStageSequence
: controls the pipeline's stage sequence enforcement.PassThru
: when set, returns the created/updated pipeline object.
Set-BMRelease
:Pipeline
, to set the pipeline for the release; this replaces the obsoletePipelineID
parameter.
Changed
- These functions now write an error if an item doesn't exist (for
Get
andRemove
functions) or if an item already
exists (forNew
functions). Add-ErrorAction Ignore
to existing usages to preserve previous behavior:Disable-BMEnvironment
Enable-BMEnvironment
Get-BMApplication
Get-BMApplicationGroup
Get-BMDeployment
Get-BMEnvironment
Get-BMRelease
Get-BMServer
Get-BMServerRole
New-BMApplication
Remove-BMServer
Remove-BMServerRole
Remove-BMVariable
Set-BMRelease
Add-BMObjectParameter
now accepts$null
values. When passed a null value, it does nothing.Disable-BMEnvironment
: theEnvironment
parameter now accepts an environment id, name, and environment object for a value.Enable-BMEnvironment
: theEnvironment
parameter now accepts an environment id, name, and environment object for a value.Get-BMApplicationGroup
now accepts application group ids, names, or application group objects as pipeline input.Get-BMEnvironment
now accepts environment ids, names, or environment objects as pipeline input.Get-BMPipeline
returns raft item objects instead of pipeline objects.Get-BMServer
now accepts server names, ids, and server objects as pipeline input.Get-BMServerRole
now accepts server role names, ids, and server objects as pipeline input.Get-BMApplication
now accepts application ids, names, or application objects as pipeline input.New-BMPipeline
renamed toSet-BMPipeline
and:- it creates and/or updates a pipeline.
- its
Stage
parameter now takes in stage objects instead of XML strings. Use the newNew-BMPipelineStageObject
andNew-BMPipelineStageTargetObject
functions to create the objects you should pass. - it no longer returns the pipeline. Use the
PassThru
switch to have the pipeline object returned.
Deprecated
Obsolete Functions
- The
Get-BMPackage
function. It is replaced byGet-BMBuild
. - The
New-BMPackage
function. It is replaced byNew-BMBuild
. - The
Publish-BMReleasePackage
function. It is replaced byPublish-BMReleaseBuild
.
Function Parameters
- The
Get-BMApplication
function's `N...
1.0.0/1.0.1
1.0.1
- Publishing version 1.0.0 to GitHub failed. This version is identical to 1.0.0.
1.0.0
- Updated to support BuildMaster 6.1.28.
- Added support for PowerShell Core.