Concurrent build with isolated database?

Hi, we’re evaluating drone for CI self-host solution and compare with different solutions like CircleCI. I just want to know if Drone support isolated database-level build just like concurrent container concept of CircleCI.

I means, if there are multiple builds, it should run in concurrent, and database running with different build should be isolated as well.

here’s the .drone.yml file I have right now, for example, the build “frontend” and “backend” should be isolated, and can be trigger in different drone-agent ( agents should be spread in different vm, so that the machine vm can use full resources of vm to run single build ). Is it possible to do that in Drone?

pipeline:
  restore-cache:
    image: drillster/drone-volume-cache
    restore: true
    mount:
      - ./node_modules
      - ./vender/bundle
      - ./cache/yarn
    volumes:
      - /tmp/cache:/cache

  backend:
    image: example_images:latest
    group: build
    commands:
      - bundle install --path vender/bundle
      - yarn install --cache-folder cache/yarn
      - bundle exec rake db:create
      - bundle exec rake db:schema:load
      - bundle exec rake assets:precompile RAILS_ENV=test
      - bundle exec rake test:backend

  frontend:
    image: example_images:latest
    group: build
    commands:
      - bundle install --path vender/bundle
      - yarn install --cache-folder cache/yarn
      - bundle exec rake db:create
      - bundle exec rake db:schema:load
      - bundle exec rake assets:precompile RAILS_ENV=test
      - bundle exec rake test:frontend

  rebuild-cache:
    image: drillster/drone-volume-cache
    rebuild: true
    mount:
      - ./node_modules
      - ./vender/bundle
      - ./cache/yarn
    volumes:
      - /tmp/cache:/cache

services:
  postgres:
    image: postgres:9.6.2-alpine

here’s the .drone.yml file I have right now, for example, the build “frontend” and “backend” should be isolated, and can be trigger in different drone-agent

This is not how drone works. All pipeline steps execute on the same agent and share a dedicated, ephemeral workspace (docker volume) allowing all steps to read and write to the same source code directory where your code was cloned.

Thanks for the quick response, and I really love Drone with clear document and the UI is pretty clean! I really enjoy using it!

and I would like to know if there’s any work around for now or planing to support one single step inside “pipeline” per drone-agent?

I think this is really important feature if all the "step"s inside the “pipeline” run pretty long time all together, and one can simply reduce the whole build time by introducing more agents. really looking forward to it. I know it’s hard to say, but I really hope this feature will be there in near future.

You can run steps in parallel (on the same machine) to reduce build time:
http://docs.drone.io/pipelines/#parallel-execution

There are no immediate plans to support parallel execution of pipeline steps on multiple machines. Same-machine parallelism should be adequate for most projects, especially if you provision an n1-megamem-96 instance with 96 vcpus and 1433.6 GB of memory :slight_smile: