Skip to content
Snippets Groups Projects
Commit 0ebbec9b authored by Bartek Jaskulski's avatar Bartek Jaskulski
Browse files

Merge branch 'feat/global-composer-auth' into 'master'

feat: authorize composer globally

See merge request wpdesk/gitlab-ci!266
parents 8729b364 500bce48
No related branches found
No related tags found
No related merge requests found
variables: variables:
WPDESK_CI_VERSION: "2024.11.19" WPDESK_CI_VERSION: "2024.11.26"
MYSQL_ROOT_PASSWORD: "mysql" MYSQL_ROOT_PASSWORD: "mysql"
MYSQL_DATABASE: "wptest" MYSQL_DATABASE: "wptest"
MYSQL_USER: "mysql" MYSQL_USER: "mysql"
...@@ -39,4 +39,5 @@ include: ...@@ -39,4 +39,5 @@ include:
- '/includes/tests/integration.yml' - '/includes/tests/integration.yml'
- '/includes/deploy.yml' - '/includes/deploy.yml'
- '/includes/mixins/.after-codeception.yml' - '/includes/mixins/.after-codeception.yml'
- '/includes/mixins/.composer-auth.yml'
- '/includes/mixins/.skip-mr.yml' - '/includes/mixins/.skip-mr.yml'
...@@ -27,7 +27,7 @@ ...@@ -27,7 +27,7 @@
- release - release
- release.zip - release.zip
before_script: before_script:
- composer config gitlab-token.gitlab.wpdesk.dev gitlab-ci-token ${CI_JOB_TOKEN} - !reference [.composer-auth, script]
script: script:
- echo ${WPDESK_CI_VERSION} - echo ${WPDESK_CI_VERSION}
- php --version - php --version
...@@ -285,7 +285,7 @@ library: ...@@ -285,7 +285,7 @@ library:
paths: paths:
- wp-desk - wp-desk
before_script: before_script:
- composer config gitlab-token.gitlab.wpdesk.dev gitlab-ci-token ${CI_JOB_TOKEN} - !reference [.composer-auth, script]
script: script:
- rm -rf ${CI_PROJECT_DIR}/wp-desk - rm -rf ${CI_PROJECT_DIR}/wp-desk
- mkdir -p /tmp/wp-desk - mkdir -p /tmp/wp-desk
......
.composer-auth:
script:
- composer global config gitlab-token.gitlab.wpdesk.dev gitlab-ci-token ${CI_JOB_TOKEN}
...@@ -16,7 +16,7 @@ prepare prefixed vendor: ...@@ -16,7 +16,7 @@ prepare prefixed vendor:
- $IS_NPM_LIBRARY - $IS_NPM_LIBRARY
interruptible: true interruptible: true
before_script: before_script:
- composer config gitlab-token.gitlab.wpdesk.dev gitlab-ci-token ${CI_JOB_TOKEN} - !reference [.composer-auth, script]
- echo ${WPDESK_CI_VERSION} - echo ${WPDESK_CI_VERSION}
- php --version - php --version
script: script:
...@@ -83,7 +83,7 @@ prepare tests: ...@@ -83,7 +83,7 @@ prepare tests:
interruptible: true interruptible: true
before_script: before_script:
- cp /usr/local/bin/clone /tmp/clone.sh - 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} - echo ${WPDESK_CI_VERSION}
- php --version - php --version
script: script:
......
...@@ -50,7 +50,7 @@ integration codeception tests: ...@@ -50,7 +50,7 @@ integration codeception tests:
- mkdir -p ${APACHE_DOCUMENT_ROOT} - mkdir -p ${APACHE_DOCUMENT_ROOT}
- cd ${APACHE_DOCUMENT_ROOT} - cd ${APACHE_DOCUMENT_ROOT}
- cd ${CI_PROJECT_DIR} - 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-wordpress-for-codeception
- composer prepare-local-codeception-tests - composer prepare-local-codeception-tests
- chmod -R a+w ${APACHE_DOCUMENT_ROOT}/wp-content/uploads - chmod -R a+w ${APACHE_DOCUMENT_ROOT}/wp-content/uploads
......
...@@ -35,7 +35,7 @@ prepare codeception parallel: ...@@ -35,7 +35,7 @@ prepare codeception parallel:
allow_failure: false allow_failure: false
interruptible: true interruptible: true
before_script: before_script:
- composer config gitlab-token.gitlab.wpdesk.dev gitlab-ci-token ${CI_JOB_TOKEN} - !reference [.composer-auth, script]
- echo ${WPDESK_CI_VERSION} - echo ${WPDESK_CI_VERSION}
- php --version - php --version
script: script:
......
...@@ -43,7 +43,7 @@ ...@@ -43,7 +43,7 @@
allow_failure: false allow_failure: false
interruptible: true interruptible: true
before_script: 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 - echo "xdebug.max_nesting_level=2560" >> /usr/local/etc/php/php.ini
- mkdir -p /cache/wp-cli - mkdir -p /cache/wp-cli
- mkdir -p /project - mkdir -p /project
......
...@@ -4,7 +4,7 @@ lint: ...@@ -4,7 +4,7 @@ lint:
- prepare prefixed vendor - prepare prefixed vendor
stage: tests stage: tests
before_script: before_script:
- composer config gitlab-token.gitlab.wpdesk.dev gitlab-ci-token ${CI_JOB_TOKEN} - !reference [.composer-auth, script]
- composer install --no-dev - composer install --no-dev
- rm auth.json - 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 - phive install -g https://github.com/php-parallel-lint/PHP-Parallel-Lint/releases/download/v1.4.0/parallel-lint.phar --force-accept-unsigned
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment