drone/drone — pull request #489 by Bugagazavr (2014-09-28 15:16:30+00:00)
Title: Matrix builds

This PR is a proof of concept.

# Features
- matrix builds
- improved yaml file structure
- allow fails

# YAML file
support old `.drone.yml`
```yaml
image: go1.3
git:
path: github.com/drone/drone
env:
- GOROOT=/usr/local/go
- PATH=$PATH:$GOROOT/bin:$GOPATH/bin
script:
- sudo apt-get -y install zip libsqlite3-dev sqlite3 1> /dev/null 2> /dev/null
- make deps
- make test
- make dpkg
notify:
email:
recipients:
- brad@drone.io

publish:
s3:
acl: public-read
region: us-east-1
bucket: downloads.drone.io
access_key: $AWS_KEY
secret_key: $AWS_SECRET
source: debian/drone.deb
target: $DRONE_BRANCH/
```

support new `.drone.yml` structure:
```yaml
matrix:
- name: 'with go 1.3'
image: go1.3
allow_fail: true
git:
path: github.com/drone/drone
env:
- GOROOT=/usr/local/go
- PATH=$PATH:$GOROOT/bin:$GOPATH/bin
script:
- sudo apt-get -y install zip libsqlite3-dev sqlite3 1> /dev/null 2> /dev/null
- make deps
- make test
- make dpkg
- name: 'with go 1.2'
image: go1.2
git:
path: github.com/drone/drone
env:
- GOROOT=/usr/local/go
- PATH=$PATH:$GOROOT/bin:$GOPATH/bin
script:
- sudo apt-get -y install zip libsqlite3-dev sqlite3 1> /dev/null 2> /dev/null
- make deps
- make test
- make dpkg
publish:
s3:
acl: public-read
region: us-east-1
bucket: downloads.drone.io
access_key: $AWS_KEY
secret_key: $AWS_SECRET
source: debian/drone.deb
target: $DRONE_BRANCH/

notify:
email:
recipients:
- brad@drone.io
```

also support booth usage:
```yaml
image: go1.2
env:
- GOROOT=/usr/local/go
- PATH=$PATH:$GOROOT/bin:$GOPATH/bin
matrix:
- name: 'with go 1.2'
git:
path: github.com/drone/drone
script:
- sudo apt-get -y install zip libsqlite3-dev sqlite3 1> /dev/null 2> /dev/null
- make deps
- make test
- make dpkg
```

# What is ugly
1. Queues, i use simple goroutines to create matrix builds, but i can't include build in common queue
2. Wesockets, because websocket doesn't have event type, your build UI refresh after all builds in commit has been completed
3. more...

I will be happy for your suggestions on this pool request