• bmortier's avatar
    Merge branch... · 5c311963
    bmortier authored
    Merge branch '5830-use-precompiled-images-for-transifex-stage-base-on-php-cli-stretch' into '1.3-dev'
    
    Resolve "Use precompiled images for transifex stage base on php-cli stretch"
    
    Closes #5830
    
    See merge request fusiondirectory/fd!257
    
    (cherry picked from commit 3c888fd7)
    
    c7edb68c :ambulance: fix(gitlab) Use precompiled images for transifex stage base on php-cli stretch
    6c017e0c :ambulance: fix(gitlab-ci) Use precompiled images for transifex stage base on php-cli stretch
    12cfe799 :ambulance: fix(gitlab-ci) Use precompiled images for transifex stage base on php-cli stretch
    fc310275 Revert ":ambulance: fix(gitlab-ci) Use precompiled images for transifex stage…
    100534ed Revert ":ambulance: fix(gitlab-ci) Use precompiled images for transifex stage…
    5c311963
This GitLab CI configuration is valid. Learn more
.gitlab-ci.yml 4.19 KiB
# Specify docker image
image: debian:stretch
# Define variable to disable SSL verification of GIT
variables:
  GIT_SSL_NO_VERIFY: "true"
stages:
  - lint
  - codestyle
  - transifex
  - tarballs
## Stage lint
# Perl lint
create_perl_lint_rapport:
  stage: lint
  only:
    - branches
  before_script:
    - apt-get update -qq
    - apt-get install -y -qq libarchive-extract-perl libcrypt-cbc-perl libdigest-sha-perl libfile-copy-recursive-perl
    - apt-get install -y -qq libnet-ldap-perl libpath-class-perl libterm-readkey-perl libxml-twig-perl
  script:
    - perl -cW contrib/bin/fusiondirectory-setup contrib/bin/fusiondirectory-insert-schema
# PHP lint (jessie)
create_php_lint_rapport_jessie:
  image: php:5.6.33-cli-jessie
  stage: lint
  only:
    - branches
  script:
    - find . -type f -name '*.php' -o -name '*.inc' -print0 | xargs -0 -n1 php -l
# PHP lint (stretch)
create_php_lint_rapport_stretch:
  image: php:cli-stretch
  stage: lint
  only:
    - branches
  script:
    - find . -type f -name '*.php' -o -name '*.inc' -print0 | xargs -0 -n1 php -l
## Stage codestyle
# Generate perlcritic rapport
create_perlcritic_rapport:
  stage: codestyle
  only:
    - branches
  before_script:
  - apt-get update -qq
  - apt-get install -y -qq libperl-critic-perl
  script:
    - cp contrib/bin/fusiondirectory-setup contrib/bin/fusiondirectory-setup.pl
    - cp contrib/bin/fusiondirectory-insert-schema contrib/bin/fusiondirectory-insert-schema.pl
    - perlcritic --quiet --verbose "%f~|~%s~|~%l~|~%c~|~%m~|~%e~|~%p~||~%n" contrib/bin
# PHP codesniffer
create_php_code_sniffer_rapport:
  stage: codestyle
  only:
    - branches
  before_script:
    - apt-get update -qq
    - apt-get install -y -qq  git php-cli php-codesniffer
  script:
    - git clone https://gitlab.fusiondirectory.org/fusiondirectory/dev-tools.git ../dev-tools
7172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136
- find . -type f -name '*.php' -o -name '*.inc' -exec phpcs --standard=../dev-tools/php-codesniffer-rules/FDStandard/ruleset.xml "{}" \; # generate man pages to test validity create_manpages_lint_report: stage: lint only: - branches before_script: - apt-get update -qq - apt-get install -y -qq perl man-db script: - pod2man -c "FusionDirectory Documentation" -r "FusionDirectory 1.3" contrib/bin/fusiondirectory-insert-schema contrib/man/fusiondirectory-insert-schema.1 - pod2man -c "FusionDirectory Documentation" -r "FusionDirectory 1.3" contrib/bin/fusiondirectory-setup contrib/man/fusiondirectory-setup.1 - pod2man -c "FusionDirectory Documentation" -r "FusionDirectory 1.3" contrib/man/fusiondirectory.conf.pod contrib/man/fusiondirectory.conf.5 - lexgrog contrib/man/fusiondirectory-insert-schema.1 - lexgrog contrib/man/fusiondirectory-setup.1 - lexgrog contrib/man/fusiondirectory.conf.5 # fusiondirectory-update-locale fusiondirectory-update-locale: image: php:cli-stretch stage: transifex only: - branches before_script: - apt-get update -qq - apt-get install -y -qq gettext git script: - git clone https://gitlab.fusiondirectory.org/fusiondirectory/dev-tools.git ../dev-tools - ../dev-tools/locale-scripts/fusiondirectory-update-locale -g # Update transifex update-transifex: image: php:cli-stretch stage: transifex only: - /^1.*$/ before_script: - apt-get update -qq - apt-get install -y -qq gettext git 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 -g - tx push -f -s -t --skip --no-interactive build-tarballs: stage: tarballs script: - tar -cvzf fusiondirectory-core.tar.gz * artifacts: paths: - fusiondirectory-core.tar.gz expire_in: 1h build-release: stage: tarballs only: - tags script: - tar -cvzf fusiondirectory-core-$(grep '%' Changelog.md | head -n1 | cut -d ' ' -f3 | tr -d '"').tar.gz * artifacts: paths: - fusiondirectory-core-$(grep '%' Changelog.md | head -n1 | cut -d ' ' -f3 | tr -d '"').tar.gz