Skip to main content

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:

  1. Go to https://api.slack.com/apps?new_app=1
  2. click 'From scratch'
  3. enter 'App Name': 'awsslack'
  4. select workspace
  5. click 'Create App'
  6. click 'OAuth and Permissions'
  7. under scopes, 'Bot Token Scopes', click 'Add an OAuth Scope'
  8. add 'chat:write' scope
  9. under scopes, 'User Token Scopes', click 'Add an OAuth Scope'
  10. under 'OAuth Tokens for Your Workspace', click 'Install to Workspace'
  11. click 'Allow'
  12. copy 'Bot User OAuth Token'
  13. update the token in config file at path ~/.aws/.awsslack-config.yaml
  14. Add apps to your Slack workspace
  15. 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

awsslack-0.1.4.tar.gz (10.2 kB view details)

Uploaded Source

Built Distribution

awsslack-0.1.4-py3-none-any.whl (13.0 kB view details)

Uploaded Python 3

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

Hashes for awsslack-0.1.4.tar.gz
Algorithm Hash digest
SHA256 0e180e7adc2ad8395ab59229d8b1c9dff34d1954cd81fd78afcc59d91ac46edd
MD5 2b038640dd3f8eb4a7c1e0bc23ecb52a
BLAKE2b-256 063a95a8acadee350353557decef6af22e7d3740c0ee7cf8ddf75ea0e4c6d97e

See more details on using hashes here.

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

Hashes for awsslack-0.1.4-py3-none-any.whl
Algorithm Hash digest
SHA256 26f18ca8198abbb710e73287a545f32bfcad15bb46016c309b32fb2a1fd61525
MD5 149ea5b6018723014dd516ff9347923d
BLAKE2b-256 d833fa976f8c56c0dabe897e8f813d6895202db01b12275884f0f50ce4c6556e

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page