![]() There are a couple nuances to how we summarize the diff, but these are the main steps. The first iteration of the deployment worked via a series of promises chained from GitLab’s API. To start with, we built a deployment summary command. Since each command runs its own code path, it makes the app extensible if we want to add in other commands or interactions down the line. It works off a series of listeners for each individual slash command and configurations for each of our deployable apps. Our Slack Bot is a Node app built on express. They offer rich building block tools to style messages and commands, and their interactive action layer makes it simple to communicate with niche integrations like ephemeral messages. Slack’s slash command integrations are flexible and easy to work with ( most of the time). ![]() There are plenty of solutions to manage the deployment lifecycle of applications via Slack, but none that offered the peace of mind of a fully hosted application or the flexibility we’d need to add custom features. Before we get into the details, the main question is why not just use something off the shelf? The answer is security and flexibility. We choose to manage deployments via Slack as this was the most active place for our engineering team. Enter Slack Bot Badger, the botĮnter Slack Bot, also known as Badger, one of the many animal mascots at Curated. We wanted to create low-friction, high visibility sign off on deployments. Herein lies the problem that we sought to solve. From here, any member of our engineering team can promote a deployable application to production with a single click of a button. All commits to master will be continuously deployed to our staging environment as long as they successfully build and pass all of our automated tests. The final automated step is deploying to staging. Most jobs in each stage run in parallel, but a failed job in any stage prevents the progression into the subsequent tiers. The first stages are automated in that as one group of jobs completes, the second stage is triggered. Without going into extreme detail of our GitLab build and deployment pipeline, our code goes through a series of stages that contain jobs to build the application, run automated unit and integration tests, and then finally deploy to staging and production environments. It offers the proper hooks and flexibility to work with our complicated Kubernetes system and the proper APIs to remotely communicate with it. GitLab was our first choice for extensible, customizable software that we could use to manage our continuous integration and deployment pipelines. Not a problem when we’re hacking away in a loft apartment very big problem as we continue to scale. Even with a small engineering team, we didn’t have a consistent way of notifying engineers that their changes were being deployed into production. Slacks source code is released under the MIT License.įriedel Ziegelmayer for the Elixir programming language.How Curated leveraged Slack, express and GitLab to create a custom bot integration.Īs soon as Curated’s stack started to evolve, we realized we needed to expand on the visibility of our deployments. Slack.upload_file/4 for uploading files.Slack.post_message/4 for posting messages.Empty fields filtered out of API calls.Slack.chat_update/5 for updating messages.Slack.post_ephemeral/5 for posting ephemeral messages.Defmodule QuoteBot do use Slack.Bot, token : "xoxb-." Slack.Bot def init ( state ), do : ] end
0 Comments
Leave a Reply. |
Details
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |