2019-03-13 11:14:55 +00:00
|
|
|
runtimes:
|
|
|
|
go1.12:
|
|
|
|
type: pod
|
|
|
|
arch: amd64
|
|
|
|
containers:
|
|
|
|
- image: golang:1.12-stretch
|
2019-04-03 16:05:34 +00:00
|
|
|
environment:
|
|
|
|
ENV01: envvalue01
|
2019-03-13 11:14:55 +00:00
|
|
|
debian:
|
|
|
|
type: pod
|
|
|
|
arch: amd64
|
|
|
|
containers:
|
|
|
|
- image: debian:stretch
|
|
|
|
dind:
|
|
|
|
type: pod
|
|
|
|
arch: amd64
|
|
|
|
containers:
|
|
|
|
- image: docker:stable-dind
|
|
|
|
privileged: true
|
|
|
|
entrypoint: dockerd
|
|
|
|
|
|
|
|
tasks:
|
|
|
|
build-go1.12:
|
|
|
|
runtime: go1.12
|
|
|
|
working_dir: /go/src/github.com/sorintlab/agola
|
|
|
|
environment:
|
|
|
|
GO111MODULE: "on"
|
2019-04-03 16:05:34 +00:00
|
|
|
VAR01:
|
|
|
|
from_variable: var01
|
2019-03-13 11:14:55 +00:00
|
|
|
steps:
|
|
|
|
- run: env
|
|
|
|
- clone:
|
|
|
|
- run: SKIP_DOCKER_TESTS=1 go test -v -count 1 ./...
|
|
|
|
|
|
|
|
build-docker-tests-go-1.12:
|
|
|
|
runtime: go1.12
|
|
|
|
working_dir: /go/src/github.com/sorintlab/agola
|
|
|
|
environment:
|
|
|
|
GO111MODULE: "on"
|
|
|
|
steps:
|
|
|
|
- run: env
|
|
|
|
- clone:
|
|
|
|
- run:
|
|
|
|
name: build docker tests binary
|
|
|
|
command: CGO_ENABLED=0 go test -c ./internal/services/runservice/executor/driver -o ./bin/docker-tests
|
2019-04-03 16:05:34 +00:00
|
|
|
environment:
|
|
|
|
ENV01: envvalue01
|
2019-03-13 11:14:55 +00:00
|
|
|
- save_to_workspace:
|
|
|
|
contents:
|
|
|
|
- source_dir: ./bin
|
|
|
|
dest_dir: /bin/
|
|
|
|
paths:
|
|
|
|
- "*"
|
|
|
|
|
|
|
|
test-docker-driver:
|
|
|
|
runtime: dind
|
|
|
|
steps:
|
|
|
|
- run: env
|
|
|
|
- restore_workspace:
|
|
|
|
dest_dir: .
|
|
|
|
- run: sleep 5
|
|
|
|
- run: ./bin/docker-tests -test.parallel 1 -test.v
|
|
|
|
|
|
|
|
pipelines:
|
|
|
|
agola build/test:
|
|
|
|
elements:
|
|
|
|
build go1.12:
|
|
|
|
task: build-go1.12
|
|
|
|
build docker tests go1.12:
|
|
|
|
task: build-docker-tests-go-1.12
|
|
|
|
test docker driver:
|
|
|
|
task: test-docker-driver
|
|
|
|
depends:
|
|
|
|
- build docker tests go1.12
|