Skip to content

Getting CI up and running #14

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.

Activity

  1. added this to the milestone on Jun 6, 2016
  2. MorrisJobke commented on Jun 6, 2016

    @MorrisJobke
    MemberAuthor
  3. MariusBluem commented on Jun 6, 2016

    @MariusBluem
    Member

    Interessting domain 😕 ...why not ci.nextcloud.com or something ...

  4. MorrisJobke commented on Jun 6, 2016

    @MorrisJobke
    MemberAuthor

    why not ci.nextcloud.com or something ...

    Because I'm not in charge of it. This is one of my domains and the server of @LukasReschke. We will use a server of the foundation (once it is there) and the proper domain once they are available (we are in bootstrapping process). For now we want something that executes tests automatically, so we went the fast lane ;)

  5. MorrisJobke commented on Jun 6, 2016

    @MorrisJobke
    MemberAuthor

    Multiple different test runs could be accomplished by "multiple steps": http://readme.drone.io/usage/build_test/#multiple-steps:fb92aa3346185c57f15afda861d465a3

  6. MorrisJobke commented on Jun 7, 2016

    @MorrisJobke
    MemberAuthor

    A first minimal version was merged with #17

    This only runs autotest.sh sqlite on a PHP 7 5.6 (it is a Debian 8 with default PHP installed). Now we could extend the .drone.yml to also run more jobs.

    This version of drone (0.4.2) can not run multiple steps of one PR in parallel, but the next drone release (0.5) will support this.

  7. self-assigned this
    on Jun 13, 2016
  8. modified the milestones: , Nextcloud 9 on Jun 13, 2016
  9. MorrisJobke commented on Jun 14, 2016

    @MorrisJobke
    MemberAuthor
  10. MorrisJobke commented on Jul 22, 2016

    @MorrisJobke
    MemberAuthor

    Most of this is done. We will add the remaining stuff step by step.

  11. removed their assignment
    on Sep 5, 2016
  12. added a commit that references this issue on Feb 7, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions