From ef547f4ee6204920057ed7e2d5d7daa36d6fa0fa Mon Sep 17 00:00:00 2001
From: Adar Nimrod <nimrod@shore.co.il>
Date: Fri, 22 Jan 2021 21:34:53 +0200
Subject: [PATCH] Pull with CI.

---
 .gitlab-ci.yml | 22 ++++++++++++++++++++++
 deploy         |  1 -
 2 files changed, 22 insertions(+), 1 deletion(-)

diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
index 135eb44..d53fc6c 100644
--- a/.gitlab-ci.yml
+++ b/.gitlab-ci.yml
@@ -9,6 +9,7 @@ stages:
   - test
   - build
   - deploy
+  - pull
 
 build:
   extends: .compose-build
@@ -17,3 +18,24 @@ build:
 push:
   extends: .compose-push
   tags: [ns4.shore.co.il]
+
+pull-ns4:
+  image: registry.shore.co.il/ci-images:docker
+  stage: pull
+  tags: [ns4.shore.co.il]
+  script:
+    - docker-compose pull --quiet
+
+pull-host01:
+  image: registry.shore.co.il/ci-images:docker
+  stage: pull
+  tags: [host01.shore.co.il]
+  script:
+    - docker-compose pull --quiet
+
+pull-kodi:
+  image: registry.shore.co.il/ci-images:docker
+  stage: pull
+  tags: [kodi.shore.co.il]
+  script:
+    - docker-compose pull --quiet
diff --git a/deploy b/deploy
index d7b555a..4c175e1 100755
--- a/deploy
+++ b/deploy
@@ -11,7 +11,6 @@ _deploy() {
     echo "Deploying to $1" >&2
     export DOCKER_HOST="ssh://$1"
     export RUNNER_NAME="$1"
-    until docker-compose pull --quiet; do true; done
     until docker-compose up --detach --remove-orphans ; do true; done
     # shellcheck disable=SC2034
     for i in $(seq 12)
-- 
GitLab