Browse Source

add buil docker file

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

24
.circleci/config.yml

@ -66,11 +66,31 @@ jobs:
- save_cache:
key: yarn-cache{{ checksum "yarn.lock" }}
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:
build:
jobs:
- "build"
- "test"
- "lint"
- "test-e2e"
- "test-e2e"
- "build_docker_file"

7
package.json

@ -22,7 +22,12 @@
"test:e2e": "jest --config ./test/jest-e2e.json",
"format": "prettier --write \"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": {
"@hapi/joi": "^16.1.5",

Loading…
Cancel
Save