workspace:
  base: /go
  path: src/github.com/gitpods/gitpods

pipeline:
  goget:
    group: dependencies
    image: golang:1.8
    commands:
      - go get -v -t ./...

  yarn:
    group: dependencies
    image: kkarczmarczyk/node-yarn
    commands:
      - yarn install

  test:
    image: golang:1.8
    commands:
      - go test -v ./...

  api:
    group: build
    image: golang:1.8
    commands:
      - CGO_ENABLED=0 go build -v -ldflags '-w -extldflags '-static'' -o ./cmd/api/api ./cmd/api

  gitpods:
    group: build
    image: golang:1.8
    commands:
      - CGO_ENABLED=0 go build -v -ldflags '-w -extldflags '-static'' -o ./cmd/gitpods/gitpods ./cmd/gitpods

  ui:
    group: build
    image: golang:1.8
    commands:
#      - ./node_modules/.bin/webpack
#      - packr
      - CGO_ENABLED=0 go build -v -ldflags '-w -extldflags '-static'' -o ./cmd/ui/ui ./cmd/ui

  docker-api:
    group: docker
    image: plugins/docker
    commands:
      - docker build -t gitpods/api ./cmd/api

  docker-ui:
    group: docker
    image: plugins/docker
    commands:
      - docker build -t gitpods/ui ./cmd/ui

  gitter:
    image: plugins/gitter
    secrets: [ gitter_webhook ]

workspace:
  base: /go
  path: src/github.com/gitpods/gitpods

pipeline:
  goget:
    group: dependencies
    image: golang:1.8
    commands:
      - go get -v -t ./...

  yarn:
    group: dependencies
    image: kkarczmarczyk/node-yarn
    commands:
      - yarn install

  test:
    image: golang:1.8
    commands:
      - go test -v ./...

  api:
    group: build
    image: golang:1.8
    commands:
      - CGO_ENABLED=0 go build -v -ldflags '-w -extldflags '-static'' -o ./cmd/api/api ./cmd/api

  gitpods:
    group: build
    image: golang:1.8
    commands:
      - CGO_ENABLED=0 go build -v -ldflags '-w -extldflags '-static'' -o ./cmd/gitpods/gitpods ./cmd/gitpods

  ui:
    group: build
    image: golang:1.8
    commands:
#      - ./node_modules/.bin/webpack
#      - packr
      - CGO_ENABLED=0 go build -v -ldflags '-w -extldflags '-static'' -o ./cmd/ui/ui ./cmd/ui

  docker-api:
    group: docker
    image: plugins/docker
    debug: true
    commands:
      - docker build -t gitpods/api ./cmd/api

  docker-ui:
    group: docker
    image: plugins/docker
    debug: true
    commands:
      - docker build -t gitpods/ui ./cmd/ui

  gitter:
    image: plugins/gitter
    secrets: [ gitter_webhook ]

Enable debugging when building docker images
Enable debugging when building docker images
