diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index be9f1fe38fc8b2ddd28162ee7fb9e636b48b2e7d..20f3048fe105440bdbd1c8aa201c8f86c5c83018 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -48,3 +48,11 @@ phpcs: # @todo remove when https://www.drupal.org/project/gitlab_templates/issues/3380694 is merged. cp -v phpcs.xml $CI_PROJECT_DIR fi + - | + if [[ $BEFORE_SCRIPT_ACTIONS =~ "phpcs-duplicate-files" ]]; then + echo "Executing phpcs-duplicate-files" + cp -v .gitlab/phpcs-ok.xml .phpcs.xml + cp -v .gitlab/phpcs-ok.xml .phpcs.xml.dist + cp -v .gitlab/phpcs-ok.xml phpcs.xml.dist + cp -v .gitlab/phpcs-ok.xml phpcs.xml.old + fi diff --git a/.gitlab/anything.txt b/.gitlab/anything.txt index 15b5c722bb660d99a1439097782992cbd3e98e78..4d703fbf6297c5204f21dafc00eec58b866072eb 100644 --- a/.gitlab/anything.txt +++ b/.gitlab/anything.txt @@ -1,2 +1,4 @@ +This is the d7-composer branch. + This file has been added so that changes to it can be used to trigger a pipeline. It can contain anything, and there is no need to cherry-pick any changes to the other branches. diff --git a/.gitlab/phpcs-fail.xml b/.gitlab/phpcs-fail.xml index 05a045eba064e64194c9c795acba0855c2043cee..600d7e6d2e096737a48be197235a5d18a2948710 100644 --- a/.gitlab/phpcs-fail.xml +++ b/.gitlab/phpcs-fail.xml @@ -1,5 +1,5 @@ <?xml version="1.0" encoding="UTF-8"?> -<ruleset name="gtd-d7-composer"> +<ruleset name="gitlab-templates-downstream-fail"> <description>This file is inactive by default, but can be renamed in a before_script to test downstream failures</description> <!-- Include all rules in the Drupal ruleset. --> diff --git a/.gitlab/phpcs-ok.xml b/.gitlab/phpcs-ok.xml new file mode 100644 index 0000000000000000000000000000000000000000..dcf258c6c117e89137c789717474290c6044c08a --- /dev/null +++ b/.gitlab/phpcs-ok.xml @@ -0,0 +1,13 @@ +<?xml version="1.0" encoding="UTF-8"?> +<ruleset name="gitlab-templates-downstream-ok"> + <description>This file is inactive by default, but can be renamed in a before_script to test downstream failures</description> + + <!-- Include all rules in the Drupal ruleset. --> + <rule ref="Drupal"/> + + <!-- Include all rules in the DrupalPractice ruleset. --> + <rule ref="vendor/drupal/coder/coder_sniffer/DrupalPractice/ruleset.xml"/> + + <arg name="extensions" value="php,inc,module,install,info,test,profile,theme"/> + +</ruleset>