.gitlab-ci.yml 1.94 KB
Newer Older
# Specify docker image
image: debian:stretch

# Define variable to disable SSL verification of GIT
variables:
  GIT_SSL_NO_VERIFY: "true"

# Execute before every job
# Install php-codesniffer, git and php
before_script:
  - apt-get update -qq
  - apt-get install -y -qq php-codesniffer git php gettext

# PHP codesniffer
create_php_code_sniffer_rapport:
  before_script:
    - apt-get update -qq
    - apt-get install -y -qq  git php-cli php-codesniffer
    - git clone https://gitlab.fusiondirectory.org/fusiondirectory/dev-tools.git ../dev-tools
    - phpcs --ignore=class_sieve.inc --standard=../dev-tools/php-codesniffer-rules/FDStandard/ruleset.xml $(find . -type f -name '*.php' -o -name '*.inc')
  before_script:
    - apt-get update -qq
    - apt-get install -y -qq php-cli
    - find . -type f \( -name '*.php' -o -name '*.inc' \) -print0 | xargs -0 -n1 php -l
# fusiondirectory-update-locale
fusiondirectory-update-locale:
  only:
    - branches
    - tags
  before_script:
    - apt-get update -qq
    - apt-get install -y -qq gettext git php-cli
  script:
    - git clone https://gitlab.fusiondirectory.org/fusiondirectory/dev-tools.git ../dev-tools
    - ../dev-tools/locale-scripts/fusiondirectory-update-locale-plugins
# Update transifex
update-transifex:
  only:
    - branches
    - tags
  before_script:
    - apt-get update -qq
    - apt-get install -y -qq gettext git php-cli transifex-client
  script:
    - git clone https://gitlab.fusiondirectory.org/fusiondirectory/dev-tools.git ../dev-tools
    - echo $'[https://www.transifex.com]\nhostname = https://www.transifex.com\nusername = '"$TRANSIFEX_USER"$'\npassword = '"$TRANSIFEX_PASSWORD"$'\ntoken = '"$TRANSIFEX_API_TOKEN"$'\n' > ~/.transifexrc
    - tx pull -a -f
    - ../dev-tools/locale-scripts/fusiondirectory-update-locale-plugins