Skip to content

Getting CI up and running #14

@MorrisJobke

Description

@MorrisJobke

This is moved over from the forums: https://help.nextcloud.com/t/having-a-ci-setup/223

Today we worked on a first setup of a minimal CI instance. The ansible scripts can be found at https://github.com/nextcloud/infrastructure/tree/master/ci

This instance runs at https://drone.weasel.rocks/nextcloud/server (link to the CI setup for the server, because there is no public overview page).

Now the task is to move from our previous setup to a dockerized one. I will soon open a PR in core to run the first tests (autotest.sh sqlite in our server repository) and then we can steadily extend this and play around with all the matrix stuff (multiple PHP versions, DBs, tests, ...).

A quick preview:

I used this docker file to generate the php-7-owncloud image:

FROM php:7
RUN apt-get update && apt-get install -y \
        libfreetype6-dev \
        libjpeg62-turbo-dev \
        libpng12-dev \
        git \
    && docker-php-ext-configure gd --with-freetype-dir=/usr/include/ --with-jpeg-dir=/usr/include/ \
    && docker-php-ext-install gd zip \
    && docker-php-ext-enable gd zip
RUN curl -O -L https://phar.phpunit.de/phpunit.phar \
    && chmod +x phpunit.phar \
    && mv phpunit.phar /usr/local/bin/phpunit

And following .drone.yml that is placed in the server repository:

build:
  image: php-7-owncloud
  commands:
    - ./occ maintenance:install --database-name oc_autotest --database-user oc_autotest --admin-user admin --admin-pass admin --database sqlite --database-pass=''
    - ./autotest.sh sqlite

It currently fails due to a too low memory limit, but it is a nice start.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions