diff --git a/gitlab-ci-1.2.yml b/gitlab-ci-1.2.yml index 234a43af8f7d9ead48727d84950d5e1e7b528f36..968b3ad557c4011b9ccbf02e43bd5f67bef3ede6 100644 --- a/gitlab-ci-1.2.yml +++ b/gitlab-ci-1.2.yml @@ -1,5 +1,5 @@ variables: - WPDESK_CI_VERSION: "2024.11.19" + WPDESK_CI_VERSION: "2024.11.26" MYSQL_ROOT_PASSWORD: "mysql" MYSQL_DATABASE: "wptest" MYSQL_USER: "mysql" @@ -39,4 +39,5 @@ include: - '/includes/tests/integration.yml' - '/includes/deploy.yml' - '/includes/mixins/.after-codeception.yml' + - '/includes/mixins/.composer-auth.yml' - '/includes/mixins/.skip-mr.yml' diff --git a/includes/deploy.yml b/includes/deploy.yml index 78b918d19d4243cf39721ffd37893a26ee7c0670..14f5735d532d5175c1c9bd65d6c45b4c56480c92 100644 --- a/includes/deploy.yml +++ b/includes/deploy.yml @@ -27,7 +27,7 @@ - release - release.zip before_script: - - composer config gitlab-token.gitlab.wpdesk.dev gitlab-ci-token ${CI_JOB_TOKEN} + - !reference [.composer-auth, script] script: - echo ${WPDESK_CI_VERSION} - php --version @@ -285,7 +285,7 @@ library: paths: - wp-desk before_script: - - composer config gitlab-token.gitlab.wpdesk.dev gitlab-ci-token ${CI_JOB_TOKEN} + - !reference [.composer-auth, script] script: - rm -rf ${CI_PROJECT_DIR}/wp-desk - mkdir -p /tmp/wp-desk diff --git a/includes/mixins/.composer-auth.yml b/includes/mixins/.composer-auth.yml new file mode 100644 index 0000000000000000000000000000000000000000..ebf53181f89d6ac94af0bb1024f70c5072bea6b4 --- /dev/null +++ b/includes/mixins/.composer-auth.yml @@ -0,0 +1,3 @@ +.composer-auth: + script: + - composer global config gitlab-token.gitlab.wpdesk.dev gitlab-ci-token ${CI_JOB_TOKEN} diff --git a/includes/prepare.yml b/includes/prepare.yml index 1f78e7dbc428cc9a05728ffe348c0b4e1cd925dc..294b1604748c39da1f11780057374e43d723668c 100644 --- a/includes/prepare.yml +++ b/includes/prepare.yml @@ -16,7 +16,7 @@ prepare prefixed vendor: - $IS_NPM_LIBRARY interruptible: true before_script: - - composer config gitlab-token.gitlab.wpdesk.dev gitlab-ci-token ${CI_JOB_TOKEN} + - !reference [.composer-auth, script] - echo ${WPDESK_CI_VERSION} - php --version script: @@ -83,7 +83,7 @@ prepare tests: interruptible: true before_script: - cp /usr/local/bin/clone /tmp/clone.sh - - composer config gitlab-token.gitlab.wpdesk.dev gitlab-ci-token ${CI_JOB_TOKEN} + - !reference [.composer-auth, script] - echo ${WPDESK_CI_VERSION} - php --version script: diff --git a/includes/tests/codeception-integration.yml b/includes/tests/codeception-integration.yml index 486e53fba35dd70e5baf98f20408733e39234a3c..413212b7da8a4ab664054407833aa22efc636573 100644 --- a/includes/tests/codeception-integration.yml +++ b/includes/tests/codeception-integration.yml @@ -50,7 +50,7 @@ integration codeception tests: - mkdir -p ${APACHE_DOCUMENT_ROOT} - cd ${APACHE_DOCUMENT_ROOT} - cd ${CI_PROJECT_DIR} - - composer config gitlab-token.gitlab.wpdesk.dev gitlab-ci-token ${CI_JOB_TOKEN} + - !reference [.composer-auth, script] - composer prepare-wordpress-for-codeception - composer prepare-local-codeception-tests - chmod -R a+w ${APACHE_DOCUMENT_ROOT}/wp-content/uploads diff --git a/includes/tests/codeception-parallel.yml b/includes/tests/codeception-parallel.yml index b798fdf928cdc7ada8cb1c4c4dbb619781516ae6..14bcfe0ecf5af46f0c92796684d8962e2daf3207 100644 --- a/includes/tests/codeception-parallel.yml +++ b/includes/tests/codeception-parallel.yml @@ -35,7 +35,7 @@ prepare codeception parallel: allow_failure: false interruptible: true before_script: - - composer config gitlab-token.gitlab.wpdesk.dev gitlab-ci-token ${CI_JOB_TOKEN} + - !reference [.composer-auth, script] - echo ${WPDESK_CI_VERSION} - php --version script: diff --git a/includes/tests/codeception.yml b/includes/tests/codeception.yml index fe83faf80223c57ab3b4539885167d059b9143e0..4d1fee1dd69d60320cac47074dddb5b8f63217db 100644 --- a/includes/tests/codeception.yml +++ b/includes/tests/codeception.yml @@ -43,7 +43,7 @@ allow_failure: false interruptible: true before_script: - - composer config gitlab-token.gitlab.wpdesk.dev gitlab-ci-token ${CI_JOB_TOKEN} + - !reference [.composer-auth, script] - echo "xdebug.max_nesting_level=2560" >> /usr/local/etc/php/php.ini - mkdir -p /cache/wp-cli - mkdir -p /project diff --git a/includes/tests/lint.yml b/includes/tests/lint.yml index af0a8ba50e43fea49aed4d05ba24f31702ba3ed1..a3a7b8451c745738aa893a90eda12e80619589bc 100644 --- a/includes/tests/lint.yml +++ b/includes/tests/lint.yml @@ -4,7 +4,7 @@ lint: - prepare prefixed vendor stage: tests before_script: - - composer config gitlab-token.gitlab.wpdesk.dev gitlab-ci-token ${CI_JOB_TOKEN} + - !reference [.composer-auth, script] - composer install --no-dev - rm auth.json - phive install -g https://github.com/php-parallel-lint/PHP-Parallel-Lint/releases/download/v1.4.0/parallel-lint.phar --force-accept-unsigned