forked from weaveworks-plugins/scope-iowait
-
Notifications
You must be signed in to change notification settings - Fork 0
/
circle.yml
48 lines (44 loc) · 1.65 KB
/
circle.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
general:
branches:
ignore:
- gh-pages
machine:
services:
- docker
environment:
GOPATH: /home/ubuntu
SRCDIR: /home/ubuntu/scope-iowait
PATH: $PATH:$HOME/.local/bin
dependencies:
cache_directories:
- "~/docker"
override:
- echo "no dependencies"
test:
override:
- cd $SRCDIR && make .iowait.uptodate && docker tag weaveworksplugins/scope-iowait weaveworksplugins/scope-iowait:$(./tools/image-tag):
parallel: false
timeout: 300
deployment:
hub:
branch: master
commands:
- |
test -z "${DOCKER_USER}" || (
docker login -e $DOCKER_EMAIL -u $DOCKER_USER -p $DOCKER_PASS &&
(test "${DOCKER_ORGANIZATION:-$DOCKER_USER}" == "weaveworksplugins" || (
docker tag weaveworksplugins/scope-iowait:latest ${DOCKER_ORGANIZATION:-$DOCKER_USER}/scope-iowait:latest &&
docker tag weaveworksplugins/scope-iowait:$(./tools/image-tag) ${DOCKER_ORGANIZATION:-$DOCKER_USER}/scope-iowait:$(./tools/image-tag)
)) &&
docker push ${DOCKER_ORGANIZATION:-$DOCKER_USER}/scope-iowait &&
docker push ${DOCKER_ORGANIZATION:-$DOCKER_USER}/scope-iowait:$(./tools/image-tag)
)
hub-dev:
branch: /^((?!master).)*$/ # not the master branch
commands:
- >
test -z "${DEPLOY_BRANCH}" || test -z "${DOCKER_USER}" || (
docker login -e $DOCKER_EMAIL -u $DOCKER_USER -p $DOCKER_PASS &&
docker tag weaveworksplugins/scope-iowait:latest ${DOCKER_ORGANIZATION:-$DOCKER_USER}/scope-iowait:${CIRCLE_BRANCH//\//-} &&
docker push ${DOCKER_ORGANIZATION:-$DOCKER_USER}/scope-iowait:${CIRCLE_BRANCH//\//-}
)