1
0
mirror of https://github.com/golang/go synced 2024-11-18 14:04:45 -07:00

dashboard: start of Dockeritization of Linux builders

Good checkpoint. Can now do builds by hand.

Next step is coordinator server in front of this, and things
to fire up beefy GCE instances running CoreOS and each build
in its own Docker container. See README for how to do a single
build.

LGTM=adg
R=adg
CC=golang-codereviews
https://golang.org/cl/134870043
This commit is contained in:
Brad Fitzpatrick 2014-08-26 00:33:19 -07:00
parent 51353854a4
commit eb8b4b0d41
3 changed files with 64 additions and 0 deletions

44
dashboard/env/linux-x86-base/Dockerfile vendored Normal file
View File

@ -0,0 +1,44 @@
# Copyright 2014 The Go Authors. All rights reserved.
# Use of this source code is governed by a BSD-style
# license that can be found in the LICENSE file.
# Base builder image: gobuilders/linux-x86-base
FROM debian:wheezy
MAINTAINER golang-dev <golang-dev@googlegroups.com>
ENV DEBIAN_FRONTEND noninteractive
RUN apt-get update && apt-get upgrade -y
# For running curl to get the hg starter tarballs (faster than hg clone).
RUN apt-get install -y --no-install-recommends curl ca-certificates
# Optionally used by some net/http tests:
RUN apt-get install -y --no-install-recommends strace
# For building Go's bootstrap 'dist' program:
RUN apt-get install -y --no-install-recommends gcc libc6-dev
# For 32-bit builds:
RUN apt-get install -y --no-install-recommends libc6-dev-i386
# For interacting with the Go source & subrepos:
RUN apt-get install -y --no-install-recommends mercurial git-core subversion
ENV GOPATH /gopath
ENV GOROOT /goroot
RUN mkdir -p $GOROOT
RUN cd $GOROOT && curl -s https://storage.googleapis.com/gobuilder/go-snap.tar.gz | tar x --no-same-owner -zv
ENV GO_TOOLS $GOPATH/src/code.google.com/p/go.tools
RUN mkdir -p $GO_TOOLS
RUN cd $GO_TOOLS $ && curl -s https://storage.googleapis.com/gobuilder/go.tools-snap.tar.gz | tar x --no-same-owner -zv
RUN cd $GOROOT && hg update -C b8ff0ec2a724
RUN cd $GOROOT/src && ./make.bash
RUN mkdir -p /usr/local/bin
RUN cd $GO_TOOLS && hg update -C 881a2f3130de
ENV GOBIN /usr/local/bin
RUN /goroot/bin/go install code.google.com/p/go.tools/dashboard/builder

9
dashboard/env/linux-x86-base/Makefile vendored Normal file
View File

@ -0,0 +1,9 @@
# Copyright 2014 The Go Authors. All rights reserved.
# Use of this source code is governed by a BSD-style
# license that can be found in the LICENSE file.
docker: Dockerfile
docker build -t gobuilders/linux-x86-base .
push: docker
docker push gobuilders/linux-x86-base

11
dashboard/env/linux-x86-base/README vendored Normal file
View File

@ -0,0 +1,11 @@
For now, you can at least do a single build of a single revision:
$ export BUILD=linux-amd64-temp
$ docker run \
-v $HOME/keys/$BUILD.buildkey:/.gobuildkey \
gobuilders/linux-x86-base \
/usr/local/bin/builder -rev=50ac9eded6ad -buildroot=/ -v $BUILD
TODO(bradfitz): automate with CoreOS + GCE, ala:
https://github.com/bradfitz/camlistore/blob/master/misc/gce/create.go