PsBamboo is a PowerShell module that provides a wrapper for Bamboo REST API to allow easy and fast authenticated access to Bamboo CI in a scriptable and automatable manner.
The module handles both authenticated and anonymous methods, it supports paged
reading and manipulation of the following Bamboo resources:
Project
, Plan
, PlanBranch
, Build
, Artifact
, Server
, CurrentUser
,DeployProject
In addition to several already implemented functions, it also provides generic Cmdlets to access any not yet covered Bamboo REST API resources too.
PsBamboo is available via PsGet or via PowerShell Gallery , so you can simply install it with the following command:
Install-Module PsBamboo
Of course you can download and install the module manually too from Downloads
Import-Module PsBamboo
Try and execute the sample scripts in the Examples folder against your local Bamboo
server to see all the Cmdlets in action or call help
on any of the PsBamboo cmdlets.
# Set the target Bamboo Server
Set-BambooServer -Url 'http://localhost:8085'
# Set login credentials for further cmdlets
Set-BambooAuthentication -Credential (Get-Credential)
# Get the current authenticated user details
Get-BambooCurrentUser
# List all the latest build results
Get-BambooBuild
# Get the latest or all build results for a specific Plan
Get-BambooBuild -PlanKey 'PRJKEY-PLANKEY'
Get-BambooBuild -PlanKey 'PRJKEY-PLANKEY' -All
# Start a new build or resume a pause build
Start-BambooBuild -PlanKey 'PRJKEY-PLANKEY'
Resume-BambooBuild -BuildKey 'PRJKEY-PLANKEY-2'
# Execute all manual stages for a build
Start-BambooBuild -PlanKey 'PRJKEY-PLANKEY' -ExecuteAllStages
# Read logs from a specific build job
Get-BambooBuildLog -PlanKey 'PRJKEY-PLANKEY' -StageKey JOB1
# List all projects
Get-BambooProject
# Detail a specific Project defined by the -ProjectKey
Get-BambooProject -ProjectKey 'PRJKEY'
# List all Bamboo Plans
Get-BambooPlan
# List all Bamboo Plans for a specific Project
Get-BambooPlan -ProjectKey 'PRJKEY'
# Get details for a specific Plan
Get-BambooPlan -PlanKey 'PRJKEY-PLANKEY'
# Disable/Enable a specific Plan
Disable-BambooPlan -PlanKey 'PRJKEY-PLANKEY'
Enable-BambooPlan -PlanKey 'PRJKEY-PLANKEY'
# Clone/Copy a BambooPlan to a new Plan
Copy-BambooPlan -PlanKey 'PRJKEY-PLANKEY' -NewPlanKey 'PRJKEY-NEWPLAN'
# Create a new PlanBranch to a VCS-branch
$BranchName='pester'
Add-BambooPlanBranch -PlanKey 'PRJKEY-PLANKEY' -BranchName $BranchName -VcsBranch 'feature/pester'
# Enable/Disable PlanBranches
Enable-BambooPlanBranch -PlanKey 'PRJKEY-PLANKEY' -BranchName $BranchName
Disable-BambooPlanBranch -PlanKey 'PRJKEY-PLANKEY' -BranchName $BranchName
Note: Plan-branches are technically child-plans for regular plans in Bamboo, which means most of the Plan cmdlets can be used for PlanBranches too, by passing their PlanKey.
Cmdlets and functions for PsBamboo have their own help PowerShell help, which
you can read with help <cmdlet-name>
. PsBamboo Wiki is also added to this project with
some more information.
PsBamboo aims to adhere to Semantic Versioning 2.0.0.
In case of any issues, raise an issue ticket in this repository and/or feel free to contribute to this project if you have a possible fix for it.
- Source hosted at BitBucket
- Report issues/questions/feature requests on Bitbucket Issues
Pull requests are very welcome! Make sure your patches are well tested with Pester. Ideally create a topic branch for every separate change you make. For example:
- Fork the repo
- Create your feature branch (
git checkout -b my-new-feature
) - Commit your changes (
git commit -am 'Added some feature'
) - Make sure
Invoke-Pester
tests are passing with all your changes - Push to the branch (
git push origin my-new-feature
) - Create new Pull Request
Created and maintained by Akos Murati (akos@murati.hu).
Apache License, Version 2.0 (see LICENSE)