Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
48 changes: 48 additions & 0 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
version: 2
jobs:
tensorflow-building-detection:
docker:
- image: docker:17.05.0-ce-git
steps:
- checkout
- setup_remote_docker

- restore_cache:
keys:
- v1-{{ .Branch }}
paths:
- caches/tensorflowbd.tar

- run:
name: Load docker image cache
command: |
docker load -i caches/tensorflowbd.tar || true

- run:
name: Build application docker image
command: docker build --cache-from=tensorflowbd -t tensorflow-building-detection .
no_output_timeout: 60m

- run:
name: Save docker image cache
command: |
mkdir -p caches
docker save -o caches/tensorflowbd.tar tensorflowbd

- save_cache:
key: v1-{{ .Branch }}-{{ epoch }}
paths:
- caches/tensorflowbd.tar

- deploy:
name: Push docker image
command: |
VERSION=$(grep -m1 version package.json | awk -F: '{ print $2 }' | sed 's/[", ]//g')
docker tag tensorflow-building-detection rub21/tensorflow-building-detection:${VERSION}
docker login -u $DOCKER_USER -p $DOCKER_PASS
docker push rub21/tensorflow-building-detection:${VERSION}
workflows:
version: 2
build_and_push:
jobs:
- tensorflow-building-detection
3 changes: 3 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
"version": "0.0.1"
}