AWS CodeBuild/CodeDeploy triggers & updates to Slack with a cool Progress Bar!
Project description
awsslack
Basic view of how it would look in Slack (reality is much better with live progress-bar)
my-slack-bot APP 12:02 AM
████████████████████ 100.0%
00:02:12 - [Build: <project-name> BuildStatus=IN_PROGRESS!]
00:02:17 - [Build's Phase: SUBMITTED PhaseStatus=SUCCEEDED]
00:02:18 - [Build's Phase: QUEUED PhaseStatus=SUCCEEDED]
00:02:48 - [Build's Phase: PROVISIONING PhaseStatus=SUCCEEDED]
00:02:53 - [Build's Phase: DOWNLOAD_SOURCE PhaseStatus=SUCCEEDED]
00:03:14 - [Build's Phase: INSTALL PhaseStatus=SUCCEEDED]
00:03:19 - [Build's Phase: PRE_BUILD PhaseStatus=SUCCEEDED]
00:05:00 - [Build's Phase: BUILD PhaseStatus=SUCCEEDED]
00:05:31 - [Build's Phase: POST_BUILD PhaseStatus=SUCCEEDED]
00:05:36 - [Build: <project-name> BuildStatus=SUCCEEDED!] (edited)
Installation
$ pip install awsslack
Usage
Config
Config file path is: ~/.aws/.awsslack-config.yaml
$ awsslack config --auto-generate
See help: awsslack config --help
CodeBuild
Trigger Codebuild project for dev
environment:
$ awsslack codebuild -P <project-name> -E dev
Similarly, for prod
environment:
$ awsslack codebuild -P <project-name> -E prod
See help: awsslack codebuild --help
CodeDeploy
Trigger CodeDeploy project for dev
environment:
$ awsslack codedeploy -P <project-name> -E dev
Similarly, for prod
environment:
$ awsslack codedeploy -P <project-name> -E prod
Note: If --commit
is not provided, will fetch latest Commit ID from --branch
.
See help: awsslack codedeploy --help
Slack App
To create a new Slack app:
- Go to https://api.slack.com/apps?new_app=1
- click 'From scratch'
- enter 'App Name': 'awsslack'
- select workspace
- click 'Create App'
- click 'OAuth and Permissions'
- under scopes, 'Bot Token Scopes', click 'Add an OAuth Scope'
- add 'chat:write' scope
- under scopes, 'User Token Scopes', click 'Add an OAuth Scope'
- under 'OAuth Tokens for Your Workspace', click 'Install to Workspace'
- click 'Allow'
- copy 'Bot User OAuth Token'
- update the token in config file at path
~/.aws/.awsslack-config.yaml
- Add apps to your Slack workspace
- Good to go. now 'awsslack' can push updates to slack
Project details
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 awsslack-0.1.4.tar.gz
.
File metadata
- Download URL: awsslack-0.1.4.tar.gz
- Upload date:
- Size: 10.2 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.4.1 CPython/3.8.10 Linux/5.15.0-1028-aws
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 0e180e7adc2ad8395ab59229d8b1c9dff34d1954cd81fd78afcc59d91ac46edd |
|
MD5 | 2b038640dd3f8eb4a7c1e0bc23ecb52a |
|
BLAKE2b-256 | 063a95a8acadee350353557decef6af22e7d3740c0ee7cf8ddf75ea0e4c6d97e |
File details
Details for the file awsslack-0.1.4-py3-none-any.whl
.
File metadata
- Download URL: awsslack-0.1.4-py3-none-any.whl
- Upload date:
- Size: 13.0 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.4.1 CPython/3.8.10 Linux/5.15.0-1028-aws
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 26f18ca8198abbb710e73287a545f32bfcad15bb46016c309b32fb2a1fd61525 |
|
MD5 | 149ea5b6018723014dd516ff9347923d |
|
BLAKE2b-256 | d833fa976f8c56c0dabe897e8f813d6895202db01b12275884f0f50ce4c6556e |