From 9b411a541f4972721827c9edd74b538f84522a51 Mon Sep 17 00:00:00 2001
From: Bertrand GAUTHIER <bertrand.gauthier@unicaen.fr>
Date: Mon, 12 Jul 2021 15:41:50 +0200
Subject: [PATCH] Ajout d'un .gitlab-ci.yml

---
 .gitlab-ci.yml | 31 +++++++++++++++++++++----------
 1 file changed, 21 insertions(+), 10 deletions(-)

diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
index 47e130c..5dd47bb 100644
--- a/.gitlab-ci.yml
+++ b/.gitlab-ci.yml
@@ -1,13 +1,24 @@
+image: registre.unicaen.fr:5000/unicaen-dev-php7.3-apache
+
 stages:
-- update-repo-directory
+- publish
+- tests
+
+cache:
+  key: ${CI_COMMIT_REF_SLUG}
+  paths:
+  - vendor/
+
+#unit-tests:
+#  stage: tests
+#  script:
+#    - composer install --no-interaction --no-suggest --no-progress
+#    - php vendor/bin/phpunit --coverage-text=coverage.txt --colors=never
+#  artifacts:
+#    paths:
+#      - coverage.txt
 
-repo-update:
-  stage: update-repo-directory
+update-satis:
+  stage: publish
   script:
-    - http_proxy=http://10.14.128.99:3128 apt -qq update
-    - http_proxy=http://10.14.128.99:3128 apt -qq -y install openssh-client
-    - eval $(ssh-agent -s)
-    - echo "$SSH_PRIVATE_KEY" | tr -d '\r' | ssh-add - > /dev/null
-    - mkdir -p ~/.ssh
-    - chmod 700 ~/.ssh
-    - ssh -o StrictHostKeychecking=no root@10.14.129.37 "cd /var/www/html/packagist/satis && php bin/satis build --verbose unicaen.json /var/www/html/packagist/"
+    - curl https://gest.unicaen.fr/packagist/update
-- 
GitLab