Skip to content

The open alternative to Salesforce, designed for AI.

Initiate circle-ci config

Charles Bochetbc6764b3b915
diff --git a/.circleci/config.yml b/.circleci/config.yml
new file mode 100644
index 00000000000..57d1d009151
--- /dev/null
+++ b/.circleci/config.yml
@@ -0,0 +1,67 @@
+version: 2.1
+
+orbs:
+ aws-ecr: circleci/[email protected]
+ aws-ecs: circleci/[email protected]
+ slack: circleci/[email protected]
+ node: circleci/[email protected]
+
+jobs:
+ tests:
+ executor: node/default
+ steps:
+ - checkout
+ - run:
+ command: cd front && npm install
+ name: install node dependencies
+ - run:
+ command: cd front && npm run test
+ name: tests
+
+workflows:
+ build-and-deploy:
+ jobs:
+ - tests
+ - aws-ecr/build-and-push-image:
+ filters:
+ branches:
+ only: main
+ requires:
+ - tests
+ dockerfile: Dockerfile
+ registry-id: AWS_ACCOUNT_ID
+ aws-access-key-id: AWS_ACCESS_KEY_ID
+ aws-secret-access-key: AWS_SECRET_ACCESS_KEY
+ region: $AWS_REGION
+ repo: $AWS_ECR_REPO
+ tag: $CIRCLE_SHA1
+ - aws-ecs/deploy-service-update:
+ name: deploy-canary
+ requires:
+ - aws-ecr/build-and-push-image
+ family: $AWS_ECS_CONTAINER_NAME_CANARY
+ cluster: $AWS_ECS_CLUSTER
+ container-image-name-updates: "container=$AWS_ECS_CONTAINER_NAME_CANARY,tag=${CIRCLE_SHA1}"
+ - slack/on-hold:
+ name: slack-notification
+ context: slack-secrets
+ requires:
+ - deploy-canary
+ - hold:
+ type: approval
+ requires:
+ - slack-notification
+ - aws-ecs/deploy-service-update:
+ name: deploy-prod
+ requires:
+ - hold
+ family: $AWS_ECS_CONTAINER_NAME_DEFAULT
+ cluster: $AWS_ECS_CLUSTER
+ container-image-name-updates: "container=$AWS_ECS_CONTAINER_NAME_DEFAULT,tag=${CIRCLE_SHA1}"
+ post-steps:
+ - slack/notify:
+ event: pass
+ template: basic_success_1
+ - slack/notify:
+ event: fail
+ template: basic_fail_1
\ No newline at end of file
diff --git a/front/package.json b/front/package.json
index d5638cece75..896ae6d1916 100644
--- a/front/package.json
+++ b/front/package.json
@@ -25,7 +25,7 @@
"eject": "react-scripts eject",
"storybook": "start-storybook -p 6006 -s public",
"build-storybook": "build-storybook -s public",
- "coverage": "react-scripts test --coverage"
+ "coverage": "react-scripts test --coverage --watchAll"
},
"eslintConfig": {
"extends": [