Browse Source

👽 fix bug

main
Martin 4 years ago
parent
commit
771c4f8ed4
  1. 29
      .circleci/config.yml

29
.circleci/config.yml

@ -45,6 +45,29 @@ jobs:
- dependencies- - dependencies-
- run: yarn build - run: yarn build
docker-build-and-push:
working_directory: /dockerapp
docker:
- image: docker:17.05.0-ce-git
steps:
- checkout
- setup_remote_docker:
version: 19.03.13
- run:
name: Build application Docker image
command: |
docker build --cache-from=app -t app .
- deploy:
name: Publish application to docker hub
command: |
docker login -e $DOCKER_HUB_EMAIL -u $DOCKER_HUB_USER_ID -p $DOCKER_HUB_PWD
docker tag app $DOCKER_HUB_USER_ID/$DOCKER_HUB_NAME:$CIRCLE_BUILD_NUM
docker tag app $DOCKER_HUB_USER_ID/$DOCKER_HUB_NAME:latest
docker push $DOCKER_HUB_USER_ID/$DOCKER_HUB_NAME:$CIRCLE_BUILD_NUM
docker push $DOCKER_HUB_USER_ID/$DOCKER_HUB_NAME:latest
# Invoke jobs via workflows # Invoke jobs via workflows
# See: https://circleci.com/docs/2.0/configuration-reference/#workflows # See: https://circleci.com/docs/2.0/configuration-reference/#workflows
workflows: workflows:
@ -58,3 +81,9 @@ workflows:
- build: - build:
requires: requires:
- unit-tests - unit-tests
- docker-build-and-push:
requires:
- build
filters:
branches:
only: main
Loading…
Cancel
Save