ciena-devops
A collection of scripts and configurations used by the Ciena organization in their DevOps
scripts/slack/incoming-webhooks/send-message.sh
After pr-bumper
has merged an outstanding PR and bumped the package version this script should then be ran to send a
message to the #ui-platform
Slack channel.
The message will look like:
PATCHES will have a green color, MINOR blue, and MAJOR burgundy.
An error message may also be sent when an error is encountered:
package.json Configuration
A repository
property needs to added to the package.json file, such as:
"repository": {
"type": "git",
"url": "https://<url>/<organization>/<repo>.git"
},
TravisCI Configuration
An environment variable needs to be added to the TravisCI configuration at https://travis-ci.org as well as two additions need to be added to the .travis.yml file.
The environment variable that needs to be added to the respective package's configuration in TravisCI is
SLACK_INCOMING_WEBHOOK_URL
and needs to be set to the url of the incoming webhook integration for the #ui-platform
channel. To do this visit https://travis-ci.org/<organization>/<repo>/settings
. NOTE: When adding the
SLACK_INCOMING_WEBHOOK_URL
variable, make sure to keep the "Display value in build log" set to "OFF" otherwise the url will be written to the build logs for the public to see.
The additions to the .travis.yml file are to add the ciena-devops
package to the npm install
in the
before_install
configuration, such as:
before_install:
- npm install -g pr-bumper@^3.2.3 ciena-devops^1.0.0
The second addition is to add an after_deploy
configuration, such as:
after_deploy:
- $(npm root -g)/ciena-devops/scripts/slack/incoming-webhooks/send-message.sh
TeamCity Configuration
@TODO
scripts/package-info.sh
This script contains several functions related to retrieving information about packages.
Creating new scripts
When developing new scripts you must change the permissions of them before committing, as per
https://docs.travis-ci.com/user/customizing-the-build/#Implementing-Complex-Build-Steps
You may also find the https://www.shellcheck.net tool helpful when writing bash
scripts.