File tree Expand file tree Collapse file tree 3 files changed +63
-0
lines changed Expand file tree Collapse file tree 3 files changed +63
-0
lines changed Original file line number Diff line number Diff line change 1+ version : 2.1
2+ executors :
3+ docker-publisher :
4+ environment :
5+ IMAGE_NAME : tedivm/gitconsensus_service
6+ docker :
7+ - image : circleci/buildpack-deps:stretch
8+ jobs :
9+ build :
10+ executor : docker-publisher
11+ steps :
12+ - checkout
13+ - setup_remote_docker
14+ - run :
15+ name : Build Docker image
16+ command : |
17+ docker build -t $IMAGE_NAME:latest .
18+ - run :
19+ name : Archive Docker image
20+ command : docker save -o image.tar $IMAGE_NAME
21+ - persist_to_workspace :
22+ root : .
23+ paths :
24+ - ./image.tar
25+ publish-latest :
26+ executor : docker-publisher
27+ steps :
28+ - attach_workspace :
29+ at : /tmp/workspace
30+ - setup_remote_docker
31+ - run :
32+ name : Load archived Docker image
33+ command : docker load -i /tmp/workspace/image.tar
34+ - run :
35+ name : Publish Docker Image to Docker Hub
36+ command : |
37+ echo "$DOCKERHUB_PASS" | docker login -u "$DOCKERHUB_USERNAME" --password-stdin
38+ docker push $IMAGE_NAME:latest
39+ workflows :
40+ version : 2
41+ build-master :
42+ jobs :
43+ - build :
44+ filters :
45+ branches :
46+ only : master
47+ - publish-latest :
48+ requires :
49+ - build
50+ filters :
51+ branches :
52+ only : master
Original file line number Diff line number Diff line change 1+ .git
2+ venv
3+ build
4+ dist
5+ * .pem
Original file line number Diff line number Diff line change @@ -16,6 +16,12 @@ testenv: clean_testenv
1616clean_testenv :
1717 docker-compose down
1818
19+ build_image :
20+ docker build -f $(ROOT_DIR ) /dockerfile -t tedivm/gitconsensus_service:latest .
21+
22+ publish_image : build_image
23+ docker push tedivm/gitconsensus_service:latest
24+
1925dependencies :
2026 if [ ! -d $( ROOT_DIR) /venv ]; then python3 -m venv $( ROOT_DIR) /venv; fi
2127 source $(ROOT_DIR ) /venv/bin/activate; python -m pip install wheel; yes w | python -m pip install -e .
You can’t perform that action at this time.
0 commit comments