From 6a253abfd2cb60c7f72a8f30dd583844a1aba384 Mon Sep 17 00:00:00 2001
From: bmortier <benoit.mortier@fusiondirectory.org>
Date: Fri, 15 Jan 2021 14:13:11 +0100
Subject: [PATCH] Update .gitlab-ci.yml Add ou own docker images Standardize
 with fusiondirectory ci

---
 .gitlab-ci.yml | 34 ++++++++++++++++++----------------
 1 file changed, 18 insertions(+), 16 deletions(-)

diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
index cfdee1f..311b582 100644
--- a/.gitlab-ci.yml
+++ b/.gitlab-ci.yml
@@ -1,24 +1,26 @@
-# Specify docker image
-image: debian:stretch
+stages:
+  - lint
+  - codestyle
 
-# Generate perlcritic rapport
-create_perlcritic_rapport:
+# Perl lint
+create_perl_lint_rapport:
+  image: registry.fusiondirectory.org/fusiondirectory/fd/perlcodestyle:stretch
+  stage: lint
   only:
     - branches
-    - tags
-  before_script:
-    - apt-get update -qq
-    - apt-get install -y -qq libperl-critic-perl
   script:
-    - perlcritic .
+    - perl -cW bin/ldap-schema-manager
+    - perl -cW bin/schema2ldif
 
-# Perl lint
-create_perl_lint_rapport:
+# Generate perlcritic rapport
+create_perlcritic_rapport:
+  image: registry.fusiondirectory.org/fusiondirectory/fd/perlcodestyle:stretch
+  stage: codestyle
   only:
     - branches
-    - tags
-  before_script:
-    - apt-get update -qq
-    - apt-get install -y -qq perl
   script:
-    - find bin/ -type f -print0 | xargs -0 -n1 perl -cw
+    - cp bin/ldap-schema-manager bin/ldap-schema-manager.pl
+    - cp bin/schema2ldif bin/bin/schema2ldif.pl
+    - perlcritic --quiet --verbose "%f~|~%s~|~%l~|~%c~|~%m~|~%e~|~%p~||~%n" bin
+
+
-- 
GitLab