Slack client for reporting on CodePipeline runs
Project description
ci-buildbot
ci-buildbot
is a command line tool to do slack messaging from CodePipelines. ci-buildbot
acts as a Slack App in
order to do its work.
To install:
pyenv virtualenv 3.8.5 ci-buildbot
pyenv local ci-buildbot
pip install -r requirements.txt
pip install -e .
Now set up the environment:
cp etc/environment.text .env
You'll need to know two things:
SLACK_API_TOKEN
: this your Slack app's Oath tokenCHANNEL
: this is the channel you wantci-buildbot
to post into. Note that if this is a private channel, you'll need to invite theci-buildbot
app into that channel before you'll see any messages.
Now you can run the main command, buildbot
:
buildbot --help
Icons
I get the icons for the Slack messages here: https://iconmonstr.com.
Get them as .pngs, 64x64px, name them appropriately to the build steps they're going to be used in, and save them to ./icons/
For the gray icons (foo-start.png
), use #909090 as the icon color.
For the green icons (foo-success.png
), use #0D6B19 as the icon color.
For the red icons (foo-failure.png
), use #801B0B as the icon color.
ci-buildbot
tells slack to retrieve the icons from an S3 bucket: ads-utils-icons.s3.amanzonaws.com. Do this to sync ./icons
to S3:
make icons
Testing: CodeBuild environment variables
export CODEBUILD_START_TIME=1594856732.3577878
export CODEBUILD_VPC_AZ=us-west-2b
export CODEBUILD_LAST_EXIT=0
export CODEBUILD_START_TIME=1538752095466
export CODEBUILD_BMR_URL=https://CODEBUILD_AGENT:3000
export CODEBUILD_SOURCE_VERSION=arn:aws:s3:::bucket/pipeline/App/OGgJCVJ.zip
export CODEBUILD_KMS_KEY_ID=arn:aws:kms:us-west-2:000000011111:alias/aws/s3
export CODEBUILD_BUILD_ID=codebuild-project:40b92e01-706b-422a-9305-8bdb16f7c269
export OLDPWD=/codebuild/output/src00011222/src
export CODEBUILD_GOPATH=/codebuild/output/src084981953
export CODEBUILD_RESOLVED_SOURCE_VERSION=9e0d29404ee30b7b63258414ecccc996bbeb55c6
export CODEBUILD_BUILD_SUCCEEDING=1
export CODEBUILD_BUILD_ARN=arn:aws:codebuild:us-west-2:000000001111:build/codebuild-project:40b92e01-706b-422a-9305-8bdb16f7c269
export AWS_CONTAINER_CREDENTIALS_RELATIVE_URI=/v2/credentials/e5f23b9f-c72e-4384-9ba1-37d08aa052b7
export CODEBUILD_INITIATOR=codepipeline/pipeline-name
export AWS_DEFAULT_REGION=us-west-2
export CODEBUILD_LOG_PATH=40b92e01-706b-422a-9305-8bdb16f7c269
export CODEBUILD_BUILD_IMAGE=000011112222.dkr.ecr.us-west-2.amazonaws.com/codebuild:docker-image
export AWS_REGION=us-west-2
export CODEBUILD_SRC_DIR=/codebuild/output/src00011222/src
export CODEBUILD_AUTH_TOKEN=0730f0ab-5299-4235-a2c2-bb1f6ad07033
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
File details
Details for the file ci_buildbot-0.11.3.tar.gz
.
File metadata
- Download URL: ci_buildbot-0.11.3.tar.gz
- Upload date:
- Size: 18.4 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.1 CPython/3.11.9
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 1548045337385819ccca742519afc744ec3cbc431c35e4f5f71fc7a2a267b86b |
|
MD5 | b5925578591cc6405c7f194d493ede1b |
|
BLAKE2b-256 | ccb43aa751fa02d8e6609482e3b37d2c61d21446ad594c73d0148e4d5af9b16c |
File details
Details for the file ci_buildbot-0.11.3-py3-none-any.whl
.
File metadata
- Download URL: ci_buildbot-0.11.3-py3-none-any.whl
- Upload date:
- Size: 29.7 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.1 CPython/3.11.9
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | abe3afe251be7a8308dc0883798496c660aabed3df8da1da365070e074eb8ed7 |
|
MD5 | fb3e583192dac2694d2709273a17543e |
|
BLAKE2b-256 | 3167d1fb213cb966ae2aa552f42b55a59cfc4c90cd2c8256adbc171a473e21e2 |