DEV Community

Building a simple CI/CD pipeline for local testing using Go, Docker, Minikube and a Bash script

Shivan Moodley on December 24, 2019

Wat In this article I will detail the thought process and implementation of an automated build and deployment pipeline that I wrote to r...
Collapse
 
jaedle profile image
jaedle •

As a small reference to the book β€œThe Unicorn Project”: you are following the ideal of locality and simplicity:
Test your code locally and with fast feedback in a production like environment: great job!

Could you provide a repo with your article content?

I would recommend some refactorings, this is very hard to read for me:

if [[ $1 = "build" ]]; then
    if [[ $2 = "docker" ]]; then
        if [[ $3 = "deploy" ]]; then
Collapse
 
cishiv profile image
Shivan Moodley •

I haven't read the Unicorn Project, but I might have to now!

You can find the code here github.com/cishiv/cicdexample

What refactoring would you recommend for readability? Feel free to open a PR on the repo if you want 😊

Thanks for taking the time to read!

Collapse
 
themanuel0 profile image
TheManuel0 • • Edited

really good post, and really intuitive also, but i got a question, what does the command "buildDocker" stands for? as it always output "command not found" on my terminal

Edit, i guess is a "build docker" command alias

Collapse
 
giladsh1 profile image
Gilad Sharaby •

Thanks for the hard work you've put into this post.

There are several very popular open source tools for this problem.

look into this post -
medium.com/containers-101/the-ulti...

my personal favourite is skaffold, which has all of these features built-in and a lot more...
good luck

Collapse
 
cishiv profile image
Shivan Moodley • • Edited

I actually drew some inspiration from similar tools - they're really cool and allow for far more customization. This was more an exercise in 'seeing if I could do it'. Thanks for reading!

Collapse
 
marquies profile image
Patrick Steinert •

Excellent post! Thank you for the insights!

Collapse
 
cishiv profile image
Shivan Moodley •

Thank you for taking the time to read it! 😊

Collapse
 
linuxxraza profile image
Hassan raza •

Absolutely amazing u r awesome πŸ”₯

Collapse
 
cishiv profile image
Shivan Moodley •

Thanks πŸ˜€

Collapse
 
johnmccuk profile image
John McCracken •

Thanks for the post, really enlightening and a big help in understanding the internal workings of CI.

Collapse
 
cishiv profile image
Shivan Moodley •

Thank you for reading John. Writing it helped me understand a whole bunch about CI as well

Collapse
 
ben profile image
Ben Halpern •

Tremendous first post!

Collapse
 
cishiv profile image
Shivan Moodley •

Thank you!

Collapse
 
robr8 profile image
RobR8 •

Hands down the best CICD example I have seen. I look forward to more articles!

Collapse
 
cishiv profile image
Shivan Moodley •

This means a lot. Thank you! I have a few that I'm working on 😁

Collapse
 
chillerbang profile image
Lance Govender •

Good Stuff man!

Collapse
 
cishiv profile image
Shivan Moodley •

Thanks brother