From 6ec321ef236643863fa7bc471c523eda3d1c653b Mon Sep 17 00:00:00 2001 From: Morris Jobke Date: Fri, 14 Jul 2017 09:03:14 +0200 Subject: [PATCH 1/3] Fix drone Fix service container host name Fix more hostnames Signed-off-by: Morris Jobke --- autotest.sh | 15 +++++++++++++-- 1 file changed, 13 insertions(+), 2 deletions(-) diff --git a/autotest.sh b/autotest.sh index f42ca41de9..1e45dce2ed 100755 --- a/autotest.sh +++ b/autotest.sh @@ -200,7 +200,7 @@ function execute_tests { fi mysql -u "$DATABASEUSER" -powncloud -e "DROP DATABASE IF EXISTS $DATABASENAME" -h $DATABASEHOST || true else - DATABASEHOST=127.0.0.1 + DATABASEHOST=mysql fi fi echo "Waiting for MySQL initialisation ..." @@ -234,7 +234,7 @@ function execute_tests { fi mysql -u "$DATABASEUSER" -powncloud -e "DROP DATABASE IF EXISTS $DATABASENAME" -h $DATABASEHOST || true else - DATABASEHOST=127.0.0.1 + DATABASEHOST=mysqlmb4 fi fi @@ -296,6 +296,17 @@ function execute_tests { echo "Postgres is up." else + if [ ! -z "$DRONE" ] ; then + DATABASEHOST=postgres + fi + echo "Waiting for Postgres to be available ..." + if ! apps/files_external/tests/env/wait-for-connection $DATABASEHOST 5432 60; then + echo "[ERROR] Waited 60 seconds, no response" >&2 + exit 1 + fi + echo "Give it 10 additional seconds ..." + sleep 10 + if [ -z "$DRONE" ] ; then # no need to drop the DB when we are on CI dropdb -U "$DATABASEUSER" "$DATABASENAME" || true fi From 679ce486713ee07a99b74f35aa3f1429fbe5afb7 Mon Sep 17 00:00:00 2001 From: Morris Jobke Date: Fri, 14 Jul 2017 13:08:19 +0200 Subject: [PATCH 2/3] Add branch limitation Signed-off-by: Morris Jobke --- .drone.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.drone.yml b/.drone.yml index e97590d4db..e2321c2a86 100644 --- a/.drone.yml +++ b/.drone.yml @@ -484,3 +484,5 @@ services: when: matrix: DB: mysqlmb4 + +branches: [ master, stable* ] From bd90d6b4f5f0d274a2c273966aaf8a093d62cae7 Mon Sep 17 00:00:00 2001 From: Morris Jobke Date: Tue, 2 May 2017 12:44:54 -0300 Subject: [PATCH 3/3] Add redis support to our CI jobs Signed-off-by: Morris Jobke --- .drone.yml | 16 +++++++++++++++- autotest.sh | 8 ++++++++ tests/redis.config.php | 12 ++++++++++++ 3 files changed, 35 insertions(+), 1 deletion(-) create mode 100644 tests/redis.config.php diff --git a/.drone.yml b/.drone.yml index e2321c2a86..f406b1e056 100644 --- a/.drone.yml +++ b/.drone.yml @@ -400,7 +400,9 @@ matrix: - TESTS: signed-off-check - TESTS: htaccess-checker - TESTS: nodb-codecov - - TESTS: db-codecov + ENABLE_REDIS: true + - TESTS: db-codecov + ENABLE_REDIS: true - TESTS: integration-capabilities_features - TESTS: integration-federation_features - TESTS: integration-auth @@ -435,26 +437,38 @@ matrix: - TESTS: carddavtester-old-endpoint - DB: NODB PHP: 5.6 + ENABLE_REDIS: true - DB: NODB PHP: 7.0 + ENABLE_REDIS: true - DB: NODB PHP: 7.1 + ENABLE_REDIS: true - DB: sqlite PHP: 5.6 + ENABLE_REDIS: true - DB: sqlite PHP: 7.0 + ENABLE_REDIS: true - DB: sqlite PHP: 7.1 + ENABLE_REDIS: true - DB: mysql PHP: 5.6 + ENABLE_REDIS: true - DB: postgres PHP: 5.6 + ENABLE_REDIS: true - DB: mysqlmb4 PHP: 5.6 + ENABLE_REDIS: true services: cache: image: redis + when: + matrix: + ENABLE_REDIS: true postgres: image: postgres environment: diff --git a/autotest.sh b/autotest.sh index 1e45dce2ed..8afc69e57a 100755 --- a/autotest.sh +++ b/autotest.sh @@ -143,6 +143,10 @@ function cleanup_config { if [ -f config/autotest-storage-swift.config.php ]; then rm config/autotest-storage-swift.config.php fi + # Remove autotest redis config + if [ -f config/redis.config.php ]; then + rm config/redis.config.php + fi } # restore config on exit @@ -176,6 +180,10 @@ function execute_tests { fi cp tests/preseed-config.php config/config.php + if [ "$ENABLE_REDIS" == "true" ] ; then + cp tests/redis.config.php config/redis.config.php + fi + _DB=$DB # drop database diff --git a/tests/redis.config.php b/tests/redis.config.php new file mode 100644 index 0000000000..9d3f1eca63 --- /dev/null +++ b/tests/redis.config.php @@ -0,0 +1,12 @@ + '\\OC\\Memcache\\Redis', + 'memcache.distributed' => '\\OC\\Memcache\\Redis', + 'memcache.locking' => '\\OC\\Memcache\\Redis', + 'redis' => [ + 'host' => 'cache', + 'port' => 6379, + 'timeout' => 0, + ], +];