Commit 60cb7f81 authored by Benoit Mortier's avatar Benoit Mortier
Browse files

:ambulance: fix(gitlab-ci): Add before script section in gitlab-ci to not...

:ambulance:

 fix(gitlab-ci): Add before script section in gitlab-ci to not reinstall non needed packages at each time

Signed-off-by: default avatarBenoit Mortier <benoit.mortier@opensides.be>
Showing with 9 additions and 6 deletions
+9 -6
...@@ -5,17 +5,14 @@ image: debian:stretch ...@@ -5,17 +5,14 @@ image: debian:stretch
variables: variables:
GIT_SSL_NO_VERIFY: "true" GIT_SSL_NO_VERIFY: "true"
# Execute before every job
# Install libperl-critic-perl, php-codesniffer, git and php
before_script:
- apt-get update -qq
- apt-get install -y -qq libperl-critic-perl php-codesniffer git php
# Generate perlcritic rapport # Generate perlcritic rapport
create_perlcritic_rapport: create_perlcritic_rapport:
only: only:
- branches - branches
- tags - tags
before_script:
- apt-get update -qq
- apt-get install -y -qq libperl-critic-perl
script: script:
- cp contrib/bin/fusiondirectory-setup contrib/bin/fusiondirectory-setup.pl - cp contrib/bin/fusiondirectory-setup contrib/bin/fusiondirectory-setup.pl
- cp contrib/bin/fusiondirectory-insert-schema contrib/bin/fusiondirectory-insert-schema.pl - cp contrib/bin/fusiondirectory-insert-schema contrib/bin/fusiondirectory-insert-schema.pl
...@@ -26,6 +23,9 @@ create_php_code_sniffer_rapport: ...@@ -26,6 +23,9 @@ create_php_code_sniffer_rapport:
only: only:
- branches - branches
- tags - tags
before_script:
- apt-get update -qq
- apt-get install -y -qq git php-cli php-codesniffer
script: script:
- git clone https://gitlab.fusiondirectory.org/fusiondirectory/dev-tools.git ../dev-tools - git clone https://gitlab.fusiondirectory.org/fusiondirectory/dev-tools.git ../dev-tools
- find . -type f -name '*.php' -o -name '*.inc' -exec phpcs --standard=../dev-tools/php-codesniffer-rules/FDStandard/ruleset.xml "{}" \; - find . -type f -name '*.php' -o -name '*.inc' -exec phpcs --standard=../dev-tools/php-codesniffer-rules/FDStandard/ruleset.xml "{}" \;
...@@ -35,6 +35,9 @@ create_php_lint_rapport: ...@@ -35,6 +35,9 @@ create_php_lint_rapport:
only: only:
- branches - branches
- tags - tags
before_script:
- apt-get update -qq
- apt-get install -y -qq php-cli
script: script:
- find . -type f -name '*.php' -o -name '*.inc' -print0 | xargs -0 -n1 php -l - find . -type f -name '*.php' -o -name '*.inc' -print0 | xargs -0 -n1 php -l
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment