Skip to content

Commit

Permalink
fix: update docker-compose on release
Browse files Browse the repository at this point in the history
Signed-off-by: Akarshit Wal <[email protected]>
  • Loading branch information
Akarshit committed Jun 10, 2021
1 parent 1ea0487 commit 2e88105
Show file tree
Hide file tree
Showing 4 changed files with 36,266 additions and 8,673 deletions.
32 changes: 28 additions & 4 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ version: 2
# typing. See http://yaml.org/type/merge.html for details.
defaults: &defaults
environment:
CI_SCRIPTS: 'npx --quiet --package @reactioncommerce/[email protected]'
CI_SCRIPTS: "npx --quiet --package @reactioncommerce/[email protected]"
DOCKER_REPOSITORY: "reactioncommerce/reaction"
DOCKER_NAMESPACE: "reactioncommerce"
DOCKER_NAME: "reaction"
Expand Down Expand Up @@ -111,6 +111,18 @@ jobs:
MONGO_USE_UNIFIED_TOPOLOGY: false
command: npm run test:integration:mutation

release:
<<: *defaults
steps:
- checkout
- restore_cache:
keys:
- reaction-v5-node-modules-{{ checksum "package.json" }}-{{ checksum "package-lock.json" }}
- reaction-v5-node-modules-{{ .Branch }}
- run:
name: Push the latest version to npm
command: |
npx semantic-release
docker-build-push:
<<: *defaults
Expand All @@ -120,7 +132,11 @@ jobs:
docker_layer_caching: true
- run:
name: Build and push production Docker image
command: ${CI_SCRIPTS} docker-build-tag-push . ${DOCKER_REPOSITORY}
command: |
VERSION=$(git describe --abbrev=0 --tags)-test
docker build -t ${DOCKER_REPOSITORY}:${VERSION} .
docker login -u ${DOCKER_USER} -p ${DOCKER_PASS}
docker push ${DOCKER_REPOSITORY}:${VERSION}
workflows:
version: 2
Expand All @@ -142,11 +158,19 @@ workflows:
- test-integration-mutation:
requires:
- install-dependencies
- docker-build-push:
context: reaction-publish-docker
- release:
context: reaction-publish-semantic-release
requires:
- dockerfile-lint
- eslint
- graphql-lint
- test-integration-query
- test-integration-mutation
filters:
branches:
only:
- trunk
- docker-build-push:
context: reaction-publish-docker
requires:
- release
4 changes: 2 additions & 2 deletions docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
#
# See comment in docker-compose.dev.yml if you want to run for development.

version: '3.4'
version: "3.4"

networks:
reaction:
Expand All @@ -13,7 +13,7 @@ networks:

services:
api:
image: reactioncommerce/reaction:3.11.1
image: reactioncommerce/reaction:3.12.0
depends_on:
- mongo
env_file:
Expand Down
Loading

0 comments on commit 2e88105

Please sign in to comment.