pn-analytics-deployments
v1.0.5
Published
Node utility CLI for bitbucket pipelines to publish deployment details to the analytics team
Downloads
58
Readme
pn-analytics-deployments
Node utility CLI for bitbucket pipelines to publish deployment details to the analytics team
Features
- SIMPLIFIES PUBLISHING DEPLOYMENT DATA TO DAD
- SETS THE LATEST COMMIT MESSAGE TO THE MESSAGE SENT
- GETS THE CURRENT REPO NAME FROM BITBUCKET ENV VARS
Setup
- Setup environment variables
- DAD_SLACK_CHANNEL - this refers to your teams slack channel, where your team would be contacted. Needs to match: /^[a-z0-9_\\-]+$/. This env var is optional, you can pass the value as parameter to the script aswell using --slackChannel
- DAD_TEAM_NAME - this refers to your teams name. Needs to match: /^[a-z0-9\\-]+$/. This env var is optional, you can pass the value as a parameter to the script using --teamName
- DAD_URL_DEV - the dad deployments url for dev
- DAD_URL_PROD - the dad deployments url for production
- Installing
- npm install pn-analytics-deployments
- Running
- ./node_modules/.bin/pn-publish-deployments --stage dev
Example
# bitbucket pipeline configuration
stepdefinitions:
- publish-deployment-status: &publish-deployment-status
name: publish-deployment-status
script:
- ./node_modules/.bin/pn-publish-deployments --stage dev # dev or prod is the only valid options
pipelines:
default:
- step: *your-fancy-stuff
- step: *publish-deployment-status