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: phpcs
|
2017-02-12 14:56:10 +00:00
|
|
|
image: joomlaprojects/docker-phpcs
|
|
|
|
commands:
|
|
|
|
- echo $(date)
|
2018-06-16 04:00:27 +00:00
|
|
|
- /root/.composer/vendor/bin/phpcs --report=full --encoding=utf-8 --extensions=php -p --standard=build/phpcs/Joomla .
|
2017-02-12 14:56:10 +00:00
|
|
|
- echo $(date)
|
|
|
|
|
2019-05-05 10:29:49 +00:00
|
|
|
- name: restore-cache
|
|
|
|
image: drillster/drone-volume-cache
|
2019-05-07 10:01:42 +00:00
|
|
|
depends_on: [ phpcs ]
|
2019-05-05 10:29:49 +00:00
|
|
|
settings:
|
2018-07-28 15:28:57 +00:00
|
|
|
restore: true
|
|
|
|
mount:
|
|
|
|
- ./node_modules
|
|
|
|
- ./libraries/vendor
|
2019-05-05 13:38:47 +00:00
|
|
|
- ./administrator/components/com_media/node_modules
|
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-05-05 10:29:49 +00:00
|
|
|
- name: prepare
|
2018-07-29 09:05:54 +00:00
|
|
|
image: joomlaprojects/docker-tools:develop
|
2019-05-07 10:01:42 +00:00
|
|
|
depends_on: [ restore-cache ]
|
2017-02-12 10:40:56 +00:00
|
|
|
commands:
|
2018-04-02 17:17:42 +00:00
|
|
|
- composer install --no-progress --no-suggest
|
2018-04-02 18:14:44 +00:00
|
|
|
# needed for system testing
|
2018-04-02 17:17:42 +00:00
|
|
|
- composer update joomla/test-system --no-progress --no-suggest
|
2019-03-07 18:16:06 +00:00
|
|
|
- composer update joomla/test-api --no-progress --no-suggest
|
2018-04-02 18:14:44 +00:00
|
|
|
- composer update joomla-projects/selenium-server-standalone --no-progress --no-suggest
|
2018-11-16 12:10:05 +00:00
|
|
|
- composer update joomla-projects/joomla-browser --no-progress --no-suggest
|
2018-07-29 09:05:54 +00:00
|
|
|
- npm install --unsafe-perm
|
2018-03-31 14:19:44 +00:00
|
|
|
|
2019-05-05 10:29:49 +00:00
|
|
|
- name: rebuild-cache
|
|
|
|
image: drillster/drone-volume-cache
|
2019-05-07 10:01:42 +00:00
|
|
|
depends_on: [ prepare ]
|
2019-05-05 10:29:49 +00:00
|
|
|
settings:
|
2018-08-08 14:12:31 +00:00
|
|
|
rebuild: true
|
|
|
|
mount:
|
|
|
|
- ./node_modules
|
|
|
|
- ./libraries/vendor
|
2019-05-05 13:38:47 +00:00
|
|
|
- ./administrator/components/com_media/node_modules
|
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-05 10:29:49 +00:00
|
|
|
- name: php70-unit
|
2019-05-07 10:01:42 +00:00
|
|
|
depends_on: [ rebuild-cache ]
|
2018-03-31 14:19:44 +00:00
|
|
|
image: joomlaprojects/docker-php70:develop
|
|
|
|
commands:
|
2019-03-10 14:20:06 +00:00
|
|
|
- ./libraries/vendor/bin/phpunit
|
2018-03-31 14:19:44 +00:00
|
|
|
|
2019-05-05 10:29:49 +00:00
|
|
|
- name: php71-unit
|
2019-05-07 10:01:42 +00:00
|
|
|
depends_on: [ rebuild-cache ]
|
2018-03-31 14:19:44 +00:00
|
|
|
image: joomlaprojects/docker-php71:develop
|
|
|
|
commands:
|
2019-03-10 14:20:06 +00:00
|
|
|
- ./libraries/vendor/bin/phpunit
|
2018-03-31 14:19:44 +00:00
|
|
|
|
2019-05-05 10:29:49 +00:00
|
|
|
- name: php72-unit
|
2019-05-07 10:01:42 +00:00
|
|
|
depends_on: [ rebuild-cache ]
|
2018-03-31 14:19:44 +00:00
|
|
|
image: joomlaprojects/docker-php72:develop
|
|
|
|
commands:
|
2019-03-10 14:20:06 +00:00
|
|
|
- ./libraries/vendor/bin/phpunit
|
2018-03-31 14:19:44 +00:00
|
|
|
|
2019-05-05 10:29:49 +00:00
|
|
|
- name: javascript-cs
|
2019-05-07 10:01:42 +00:00
|
|
|
depends_on: [ rebuild-cache ]
|
2018-12-29 10:46:22 +00:00
|
|
|
image: joomlaprojects/docker-systemtests:develop
|
|
|
|
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-05-07 10:01:42 +00:00
|
|
|
depends_on: [ rebuild-cache ]
|
2018-07-22 17:59:56 +00:00
|
|
|
image: joomlaprojects/docker-systemtests:develop
|
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-05 10:29:49 +00:00
|
|
|
- name: system-tests
|
2019-05-07 10:01:42 +00:00
|
|
|
depends_on: [ javascript-tests ]
|
2019-05-05 10:29:49 +00:00
|
|
|
image: joomlaprojects/docker-systemtests:develop
|
|
|
|
commands:
|
|
|
|
- bash libraries/vendor/joomla/test-system/src/drone-run.sh "$(pwd)"
|
2018-04-01 14:26:37 +00:00
|
|
|
|
2019-05-05 10:29:49 +00:00
|
|
|
- name: api-tests
|
2019-05-07 10:01:42 +00:00
|
|
|
depends_on: [ system-tests ]
|
2019-03-07 18:16:06 +00:00
|
|
|
image: joomlaprojects/docker-systemtests:latest
|
|
|
|
commands:
|
|
|
|
- bash libraries/vendor/joomla/test-api/drone-run.sh "$(pwd)"
|
|
|
|
|
2019-05-05 10:29:49 +00:00
|
|
|
- name: analysis4x
|
2019-02-25 22:36:33 +00:00
|
|
|
image: rips/rips-cli:1.2.1
|
2019-05-07 10:01:42 +00:00
|
|
|
depends_on: [ api-tests ]
|
2018-09-05 08:28:45 +00:00
|
|
|
when:
|
|
|
|
branch: 4.0-dev
|
|
|
|
commands:
|
|
|
|
- export RIPS_BASE_URI='https://api.rips.joomla.org'
|
2019-05-05 10:29:49 +00:00
|
|
|
- if [ $DRONE_REPO_NAMESPACE != 'joomla' ]; then echo "The analysis check only run on the main repos"; exit 0; fi
|
|
|
|
- rips-cli rips:scan:start -a 3 -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; }
|
|
|
|
environment:
|
|
|
|
RIPS_USERNAME:
|
|
|
|
from_secret: RIPS_USERNAME
|
|
|
|
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
|
|
|
|
|
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-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
|
2018-04-06 06:57:38 +00:00
|
|
|
image: postgres
|
2019-05-05 10:29:49 +00:00
|
|
|
|
2019-05-04 16:22:56 +00:00
|
|
|
---
|
|
|
|
kind: signature
|
2019-05-07 10:01:42 +00:00
|
|
|
hmac: 820e2021962202c01514b4ffe5eb893640c83fb5542345a70c4ca01e4ccfd43c
|
2019-05-04 16:22:56 +00:00
|
|
|
|
|
|
|
...
|