From 7ad937266f16f246b044d91626303ba25197cb13 Mon Sep 17 00:00:00 2001 From: Danny Coates Date: Tue, 5 Nov 2019 20:53:59 -0800 Subject: [PATCH] trimmed circleci config --- .circleci/config.yml | 81 +++++++------------------------------------- 1 file changed, 13 insertions(+), 68 deletions(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index b7e6234f..e80d4301 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -1,36 +1,13 @@ version: 2.0 jobs: - build: - docker: - - image: circleci/node:10 - steps: - - checkout - - restore_cache: - key: send-build-{{ checksum "package-lock.json" }} - - run: npm install - - save_cache: - key: send-build-{{ checksum "package-lock.json" }} - paths: - - node_modules - - run: npm run build - - persist_to_workspace: - root: . - paths: - - ./dist test: docker: - image: circleci/node:10-browsers steps: - checkout - - restore_cache: - key: send-test-{{ checksum "package-lock.json" }} - - run: npm install - - save_cache: - key: send-test-{{ checksum "package-lock.json" }} - paths: - - node_modules + - run: npm ci - run: npm run lint - - run: npm run test + - run: npm test - store_artifacts: path: coverage integration_tests: @@ -38,40 +15,34 @@ jobs: - image: circleci/node:10-browsers steps: - checkout - - restore_cache: - key: send-int-{{ checksum "package-lock.json" }} - - run: npm install - - save_cache: - key: send-int-{{ checksum "package-lock.json" }} - paths: - - node_modules - - run: + - run: npm ci + - run: name: Run integration test command: ./scripts/bin/run-integration-test-circleci.sh deploy_dev: - machine: true + docker: + - image: circleci/node:10 steps: - checkout - - attach_workspace: - at: . + - setup_remote_docker - run: docker login -u $DOCKER_USER -p $DOCKER_PASS - run: docker build -t mozilla/send:latest . - run: docker push mozilla/send:latest deploy_vnext: - machine: true + docker: + - image: circleci/node:10 steps: - checkout - - attach_workspace: - at: . + - setup_remote_docker - run: docker login -u $DOCKER_USER -p $DOCKER_PASS - run: docker build -t mozilla/send:vnext . - run: docker push mozilla/send:vnext deploy_stage: - machine: true + docker: + - image: circleci/node:10 steps: - checkout - - attach_workspace: - at: . + - setup_remote_docker - run: docker login -u $DOCKER_USER -p $DOCKER_PASS - run: docker build -t mozilla/send:$CIRCLE_TAG . - run: docker push mozilla/send:$CIRCLE_TAG @@ -79,12 +50,6 @@ workflows: version: 2 test_pr: jobs: - - build: - filters: - branches: - ignore: - - master - - vnext - test: filters: branches: @@ -97,25 +62,13 @@ workflows: ignore: master build_and_deploy_dev: jobs: - - build: - filters: - branches: - only: - - master - - vnext - tags: - ignore: /^v.*/ - deploy_dev: - requires: - - build filters: branches: only: master tags: ignore: /^v.*/ - deploy_vnext: - requires: - - build filters: branches: only: vnext @@ -123,12 +76,6 @@ workflows: ignore: /^v.*/ build_and_deploy_stage: jobs: - - build: - filters: - branches: - ignore: /.*/ - tags: - only: /^v.*/ - test: filters: branches: @@ -142,8 +89,6 @@ workflows: tags: only: /^v.*/ - deploy_stage: - requires: - - build - test - integration_tests filters: