From 2f03f98c05598dbb46ce07efc9268117d3e15c7c Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Guillaume=20Perr=C3=A9al?= <guillaume.perreal@irstea.fr>
Date: Fri, 24 Jan 2020 10:48:00 +0100
Subject: [PATCH] =?UTF-8?q?Utilise=20les=20pr=C3=A9configurations=20de=20c?=
 =?UTF-8?q?i-config.?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

---
 .gitlab-ci.yml | 45 +++++++--------------------------------------
 .packagist.sh  |  5 -----
 2 files changed, 7 insertions(+), 43 deletions(-)
 delete mode 100755 .packagist.sh

diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
index 7aacdd3..973f5de 100644
--- a/.gitlab-ci.yml
+++ b/.gitlab-ci.yml
@@ -1,38 +1,7 @@
-stages:
-  - test
-  - deploy
-
-.test:
-  stage: test
-  tags: [docker]
-  image: gitlab-registry.irstea.fr/pole-is/docker/php:buster-${CI_JOB_NAME}
-  variables:
-    COMPOSER_CACHE_DIR: "${CI_PROJECT_DIR}/.composer-cache"
-    COMPOSER_OPTS: ""
-  before_script:
-    - php -v
-    - composer -V
-  script:
-    - composer update $COMPOSER_OPTS
-    - php -l src/*.php
-    - vendor/bin/composer-require-checker
-    - vendor/bin/php-cs-fixer fix --verbose --dry-run --using-cache=no
-    - vendor/bin/phpunit
-  cache:
-    key: "composer-cache-${CI_COMMIT_REF_NAME}"
-    paths:
-      - "${COMPOSER_CACHE_DIR}"
-
-"7.1":
-  extends: .test
-  variables:
-    COMPOSER_OPTS: "--prefer-lowest --prefer-stable"
-
-"7.3":
-  extends: .test
-
-deploy:
-  stage: deploy
-  tags: [docker]
-  image: appropriate/curl
-  script: ./.packagist.sh
+include:
+  - project: pole-is/tools/ci-config
+    ref: "2.1.0"
+    file: /php-multiversions-ci.yml
+  - project: pole-is/tools/ci-config
+    ref: "2.1.0"
+    file: /packagist-ci.yml
diff --git a/.packagist.sh b/.packagist.sh
deleted file mode 100755
index a4d7718..0000000
--- a/.packagist.sh
+++ /dev/null
@@ -1,5 +0,0 @@
-#!/usr/bin/env sh
-curl -fsSL \
-    -H"Content-Type: application/json" \
-    -d'{"repository":{"url":"'$CI_PROJECT_URL'.git"}}' \
-    "https://packagist.org/api/update-package?username=$PACKAGIST_USERNAME&apiToken=$PACKAGIST_TOKEN"
-- 
GitLab