From f432e4a5fb1eed4d8ac3cd425c9b93f174d97a84 Mon Sep 17 00:00:00 2001 From: Nilanjan Haldar Date: Thu, 11 Jan 2024 18:30:56 +0530 Subject: [PATCH 1/3] modify some code in circleci workflow --- .circleci/config.yml | 23 ++++++++++------------- 1 file changed, 10 insertions(+), 13 deletions(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index b001947..d35f206 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -6,26 +6,23 @@ version: 2.1 # See: https://circleci.com/docs/configuration-reference/#jobs jobs: check-node-version: - runs-on: ubuntu-latest - + # Specify the execution environment. You can specify an image from Docker Hub or use one of our convenience images from CircleCI's Developer Hub. + # See: https://circleci.com/docs/configuration-reference/#executor-job + docker: + - image: cimg/base:stable + # Add steps to the job + # See: https://circleci.com/docs/configuration-reference/#steps steps: - checkout - run: # Check Node version name: "Check Node.js version" command: "node --version" - - - name: Use Node.js - uses: actions/setup-node@v4 - - - name: Check Node.js version - run: | - node --version - workflows: - check-node-version-workflow: - jobs: - - check-node-version +workflows: + check-node-version-workflow: + jobs: + - check-node-version # # Specify the execution environment. You can specify an image from Docker Hub or use one of our convenience images from CircleCI's Developer Hub. # # See: https://circleci.com/docs/configuration-reference/#executor-job # docker: From ee8ebd3c30c2abbbd3da6d683aaaa731df985bdd Mon Sep 17 00:00:00 2001 From: Nilanjan Haldar Date: Thu, 11 Jan 2024 18:38:34 +0530 Subject: [PATCH 2/3] modified again some code in circleci workflow --- .circleci/config.yml | 71 +++++++++++++++++++++----------------------- 1 file changed, 34 insertions(+), 37 deletions(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index d35f206..0bde2cc 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -1,43 +1,40 @@ -# Use the latest 2.1 version of CircleCI pipeline process engine. -# See: https://circleci.com/docs/configuration-reference version: 2.1 +orbs: + node: circleci/node@5.0.2 -# Define a job to be invoked later in a workflow. -# See: https://circleci.com/docs/configuration-reference/#jobs jobs: - check-node-version: - # Specify the execution environment. You can specify an image from Docker Hub or use one of our convenience images from CircleCI's Developer Hub. - # See: https://circleci.com/docs/configuration-reference/#executor-job - docker: - - image: cimg/base:stable - # Add steps to the job - # See: https://circleci.com/docs/configuration-reference/#steps + build_and_test: + executor: node/default steps: - - checkout - - run: - # Check Node version - name: "Check Node.js version" - command: "node --version" - + - checkout + - node/install-packages: + pkg-manager: npm + - run: + command: node -v + name: Check Node.js Version + # - run: + # command: yarn build + # name: Build app + # - persist_to_workspace: + # root: ~/project + # paths: + # - . + + # deploy: # this can be any name you choose + # executor: heroku/default + # steps: + # - attach_workspace: + # at: ~/project + # - heroku/deploy-via-git: + # force: true # force push when pushing to the heroku remote, see: https://devcenter.heroku.com/articles/git + workflows: - check-node-version-workflow: + test_my_app: jobs: - - check-node-version -# # Specify the execution environment. You can specify an image from Docker Hub or use one of our convenience images from CircleCI's Developer Hub. -# # See: https://circleci.com/docs/configuration-reference/#executor-job -# docker: -# - image: cimg/base:stable -# # Add steps to the job -# # See: https://circleci.com/docs/configuration-reference/#steps -# steps: -# - checkout -# - run: -# name: "Say hello" -# command: "echo Hello, World!" - -# # Orchestrate jobs using workflows -# # See: https://circleci.com/docs/configuration-reference/#workflows -# workflows: -# say-hello-workflow: -# jobs: -# - say-hello + - build_and_test + # - deploy: + # requires: + # - build_and_test # only deploy if the build_and_test job has completed + # filters: + # branches: + # only: main # only deploy when on main From faa0e95c1628e80710ecd0e432b10d9394c6ae4b Mon Sep 17 00:00:00 2001 From: Nilanjan Haldar Date: Thu, 11 Jan 2024 18:41:27 +0530 Subject: [PATCH 3/3] added header --- .circleci/config.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.circleci/config.yml b/.circleci/config.yml index 0bde2cc..55213e9 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -1,3 +1,4 @@ +# CircleCI workflow config file version: 2.1 orbs: node: circleci/node@5.0.2