2018-02-25 23:44:46 +00:00
|
|
|
version: 2.0
|
|
|
|
jobs:
|
|
|
|
test:
|
|
|
|
docker:
|
2018-08-02 19:24:36 +00:00
|
|
|
- image: circleci/node:10-browsers
|
2018-02-25 23:44:46 +00:00
|
|
|
steps:
|
|
|
|
- checkout
|
2019-11-06 04:53:59 +00:00
|
|
|
- run: npm ci
|
2018-02-25 23:44:46 +00:00
|
|
|
- run: npm run lint
|
2019-11-06 04:53:59 +00:00
|
|
|
- run: npm test
|
2018-02-26 18:09:28 +00:00
|
|
|
- store_artifacts:
|
|
|
|
path: coverage
|
2018-04-24 15:00:19 +00:00
|
|
|
integration_tests:
|
2018-10-04 00:39:39 +00:00
|
|
|
docker:
|
2019-03-13 00:47:54 +00:00
|
|
|
- image: circleci/node:10-browsers
|
2018-04-24 15:00:19 +00:00
|
|
|
steps:
|
|
|
|
- checkout
|
2019-11-06 04:53:59 +00:00
|
|
|
- run: npm ci
|
|
|
|
- run:
|
2019-03-13 00:47:54 +00:00
|
|
|
name: Run integration test
|
|
|
|
command: ./scripts/bin/run-integration-test-circleci.sh
|
2018-02-25 23:44:46 +00:00
|
|
|
deploy_dev:
|
2019-11-06 04:53:59 +00:00
|
|
|
docker:
|
|
|
|
- image: circleci/node:10
|
2018-02-25 23:44:46 +00:00
|
|
|
steps:
|
2018-05-03 22:00:34 +00:00
|
|
|
- checkout
|
2019-11-06 04:53:59 +00:00
|
|
|
- setup_remote_docker
|
2018-02-26 01:06:28 +00:00
|
|
|
- run: docker login -u $DOCKER_USER -p $DOCKER_PASS
|
2018-02-25 23:44:46 +00:00
|
|
|
- run: docker build -t mozilla/send:latest .
|
|
|
|
- run: docker push mozilla/send:latest
|
2018-09-18 18:23:04 +00:00
|
|
|
deploy_vnext:
|
2019-11-06 04:53:59 +00:00
|
|
|
docker:
|
|
|
|
- image: circleci/node:10
|
2018-09-18 18:23:04 +00:00
|
|
|
steps:
|
|
|
|
- checkout
|
2019-11-06 04:53:59 +00:00
|
|
|
- setup_remote_docker
|
2018-09-18 18:23:04 +00:00
|
|
|
- run: docker login -u $DOCKER_USER -p $DOCKER_PASS
|
|
|
|
- run: docker build -t mozilla/send:vnext .
|
|
|
|
- run: docker push mozilla/send:vnext
|
2018-02-25 23:44:46 +00:00
|
|
|
deploy_stage:
|
2019-11-06 04:53:59 +00:00
|
|
|
docker:
|
|
|
|
- image: circleci/node:10
|
2018-02-25 23:44:46 +00:00
|
|
|
steps:
|
2018-05-03 22:00:34 +00:00
|
|
|
- checkout
|
2019-11-06 04:53:59 +00:00
|
|
|
- setup_remote_docker
|
2018-02-26 01:06:28 +00:00
|
|
|
- run: docker login -u $DOCKER_USER -p $DOCKER_PASS
|
2018-02-25 23:44:46 +00:00
|
|
|
- run: docker build -t mozilla/send:$CIRCLE_TAG .
|
|
|
|
- run: docker push mozilla/send:$CIRCLE_TAG
|
|
|
|
workflows:
|
|
|
|
version: 2
|
|
|
|
test_pr:
|
|
|
|
jobs:
|
|
|
|
- test:
|
|
|
|
filters:
|
|
|
|
branches:
|
2018-09-18 18:23:04 +00:00
|
|
|
ignore:
|
|
|
|
- master
|
|
|
|
- vnext
|
2018-10-04 00:39:39 +00:00
|
|
|
- integration_tests:
|
|
|
|
filters:
|
|
|
|
branches:
|
|
|
|
ignore: master
|
2018-02-25 23:44:46 +00:00
|
|
|
build_and_deploy_dev:
|
|
|
|
jobs:
|
2018-02-26 01:06:28 +00:00
|
|
|
- deploy_dev:
|
2018-02-25 23:44:46 +00:00
|
|
|
filters:
|
|
|
|
branches:
|
|
|
|
only: master
|
|
|
|
tags:
|
|
|
|
ignore: /^v.*/
|
2018-09-18 18:23:04 +00:00
|
|
|
- deploy_vnext:
|
|
|
|
filters:
|
|
|
|
branches:
|
|
|
|
only: vnext
|
|
|
|
tags:
|
|
|
|
ignore: /^v.*/
|
2018-02-25 23:44:46 +00:00
|
|
|
build_and_deploy_stage:
|
|
|
|
jobs:
|
|
|
|
- test:
|
|
|
|
filters:
|
2018-02-26 01:14:37 +00:00
|
|
|
branches:
|
|
|
|
ignore: /.*/
|
2018-02-25 23:44:46 +00:00
|
|
|
tags:
|
|
|
|
only: /^v.*/
|
2018-05-04 06:47:44 +00:00
|
|
|
- integration_tests:
|
|
|
|
filters:
|
|
|
|
branches:
|
|
|
|
ignore: /.*/
|
|
|
|
tags:
|
|
|
|
only: /^v.*/
|
2018-02-25 23:44:46 +00:00
|
|
|
- deploy_stage:
|
|
|
|
- test
|
2018-05-04 06:47:44 +00:00
|
|
|
- integration_tests
|
2018-02-25 23:44:46 +00:00
|
|
|
filters:
|
2018-02-26 01:14:37 +00:00
|
|
|
branches:
|
|
|
|
ignore: /.*/
|
2018-02-25 23:44:46 +00:00
|
|
|
tags:
|
2018-04-24 15:00:19 +00:00
|
|
|
only: /^v.*/
|