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
27 changes: 27 additions & 0 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,10 @@ executors:
docker:
- image: shotayamazaki/cci-docker-primary:latest

docker_image_build_executor:
docker:
- image: docker:stable-git

jobs:
test:
executor: elaborate-base
Expand Down Expand Up @@ -69,6 +73,23 @@ jobs:
name: deploy master to firebase hosting
command: node_modules/.bin/firebase deploy --token=$FIREBASE_TOKEN

docker_image_build:
executor: docker_image_build_executor
steps:
- checkout
- setup_remote_docker:
docker_layer_caching: true
version: '18.09.3'
- run:
name: docker login
command: docker login -u $DOCKERHUB_USER -p $DOCKERHUB_PASSWORD
- run:
name: docker image build
command: docker-compose build
- run:
name: docker image push
command: docker push shotayamazaki/cci-docker-primary:latest

workflows:
version: 2
test_deploy:
Expand All @@ -80,3 +101,9 @@ workflows:
filters:
branches:
only: master
- docker_image_build:
requires:
- test
filters:
branches:
only: master
2 changes: 1 addition & 1 deletion docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ version: '3'
services:
elaborate:
build: ./ # Dockerfileがあるディレクトリのパス
image: elaborate/webpack # イメージを指定(IMAGEタグはコンテナ作成後docker ps -aで得られる)
image: elaborate/webpack
container_name: elaborate
ports:
- "0.0.0.0:8080:8080" # "ホストのポート:コンテナのポート"
Expand Down