DevOps Course test application
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.
Pros and Cons of such migration are described here: Detailed Notes and Short Notes
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.
- Tutorial: Create and run your first GitLab CI/CD pipeline
- Tutorial: Create a complex pipeline
- Configure a list of selectable prefilled variable values
- Golang CI Example
- Build Golang Docker images with GitLab CI Pipelines
- Passing Docker Image Between Build and Test Stage in GitLab Runner
- 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 akaCMD+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
- Each make and build command has such environment variables
TARGETOS
,TARGETARCH
they define target operation system and processor architecture. See variables logic details atMakefile
. - See supported os and architecture values here Golang Environment
TARGETOS=darwin TARGETARCH=arm64 make build
- this example command will prepare application binary filemake image
- create docker imagemake push
- push docker image into registrymake clean
- remove binary and docker image
docker run suhovius/kbot:v1.0.9-3019ec6-darwin-arm64
/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: Add CI/CD schema with Github Actions, Jenkins, Gilab CI and ArgoCD/Helm
- TODO: Update Build generation with proper commands