config.yml 2.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899
  1. version: 2.0
  2. jobs:
  3. test:
  4. docker:
  5. - image: circleci/node:12-browsers
  6. steps:
  7. - checkout
  8. - run: npm ci
  9. - run: npm run lint
  10. - run: npm test
  11. - store_artifacts:
  12. path: coverage
  13. integration_tests:
  14. docker:
  15. - image: circleci/node:12-browsers
  16. steps:
  17. - checkout
  18. - run: npm ci
  19. - run:
  20. name: Run integration test
  21. command: ./scripts/bin/run-integration-test-circleci.sh
  22. deploy_dev:
  23. docker:
  24. - image: circleci/node:12
  25. steps:
  26. - checkout
  27. - setup_remote_docker
  28. - run: docker login -u $DOCKER_USER -p $DOCKER_PASS
  29. - run: docker build -t mozilla/send:latest .
  30. - run: docker push mozilla/send:latest
  31. deploy_vnext:
  32. docker:
  33. - image: circleci/node:12
  34. steps:
  35. - checkout
  36. - setup_remote_docker
  37. - run: docker login -u $DOCKER_USER -p $DOCKER_PASS
  38. - run: docker build -t mozilla/send:vnext .
  39. - run: docker push mozilla/send:vnext
  40. deploy_stage:
  41. docker:
  42. - image: circleci/node:12
  43. steps:
  44. - checkout
  45. - setup_remote_docker
  46. - run: docker login -u $DOCKER_USER -p $DOCKER_PASS
  47. - run: docker build -t mozilla/send:$CIRCLE_TAG .
  48. - run: docker push mozilla/send:$CIRCLE_TAG
  49. workflows:
  50. version: 2
  51. test_pr:
  52. jobs:
  53. - test:
  54. filters:
  55. branches:
  56. ignore:
  57. - master
  58. - vnext
  59. - integration_tests:
  60. filters:
  61. branches:
  62. ignore: master
  63. build_and_deploy_dev:
  64. jobs:
  65. - deploy_dev:
  66. filters:
  67. branches:
  68. only: master
  69. tags:
  70. ignore: /^v.*/
  71. - deploy_vnext:
  72. filters:
  73. branches:
  74. only: vnext
  75. tags:
  76. ignore: /^v.*/
  77. build_and_deploy_stage:
  78. jobs:
  79. - test:
  80. filters:
  81. branches:
  82. ignore: /.*/
  83. tags:
  84. only: /^v.*/
  85. - integration_tests:
  86. filters:
  87. branches:
  88. ignore: /.*/
  89. tags:
  90. only: /^v.*/
  91. - deploy_stage:
  92. requires:
  93. - test
  94. - integration_tests
  95. filters:
  96. branches:
  97. ignore: /.*/
  98. tags:
  99. only: /^v.*/