This repository has been archived by the owner on May 22, 2021. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 1.6k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
74b9e36
commit ec2dc92
Showing
2 changed files
with
80 additions
and
28 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,28 +1,79 @@ | ||
machine: | ||
node: | ||
version: 8 | ||
services: | ||
- docker | ||
- redis | ||
|
||
deployment: | ||
latest: | ||
branch: master | ||
commands: | ||
- docker login -e $DOCKER_EMAIL -u $DOCKER_USER -p $DOCKER_PASS | ||
- docker build -t mozilla/send:latest . | ||
- docker push mozilla/send:latest | ||
tags: | ||
tag: /.*/ | ||
owner: mozilla | ||
commands: | ||
- docker login -e $DOCKER_EMAIL -u $DOCKER_USER -p $DOCKER_PASS | ||
- docker build -t mozilla/send:$CIRCLE_TAG . | ||
- docker push mozilla/send:$CIRCLE_TAG | ||
|
||
test: | ||
override: | ||
- npm run build | ||
- npm run lint | ||
- npm test | ||
- nsp check | ||
version: 2.0 | ||
jobs: | ||
build: | ||
docker: | ||
- image: circleci/node:8 | ||
steps: | ||
- checkout | ||
- restore_cache: | ||
key: send-{{ checksum "package-lock.json" }} | ||
- run: npm install | ||
- save_cache: | ||
key: send-{{ checksum "package-lock.json" }} | ||
paths: | ||
- node_modules | ||
- run: npm run build | ||
- persist_to_workspace: | ||
root: . | ||
paths: | ||
- ./* | ||
test: | ||
docker: | ||
- image: circleci/node:8-browsers | ||
steps: | ||
- checkout | ||
- restore_cache: | ||
key: send-{{ checksum "package-lock.json" }} | ||
- run: npm install | ||
- save_cache: | ||
key: send-{{ checksum "package-lock.json" }} | ||
paths: | ||
- node_modules | ||
- run: npm run check | ||
- run: npm run lint | ||
- run: npm test | ||
deploy_dev: | ||
machine: true | ||
steps: | ||
- attach_workspace: | ||
at: . | ||
- run: docker login -e $DOCKER_EMAIL -u $DOCKER_USER -p $DOCKER_PASS | ||
- run: docker build -t mozilla/send:latest . | ||
- run: docker push mozilla/send:latest | ||
deploy_stage: | ||
machine: true | ||
steps: | ||
- attach_workspace: | ||
at: . | ||
- run: docker login -e $DOCKER_EMAIL -u $DOCKER_USER -p $DOCKER_PASS | ||
- run: docker build -t mozilla/send:$CIRCLE_TAG . | ||
- run: docker push mozilla/send:$CIRCLE_TAG | ||
workflows: | ||
version: 2 | ||
build_and_deploy_dev: | ||
jobs: | ||
- build: | ||
filters: | ||
tags: | ||
only: /.*/ | ||
- test: | ||
filters: | ||
tags: | ||
only: /.*/ | ||
- deploy_latest: | ||
requires: | ||
- build | ||
filters: | ||
branches: | ||
only: master | ||
tags: | ||
ignore: /^v.*/ | ||
- deploy_stage: | ||
requires: | ||
- build | ||
- test | ||
filters: | ||
branches: | ||
only: master | ||
tags: | ||
only: /^v.*/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters