Skip to content

Commit

Permalink
Build, tag and push images via CI
Browse files Browse the repository at this point in the history
[refs #a604d5dbc223]
  • Loading branch information
jfahrer committed Mar 11, 2018
1 parent e70e6d7 commit 2653f9f
Show file tree
Hide file tree
Showing 2 changed files with 38 additions and 0 deletions.
11 changes: 11 additions & 0 deletions .circleci/config.yml
Expand Up @@ -21,5 +21,16 @@ jobs:
- run:
name: Running the test suite
command: ./scripts/run-specs.sh
- run:
name: Signing in to Docker Hub
command: docker login -u $DOCKER_USER -p $DOCKER_PASS
- run:
name: Building and pushing images
command: |
set -e
export COMPOSE_FILE=docker-compose.build.yml
export GIT_SHA=`git rev-parse HEAD`
docker-compose build --pull
docker-compose push
- store_artifacts:
path: /tmp/artifacts
27 changes: 27 additions & 0 deletions docker-compose.build.yml
@@ -0,0 +1,27 @@
version: '3.3'

services:
current:
image: jfahrer/demo_web_app:${GIT_SHA}
build:
context: .
args:
PREPARE_DATABASE: "true"
WAIT_FOR_POSTGRES: "false"

latest:
image: jfahrer/demo_web_app:latest
build:
context: .
args:
PREPARE_DATABASE: "true"
WAIT_FOR_POSTGRES: "false"

wait_for_pg:
image: jfahrer/demo_web_app:wait_for_pg
build:
context: .
args:
PREPARE_DATABASE: "true"
WAIT_FOR_POSTGRES: "true"

0 comments on commit 2653f9f

Please sign in to comment.