|
1 | | -version: 2 |
2 | | - |
3 | | -npmrc-git: &npmrc-git |
4 | | - run: echo "//npm.pkg.github.com/:_authToken=${GITHUB_TOKEN}" > ~/.npmrc |
5 | | - |
6 | | -restore-cache: &restore-cache |
7 | | - restore_cache: |
8 | | - keys: |
9 | | - - v1-{{ checksum "yarn.lock" }} |
10 | | - |
11 | | -save-cache: &save-cache |
12 | | - save_cache: |
13 | | - key: v1-{{ checksum "yarn.lock" }} |
14 | | - paths: |
15 | | - - ~/.cache |
16 | | - |
17 | | -jobs: |
18 | | - test: |
19 | | - docker: |
20 | | - - image: circleci/node:12 |
21 | | - - image: confluentinc/cp-zookeeper:5.0.1 |
22 | | - environment: |
23 | | - ZOOKEEPER_CLIENT_PORT: 2181 |
24 | | - ZOOKEEPER_TICK_TIME: 2000 |
25 | | - - image: confluentinc/cp-kafka:5.0.1 |
26 | | - environment: |
27 | | - KAFKA_OFFSETS_TOPIC_REPLICATION_FACTOR: 1 |
28 | | - KAFKA_ZOOKEEPER_CONNECT: 'localhost:2181' |
29 | | - KAFKA_LISTENER_SECURITY_PROTOCOL_MAP: PLAINTEXT:PLAINTEXT,PLAINTEXT_HOST:PLAINTEXT |
30 | | - KAFKA_ADVERTISED_LISTENERS: PLAINTEXT://localhost:9092,PLAINTEXT_HOST://localhost:29092 |
31 | | - - image: confluentinc/cp-schema-registry:5.0.1 |
32 | | - environment: |
33 | | - SCHEMA_REGISTRY_HOST_NAME: localhost |
34 | | - SCHEMA_REGISTRY_KAFKASTORE_CONNECTION_URL: 'localhost:2181' |
35 | | - - image: circleci/postgres:10-alpine |
36 | | - environment: |
37 | | - POSTGRES_PASSWORD: dev-pass |
38 | | - steps: |
39 | | - - checkout |
40 | | - - *restore-cache |
41 | | - - run: yarn config set yarn-offline-mirror ~/.cache/yarn |
42 | | - - run: yarn |
43 | | - - *save-cache |
44 | | - - run: yarn build |
45 | | - - run: .circleci/wait-for-server.sh |
46 | | - - run: yarn test |
47 | | - |
48 | | - publish: |
49 | | - docker: |
50 | | - - image: circleci/node:12 |
51 | | - steps: |
52 | | - - checkout |
53 | | - - *restore-cache |
54 | | - - *npmrc-git |
55 | | - - run: yarn config set yarn-offline-mirror ~/.cache/yarn |
56 | | - - run: yarn --frozen-lockfile |
57 | | - - run: yarn build |
58 | | - - run: git config user.email "ovotech-ci@ovoenergy.com" |
59 | | - - run: git config user.name "Ovotech CI" |
60 | | - - run: yarn lerna publish from-package --yes --registry https://npm.pkg.github.com |
61 | | - |
62 | | -workflows: |
63 | | - version: 2 |
64 | | - test: |
65 | | - jobs: |
66 | | - - test: |
67 | | - context: boost-btt |
68 | | - filters: |
69 | | - branches: |
70 | | - ignore: master |
71 | | - deploy: |
72 | | - jobs: |
73 | | - - test: |
74 | | - context: boost-btt |
75 | | - filters: |
76 | | - branches: |
77 | | - only: master |
78 | | - - publish: |
79 | | - context: boost-btt |
80 | | - requires: |
81 | | - - test |
| 1 | +# version: 2 |
| 2 | +# |
| 3 | +# npmrc-git: &npmrc-git |
| 4 | +# run: echo "//npm.pkg.github.com/:_authToken=${GITHUB_TOKEN}" > ~/.npmrc |
| 5 | +# |
| 6 | +# restore-cache: &restore-cache |
| 7 | +# restore_cache: |
| 8 | +# keys: |
| 9 | +# - v1-{{ checksum "yarn.lock" }} |
| 10 | +# |
| 11 | +# save-cache: &save-cache |
| 12 | +# save_cache: |
| 13 | +# key: v1-{{ checksum "yarn.lock" }} |
| 14 | +# paths: |
| 15 | +# - ~/.cache |
| 16 | +# |
| 17 | +# jobs: |
| 18 | +# test: |
| 19 | +# docker: |
| 20 | +# - image: circleci/node:12 |
| 21 | +# - image: confluentinc/cp-zookeeper:5.0.1 |
| 22 | +# environment: |
| 23 | +# ZOOKEEPER_CLIENT_PORT: 2181 |
| 24 | +# ZOOKEEPER_TICK_TIME: 2000 |
| 25 | +# - image: confluentinc/cp-kafka:5.0.1 |
| 26 | +# environment: |
| 27 | +# KAFKA_OFFSETS_TOPIC_REPLICATION_FACTOR: 1 |
| 28 | +# KAFKA_ZOOKEEPER_CONNECT: 'localhost:2181' |
| 29 | +# KAFKA_LISTENER_SECURITY_PROTOCOL_MAP: PLAINTEXT:PLAINTEXT,PLAINTEXT_HOST:PLAINTEXT |
| 30 | +# KAFKA_ADVERTISED_LISTENERS: PLAINTEXT://localhost:9092,PLAINTEXT_HOST://localhost:29092 |
| 31 | +# - image: confluentinc/cp-schema-registry:5.0.1 |
| 32 | +# environment: |
| 33 | +# SCHEMA_REGISTRY_HOST_NAME: localhost |
| 34 | +# SCHEMA_REGISTRY_KAFKASTORE_CONNECTION_URL: 'localhost:2181' |
| 35 | +# - image: circleci/postgres:10-alpine |
| 36 | +# environment: |
| 37 | +# POSTGRES_PASSWORD: dev-pass |
| 38 | +# steps: |
| 39 | +# - checkout |
| 40 | +# - *restore-cache |
| 41 | +# - run: yarn config set yarn-offline-mirror ~/.cache/yarn |
| 42 | +# - run: yarn |
| 43 | +# - *save-cache |
| 44 | +# - run: yarn build |
| 45 | +# - run: .circleci/wait-for-server.sh |
| 46 | +# - run: yarn test |
| 47 | +# |
| 48 | +# publish: |
| 49 | +# docker: |
| 50 | +# - image: circleci/node:12 |
| 51 | +# steps: |
| 52 | +# - checkout |
| 53 | +# - *restore-cache |
| 54 | +# - *npmrc-git |
| 55 | +# - run: yarn config set yarn-offline-mirror ~/.cache/yarn |
| 56 | +# - run: yarn --frozen-lockfile |
| 57 | +# - run: yarn build |
| 58 | +# - run: git config user.email "ovotech-ci@ovoenergy.com" |
| 59 | +# - run: git config user.name "Ovotech CI" |
| 60 | +# - run: yarn lerna publish from-package --yes --registry https://npm.pkg.github.com |
| 61 | +# |
| 62 | +# workflows: |
| 63 | +# version: 2 |
| 64 | +# test: |
| 65 | +# jobs: |
| 66 | +# - test: |
| 67 | +# context: boost-btt |
| 68 | +# filters: |
| 69 | +# branches: |
| 70 | +# ignore: master |
| 71 | +# deploy: |
| 72 | +# jobs: |
| 73 | +# - test: |
| 74 | +# context: boost-btt |
| 75 | +# filters: |
| 76 | +# branches: |
| 77 | +# only: master |
| 78 | +# - publish: |
| 79 | +# context: boost-btt |
| 80 | +# requires: |
| 81 | +# - test |
0 commit comments