Browse Source

final step

main
Morgan 6 years ago
parent
commit
9a9d64f191
  1. 43
      .circleci/config.yml
  2. 12
      Dockerfile

43
.circleci/config.yml

@ -1,5 +1,6 @@
version: 2.1 version: 2.1
# global cache commands to avoid repetitions
commands: commands:
restore_cache_cmd: restore_cache_cmd:
steps: steps:
@ -13,7 +14,7 @@ commands:
key: yarn-v3-packages-{{ checksum "yarn.lock" }} key: yarn-v3-packages-{{ checksum "yarn.lock" }}
jobs: jobs:
build1:
build:
docker: docker:
- image: "circleci/node:12" - image: "circleci/node:12"
@ -25,7 +26,7 @@ jobs:
name: "installation" name: "installation"
- save_cache_cmd - save_cache_cmd
lint1:
lint:
docker: docker:
- image: "circleci/node:12" - image: "circleci/node:12"
@ -37,7 +38,7 @@ jobs:
name: "lint and format check" name: "lint and format check"
- save_cache_cmd - save_cache_cmd
unit1:
unit-tests:
docker: docker:
- image: "circleci/node:12" - image: "circleci/node:12"
@ -49,7 +50,8 @@ jobs:
name: "test unitaires" name: "test unitaires"
- save_cache_cmd - save_cache_cmd
database1:
database:
docker: docker:
- image: "circleci/node:12" - image: "circleci/node:12"
environment: environment:
@ -73,21 +75,34 @@ jobs:
name: "test end 2 end db postgres" name: "test end 2 end db postgres"
- save_cache_cmd - save_cache_cmd
documentation:
docker:
- image: "circleci/node:12"
steps:
- checkout
- restore_cache_cmd
- run:
command: yarn doc:build
name: creation de la doc
- store_artifacts:
path: ./doc-server
- save_cache_cmd
workflows: workflows:
version: 2 version: 2
test_workflow: test_workflow:
jobs: jobs:
- build1
- lint1:
- build
- lint:
requires: requires:
- build1
- unit1:
- build
- unit-tests:
requires: requires:
- build1
- database1:
- build
- database:
requires:
- build
- documentation
requires: requires:
- build1
- lint1
- unit1
- build

12
Dockerfile

@ -0,0 +1,12 @@
# dockerhub : morganlmd/my-awesome-ci-expr:latest
FROM node:12
WORKDIR /usr/src/app
COPY . .
RUN yarn global add node-gyp && yarn install
EXPOSE 3000
CMD ["yarn", "start"]
Loading…
Cancel
Save