From ea3fa8a7dc48544d7cbe50c26ddf9284f54643f1 Mon Sep 17 00:00:00 2001 From: yosef septian <37581081+yosefseptian1@users.noreply.github.com> Date: Thu, 27 Oct 2022 14:15:37 +0700 Subject: [PATCH 1/5] Update config.yml --- .circleci/config.yml | 68 ++++++-------------------------------------- 1 file changed, 8 insertions(+), 60 deletions(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index db3f677e..e401ecef 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -1,64 +1,12 @@ -version: 2.1 -orbs: - node: circleci/node@4.7.0 - heroku: circleci/heroku@1.2.6 - +versio: 2.1 +workflow: + test-deploy: + jobs: + -test jobs: - build_and_test: + build: docker: - - image: cimg/node:17.2.0 + - image: cimg/node:19.0.0 steps: - checkout - - node/install-packages: - pkg-manager: yarn - - run: - command: yarn test - name: Run tests - - run: - command: yarn build - name: Build app - - persist_to_workspace: - root: ~/project - paths: - - . - deploy: # this can be any name you choose - docker: - - image: cimg/node:17.2.0 - 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: - on_commit: - jobs: - - build_and_test - # Follow instructions here to authenticate git for Heroku: https://devcenter.heroku.com/articles/git#http-git-authentication - # The following code may be uncommented, onnce HEROKU_API_KEY & HEROKU_APP_NAME environemnt variables are present - # Read more: https://circleci.com/docs/2.0/env-vars/ - # - deploy: - # requires: - # - build_and_test # only deploy if the build_and_test job has completed - # filters: - # branches: - # only: master # only deploy when on main/master - nightly: - triggers: - - schedule: - cron: "0 0 * * *" - filters: - branches: - only: - - master - jobs: - - build_and_test - # Follow instructions here to authenticate git for Heroku: https://devcenter.heroku.com/articles/git#http-git-authentication - # The following code may be uncommented, onnce HEROKU_API_KEY & HEROKU_APP_NAME environemnt variables are present - # Read more: https://circleci.com/docs/2.0/env-vars/ - # - deploy: - # requires: - # - build_and_test # only deploy if the build_and_test job has completed - # filters: - # branches: - # only: master # only deploy when on main/master + - run: node --version From 23f24998e962097fc2ed1ad401230cc608a3eb96 Mon Sep 17 00:00:00 2001 From: yosef septian <37581081+yosefseptian1@users.noreply.github.com> Date: Thu, 27 Oct 2022 14:27:09 +0700 Subject: [PATCH 2/5] update config run test --- .circleci/config.yml | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index e401ecef..cc230870 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -9,4 +9,9 @@ jobs: - image: cimg/node:19.0.0 steps: - checkout - - run: node --version + - run: + name: install dependencies + command: npm install + - run: + name: run Tests + command: npm run test From 1c76589366d7ebeaa037e8cfcc3a4dc183801b8c Mon Sep 17 00:00:00 2001 From: yosef septian <37581081+yosefseptian1@users.noreply.github.com> Date: Thu, 27 Oct 2022 14:33:51 +0700 Subject: [PATCH 3/5] Updated config.yml --- .circleci/config.yml | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index cc230870..a70b4729 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -1,17 +1,17 @@ -versio: 2.1 +version: 2.1 workflow: test-deploy: jobs: -test jobs: - build: - docker: - - image: cimg/node:19.0.0 - steps: - - checkout - - run: - name: install dependencies - command: npm install - - run: - name: run Tests - command: npm run test + test: + docker: + - image: cimg/node:19.0.0 + steps: + - checkout + - run: + name: install dependencies + command: npm install + - run: + name: run Tests + command: npm run test From 426d6a7e08d674ec4e9058cf51dca242d472b4fc Mon Sep 17 00:00:00 2001 From: yosef septian <37581081+yosefseptian1@users.noreply.github.com> Date: Thu, 27 Oct 2022 14:41:33 +0700 Subject: [PATCH 4/5] Add .circleci/config.yml --- .circleci/config.yml | 39 ++++++++++++++++++++++++--------------- 1 file changed, 24 insertions(+), 15 deletions(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index a70b4729..6554e1f4 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -1,17 +1,26 @@ +# Use the latest 2.1 version of CircleCI pipeline process engine. +# See: https://circleci.com/docs/2.0/configuration-reference version: 2.1 -workflow: - test-deploy: - jobs: - -test + +# Define a job to be invoked later in a workflow. +# See: https://circleci.com/docs/2.0/configuration-reference/#jobs jobs: - test: - docker: - - image: cimg/node:19.0.0 - steps: - - checkout - - run: - name: install dependencies - command: npm install - - run: - name: run Tests - command: npm run test + say-hello: + # Specify the execution environment. You can specify an image from Dockerhub or use one of our Convenience Images from CircleCI's Developer Hub. + # See: https://circleci.com/docs/2.0/configuration-reference/#docker-machine-macos-windows-executor + docker: + - image: cimg/base:stable + # Add steps to the job + # See: https://circleci.com/docs/2.0/configuration-reference/#steps + steps: + - checkout + - run: + name: "Say hello" + command: "echo Hello, World!" + +# Invoke jobs via workflows +# See: https://circleci.com/docs/2.0/configuration-reference/#workflows +workflows: + say-hello-workflow: + jobs: + - say-hello From 23230d5e49f220e02e8189b79a778e06333ceb97 Mon Sep 17 00:00:00 2001 From: yosef septian <37581081+yosefseptian1@users.noreply.github.com> Date: Thu, 27 Oct 2022 14:43:42 +0700 Subject: [PATCH 5/5] Add .circleci/config.yml --- .circleci/config.yml | 39 +++++++++++++++------------------------ 1 file changed, 15 insertions(+), 24 deletions(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index 6554e1f4..a332ec5c 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -1,26 +1,17 @@ -# Use the latest 2.1 version of CircleCI pipeline process engine. -# See: https://circleci.com/docs/2.0/configuration-reference version: 2.1 - -# Define a job to be invoked later in a workflow. -# See: https://circleci.com/docs/2.0/configuration-reference/#jobs -jobs: - say-hello: - # Specify the execution environment. You can specify an image from Dockerhub or use one of our Convenience Images from CircleCI's Developer Hub. - # See: https://circleci.com/docs/2.0/configuration-reference/#docker-machine-macos-windows-executor - docker: - - image: cimg/base:stable - # Add steps to the job - # See: https://circleci.com/docs/2.0/configuration-reference/#steps - steps: - - checkout - - run: - name: "Say hello" - command: "echo Hello, World!" - -# Invoke jobs via workflows -# See: https://circleci.com/docs/2.0/configuration-reference/#workflows -workflows: - say-hello-workflow: +workflow: + test-deploy: jobs: - - say-hello + -test +jobs: + test: + docker: + - image: cimg/node:19.0.0 + steps: + - checkout + - run: + name: install dependencies + command: npm install + - run: + name: run Tests + command: npm run test \ No newline at end of file