Skip to content

Commit f2eca68

Browse files
author
Seth Goings
committed
feat(.travis.yml): add travis build/deploy of container
1 parent 67566ab commit f2eca68

3 files changed

Lines changed: 19 additions & 3 deletions

File tree

.travis.yml

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
language: generic
2+
3+
services:
4+
- docker
5+
6+
script: make build
7+
8+
deploy:
9+
provider: script
10+
script: _scripts/ci/deploy.sh

Makefile

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
1-
VERSION := 0.2.0
2-
REGISTRY ?= quay.io
1+
VERSION := $(shell git describe --tags --exact-match 2>/dev/null || echo latest)
2+
REGISTRY ?= quay.io/
33
IMAGE_PREFIX ?= deis/
4-
IMAGE := ${REGISTRY}/${IMAGE_PREFIX}go-dev:${VERSION}
4+
IMAGE := ${REGISTRY}${IMAGE_PREFIX}go-dev:${VERSION}
55

66
build:
77
docker build -t ${IMAGE} rootfs

_scripts/ci/deploy.sh

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
#!/usr/bin/env bash
2+
3+
docker login -e="$DOCKER_EMAIL" -u="$DOCKER_USER" -p="$DOCKER_PASSWORD"
4+
REGISTRY="" make push
5+
docker login -e="$QUAY_EMAIL" -u="$QUAY_USERNAME" -p="$QUAY_PASSWORD" quay.io
6+
make push

0 commit comments

Comments
 (0)