From 839e110399644696e8731b9a6c6039ffc47b9499 Mon Sep 17 00:00:00 2001 From: David Herges Date: Mon, 7 Aug 2017 08:06:43 +0200 Subject: [PATCH 01/12] ci: add circle v2 config --- .circleci/config.yml | 47 ++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 47 insertions(+) create mode 100644 .circleci/config.yml diff --git a/.circleci/config.yml b/.circleci/config.yml new file mode 100644 index 0000000..c044c7a --- /dev/null +++ b/.circleci/config.yml @@ -0,0 +1,47 @@ +# Javascript Node CircleCI 2.0 configuration file +# +# Check https://circleci.com/docs/2.0/language-javascript/ for more details +# +version: 2 +jobs: + build: + docker: + - image: circleci/node:latest + working_directory: ~/repo + + steps: + - checkout + + # Download and cache dependencies + - restore_cache: + keys: + - v1-dependencies-{{ checksum "package.json" }} + # fallback to using the latest cache if no exact match is found + - v1-dependencies- + + - run: yarn install + + - save_cache: + paths: + - node_modules + key: v1-dependencies-{{ checksum "package.json" }} + + # run tests! + - run: yarn e2e + + # run deployments for git tags + - deploy: + name: Deploy Tag to npm registry + command: | + if [ "${CIRCLE_TAG}" ]; then + npm pack . + npm publish . + fi + +# trigger builds for git tags +# https://discuss.circleci.com/t/git-tag-deploys-in-2-0/9493/8 +deployment: + trigger_tag: + tag: /.*/ + commands: + - echo "make tags run in 2.0" From dd517182ab9d4b6442e8d5078279d9b831395739 Mon Sep 17 00:00:00 2001 From: David Herges Date: Mon, 7 Aug 2017 08:07:05 +0200 Subject: [PATCH 02/12] Delete config.yml --- .circle/config.yml | 47 ---------------------------------------------- 1 file changed, 47 deletions(-) delete mode 100644 .circle/config.yml diff --git a/.circle/config.yml b/.circle/config.yml deleted file mode 100644 index c044c7a..0000000 --- a/.circle/config.yml +++ /dev/null @@ -1,47 +0,0 @@ -# Javascript Node CircleCI 2.0 configuration file -# -# Check https://circleci.com/docs/2.0/language-javascript/ for more details -# -version: 2 -jobs: - build: - docker: - - image: circleci/node:latest - working_directory: ~/repo - - steps: - - checkout - - # Download and cache dependencies - - restore_cache: - keys: - - v1-dependencies-{{ checksum "package.json" }} - # fallback to using the latest cache if no exact match is found - - v1-dependencies- - - - run: yarn install - - - save_cache: - paths: - - node_modules - key: v1-dependencies-{{ checksum "package.json" }} - - # run tests! - - run: yarn e2e - - # run deployments for git tags - - deploy: - name: Deploy Tag to npm registry - command: | - if [ "${CIRCLE_TAG}" ]; then - npm pack . - npm publish . - fi - -# trigger builds for git tags -# https://discuss.circleci.com/t/git-tag-deploys-in-2-0/9493/8 -deployment: - trigger_tag: - tag: /.*/ - commands: - - echo "make tags run in 2.0" From 92dd527a65457d479a7db5881bf3d23edf699eaa Mon Sep 17 00:00:00 2001 From: David Herges Date: Mon, 7 Aug 2017 08:10:26 +0200 Subject: [PATCH 03/12] Update config.yml --- .circleci/config.yml | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/.circleci/config.yml b/.circleci/config.yml index c044c7a..1de6c54 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -12,6 +12,12 @@ jobs: steps: - checkout + - selenium + name: Install standalone selenium host + command: | + wget https://selenium-release.storage.googleapis.com/2.44/selenium-server-standalone-2.44.0.jar + java -jar selenium-server-standalone-2.44.0.jar & + # Download and cache dependencies - restore_cache: keys: From 2b19a98148762af57a95163ad447bcac6838d2ee Mon Sep 17 00:00:00 2001 From: David Herges Date: Mon, 7 Aug 2017 08:11:44 +0200 Subject: [PATCH 04/12] Update config.yml --- .circleci/config.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index 1de6c54..10893e0 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -12,7 +12,7 @@ jobs: steps: - checkout - - selenium + - selenium: name: Install standalone selenium host command: | wget https://selenium-release.storage.googleapis.com/2.44/selenium-server-standalone-2.44.0.jar From ca005861c3ead074bfb6e749e64bcef84688943e Mon Sep 17 00:00:00 2001 From: David Herges Date: Mon, 7 Aug 2017 08:14:33 +0200 Subject: [PATCH 05/12] Update config.yml --- .circleci/config.yml | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index 10893e0..2e71eed 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -12,11 +12,15 @@ jobs: steps: - checkout - - selenium: + - run: name: Install standalone selenium host command: | wget https://selenium-release.storage.googleapis.com/2.44/selenium-server-standalone-2.44.0.jar + + - run: + name: Run standalone selenium host java -jar selenium-server-standalone-2.44.0.jar & + background: true # Download and cache dependencies - restore_cache: From 4d43296e210e5d20fa390a60d0e09a5c66e1e847 Mon Sep 17 00:00:00 2001 From: David Herges Date: Mon, 7 Aug 2017 08:24:58 +0200 Subject: [PATCH 06/12] Update config.yml --- .circleci/config.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index 2e71eed..62b6a46 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -19,7 +19,8 @@ jobs: - run: name: Run standalone selenium host - java -jar selenium-server-standalone-2.44.0.jar & + command: | + java -jar selenium-server-standalone-2.44.0.jar background: true # Download and cache dependencies From d5d202a260a7e0ff92418455acc5ee3504aa8694 Mon Sep 17 00:00:00 2001 From: David Herges Date: Mon, 7 Aug 2017 08:35:32 +0200 Subject: [PATCH 07/12] Update config.yml --- .circleci/config.yml | 14 ++++++-------- 1 file changed, 6 insertions(+), 8 deletions(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index 62b6a46..ce171fe 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -13,15 +13,13 @@ jobs: - checkout - run: - name: Install standalone selenium host + name: Install chromium and enable headless mode command: | - wget https://selenium-release.storage.googleapis.com/2.44/selenium-server-standalone-2.44.0.jar - - - run: - name: Run standalone selenium host - command: | - java -jar selenium-server-standalone-2.44.0.jar - background: true + wget -q -O - https://dl-ssl.google.com/linux/linux_signing_key.pub | apt-key add - && \ + echo "deb http://dl.google.com/linux/chrome/deb/ stable main" > /etc/apt/sources.list.d/google.list && \ + apt-get update && \ + apt-get install -y google-chrome-stable xvfb && \ + rm -rf /var/lib/apt/lists/* # Download and cache dependencies - restore_cache: From 8b6d7236b258043f9b977d91edb46b8f8c148c7b Mon Sep 17 00:00:00 2001 From: David Herges Date: Fri, 11 Aug 2017 09:38:11 +0200 Subject: [PATCH 08/12] Update config.yml --- .circleci/config.yml | 16 +++++----------- 1 file changed, 5 insertions(+), 11 deletions(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index ce171fe..836eea5 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -6,21 +6,15 @@ version: 2 jobs: build: docker: - - image: circleci/node:latest + # specify the version you desire here + # - image: circleci/node:latest + - image: angular/ngcontainer:latest + working_directory: ~/repo steps: - checkout - - run: - name: Install chromium and enable headless mode - command: | - wget -q -O - https://dl-ssl.google.com/linux/linux_signing_key.pub | apt-key add - && \ - echo "deb http://dl.google.com/linux/chrome/deb/ stable main" > /etc/apt/sources.list.d/google.list && \ - apt-get update && \ - apt-get install -y google-chrome-stable xvfb && \ - rm -rf /var/lib/apt/lists/* - # Download and cache dependencies - restore_cache: keys: @@ -36,7 +30,7 @@ jobs: key: v1-dependencies-{{ checksum "package.json" }} # run tests! - - run: yarn e2e + - run: xvfb-run -a yarn e2e # run deployments for git tags - deploy: From fdb408bf52f451d2e036e1cac1e68ef5a73c5a3b Mon Sep 17 00:00:00 2001 From: David Herges Date: Fri, 11 Aug 2017 09:46:04 +0200 Subject: [PATCH 09/12] Update protractor.conf.js --- protractor.conf.js | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/protractor.conf.js b/protractor.conf.js index fd74688..22532e7 100644 --- a/protractor.conf.js +++ b/protractor.conf.js @@ -5,7 +5,10 @@ exports.config = { allScriptsTimeout: 11000, capabilities: { - 'browserName': 'chrome' + browserName: 'chrome', + chromeOptions: { + args: ['--no-sandbox'] + } }, directConnect: true, baseUrl: 'http://localhost:4200/', From c489cee666a60320a58ed79ba4469041472fbd67 Mon Sep 17 00:00:00 2001 From: David Herges Date: Fri, 11 Aug 2017 12:14:29 +0200 Subject: [PATCH 10/12] Update package.json --- package.json | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/package.json b/package.json index 1dad741..44a58f9 100644 --- a/package.json +++ b/package.json @@ -21,6 +21,7 @@ }, "scripts": { "pree2e": "webdriver-manager update", - "e2e": "protractor" + "e2e": "protractor", + "ci:e2e": "protractor --baseUrl https://angular.io" } } From ea656db2a23818807784c159b2739a9e23cf761e Mon Sep 17 00:00:00 2001 From: David Herges Date: Fri, 11 Aug 2017 12:14:46 +0200 Subject: [PATCH 11/12] Update config.yml --- .circleci/config.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index 836eea5..4f5abc6 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -30,7 +30,7 @@ jobs: key: v1-dependencies-{{ checksum "package.json" }} # run tests! - - run: xvfb-run -a yarn e2e + - run: xvfb-run -a yarn ci:e2e # run deployments for git tags - deploy: From dfebd7945ac16194d4387826cbe8ca7e96436c6c Mon Sep 17 00:00:00 2001 From: David Herges Date: Fri, 11 Aug 2017 12:23:42 +0200 Subject: [PATCH 12/12] Update package.json --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 44a58f9..d57f37b 100644 --- a/package.json +++ b/package.json @@ -22,6 +22,6 @@ "scripts": { "pree2e": "webdriver-manager update", "e2e": "protractor", - "ci:e2e": "protractor --baseUrl https://angular.io" + "ci:e2e": "yarn e2e -- --baseUrl https://angular.io" } }