Giter Site home page Giter Site logo

pipeline-approval-from-ms-teams's Introduction

Ms Teams Approve Pipeline Deployments

Execute Approvals of CodePipeline stages from MS Teams.

Description

With increasing number of pipelines running in multiple accounts for different applications it becomes difficult to manage all approvals. This solution enables you to approve CodePipeline stages in a centralized way using MS Teams.

Requirements

  • AWS Account with existing pipeline in AWS CodePipeline
  • MS Teams channel
  • Configured webhook connector for the channel
  • Python3 and Pipenv to install required libraries

Architecture

approval-notification The solution involves several components working together. Firstly, Notification Lambda function is used to send an approval request to an MS Teams channel. This function is triggered by a CodePipeline stage that requires manual approval. The Notification Lambda function uses the Microsoft Teams webhook connector to send a message card to the MS Teams channel, which includes a button that the approver can click to approve or reject the pipeline stage. When the approver clicks the approval button, the MS Teams channel sends a POST request to an API Gateway endpoint, which triggers another Lambda function. This second function Approval Lambda uses the AWS CodePipeline API to update the status of the pipeline stage based on the approver's response.

IaC

Terraform code

Usage example

Approval request approval-request

Rejected request rejected-request

Approved request rejected-request

Best practices

  • Use a dedicated MS Teams channel for approval request to ensure that they are easily visible and distinguishable from other messages.
  • Make sure that people who allowed to trigger pipeline approval are added into channel and granted admin access
  • Use descriptive and informative message card format that includes relevant information such as the pipeline name, stage name and etc.
  • Use appropriate error handling and logging in your Lambda functions to detect and handle errors and exceptions
  • Use monitoring and alerting to track usage and performance of your Lambda functions and other resources, and to alert you about potential issues or anomalies

pipeline-approval-from-ms-teams's People

Contributors

nbekenov avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.