mirror of
https://github.com/weaveworks/scope.git
synced 2026-02-14 18:09:59 +00:00
45 lines
1.4 KiB
YAML
45 lines
1.4 KiB
YAML
machine:
|
|
services:
|
|
- docker
|
|
environment:
|
|
GOPATH: /home/ubuntu
|
|
SRCDIR: /home/ubuntu/src/github.com/weaveworks/tools
|
|
PATH: $PATH:$HOME/bin
|
|
|
|
dependencies:
|
|
post:
|
|
- sudo chmod a+wr --recursive /usr/local/go/pkg
|
|
- go clean -i net
|
|
- go install -tags netgo std
|
|
- mkdir -p $(dirname $SRCDIR)
|
|
- cp -r $(pwd)/ $SRCDIR
|
|
|
|
test:
|
|
override:
|
|
- |
|
|
cd $SRCDIR/build && \
|
|
make && \
|
|
docker run --rm -v "$SRCDIR:$SRCDIR" -w "$SRCDIR" --entrypoint sh quay.io/weaveworks/build-golang -c ./lint .
|
|
- cd $SRCDIR/cover; make
|
|
- cd $SRCDIR/socks; make
|
|
- cd $SRCDIR/runner; make
|
|
|
|
deployment:
|
|
snapshot:
|
|
branch: master
|
|
commands:
|
|
- docker login -e "$DOCKER_REGISTRY_EMAIL" -u "$DOCKER_REGISTRY_USER" -p "$DOCKER_REGISTRY_PASS" "$DOCKER_REGISTRY_URL"
|
|
- |
|
|
cd $SRCDIR/build;
|
|
for image in $(make images); do
|
|
# Tag the built images with the revision of this repo.
|
|
docker push "${image}:${GIT_TAG}"
|
|
|
|
# Tag the built images with something derived from the base images in
|
|
# their respective Dockerfiles. So "FROM golang:1.8.0-stretch" as a
|
|
# base image would lead to a tag of "1.8.0-stretch"
|
|
IMG_TAG=$(make "imagetag-${image#quay.io/weaveworks/build-}")
|
|
docker tag "${image}:latest" "${image}:${IMG_TAG}"
|
|
docker push "${image}:${IMG_TAG}"
|
|
done
|