From 176c40972d67406bb194a9cb24f3d1e43ff3babe Mon Sep 17 00:00:00 2001
From: Adar Nimrod <nimrod@shore.co.il>
Date: Sat, 10 Apr 2021 16:55:44 +0300
Subject: [PATCH] GitLab CI.

Run pre-commit, build and push. Add badge.
---
 .gitlab-ci.yml | 27 +++++++++++++++++++++++++++
 README.md      | 10 ++++++----
 2 files changed, 33 insertions(+), 4 deletions(-)
 create mode 100644 .gitlab-ci.yml

diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
new file mode 100644
index 0000000..ac6e325
--- /dev/null
+++ b/.gitlab-ci.yml
@@ -0,0 +1,27 @@
+---
+include:
+  - project: shore/ci-templates
+    file: templates/pre-commit.yml
+  - project: shore/ci-templates
+    file: templates/docker.yml
+
+stages:
+  - test
+  - build
+  - deploy
+
+build:
+  extends: .docker-build-shore
+  tags: [ns4.shore.co.il]
+
+push-shore:
+  extends: .docker-push
+  tags: [ns4.shore.co.il]
+  variables:
+    FULL_IMAGE: "registry.shore.co.il/$IMAGE:$TAG"
+
+push-hub:
+  extends: .docker-push
+  tags: [ns4.shore.co.il]
+  variables:
+    FULL_IMAGE: "registry.hub.docker.com/$IMAGE:$TAG"
diff --git a/README.md b/README.md
index 66d217a..68e5c22 100644
--- a/README.md
+++ b/README.md
@@ -1,5 +1,7 @@
 # AWS ClougWatch Agent
 
+[![pipeline status](https://git.shore.co.il/nimrod/cw-logs-docker/badges/master/pipeline.svg)](https://git.shore.co.il/nimrod/cw-logs-docker/-/commits/master)
+
 Send files to CloudWatch logs.
 
 ## Usage
@@ -29,7 +31,7 @@ This software is licensed under the MIT license (see `LICENSE.txt`).
 
 ## Author Information
 
-Nimrod Adar, [contact me](mailto:nimrod@shore.co.il) or visit my [website](
-https://www.shore.co.il/). Patches are welcome via [`git send-email`](
-http://git-scm.com/book/en/v2/Git-Commands-Email). The repository is located
-at: <https://git.shore.co.il/explore/>.
+Nimrod Adar, [contact me](mailto:nimrod@shore.co.il) or visit my
+[website](https://www.shore.co.il/). Patches are welcome via
+[`git send-email`](http://git-scm.com/book/en/v2/Git-Commands-Email). The repository
+is located at: <https://git.shore.co.il/explore/>.
-- 
GitLab