A serverless ChatOps tool for interacting with Bamboo from Microsoft Teams.
- Bamboo interaction - interact with Bamboo in Microsoft Teams with wide range of commands.
- Result notification - receive notification in Microsoft Teams for Bamboo jobs.
- Hanging detection - detect hanging Bamboo jobs and alert in Microsoft Teams.
User interacts with Bamboo through Teams outgoing webhook and bamboo-on-teams service.
Bamboo-on-teams stepfunction pulls job status from Bamboo and pushes to Teams channel through incoming webhook, and a warning message will be sent the same way out if the job is hanging.
-
Create an incoming webhook in Teams to received job notification and copy the URL out as the
notificationURL
parameter value. -
Create an outgoing webhook in Teams to point to the Bamboo-on-Teams service URL, and copy the HMAC token out as the
teamsHMACSharedToken
parameter value. -
Create a personal access token for the dedicated bamboo-on-teams bamboo account, and copy it out as the
bambooAPIToken
parameter value. -
Configure required parameters in SSM
## Infrastructure configuration ##
# ID of the AWS account in which the stack is going to be created
/bamboo-on-teams/accountId
# Custom deployment bucket
/bamboo-on-teams/deploymentBucket
# VPC configuration to access the private bamboo REST API(Optional if Bamboo Rest API is public available)
/bamboo-on-teams/securityGroupId
/bamboo-on-teams/subnetId
## Application configuration ##
/bamboo-on-teams/applicationConfig
Sample application configuration:
{
"bambooHostUrl": "test.co.nz",
"bambooAPIToken": "NjsDAFDHkoVOASXIM4QDSDFSgRQ",
"hmacToken": "neasdffz+LPsYZGsdddxyOvWSiK8=",
"notificationURL": "https://test.webhook.office.com/webhookb2/85dcasdfaf@864e4889-04a2-416e-9f88-ca5ce1c6c1b7/IncomingWebhook/9db3asdfaa369/be873347-c615-4984-ad7a-f7952283551e",
"enabledForProd": false,
}
-
Build and deploy Bamboo-on-Teams through npm scripts in package.json.
-
In Teams channel, tag the outgoing webhook and run commands.
<command> [options]
Use " help" for information on a specific command. The synopsis for each command shows its options and their usage.
- list-plans
- search-plans
- list-branches
- list-builds
- desc-build
- create-branch
- build
- list-projects
- search-projects
- list-envs
- list-releases
- list-deploys
- create-release
- deploy-latest
- deploy-release
- deploy-build
- promote-release
- help
Usage: list-plans
List bamboo plans.
Usage: search-plans [options]
Search build plans.
Options:
-s, --service <service> wildcard service name, e.g. customers
-h, --help display help for command
Usage: list-branches [options]
List branch plans for a service.
Options:
-s, --service <service> service name, e.g. customers-v1
-h, --help display help for command
Usage: list-builds [options]
List builds for a service in a branch plan.
Options:
-s, --service <service> service name, e.g. customers-v1
-b, --branch <branch> bamboo branch name, e.g. release-1.0.0
-h, --help display help for command
Usage: desc-build [options]
Describe a build.
Options:
-b, --build <build> build key, e.g. API-CCV28-1
-h, --help display help for command
Usage: create-branch [options
Create branch for a plan.
Options:
-s, --service <service> service name, e.g. customers-v1
-b, --vcs-branch <vcsBranch> vcsBranch name, e.g. master
-h, --help display help for command
Usage: build [options]
Trigger a branch build for a service.
Options:
-s, --service <service> service name, e.g. customers-v1
-b, --branch <branch> bamboo branch name, e.g. master
-h, --help display help for command
Usage: list-projects
List deployment projects.
Usage: search-projects [options]
Search deployment projects.
Options:
-s, --service <service> wildcard service name, e.g. customers
-h, --help display help for command
Usage: list-envs [options]
List available environments for a service.
Options:
-s, --service <service> service name, e.g. customers-v1
-h, --help display help for command
Usage: list-releases [options]
List the releases created from a service branch.
Options:
-s, --service <service> service name, e.g. customers-v1
-b, --branch <branch> bamboo branch name, e.g. master
-h, --help display help for command
Usage: list-deploys [options]
List the deployments in a service environment.
Options:
-s, --service <service> service name, e.g. customers-v1
-e, --env <env> env name, e.g. dev
-h, --help display help for command
Usage: create-release [options]
Create a release for a service build.
Options:
-s, --service <service> service name, e.g. customers-v1
-b, --build <build> build key, e.g. API-CCV28-1
-r, --release <release> release name, e.g. v1.0.0
-h, --help display help for command
Usage: deploy-latest [options]
Deploy the service with the latest build in a branch to an environment.
Options:
-s, --service <service> service name, e.g. customers-v1
-b, --branch <branch> bamboo branch name, e.g. master
-e, --env <env> env name, e.g. dev
-h, --help display help for command
Usage: deploy-release [options]
Deploy a release to a service environment.
Options:
-s, --service <service> service name, e.g. customers-v1
-e, --env <env> env name, e.g. dev
-r, --release <release> release name, e.g. v1.0.0
-h, --help display help for command
Usage: deploy-build [options]
Deploy a service build to an environment.
Options:
-s, --service <service> service name, e.g. customers-v1
-e, --env <env> env name, e.g. dev
-b, --build-key <buildKey> bamboo build key, e.g. API-CPV1-30
-h, --help display help for command
Usage: promote-release [options]
Promote the release from one environment to another.
Options:
-s, --service <service> service name, e.g. customers-v1
-se, --source-env <sourceEnv> source environment name, e.g. dev
-te, --target-env <targetEnv> target environment name, e.g. test
-h, --help display help for command
Your contributions are always welcome!
This work is licensed under MIT.