https://github.com/owncloud/core
Tip revision: 0c68428ad405f9b9bcfac1eb07a3baa23da9202d authored by Dipak Acharya on 31 May 2019, 07:11:39 UTC
debug for checking ci speed
debug for checking ci speed
Tip revision: 0c68428
.drone.yml
workspace:
base: /drone
path: src
branches: [master, stable10, release*]
clone:
git:
image: plugins/git
depth: 50
pipeline:
install-fed-server:
image: owncloudci/core
pull: true
exclude: apps/testing
version: ${FEDERATION_OC_VERSION}
core_path: /drone/fed-server
when:
matrix:
USE_FEDERATED_SERVER: true
configure-federation-server:
image: owncloudci/php:${PHP_VERSION}
pull: true
commands:
- cd /drone/fed-server
- php occ a:l
- php occ a:e testing
- php occ a:l
- php occ config:system:set trusted_domains 1 --value=server-${SERVER_PROTOCOL}
- php occ config:system:set trusted_domains 2 --value=federated-${SERVER_PROTOCOL}
- php occ log:manage --level 2
- php occ config:list
- echo "export TEST_SERVER_FED_URL=${SERVER_PROTOCOL}://federated-${SERVER_PROTOCOL}" > /drone/saved-settings.sh
- php occ security:certificates:import /drone/server.crt
- php occ security:certificates:import /drone/federated.crt
- php occ security:certificates
when:
matrix:
USE_FEDERATED_SERVER: true
fix-permissions-federation-server:
image: owncloudci/php:${PHP_VERSION}
pull: true
commands:
- chown www-data /drone/fed-server -R
when:
matrix:
USE_FEDERATED_SERVER: true
restore:
image: plugins/s3-cache:1
pull: true
secrets: [ cache_s3_endpoint, cache_s3_access_key, cache_s3_secret_key ]
restore: true
when:
local: false
event: [push, pull_request]
composer:
image: owncloudci/php:${PHP_VERSION}
pull: true
environment:
- COMPOSER_HOME=/drone/src/.cache/composer
commands:
- make install-composer-deps
- make vendor-bin-deps
when:
event: [push, pull_request]
yarn:
image: owncloudci/nodejs:latest
pull: true
environment:
- NPM_CONFIG_CACHE=/drone/src/.cache/npm
- YARN_CACHE_FOLDER=/drone/src/.cache/yarn
- bower_storage__packages=/drone/src/.cache/bower
commands:
- ./tests/drone/yarn-install.sh
when:
event: [push, pull_request]
rebuild:
image: plugins/s3-cache:1
pull: true
secrets: [ cache_s3_endpoint, cache_s3_access_key, cache_s3_secret_key ]
rebuild: true
mount:
- .cache
when:
local: false
event: [ push ]
matrix:
TEST_SUITE: javascript
flush:
image: plugins/s3-cache:1
pull: true
secrets: [ cache_s3_endpoint, cache_s3_access_key, cache_s3_secret_key ]
flush: true
flush_age: 14
when:
local: false
event: [push]
matrix:
TEST_SUITE: javascript
owncloud-coding-standard:
image: owncloudci/php:${PHP_VERSION}
pull: true
commands:
- make test-php-style
when:
matrix:
TEST_SUITE: owncloud-coding-standard
php-phan-71:
image: owncloudci/php:7.1
pull: true
commands:
- make test-php-phan
when:
matrix:
TEST_SUITE: phan
php-phan-72:
image: owncloudci/php:7.2
pull: true
commands:
- make test-php-phan
when:
matrix:
TEST_SUITE: phan
php-phan-73:
image: owncloudci/php:7.3
pull: true
commands:
- make test-php-phan
when:
matrix:
TEST_SUITE: phan
install-server:
image: owncloudci/php:${PHP_VERSION}
pull: true
environment:
- DB_TYPE=${DB_TYPE}
commands:
- ./tests/drone/install-server.sh
- php occ a:l
- php occ config:system:set trusted_domains 1 --value=server-${SERVER_PROTOCOL}
- php occ config:system:set trusted_domains 2 --value=federated-${SERVER_PROTOCOL}
- php occ log:manage --level 2
- php occ config:list
- php occ security:certificates:import /drone/server.crt
- php occ security:certificates:import /drone/federated.crt
- php occ security:certificates
when:
matrix:
INSTALL_SERVER: true
install-testing-app:
image: owncloudci/php:${PHP_VERSION}
pull: true
commands:
- git clone https://github.com/owncloud/testing.git $$DRONE_WORKSPACE/apps/testing
- php occ a:l
- php occ a:e testing
- php occ a:l
when:
matrix:
INSTALL_TESTING_APP: true
prepare-objectstore:
image: owncloudci/php:${PHP_VERSION}
pull: true
environment:
- OBJECTSTORE=${OBJECTSTORE}
commands:
- cd /drone/src/apps
- git clone https://github.com/owncloud/files_primary_s3.git
- cd files_primary_s3
- composer install
- cp tests/drone/${OBJECTSTORE}.config.php /drone/src/config
- cd /drone/src
- php occ a:l
- php occ a:e files_primary_s3
- php occ a:l
- php ./occ s3:create-bucket owncloud --accept-warning
when:
matrix:
PRIMARY_OBJECTSTORE: files_primary_s3
phpstan:
image: owncloudci/php:${PHP_VERSION}
pull: true
commands:
- make test-php-phpstan
when:
matrix:
TEST_SUITE: phpstan
phpunit:
image: owncloudci/php:${PHP_VERSION}
pull: true
group: test
environment:
- FILES_EXTERNAL_TYPE=${FILES_EXTERNAL_TYPE}
- COVERAGE=${COVERAGE}
- PRIMARY_OBJECTSTORE=${PRIMARY_OBJECTSTORE}
commands:
- ./tests/drone/test-phpunit.sh
when:
matrix:
TEST_SUITE: phpunit
test-javascript:
image: owncloudci/php:${PHP_VERSION}
pull: true
commands:
- ./tests/drone/test-javascript.sh
when:
matrix:
TEST_SUITE: javascript
codecov:
image: plugins/codecov:2
secrets: [codecov_token]
pull: true
flags:
- ${TEST_SUITE}
files:
- '*.xml'
paths:
- tests/output/coverage
when:
event: [push, pull_request]
matrix:
COVERAGE: true
setup-caldav-carddav-tests:
image: owncloudci/php:${PHP_VERSION}
pull: true
commands:
- bash apps/dav/tests/ci/${TEST_SUITE}/install.sh
when:
matrix:
CALDAV_CARDDAV_JOB: true
install-notifications-app:
image: owncloudci/php:${PHP_VERSION}
pull: true
commands:
- git clone https://github.com/owncloud/notifications.git apps/notifications
- php occ a:e notifications
when:
matrix:
INSTALL_NOTIFICATIONS_APP: true
fix-permissions:
image: owncloudci/php:${PHP_VERSION}
pull: true
commands:
- chown www-data /drone/src -R
when:
matrix:
CHOWN_SERVER: true
litmus-setup:
image: owncloudci/php:${PHP_VERSION}
pull: true
commands:
- echo "Create local mount ...."
- mkdir -p /drone/src/work/local_storage
- php occ app:enable files_external
- php occ config:system:set files_external_allow_create_new_local --value=true
- php occ config:app:set core enable_external_storage --value=yes
- php occ files_external:create local_storage local null::null -c datadir=/drone/src/work/local_storage
- echo 'Sharing a folder ..'
- OC_PASS=123456 php occ user:add --password-from-env user1
- chown www-data /drone/src -R
- curl -k -s -u user1:123456 -X MKCOL '${SERVER_PROTOCOL}://server-${SERVER_PROTOCOL}/remote.php/webdav/new_folder'
- curl -k -s -u user1:123456 "${SERVER_PROTOCOL}://server-${SERVER_PROTOCOL}/ocs/v2.php/apps/files_sharing/api/v1/shares" --data 'path=/new_folder&shareType=0&permissions=15&name=new_folder&shareWith=admin'
when:
matrix:
TEST_SUITE: litmus
litmus-old-endpoint:
image: owncloud/litmus
pull: true
environment:
- LITMUS_URL=${SERVER_PROTOCOL}://server-${SERVER_PROTOCOL}/remote.php/webdav
- LITMUS_USERNAME=admin
- LITMUS_PASSWORD=admin
when:
matrix:
TEST_SUITE: litmus
litmus-new-endpoint:
image: owncloud/litmus
pull: true
environment:
- LITMUS_URL=${SERVER_PROTOCOL}://server-${SERVER_PROTOCOL}/remote.php/dav/files/admin
- LITMUS_USERNAME=admin
- LITMUS_PASSWORD=admin
when:
matrix:
TEST_SUITE: litmus
litmus-new-endpoint-mount:
image: owncloud/litmus
pull: true
environment:
- LITMUS_URL=${SERVER_PROTOCOL}://server-${SERVER_PROTOCOL}/remote.php/dav/files/admin/local_storage/
- LITMUS_USERNAME=admin
- LITMUS_PASSWORD=admin
when:
matrix:
TEST_SUITE: litmus
litmus-old-endpoint-mount:
image: owncloud/litmus
pull: true
environment:
- LITMUS_URL=${SERVER_PROTOCOL}://server-${SERVER_PROTOCOL}/remote.php/webdav/local_storage/
- LITMUS_USERNAME=admin
- LITMUS_PASSWORD=admin
when:
matrix:
TEST_SUITE: litmus
litmus-new-endpoint-shared:
image: owncloud/litmus
pull: true
environment:
- LITMUS_URL=${SERVER_PROTOCOL}://server-${SERVER_PROTOCOL}/remote.php/dav/files/admin/new_folder/
- LITMUS_USERNAME=admin
- LITMUS_PASSWORD=admin
when:
matrix:
TEST_SUITE: litmus
litmus-old-endpoint-shared:
image: owncloud/litmus
pull: true
environment:
- LITMUS_URL=${SERVER_PROTOCOL}://server-${SERVER_PROTOCOL}/remote.php/webdav/new_folder/
- LITMUS_USERNAME=admin
- LITMUS_PASSWORD=admin
when:
matrix:
TEST_SUITE: litmus
owncloud-log:
image: owncloud/ubuntu:16.04
detach: true
pull: true
commands:
- tail -f /drone/src/data/owncloud.log
when:
status: [ success, failure ]
matrix:
OWNCLOUD_LOG: true
federated-log:
image: owncloud/ubuntu:16.04
detach: true
pull: true
commands:
- tail -f /drone/fed-server/data/owncloud.log
when:
matrix:
OWNCLOUD_LOG: true
USE_FEDERATED_SERVER: true
api-acceptance-tests:
image: owncloudci/php:${PHP_VERSION}
pull: true
environment:
- TEST_SERVER_URL=${SERVER_PROTOCOL}://server-${SERVER_PROTOCOL}
commands:
- touch /drone/saved-settings.sh
- . /drone/saved-settings.sh
- make test-acceptance-api TESTING_REMOTE_SYSTEM=true
when:
matrix:
TEST_SUITE: api
cli-acceptance-tests:
image: owncloudci/php:${PHP_VERSION}
pull: true
environment:
- TEST_SERVER_URL=${SERVER_PROTOCOL}://server-${SERVER_PROTOCOL}
- MAILHOG_HOST=email
commands:
- touch /drone/saved-settings.sh
- . /drone/saved-settings.sh
- make test-acceptance-cli TESTING_REMOTE_SYSTEM=true
when:
matrix:
TEST_SUITE: cli
webui-acceptance-tests:
image: owncloudci/php:${PHP_VERSION}
pull: true
environment:
- BROWSER=${BROWSER}
- SELENIUM_HOST=${BROWSER}
- SELENIUM_PORT=4444
- TEST_SERVER_URL=${SERVER_PROTOCOL}://server-${SERVER_PROTOCOL}
- PLATFORM=Linux
- MAILHOG_HOST=email
commands:
- touch /drone/saved-settings.sh
- . /drone/saved-settings.sh
- make test-acceptance-webui TESTING_REMOTE_SYSTEM=true
when:
matrix:
TEST_SUITE: selenium
caldav-carddav-tests:
image: owncloudci/php:${PHP_VERSION}
pull: true
commands:
- bash apps/dav/tests/ci/${TEST_SUITE}/script.sh
when:
matrix:
CALDAV_CARDDAV_JOB: true
print-log:
image: owncloudci/php:${PHP_VERSION}
pull: true
commands:
- cat /drone/src/data/owncloud.log
when:
status: [ failure ]
matrix:
TEST_SUITE: phpunit
notify:
image: plugins/slack:1
pull: true
secrets:
- source: slack_webhook_public
target: slack_webhook
channel: server
when:
status: [ failure, changed ]
event: [ push, tag ]
services:
mariadb:
image: ${MARIADB_IMAGE=mariadb:10.2}
environment:
- MYSQL_USER=owncloud
- MYSQL_PASSWORD=owncloud
- MYSQL_DATABASE=owncloud
- MYSQL_ROOT_PASSWORD=owncloud
when:
matrix:
DB_TYPE: mariadb
mysql:
image: ${MYSQL_IMAGE=mysql:5.5}
environment:
- MYSQL_USER=owncloud
- MYSQL_PASSWORD=owncloud
- MYSQL_DATABASE=owncloud
- MYSQL_ROOT_PASSWORD=owncloud
when:
matrix:
DB_TYPE: mysql
mysql8:
image: ${MYSQL_IMAGE=mysql:8.0}
# see http://php.net/manual/en/mysqli.requirements.php
command: --default-authentication-plugin=mysql_native_password
environment:
- MYSQL_USER=owncloud
- MYSQL_PASSWORD=owncloud
- MYSQL_DATABASE=owncloud
- MYSQL_ROOT_PASSWORD=owncloud
when:
matrix:
DB_TYPE: mysql8
postgres:
image: ${POSTGRES_IMAGE=postgres:9.4}
environment:
- POSTGRES_USER=owncloud
- POSTGRES_PASSWORD=owncloud
- POSTGRES_DB=owncloud
when:
matrix:
DB_TYPE: postgres
oracle:
image: deepdiver/docker-oracle-xe-11g:2.0
environment:
- ORACLE_DISABLE_ASYNCH_IO=true
when:
matrix:
DB_TYPE: oracle
chrome:
image: selenium/standalone-chrome-debug:latest
pull: true
environment:
- JAVA_OPTS=-Dselenium.LOGGER.level=WARNING
when:
matrix:
TEST_SUITE: selenium
BROWSER: chrome
firefox:
image: selenium/standalone-firefox-debug:3.8.1
pull: true
environment:
- SE_OPTS=-enablePassThrough false
- JAVA_OPTS=-Dselenium.LOGGER.level=WARNING
when:
matrix:
TEST_SUITE: selenium
BROWSER: firefox
server-https:
image: owncloudci/php:${PHP_VERSION}
pull: true
environment:
- APACHE_WEBROOT=/drone/src/
- APACHE_CONFIG_TEMPLATE=ssl
- APACHE_SSL_CERT_CN=server-${SERVER_PROTOCOL}
- APACHE_SSL_CERT=/drone/server.crt
- APACHE_SSL_KEY=/drone/server.key
command: [ "/usr/local/bin/apachectl", "-e", "debug" , "-D", "FOREGROUND" ]
when:
matrix:
USE_SERVER: true
SERVER_PROTOCOL: https
server-http:
image: owncloudci/php:${PHP_VERSION}
pull: true
environment:
- APACHE_WEBROOT=/drone/src/
command: [ "/usr/local/bin/apachectl", "-e", "debug" , "-D", "FOREGROUND" ]
when:
matrix:
USE_SERVER: true
SERVER_PROTOCOL: http
federated-https:
image: owncloudci/php:${PHP_VERSION}
pull: true
environment:
- APACHE_WEBROOT=/drone/fed-server/
- APACHE_CONFIG_TEMPLATE=ssl
- APACHE_SSL_CERT_CN=federated-${SERVER_PROTOCOL}
- APACHE_SSL_CERT=/drone/federated.crt
- APACHE_SSL_KEY=/drone/federated.key
command: [ "/usr/local/bin/apachectl", "-e", "debug" , "-D", "FOREGROUND" ]
when:
matrix:
USE_FEDERATED_SERVER: true
SERVER_PROTOCOL: https
federated-http:
image: owncloudci/php:${PHP_VERSION}
pull: true
environment:
- APACHE_WEBROOT=/drone/fed-server/
command: [ "/usr/local/bin/apachectl", "-e", "debug" , "-D", "FOREGROUND" ]
when:
matrix:
USE_FEDERATED_SERVER: true
SERVER_PROTOCOL: http
apache-webdav:
image: owncloudci/php
pull: true
environment:
- APACHE_CONFIG_TEMPLATE=webdav
command: [ "apachectl", "-D", "FOREGROUND" ]
when:
matrix:
FILES_EXTERNAL_TYPE: webdav_apache
smb-samba:
image: owncloudci/samba
pull: true
command: "-u \"test;test\" -s \"public;/tmp;yes;no;no;test;none;test\" -S"
when:
matrix:
FILES_EXTERNAL_TYPE: smb_samba
ceph:
image: owncloudci/ceph
pull: true
environment:
- KEYSTONE_PUBLIC_PORT=5034
- KEYSTONE_ADMIN_USER=test
- KEYSTONE_ADMIN_PASS=testing
- KEYSTONE_ADMIN_TENANT=testtenant
- KEYSTONE_ENDPOINT_REGION=testregion
- KEYSTONE_SERVICE=testceph
- OSD_SIZE=500
when:
matrix:
FILES_EXTERNAL_TYPE: swift
scality:
image: owncloudci/scality-s3server
pull: true
environment:
- HOST_NAME=scality
when:
matrix:
OBJECTSTORE: scality
email:
image: mailhog/mailhog
pull: true
when:
matrix:
USE_EMAIL: true
matrix:
include:
- PHP_VERSION: 7.1
TEST_SUITE: selenium
BROWSER: chrome
BEHAT_SUITE: webUIFiles
DB_TYPE: mariadb
USE_SERVER: true
SERVER_PROTOCOL: https
INSTALL_SERVER: true
CHOWN_SERVER: true
OWNCLOUD_LOG: true
INSTALL_TESTING_APP: true
- PHP_VERSION: 7.1
TEST_SUITE: selenium
BROWSER: chrome
BEHAT_SUITE: webUIFiles2
DB_TYPE: mariadb
USE_SERVER: true
SERVER_PROTOCOL: https
INSTALL_SERVER: true
CHOWN_SERVER: true
OWNCLOUD_LOG: true
INSTALL_TESTING_APP: true