From 65cbc8b4b4ed6248fea60a61c9939608e56e0aad Mon Sep 17 00:00:00 2001 From: Thomas Citharel Date: Tue, 21 Dec 2021 10:48:14 +0100 Subject: [PATCH] Cleanup CI Signed-off-by: Thomas Citharel --- .gitlab-ci.yml | 63 ++++++++------------------------------------------ 1 file changed, 9 insertions(+), 54 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 0247db5..4bfeae9 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -1,9 +1,7 @@ -image: framasoft/framadate-ci +image: framasoft/framadate-ci:7.3-pdo_mysql stages: - test - deploy - - beta - - funky # Run php-cs-fixer and phpunit on all branches test: @@ -12,6 +10,14 @@ test: - composer install -o --no-interaction --no-progress --prefer-dist - php vendor/bin/php-cs-fixer fix --verbose --dry-run - vendor/bin/phpunit --bootstrap app/tests/bootstrap.php --debug app/tests + image: framasoft/framadate-ci:${PHP_VERSION}-pdo_mysql + parallel: + matrix: + - PHP_VERSION: + - "7.3" + - "7.4" + - "8.0" + - "8.1" cache: paths: - vendor/ @@ -54,54 +60,3 @@ pages: - tags except: - (beta|alpha) - -# Deploy on develop -beta: - stage: beta - script: - - git checkout develop - - composer install -o --no-interaction --no-progress --prefer-dist --no-dev - - composer dump-autoload --optimize --no-dev --classmap-authoritative - - if [ ! -z ${ZANATA_CONFIG_FRAMABOT+x} ]; then mkdir -p ${HOME}/.config; echo -e "${ZANATA_CONFIG_FRAMABOT}" > ${HOME}/.config/zanata.ini; fi - - if [ ! -z ${ZANATA_CONFIG_FRAMABOT+x} ]; then make pull-locales; fi - - mkdir .public - - cp -r * .public - - cp -r .git .public - - mv .public public - - mkdir "${HOME}/.ssh" - - chmod 700 "${HOME}/.ssh" - - if [ ! -z ${DEPLOYEMENT_KNOWN_HOSTS+x} ]; then echo -e "${DEPLOYEMENT_KNOWN_HOSTS}" > ${HOME}/.ssh/known_hosts; fi - - eval `ssh-agent -s` - - if [ ! -z ${BETA_KEY+x} ]; then ssh-add <(echo "${BETA_KEY}" | base64 --decode -i); fi - - if [ ! -z ${BETA_KEY+x} ]; then rsync -a --delete --exclude admin/.stdout.log --exclude admin/.htpasswd --exclude app/inc/config.php --exclude stats/ --exclude error/ public/ ${BETA_USER}@${DEPLOYEMENT_HOST}:../../web/; fi - only: - - develop - -# Deploy on funky -funky: - stage: funky - script: - - git checkout funky - - composer install - - mkdir tpl_c - - mkdir .public - - cp -r * .public - - mv .public public - - mkdir "${HOME}/.ssh" - - chmod 700 "${HOME}/.ssh" - - if [ ! -z ${DEPLOYEMENT_KNOWN_HOSTS+x} ]; then echo -e "${DEPLOYEMENT_KNOWN_HOSTS}" > ${HOME}/.ssh/known_hosts; fi - - eval `ssh-agent -s` - - if [ ! -z ${DEPLOYEMENT_KEY+x} ]; then ssh-add <(echo "${DEPLOYEMENT_KEY}" | base64 --decode -i); fi - - if [ ! -z ${DEPLOYEMENT_KEY+x} ]; then rsync -a --delete --exclude admin/.stdout.log --exclude admin/.htpasswd --exclude app/inc/config.php --exclude stats/ --exclude error/ public/ ${DEPLOYEMENT_USER}@${DEPLOYEMENT_HOST}:../../web/; fi - only: - - funky - -# Push new translations strings to https://trad.framasoft.org -trads: - stage: deploy - image: framasoft/push-trad:latest - script: - - if [ ! -z ${ZANATA_CONFIG_FRAMABOT+x} ]; then mkdir -p ${HOME}/.config; echo -e "${ZANATA_CONFIG_FRAMABOT}" > ${HOME}/.config/zanata.ini; fi - - if [ ! -z ${ZANATA_CONFIG_FRAMABOT+x} ]; then make push-locales; fi - only: - - develop