Coder Social home page Coder Social logo

kbot's Introduction

kbot

DevOps Course test application

Github Actions GitOps Workflow Scheme

GithubActions GitOps Workflow Scheme

This repository contains CI/CD pipeline definitions for Github Actions, Jenkins and Gitlab CI. Note that Jenkins and Gitlab pipeline examples does not contain CD pipeline, so they do not update Helm charts repository code.

Bitbucket & Jenkins to Gitlab & Gitlab CI Migration

Pros and Cons of such migration are described here: Detailed Notes and Short Notes

Gitlab CI Migration Conclusion

Jenkins is highly configurable, has huge set of plugins for any need of the CI pipeline script. Main problems are configuration all neeeded plugins and keeping them up to date with their working versions. Also Jenkins needs to be hosted somewhere and as it requires Java. Accoring to local testing, it needs quite enough hardware resources to run it's ecosystem and pipeline jobs fast. It seems to be quite a hassle to keep it running and up to date.

Gitlab ecosystem, along with git repository hosting and container storage serivce, also provides cloud and self hosted solutions for Gitlab and CI. Gitlab CI can be triggered on some events, for example push at repository, manual CI job start execution is also possible. Even free version is enough to cover needs of the provided Jenkinsfile. Gitlab CI has good documentation and big community at Stack Overflow, Gitlab Forum and other sites and blogs.

Gitlab CI pipeline is described in the a simple YAML file. Syntax is very easy to write and refactor, also it reads almost like a human language.

So, migration from Jenkins to Gitlab CI is very recommended.

Used learning resources for Jenkins to Gitlab CI migration task

Link to telegram bot

kbot

Setup

  • Create your own telegram bot with BotFather bot. Use command /newbot. It will ask for bot name and bot telegram user name. Provide these values. In final response message there will be API token, click at this message once to copy this token.
  • Call command read -s TELE_TOKEN to read from the input, use insert from buffer hotkey aka CMD+V, CTRL+V, and hit enter
  • Check saved token with echo $TELE_TOKEN terminal command
  • Use export TELE_TOKEN to export this variable into the environment
  • start Kbot with ./kbot start command
  • Open your telegram bot link that was obtained at the BotFather and start typing some bot commands

Build Generation

  • Each make and build command has such environment variables TARGETOS, TARGETARCH they define target operation system and processor architecture. See variables logic details at Makefile.
  • See supported os and architecture values here Golang Environment
  • TARGETOS=darwin TARGETARCH=arm64 make build - this example command will prepare application binary file
  • make image - create docker image
  • make push - push docker image into registry
  • make clean - remove binary and docker image

Run application via Docker

  • docker run suhovius/kbot:v1.0.9-3019ec6-darwin-arm64

Supported Commands

/start hello - see bot version. Output example: 'Hello I'm Kbot 1.0.2!'

/start rand - generate random number. Output example: 'Here is some random number 3!'

TODO:

  • TODO: Add CI/CD schema with Github Actions, Jenkins, Gilab CI and ArgoCD/Helm
  • TODO: Update Build generation with proper commands

kbot's People

Contributors

suhovius 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.