Browse Source

add buil docker file

main
hallouma875 6 years ago
parent
commit
c9158318b5
  1. 20
      .circleci/config.yml
  2. 7
      package.json

20
.circleci/config.yml

@ -67,6 +67,25 @@ jobs:
key: yarn-cache{{ checksum "yarn.lock" }} key: yarn-cache{{ checksum "yarn.lock" }}
paths: paths:
- ./node_modules - ./node_modules
build_docker_file :
docker:
- image: "circleci/node:12"
steps:
- checkout
- restore_cache:
key: yarn-cache{{ checksum "yarn.lock" }}
- run: yarn install
- setup_remote_docker:
docker_layer_caching: true
- run:
name: Install Docker client
command: |
set -x
VER="18.06.3-ce"
curl -L -o /tmp/docker-$VER.tgz https://download.docker.com/linux/static/stable/x86_64/docker-$VER.tgz
tar -xz -C /tmp -f /tmp/docker-$VER.tgz
mv /tmp/docker/* /usr/bin
- run: yarn ci:docker
workflows: workflows:
build: build:
jobs: jobs:
@ -74,3 +93,4 @@ workflows:
- "test" - "test"
- "lint" - "lint"
- "test-e2e" - "test-e2e"
- "build_docker_file"

7
package.json

@ -22,7 +22,12 @@
"test:e2e": "jest --config ./test/jest-e2e.json", "test:e2e": "jest --config ./test/jest-e2e.json",
"format": "prettier --write \"src/**/*.ts\" \"test/**/*.ts\"", "format": "prettier --write \"src/**/*.ts\" \"test/**/*.ts\"",
"format:check": "prettier --list-different \"src/**/*.ts\" \"test/**/*.ts\"", "format:check": "prettier --list-different \"src/**/*.ts\" \"test/**/*.ts\"",
"generate": "hygen"
"generate": "hygen",
"docker:build": "docker build -t ahlemfahem1/projectci:latest .",
"docker:login": "docker login -u $DOCKERHUB_USERNAME -p $DOCKERHUB_PASSWORD",
"docker:push": "docker push ahlemfahem1/projectci:latest",
"ci:docker": "npm run docker:build && npm run docker:login && npm run docker:push"
}, },
"dependencies": { "dependencies": {
"@hapi/joi": "^16.1.5", "@hapi/joi": "^16.1.5",

Loading…
Cancel
Save