The simplest way buat CI/CD-an dengan gitlab

sisi server:

  1. install docker
  2. install gitlab-runner

di code:

  1. buat Dockerfile

di gitlab.com:

  1. buatlah 1 file, pilih jenis .gitlab-ci.yml lalu pakai template docker. langsung commits.
  2. buka setting>ci/cd>expand pada runner. catet tokennya.

kembali ke server:

  1. jalankan gitlab-runner register
  2. masukkan token ketika diminta. lainnya ikutin aja. oia, kalau diminta mau pakai apa buar executor, paling aman sih pakai shell.
  3. Done!

kalau emang butuh multiple repo, bisa pakai trik docker-compose. syaratnya di server sudah terinstall docker-compose. ya, gitu aja. 😀

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

This site uses Akismet to reduce spam. Learn how your comment data is processed.