Skip to content

add test and push imagen into docker hub #3

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 3 commits into
base: master
Choose a base branch
from
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"
}