From aade34427ddc4a4e0ca22ea9b1c2129652614ef9 Mon Sep 17 00:00:00 2001 From: Rajnish Dargan Date: Wed, 13 Mar 2024 18:27:29 +0530 Subject: [PATCH 01/12] linux image change --- .circleci/config.yml | 25 ++----------------------- 1 file changed, 2 insertions(+), 23 deletions(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index bc52f0226..734fbe388 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -1,41 +1,20 @@ version: 2.1 jobs: build: - machine: - image: circleci/classic:latest - steps: - - checkout - - run: - name: run build file - command: /bin/bash -x build.sh ${CIRCLE_SHA1} test - test-cases: - working_directory: ~/sunbird-questionset-editor - machine: - image: ubuntu-2004:202010-01 + docker: + - image: cimg/node:14.21.3-browsers steps: - checkout: path: ~/sunbird-questionset-editor - - run: - name: Install Node.js v16 with build in nvm tool - command: | - export NVM_DIR="/opt/circleci/.nvm" - [ -s "$NVM_DIR/nvm.sh" ] && . "$NVM_DIR/nvm.sh" - nvm install v16 && nvm use 16 && nvm alias default 16 - node -v - run: name: Node version command: 'node --version' - run: name: Installing angular cli command: 'npm install -g @angular/cli@15 --no-progress' - #~ - restore_cache: - #~ key: dependency-cache-{{ checksum "package.json" }} - run: name: Installing npm deps command: 'npm install --no-progress' - - save_cache: - key: dependency-cache-{{ checksum "package.json" }} - paths: ./node_modules - run: name: ng lint and building command: 'mkdir -p /tmp/logs && npm run build-lib:prod | tee /tmp/logs/build.log' From 125e2654c1d975e7e3c46335f3da5ff7f14a4b7e Mon Sep 17 00:00:00 2001 From: Rajnish Dargan Date: Wed, 13 Mar 2024 18:30:25 +0530 Subject: [PATCH 02/12] linux image change --- .circleci/config.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index 734fbe388..8fd9d5284 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -1,7 +1,7 @@ version: 2.1 jobs: build: - docker: + docker: - image: cimg/node:14.21.3-browsers steps: - checkout: From 1911d0cfc3ab867deecd1542889a07297fabbaee Mon Sep 17 00:00:00 2001 From: Rajnish Dargan Date: Wed, 13 Mar 2024 18:31:23 +0530 Subject: [PATCH 03/12] linux image change --- .circleci/config.yml | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index 8fd9d5284..d81823644 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -46,9 +46,4 @@ jobs: npm publish project-sunbird-sunbird-questionset-editor-web-component-* --access=public else npm run build-web-component && npm pack ./web-component - fi -workflows: - version: 2.1 - build_and_test: - jobs: - - test-cases + fi From f37d49b53452b74b64110d60020b408fce2c6cb9 Mon Sep 17 00:00:00 2001 From: Rajnish Dargan Date: Wed, 13 Mar 2024 18:32:44 +0530 Subject: [PATCH 04/12] linux image change --- .circleci/config.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index d81823644..461ebd972 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -15,9 +15,9 @@ jobs: - run: name: Installing npm deps command: 'npm install --no-progress' - - run: - name: ng lint and building - command: 'mkdir -p /tmp/logs && npm run build-lib:prod | tee /tmp/logs/build.log' + # - run: + # name: ng lint and building + # command: 'mkdir -p /tmp/logs && npm run build-lib:prod | tee /tmp/logs/build.log' - run: name: Executing test cases command: 'npm run test-coverage | tee /tmp/logs/test_cases.log' From 46f5f5f63d7bf11fb84b34ec4ac039a8661feb65 Mon Sep 17 00:00:00 2001 From: Rajnish Dargan Date: Wed, 13 Mar 2024 18:34:05 +0530 Subject: [PATCH 05/12] linux image change --- .circleci/config.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index 461ebd972..339909e27 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -20,7 +20,7 @@ jobs: # command: 'mkdir -p /tmp/logs && npm run build-lib:prod | tee /tmp/logs/build.log' - run: name: Executing test cases - command: 'npm run test-coverage | tee /tmp/logs/test_cases.log' + command: 'npm run test-coverage' - run: name: Install sonar scanner command: npm install -g sonarqube-scanner From d55087414fd00ea0a2b41742fdbc08b74973ca99 Mon Sep 17 00:00:00 2001 From: Rajnish Dargan Date: Wed, 13 Mar 2024 18:36:54 +0530 Subject: [PATCH 06/12] linux image change --- .circleci/config.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.circleci/config.yml b/.circleci/config.yml index 339909e27..a8822fd56 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -1,6 +1,7 @@ version: 2.1 jobs: build: + working_directory: ~/questionset-editor-library docker: - image: cimg/node:14.21.3-browsers steps: From b5f3a148e0a91e761c5c822bff0f74387cbbad3c Mon Sep 17 00:00:00 2001 From: Rajnish Dargan Date: Wed, 13 Mar 2024 18:40:01 +0530 Subject: [PATCH 07/12] linux image change --- .circleci/config.yml | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index a8822fd56..364681d64 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -16,12 +16,9 @@ jobs: - run: name: Installing npm deps command: 'npm install --no-progress' - # - run: - # name: ng lint and building - # command: 'mkdir -p /tmp/logs && npm run build-lib:prod | tee /tmp/logs/build.log' - run: name: Executing test cases - command: 'npm run test-coverage' + command: 'cd ~/sunbird-questionset-editor npm run test-coverage' - run: name: Install sonar scanner command: npm install -g sonarqube-scanner From df0c634b827462442956a436f5451b6dbe719b68 Mon Sep 17 00:00:00 2001 From: Rajnish Dargan Date: Wed, 13 Mar 2024 18:40:53 +0530 Subject: [PATCH 08/12] linux image change --- .circleci/config.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index 364681d64..25023ec6b 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -18,7 +18,7 @@ jobs: command: 'npm install --no-progress' - run: name: Executing test cases - command: 'cd ~/sunbird-questionset-editor npm run test-coverage' + command: 'cd ~/sunbird-questionset-editor && npm run test-coverage' - run: name: Install sonar scanner command: npm install -g sonarqube-scanner From 43d6af49824bc83ff70ea559fc8babb59a2844e9 Mon Sep 17 00:00:00 2001 From: Rajnish Dargan Date: Wed, 13 Mar 2024 18:48:37 +0530 Subject: [PATCH 09/12] linux image change --- .circleci/config.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index 25023ec6b..bbf4aab5d 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -1,7 +1,7 @@ version: 2.1 jobs: build: - working_directory: ~/questionset-editor-library + working_directory: ~/sunbird-questionset-editor docker: - image: cimg/node:14.21.3-browsers steps: @@ -18,13 +18,13 @@ jobs: command: 'npm install --no-progress' - run: name: Executing test cases - command: 'cd ~/sunbird-questionset-editor && npm run test-coverage' + command: npm run test-coverage - run: name: Install sonar scanner command: npm install -g sonarqube-scanner - run: name: Run sonar scanner - command: 'cd ~/sunbird-questionset-editor && sonar-scanner' + command: 'sonar-scanner' - run: name: Publish to NPM command: | From 3531f186e04d40e173021648c96e9efe5664ba20 Mon Sep 17 00:00:00 2001 From: Rajnish Dargan Date: Thu, 14 Mar 2024 10:05:05 +0530 Subject: [PATCH 10/12] Fix Image Deprecations --- .circleci/config.yml | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index bbf4aab5d..03f3bbbd2 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -1,10 +1,15 @@ version: 2.1 +orbs: + browser-tools: circleci/browser-tools@1.4.8 jobs: build: working_directory: ~/sunbird-questionset-editor docker: - image: cimg/node:14.21.3-browsers steps: + - browser-tools/install-chrome + - run: + command: google-chrome --version - checkout: path: ~/sunbird-questionset-editor - run: @@ -15,7 +20,7 @@ jobs: command: 'npm install -g @angular/cli@15 --no-progress' - run: name: Installing npm deps - command: 'npm install --no-progress' + command: 'npm install' - run: name: Executing test cases command: npm run test-coverage From f13b8ca4d2e90b3dceab3db90cf256c71057f475 Mon Sep 17 00:00:00 2001 From: Rajnish Dargan Date: Thu, 14 Mar 2024 11:56:27 +0530 Subject: [PATCH 11/12] Issue #IQ-694 fix: Fix Linux Image Deprecations --- .circleci/config.yml | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index 03f3bbbd2..541f77ed4 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -20,7 +20,7 @@ jobs: command: 'npm install -g @angular/cli@15 --no-progress' - run: name: Installing npm deps - command: 'npm install' + command: 'npm install --no-progress' - run: name: Executing test cases command: npm run test-coverage @@ -29,7 +29,7 @@ jobs: command: npm install -g sonarqube-scanner - run: name: Run sonar scanner - command: 'sonar-scanner' + command: 'cd ~/sunbird-questionset-editor && sonar-scanner' - run: name: Publish to NPM command: | @@ -50,3 +50,8 @@ jobs: else npm run build-web-component && npm pack ./web-component fi +workflows: + version: 2.1 + build_and_test: + jobs: + - build From d85e015bfacf8d6f4c6d121c0def37f456d97181 Mon Sep 17 00:00:00 2001 From: Rajnish Dargan Date: Thu, 14 Mar 2024 12:40:15 +0530 Subject: [PATCH 12/12] Issue #IQ-694 fix: Fix Linux Image Deprecations --- .circleci/config.yml | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index 541f77ed4..70838cd56 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -18,12 +18,20 @@ jobs: - run: name: Installing angular cli command: 'npm install -g @angular/cli@15 --no-progress' + #~ - restore_cache: + #~ key: dependency-cache-{{ checksum "package.json" }} - run: name: Installing npm deps command: 'npm install --no-progress' + - save_cache: + key: dependency-cache-{{ checksum "package.json" }} + paths: ./node_modules + - run: + name: ng lint and building + command: 'mkdir -p /tmp/logs && npm run build-lib:prod | tee /tmp/logs/build.log' - run: name: Executing test cases - command: npm run test-coverage + command: 'npm run test-coverage | tee /tmp/logs/test_cases.log' - run: name: Install sonar scanner command: npm install -g sonarqube-scanner