Skip to content

Commit

Permalink
ci(circle): authenticate Docker image pull [ch2767]
Browse files Browse the repository at this point in the history
  • Loading branch information
exactlyaron committed Oct 23, 2020
1 parent 37fbdff commit 5532a93
Showing 1 changed file with 32 additions and 12 deletions.
44 changes: 32 additions & 12 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,16 @@ jobs:
unit test:
docker:
- image: cimg/node:lts
auth:
username: $DOCKERHUB_USERNAME
password: $DOCKERHUB_PASSWORD
environment:
TZ: "Europe/London"
PG_CONNECTION_STRING: postgres://postgres:postgres@localhost:5432/circle_test
- image: circleci/postgres:9.6-alpine-postgis-ram
auth:
username: $DOCKERHUB_USERNAME
password: $DOCKERHUB_PASSWORD
environment:
POSTGRES_USER: postgres
POSTGRES_DB: circle_test
Expand All @@ -26,13 +32,18 @@ jobs:
- node_modules
- run:
name: test
command: npm test
command: |
TEST=$(circleci tests glob "./test/*.js" | circleci tests split)
npm test $TEST
- run:
name: codecov
command: npm run coverage
lint:
docker:
- image: cimg/node:lts
auth:
username: $DOCKERHUB_USERNAME
password: $DOCKERHUB_PASSWORD
working_directory: ~/repo
steps:
- checkout
Expand All @@ -45,6 +56,9 @@ jobs:
release:
docker:
- image: cimg/node:lts
auth:
username: $DOCKERHUB_USERNAME
password: $DOCKERHUB_PASSWORD
environment:
TZ: "Europe/London"
working_directory: ~/repo
Expand All @@ -70,14 +84,20 @@ workflows:
version: 2
test_and_release:
jobs:
- unit test:
context: tymly_global
- lint
- release:
context: tymly_global
requires:
- unit test
- lint
filters:
branches:
only: master
- unit test:
context:
- docker-hub-creds
- tymly_global
- lint:
context:
- docker-hub-creds
- release:
context:
- docker-hub-creds
- tymly_global
requires:
- unit test
- lint
filters:
branches:
only: master

0 comments on commit 5532a93

Please sign in to comment.