2019-05-04 16:22:56 +00:00
|
|
|
---
|
2019-05-05 10:29:49 +00:00
|
|
|
kind: pipeline
|
|
|
|
name: default
|
|
|
|
|
2019-04-28 12:41:10 +00:00
|
|
|
clone:
|
2019-05-05 10:29:49 +00:00
|
|
|
depth: 42
|
2017-02-12 13:32:55 +00:00
|
|
|
|
2019-05-05 10:29:49 +00:00
|
|
|
steps:
|
|
|
|
- name: restore-cache
|
|
|
|
image: drillster/drone-volume-cache
|
|
|
|
settings:
|
2018-07-28 15:28:57 +00:00
|
|
|
restore: true
|
|
|
|
mount:
|
|
|
|
- ./libraries/vendor
|
2019-05-05 10:29:49 +00:00
|
|
|
cache_key: [ DRONE_REPO_NAMESPACE, DRONE_REPO_NAME, DRONE_BRANCH, DRONE_STAGE_NUMBER ]
|
|
|
|
volumes:
|
|
|
|
- name: cache
|
|
|
|
path: /cache
|
2018-07-28 15:28:57 +00:00
|
|
|
|
2019-06-01 15:27:08 +00:00
|
|
|
- name: composer
|
2019-10-13 11:19:47 +00:00
|
|
|
image: joomlaprojects/docker-images:php7.3-composer
|
2019-05-07 10:01:42 +00:00
|
|
|
depends_on: [ restore-cache ]
|
2017-02-12 10:40:56 +00:00
|
|
|
commands:
|
2019-07-15 21:11:29 +00:00
|
|
|
- composer validate --no-check-all --strict
|
2018-04-02 17:17:42 +00:00
|
|
|
- composer install --no-progress --no-suggest
|
2019-06-01 15:27:08 +00:00
|
|
|
|
|
|
|
- name: phpcs
|
2019-07-11 19:21:48 +00:00
|
|
|
image: joomlaprojects/docker-images:php7.2
|
2019-07-11 21:42:30 +00:00
|
|
|
depends_on: [ composer ]
|
2019-07-11 19:21:48 +00:00
|
|
|
commands:
|
|
|
|
- echo $(date)
|
2019-07-24 19:00:48 +00:00
|
|
|
- ./libraries/vendor/bin/phpcs --extensions=php -p --standard=libraries/vendor/joomla/cms-coding-standards/lib/Joomla-CMS .
|
2019-06-01 15:27:08 +00:00
|
|
|
- echo $(date)
|
|
|
|
|
|
|
|
- name: npm
|
2019-10-13 11:19:47 +00:00
|
|
|
image: node:current-alpine
|
2019-06-01 15:27:08 +00:00
|
|
|
depends_on: [ phpcs ]
|
|
|
|
commands:
|
2019-07-15 21:11:29 +00:00
|
|
|
- npm ci --unsafe-perm
|
2018-03-31 14:19:44 +00:00
|
|
|
|
2019-09-13 17:49:32 +00:00
|
|
|
- name: publish-diff
|
|
|
|
image: joomlaprojects/docker-images:patchtester
|
|
|
|
depends_on: [ npm ]
|
|
|
|
environment:
|
|
|
|
CMP_ARCHIVE_NAME: "build"
|
|
|
|
CMP_MASTER_FOLDER: "/reference"
|
|
|
|
CMP_SLAVE_FOLDER: "." # The directory the current repo is in
|
|
|
|
FTP_USERNAME:
|
|
|
|
from_secret: ftpusername
|
|
|
|
FTP_PASSWORD:
|
|
|
|
from_secret: ftppassword
|
|
|
|
FTP_HOSTNAME: ci.joomla.org
|
|
|
|
FTP_PORT: "21"
|
|
|
|
FTP_DEST_DIR: /artifacts
|
|
|
|
FTP_VERIFY: "false"
|
|
|
|
FTP_SECURE: "true"
|
|
|
|
BRANCH_NAME: "4.0-dev" # Current branch to check against (from repo joomla/joomla-cms)
|
|
|
|
DRONE_PULL_REQUEST: DRONE_PULL_REQUEST
|
|
|
|
commands:
|
|
|
|
- export PULL_ID=$DRONE_PULL_REQUEST
|
|
|
|
- /bin/compare.sh
|
|
|
|
volumes:
|
|
|
|
- name: reference
|
|
|
|
path: /reference
|
|
|
|
when:
|
|
|
|
branch:
|
|
|
|
- 4.0-dev
|
|
|
|
|
2019-05-05 10:29:49 +00:00
|
|
|
- name: rebuild-cache
|
|
|
|
image: drillster/drone-volume-cache
|
2019-06-01 15:27:08 +00:00
|
|
|
depends_on: [ npm ]
|
2019-05-05 10:29:49 +00:00
|
|
|
settings:
|
2018-08-08 14:12:31 +00:00
|
|
|
rebuild: true
|
|
|
|
mount:
|
|
|
|
- ./libraries/vendor
|
2019-05-05 10:29:49 +00:00
|
|
|
cache_key: [ DRONE_REPO_NAMESPACE, DRONE_REPO_NAME, DRONE_BRANCH, DRONE_STAGE_NUMBER ]
|
|
|
|
volumes:
|
|
|
|
- name: cache
|
|
|
|
path: /cache
|
2018-08-08 14:12:31 +00:00
|
|
|
|
2019-05-08 19:49:59 +00:00
|
|
|
- name: php72-unit
|
2019-06-01 15:27:08 +00:00
|
|
|
depends_on: [ phpcs ]
|
2019-08-19 21:12:45 +00:00
|
|
|
image: joomlaprojects/docker-images:php7.2
|
2018-03-31 14:19:44 +00:00
|
|
|
commands:
|
2019-05-08 19:49:59 +00:00
|
|
|
- php -v
|
2019-07-11 22:48:37 +00:00
|
|
|
- ./libraries/vendor/bin/phpunit --testsuite Unit
|
2018-03-31 14:19:44 +00:00
|
|
|
|
2019-05-08 19:49:59 +00:00
|
|
|
- name: php73-unit
|
2019-06-01 15:27:08 +00:00
|
|
|
depends_on: [ phpcs ]
|
2019-08-19 21:12:45 +00:00
|
|
|
image: joomlaprojects/docker-images:php7.3
|
2018-03-31 14:19:44 +00:00
|
|
|
commands:
|
2019-05-08 19:49:59 +00:00
|
|
|
- php -v
|
2019-07-11 22:48:37 +00:00
|
|
|
- ./libraries/vendor/bin/phpunit --testsuite Unit
|
2018-03-31 14:19:44 +00:00
|
|
|
|
2019-05-08 19:49:59 +00:00
|
|
|
- name: php74-unit
|
2019-06-01 15:27:08 +00:00
|
|
|
depends_on: [ phpcs ]
|
2019-08-19 21:12:45 +00:00
|
|
|
image: joomlaprojects/docker-images:php7.4
|
2019-06-07 14:35:09 +00:00
|
|
|
failure: ignore
|
2019-05-08 19:49:59 +00:00
|
|
|
commands:
|
|
|
|
- php -v
|
2019-07-11 22:48:37 +00:00
|
|
|
- ./libraries/vendor/bin/phpunit --testsuite Unit
|
2019-05-08 19:49:59 +00:00
|
|
|
|
|
|
|
- name: php80-unit
|
2019-06-01 15:27:08 +00:00
|
|
|
depends_on: [ phpcs ]
|
2019-08-19 21:12:45 +00:00
|
|
|
image: joomlaprojects/docker-images:php8.0
|
2019-06-07 14:35:09 +00:00
|
|
|
failure: ignore
|
2018-03-31 14:19:44 +00:00
|
|
|
commands:
|
2019-05-08 19:49:59 +00:00
|
|
|
- php -v
|
2019-07-11 22:48:37 +00:00
|
|
|
- ./libraries/vendor/bin/phpunit --testsuite Unit
|
|
|
|
|
|
|
|
- name: php72-integration
|
|
|
|
depends_on: [ npm ]
|
|
|
|
image: joomlaprojects/docker-images:php7.2
|
|
|
|
commands:
|
|
|
|
- php -v
|
|
|
|
- ./libraries/vendor/bin/phpunit --testsuite Integration
|
|
|
|
|
|
|
|
- name: php73-integration
|
|
|
|
depends_on: [ npm ]
|
|
|
|
image: joomlaprojects/docker-images:php7.3
|
|
|
|
commands:
|
|
|
|
- php -v
|
|
|
|
- ./libraries/vendor/bin/phpunit --testsuite Integration
|
|
|
|
|
|
|
|
- name: php74-integration
|
|
|
|
depends_on: [ npm ]
|
|
|
|
image: joomlaprojects/docker-images:php7.4
|
|
|
|
failure: ignore
|
|
|
|
commands:
|
|
|
|
- php -v
|
|
|
|
- ./libraries/vendor/bin/phpunit --testsuite Integration
|
|
|
|
|
|
|
|
- name: php80-integration
|
|
|
|
depends_on: [ npm ]
|
|
|
|
image: joomlaprojects/docker-images:php8.0
|
|
|
|
failure: ignore
|
|
|
|
commands:
|
|
|
|
- php -v
|
|
|
|
- ./libraries/vendor/bin/phpunit --testsuite Integration
|
|
|
|
|
|
|
|
- name: php72-integration-pgsql
|
|
|
|
depends_on: [ npm ]
|
|
|
|
image: joomlaprojects/docker-images:php7.2
|
|
|
|
commands:
|
|
|
|
- php -v
|
|
|
|
- ./libraries/vendor/bin/phpunit --testsuite Integration --configuration phpunit-pgsql.xml.dist
|
|
|
|
|
2019-10-12 17:47:22 +00:00
|
|
|
- name: php73-integration-pgsql
|
|
|
|
depends_on: [ npm ]
|
|
|
|
image: joomlaprojects/docker-images:php7.3
|
|
|
|
commands:
|
|
|
|
- php -v
|
|
|
|
- ./libraries/vendor/bin/phpunit --testsuite Integration --configuration phpunit-pgsql.xml.dist
|
|
|
|
|
|
|
|
- name: php74-integration-pgsql
|
|
|
|
depends_on: [ npm ]
|
|
|
|
image: joomlaprojects/docker-images:php7.4
|
|
|
|
failure: ignore
|
|
|
|
commands:
|
|
|
|
- php -v
|
|
|
|
- ./libraries/vendor/bin/phpunit --testsuite Integration --configuration phpunit-pgsql.xml.dist
|
|
|
|
|
|
|
|
- name: php80-integration-pgsql
|
|
|
|
depends_on: [ npm ]
|
|
|
|
image: joomlaprojects/docker-images:php8.0
|
|
|
|
failure: ignore
|
|
|
|
commands:
|
|
|
|
- php -v
|
|
|
|
- ./libraries/vendor/bin/phpunit --testsuite Integration --configuration phpunit-pgsql.xml.dist
|
2018-03-31 14:19:44 +00:00
|
|
|
|
2019-05-05 10:29:49 +00:00
|
|
|
- name: javascript-cs
|
2019-06-01 15:27:08 +00:00
|
|
|
depends_on: [ npm ]
|
2019-10-13 11:19:47 +00:00
|
|
|
image: joomlaprojects/docker-images:systemtests
|
2018-12-29 10:46:22 +00:00
|
|
|
commands:
|
|
|
|
- export DISPLAY=:0
|
|
|
|
- Xvfb -screen 0 1024x768x24 -ac +extension GLX +render -noreset > /dev/null 2>&1 &
|
|
|
|
- sleep 3
|
|
|
|
- fluxbox > /dev/null 2>&1 &
|
2019-03-22 09:35:09 +00:00
|
|
|
- npm run lint:js
|
2018-12-29 10:46:22 +00:00
|
|
|
|
2019-05-05 10:29:49 +00:00
|
|
|
- name: javascript-tests
|
2019-06-01 15:27:08 +00:00
|
|
|
depends_on: [ npm ]
|
2019-10-13 11:19:47 +00:00
|
|
|
image: joomlaprojects/docker-images:systemtests
|
2018-04-01 13:31:04 +00:00
|
|
|
commands:
|
|
|
|
- export DISPLAY=:0
|
|
|
|
- Xvfb -screen 0 1024x768x24 -ac +extension GLX +render -noreset > /dev/null 2>&1 &
|
|
|
|
- sleep 3
|
|
|
|
- fluxbox > /dev/null 2>&1 &
|
2018-09-16 00:50:49 +00:00
|
|
|
- npm run test
|
2018-04-01 13:31:04 +00:00
|
|
|
|
2019-05-20 07:14:27 +00:00
|
|
|
- name: system-tests-mysql
|
2019-05-07 10:01:42 +00:00
|
|
|
depends_on: [ javascript-tests ]
|
2019-10-13 11:19:47 +00:00
|
|
|
image: joomlaprojects/docker-images:systemtests
|
2019-05-20 07:14:27 +00:00
|
|
|
commands:
|
|
|
|
- bash tests/Codeception/drone-system-run.sh "$(pwd)" mysql
|
|
|
|
|
2019-07-24 20:54:26 +00:00
|
|
|
- name: system-tests-mysql8
|
2019-05-20 07:14:27 +00:00
|
|
|
depends_on: [ system-tests-mysql ]
|
2019-10-13 11:19:47 +00:00
|
|
|
image: joomlaprojects/docker-images:systemtests
|
2019-07-24 20:54:26 +00:00
|
|
|
commands:
|
|
|
|
- bash tests/Codeception/drone-system-run.sh "$(pwd)" mysql8
|
|
|
|
|
|
|
|
- name: system-tests-postgres
|
|
|
|
depends_on: [ system-tests-mysql8 ]
|
2019-10-13 11:19:47 +00:00
|
|
|
image: joomlaprojects/docker-images:systemtests
|
2019-05-05 10:29:49 +00:00
|
|
|
commands:
|
2019-05-20 07:14:27 +00:00
|
|
|
- bash tests/Codeception/drone-system-run.sh "$(pwd)" postgres
|
2018-04-01 14:26:37 +00:00
|
|
|
|
2019-10-12 17:47:22 +00:00
|
|
|
- name: api-tests
|
|
|
|
depends_on: [ system-tests-postgres ]
|
2019-10-13 11:19:47 +00:00
|
|
|
image: joomlaprojects/docker-images:systemtests
|
2019-10-12 17:47:22 +00:00
|
|
|
commands:
|
|
|
|
- bash tests/Codeception/drone-api-run.sh "$(pwd)"
|
|
|
|
|
2019-06-30 08:39:27 +00:00
|
|
|
- name: artifacts-system-tests
|
|
|
|
image: cschlosser/drone-ftps
|
2019-10-12 17:47:22 +00:00
|
|
|
depends_on: [ api-tests ]
|
2019-06-30 08:39:27 +00:00
|
|
|
environment:
|
|
|
|
FTP_USERNAME:
|
|
|
|
from_secret: ftpusername
|
|
|
|
FTP_PASSWORD:
|
|
|
|
from_secret: ftppassword
|
|
|
|
PLUGIN_HOSTNAME: ci.joomla.org:21
|
|
|
|
PLUGIN_SRC_DIR: /tests/Codeception/_output/
|
|
|
|
PLUGIN_DEST_DIR: /artifacts
|
|
|
|
PLUGIN_SECURE: false
|
|
|
|
PLUGIN_EXCLUDE: ^\.git/$
|
|
|
|
commands:
|
2019-09-13 17:49:32 +00:00
|
|
|
- export PLUGIN_DEST_DIR=$PLUGIN_DEST_DIR/$DRONE_REPO/$DRONE_BRANCH/$DRONE_PULL_REQUEST/system-tests/$DRONE_BUILD_NUMBER
|
2019-06-30 08:39:27 +00:00
|
|
|
- echo https://ci.joomla.org:444$PLUGIN_DEST_DIR
|
|
|
|
- /bin/upload.sh
|
|
|
|
when:
|
|
|
|
status:
|
2019-10-12 17:47:22 +00:00
|
|
|
- failure
|
2019-03-07 18:16:06 +00:00
|
|
|
|
2019-05-05 10:29:49 +00:00
|
|
|
- name: analysis4x
|
2019-10-12 10:58:43 +00:00
|
|
|
image: rips/rips-cli:3.2.2
|
2019-05-07 10:01:42 +00:00
|
|
|
depends_on: [ api-tests ]
|
2018-09-05 08:28:45 +00:00
|
|
|
when:
|
2019-05-15 10:30:09 +00:00
|
|
|
repo:
|
|
|
|
- joomla/joomla-cms
|
2019-05-20 07:14:27 +00:00
|
|
|
branch:
|
2019-05-15 10:30:09 +00:00
|
|
|
- 4.0-dev
|
2018-09-05 08:28:45 +00:00
|
|
|
commands:
|
|
|
|
- export RIPS_BASE_URI='https://api.rips.joomla.org'
|
2019-10-12 21:16:47 +00:00
|
|
|
- rips-cli rips:list --table=scans -n -p filter='{"__and":[{"__lessThan":{"percent":100}}]}'
|
|
|
|
- rips-cli rips:scan:start -G -a 2 -t 1 -R -k -p $(pwd) -t 1 -T $DRONE_REPO_NAMESPACE-$DRONE_BRANCH || { echo "Please contact the security team at security@joomla.org"; exit 1; }
|
2019-05-05 10:29:49 +00:00
|
|
|
environment:
|
2019-10-12 10:58:43 +00:00
|
|
|
RIPS_EMAIL:
|
|
|
|
from_secret: RIPS_EMAIL
|
2019-05-05 10:29:49 +00:00
|
|
|
RIPS_PASSWORD:
|
|
|
|
from_secret: RIPS_PASSWORD
|
2018-09-05 08:28:45 +00:00
|
|
|
|
2018-09-10 17:28:44 +00:00
|
|
|
branches:
|
|
|
|
exclude: [ l10n_* ]
|
|
|
|
|
2019-05-05 10:29:49 +00:00
|
|
|
volumes:
|
|
|
|
- name: cache
|
|
|
|
host:
|
|
|
|
path: /tmp/cache
|
2019-09-13 17:49:32 +00:00
|
|
|
- name: reference
|
|
|
|
host:
|
|
|
|
path: /tmp/reference
|
2019-05-05 10:29:49 +00:00
|
|
|
|
2018-03-31 14:19:44 +00:00
|
|
|
services:
|
2019-05-05 10:29:49 +00:00
|
|
|
- name: mysql
|
2018-03-31 14:19:44 +00:00
|
|
|
image: mysql:5.7
|
|
|
|
environment:
|
|
|
|
MYSQL_USER: joomla_ut
|
|
|
|
MYSQL_PASSWORD: joomla_ut
|
|
|
|
MYSQL_ROOT_PASSWORD: joomla_ut
|
2018-04-05 05:53:49 +00:00
|
|
|
MYSQL_DATABASE: test_joomla
|
2018-03-31 14:19:44 +00:00
|
|
|
|
2019-07-24 20:54:26 +00:00
|
|
|
- name: mysql8
|
|
|
|
image: mysql:8
|
|
|
|
command: ["--default-authentication-plugin=mysql_native_password"]
|
|
|
|
environment:
|
|
|
|
MYSQL_USER: joomla_ut
|
|
|
|
MYSQL_PASSWORD: joomla_ut
|
|
|
|
MYSQL_ROOT_PASSWORD: joomla_ut
|
|
|
|
MYSQL_DATABASE: test_joomla
|
|
|
|
|
2019-05-05 10:29:49 +00:00
|
|
|
- name: memcached
|
2018-03-31 14:19:44 +00:00
|
|
|
image: memcached:alpine
|
|
|
|
|
2019-05-05 10:29:49 +00:00
|
|
|
- name: redis
|
2018-03-31 14:19:44 +00:00
|
|
|
image: redis:alpine
|
2017-02-12 10:40:56 +00:00
|
|
|
|
2019-05-05 10:29:49 +00:00
|
|
|
- name: postgres
|
2019-05-20 07:14:27 +00:00
|
|
|
image: postgres:9-alpine
|
|
|
|
ports:
|
|
|
|
- 5432
|
|
|
|
environment:
|
|
|
|
POSTGRES_USER: root
|
|
|
|
POSTGRES_PASSWORD: joomla_ut
|
|
|
|
POSTGRES_DB: test_joomla
|
2019-05-05 10:29:49 +00:00
|
|
|
|
2019-05-04 16:22:56 +00:00
|
|
|
---
|
|
|
|
kind: signature
|
2019-11-21 14:14:29 +00:00
|
|
|
hmac: 9269cc571ec30d3d18ba3bb5f7dc132c36608b54ec777ae6d9c6dde224255fc8
|
2019-05-04 16:22:56 +00:00
|
|
|
|
|
|
|
...
|