From 7142b2e66e4e6957f1206ba9dcea621689c87816 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?I=C3=B1igo=20Moreno=20i=20Caireta?=
 <inigo.moreno@tecnalia.com>
Date: Mon, 15 May 2023 15:22:10 +0200
Subject: [PATCH] Remove dind service from most jobs

---
 ci-templates/core.yml                    | 3 ---
 ci-templates/industrial-ci-templates.yml | 3 +++
 ci-templates/syntax-check.yml            | 9 ++++++---
 3 files changed, 9 insertions(+), 6 deletions(-)

diff --git a/ci-templates/core.yml b/ci-templates/core.yml
index 8cacbee..d565be5 100644
--- a/ci-templates/core.yml
+++ b/ci-templates/core.yml
@@ -10,9 +10,6 @@ variables:
   TMPDIR: /builds/${CI_PROJECT_NAMESPACE}
   GIT_LFS_SKIP_SMUDGE: 1 # Avoid fetching the files from LFS when doing git fetch
 
-services:
-  - name: tecnalia-docker-dev.artifact.tecnalia.com/docker:dind
-    alias: docker
 
 stages:
   - build
diff --git a/ci-templates/industrial-ci-templates.yml b/ci-templates/industrial-ci-templates.yml
index acef8ec..5e2f16d 100644
--- a/ci-templates/industrial-ci-templates.yml
+++ b/ci-templates/industrial-ci-templates.yml
@@ -1,5 +1,8 @@
 .industrial_ci:
   stage: build
+  services:
+    - name: tecnalia-docker-dev.artifact.tecnalia.com/docker:dind
+      alias: docker
   before_script:
     - apk add --update bash coreutils tar
     - git clone --quiet --depth 1 https://github.com/ros-industrial/industrial_ci.git .ci_config
diff --git a/ci-templates/syntax-check.yml b/ci-templates/syntax-check.yml
index 4ecbab1..742db94 100644
--- a/ci-templates/syntax-check.yml
+++ b/ci-templates/syntax-check.yml
@@ -51,7 +51,9 @@ bash_syntax:
 ##########################################################
 markdown_syntax:
   stage: .post
-  script: docker run -v ${PWD}:/ac tecnalia-docker-dev.artifact.tecnalia.com/cytopia/awesome-ci syntax-markdown --path=/ac --extension=md --ignore=.ci_config --custom="-r ~MD013,~MD014"
+  image: tecnalia-docker-dev.artifact.tecnalia.com/cytopia/awesome-ci
+  script:
+    - syntax-markdown --path=${PWD} --extension=md --ignore=.ci_config --custom="-r ~MD013,~MD014"
   when: always
 
 ##########################################################
@@ -62,10 +64,11 @@ markdown_syntax:
 ##########################################################
 file_syntax:
   stage: .post
+  image: tecnalia-docker-dev.artifact.tecnalia.com/cytopia/awesome-ci
   script:
     - RET=0
-    - docker run -v ${PWD}:/ac tecnalia-docker-dev.artifact.tecnalia.com/cytopia/awesome-ci file-trailing-space --path=/ac --extension=py,txt,cpp,h,md,sh,bash,xml,launch --ignore=.ci_config || RET=1
-    - docker run -v ${PWD}:/ac tecnalia-docker-dev.artifact.tecnalia.com/cytopia/awesome-ci file-utf8 --path=/ac --extension=py,txt,cpp,h,md,sh,bash,xml,launch --ignore=.ci_config || RET=1
+    - file-trailing-space --path=${PWD} --extension=py,txt,cpp,h,md,sh,bash,xml,launch --ignore=.ci_config || RET=1
+    - file-utf8 --path=${PWD} --extension=py,txt,cpp,h,md,sh,bash,xml,launch --ignore=.ci_config || RET=1
     - exit $RET
   when: always
 
-- 
GitLab