From 5869b64967f4e74404d0aab23c7e687345e85876 Mon Sep 17 00:00:00 2001 From: Brent Hoover Date: Sat, 20 Aug 2022 12:21:30 +0800 Subject: [PATCH 01/15] fix: try to get tests running in circle Signed-off-by: Brent Hoover --- .circleci/config.yml | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index dc88199..f11ac08 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -2,7 +2,7 @@ version: 2 jobs: build: docker: - - image: 'node:14' + - image: 'cimg/node:14.18.1' dependencies: pre: - 'echo "//registry.npmjs.org/:_authToken=${NPM_TOKEN}" > ~/.npmrc' @@ -15,7 +15,7 @@ jobs: key: 'v1-dependencies-{{ checksum "package.json" }}' deploy: docker: - - image: 'node:14' + - image: 'cimg/node:14.18.1' steps: - checkout - restore_cache: @@ -25,7 +25,7 @@ jobs: - run: npx semantic-release lint: docker: - - image: 'node:14' + - image: 'cimg/node:14.18.1' steps: - checkout - restore_cache: @@ -35,13 +35,15 @@ jobs: - run: npm run lint test: docker: - - image: 'node:14' + - image: 'cimg/node:14.18.1' steps: - checkout - restore_cache: keys: - 'v1-dependencies-{{ checksum "package.json" }}' - v1-dependencies- + - run: sudo apt-get install docker -y + - run: sudo apt-get install docker-compose -y - run: npm run test workflows: version: 2 From 7ddcd4344ba88402f7900fcfa52e604aacfd86d1 Mon Sep 17 00:00:00 2001 From: Brent Hoover Date: Sat, 20 Aug 2022 12:22:43 +0800 Subject: [PATCH 02/15] fix: put test step back Signed-off-by: Brent Hoover --- .circleci/config.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index f11ac08..103ebc1 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -61,7 +61,7 @@ workflows: context: reaction-publish-semantic-release requires: - lint -# - test + - test filters: branches: only: trunk From 5df7ed8d88b014a544ef2070a8d28d5658d09aee Mon Sep 17 00:00:00 2001 From: Brent Hoover Date: Sat, 20 Aug 2022 12:29:38 +0800 Subject: [PATCH 03/15] chore: revert to old images Signed-off-by: Brent Hoover --- .circleci/config.yml | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index 103ebc1..7ee31a0 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -2,7 +2,7 @@ version: 2 jobs: build: docker: - - image: 'cimg/node:14.18.1' + - image: 'node:14' dependencies: pre: - 'echo "//registry.npmjs.org/:_authToken=${NPM_TOKEN}" > ~/.npmrc' @@ -15,7 +15,7 @@ jobs: key: 'v1-dependencies-{{ checksum "package.json" }}' deploy: docker: - - image: 'cimg/node:14.18.1' + - image: 'node:14' steps: - checkout - restore_cache: @@ -25,7 +25,7 @@ jobs: - run: npx semantic-release lint: docker: - - image: 'cimg/node:14.18.1' + - image: 'node:14' steps: - checkout - restore_cache: @@ -35,15 +35,14 @@ jobs: - run: npm run lint test: docker: - - image: 'cimg/node:14.18.1' + - image: 'node:14' steps: - checkout - restore_cache: keys: - 'v1-dependencies-{{ checksum "package.json" }}' - v1-dependencies- - - run: sudo apt-get install docker -y - - run: sudo apt-get install docker-compose -y + - run: docker run -v /var/run/docker.sock:/var/run/docker.sock -ti docker - run: npm run test workflows: version: 2 From 5d7d65f188b75ec23a72a01cbb305703886b102d Mon Sep 17 00:00:00 2001 From: Brent Hoover Date: Sat, 20 Aug 2022 12:34:58 +0800 Subject: [PATCH 04/15] chore: remove docker command Signed-off-by: Brent Hoover --- .circleci/config.yml | 1 - 1 file changed, 1 deletion(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index 7ee31a0..c2155ec 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -42,7 +42,6 @@ jobs: keys: - 'v1-dependencies-{{ checksum "package.json" }}' - v1-dependencies- - - run: docker run -v /var/run/docker.sock:/var/run/docker.sock -ti docker - run: npm run test workflows: version: 2 From 01cee467e1886bc3d442c878ea00612b2185efc7 Mon Sep 17 00:00:00 2001 From: Brent Hoover Date: Sat, 20 Aug 2022 12:39:02 +0800 Subject: [PATCH 05/15] chore: try installing docker Signed-off-by: Brent Hoover --- .circleci/config.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.circleci/config.yml b/.circleci/config.yml index c2155ec..b9f9973 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -42,6 +42,7 @@ jobs: keys: - 'v1-dependencies-{{ checksum "package.json" }}' - v1-dependencies- + - run: apt-get install docker -y - run: npm run test workflows: version: 2 From 0d5481319c9fc7003eb9e03038e399da085f304a Mon Sep 17 00:00:00 2001 From: Brent Hoover Date: Sat, 20 Aug 2022 13:25:15 +0800 Subject: [PATCH 06/15] chore: try installing docker Signed-off-by: Brent Hoover --- .circleci/config.yml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index b9f9973..05c3b32 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -42,7 +42,9 @@ jobs: keys: - 'v1-dependencies-{{ checksum "package.json" }}' - v1-dependencies- - - run: apt-get install docker -y + - run: sudo apt-get update && sudo apt-get install ca-certificates curl gnupg lsb-release && sudo mkdir -p /etc/apt/keyrings && curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo gpg --dearmor -o /etc/apt/keyrings/docker.gpg + - run: echo "deb [arch=$(dpkg --print-architecture) signed-by=/etc/apt/keyrings/docker.gpg] https://download.docker.com/linux/ubuntu $(lsb_release -cs) stable" | sudo tee /etc/apt/sources.list.d/docker.list > /dev/null + - run: sudo apt-get update && sudo apt-get install docker-ce docker-ce-cli containerd.io docker-compose-plugin - run: npm run test workflows: version: 2 From e407ea926ca66a91eda5d896abda16c166790853 Mon Sep 17 00:00:00 2001 From: Brent Hoover Date: Sat, 20 Aug 2022 13:28:52 +0800 Subject: [PATCH 07/15] chore: don't use sudo Signed-off-by: Brent Hoover --- .circleci/config.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index 05c3b32..c5c2c78 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -42,9 +42,9 @@ jobs: keys: - 'v1-dependencies-{{ checksum "package.json" }}' - v1-dependencies- - - run: sudo apt-get update && sudo apt-get install ca-certificates curl gnupg lsb-release && sudo mkdir -p /etc/apt/keyrings && curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo gpg --dearmor -o /etc/apt/keyrings/docker.gpg - - run: echo "deb [arch=$(dpkg --print-architecture) signed-by=/etc/apt/keyrings/docker.gpg] https://download.docker.com/linux/ubuntu $(lsb_release -cs) stable" | sudo tee /etc/apt/sources.list.d/docker.list > /dev/null - - run: sudo apt-get update && sudo apt-get install docker-ce docker-ce-cli containerd.io docker-compose-plugin + - run: apt-get update && apt-get install ca-certificates curl gnupg lsb-release && mkdir -p /etc/apt/keyrings && curl -fsSL https://download.docker.com/linux/ubuntu/gpg | gpg --dearmor -o /etc/apt/keyrings/docker.gpg + - run: echo "deb [arch=$(dpkg --print-architecture) signed-by=/etc/apt/keyrings/docker.gpg] https://download.docker.com/linux/ubuntu $(lsb_release -cs) stable" | tee /etc/apt/sources.list.d/docker.list > /dev/null + - run: apt-get update && apt-get install docker-ce docker-ce-cli containerd.io docker-compose-plugin - run: npm run test workflows: version: 2 From 9b67a6ecf970ac598c684d3ace2dcbc6d63f8144 Mon Sep 17 00:00:00 2001 From: Brent Hoover Date: Sat, 20 Aug 2022 13:30:49 +0800 Subject: [PATCH 08/15] chore: break commands down Signed-off-by: Brent Hoover --- .circleci/config.yml | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index c5c2c78..f1801ae 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -42,8 +42,7 @@ jobs: keys: - 'v1-dependencies-{{ checksum "package.json" }}' - v1-dependencies- - - run: apt-get update && apt-get install ca-certificates curl gnupg lsb-release && mkdir -p /etc/apt/keyrings && curl -fsSL https://download.docker.com/linux/ubuntu/gpg | gpg --dearmor -o /etc/apt/keyrings/docker.gpg - - run: echo "deb [arch=$(dpkg --print-architecture) signed-by=/etc/apt/keyrings/docker.gpg] https://download.docker.com/linux/ubuntu $(lsb_release -cs) stable" | tee /etc/apt/sources.list.d/docker.list > /dev/null + - run: apt-get update && apt-get install ca-certificates curl gnupg lsb-release - run: apt-get update && apt-get install docker-ce docker-ce-cli containerd.io docker-compose-plugin - run: npm run test workflows: From 72c1db6488e0e36a3e34b58aaff293f2dbcc15ae Mon Sep 17 00:00:00 2001 From: Brent Hoover Date: Sat, 20 Aug 2022 13:32:02 +0800 Subject: [PATCH 09/15] chore: add confirmation flag Signed-off-by: Brent Hoover --- .circleci/config.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index f1801ae..db3d227 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -42,7 +42,7 @@ jobs: keys: - 'v1-dependencies-{{ checksum "package.json" }}' - v1-dependencies- - - run: apt-get update && apt-get install ca-certificates curl gnupg lsb-release + - run: apt-get update && apt-get install ca-certificates curl gnupg lsb-release -y - run: apt-get update && apt-get install docker-ce docker-ce-cli containerd.io docker-compose-plugin - run: npm run test workflows: From a748aa99290812947067cbc77db782269147dc31 Mon Sep 17 00:00:00 2001 From: Brent Hoover Date: Sat, 20 Aug 2022 13:35:59 +0800 Subject: [PATCH 10/15] chore: more commands Signed-off-by: Brent Hoover --- .circleci/config.yml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/.circleci/config.yml b/.circleci/config.yml index db3d227..33180f3 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -43,6 +43,9 @@ jobs: - 'v1-dependencies-{{ checksum "package.json" }}' - v1-dependencies- - run: apt-get update && apt-get install ca-certificates curl gnupg lsb-release -y + - run: mkdir -p /etc/apt/keyrings + - run: curl -fsSL https://download.docker.com/linux/ubuntu/gpg | gpg --dearmor -o /etc/apt/keyrings/docker.gpg + - run: echo "deb [arch=$(dpkg --print-architecture) signed-by=/etc/apt/keyrings/docker.gpg] https://download.docker.com/linux/ubuntu $(lsb_release -cs) stable" | tee /etc/apt/sources.list.d/docker.list > /dev/null - run: apt-get update && apt-get install docker-ce docker-ce-cli containerd.io docker-compose-plugin - run: npm run test workflows: From 5a25db9803606428da2204d3611d30926862f63d Mon Sep 17 00:00:00 2001 From: Brent Hoover Date: Sat, 20 Aug 2022 13:40:44 +0800 Subject: [PATCH 11/15] chore: just download docker Signed-off-by: Brent Hoover --- .circleci/config.yml | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index 33180f3..663ba9b 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -42,11 +42,13 @@ jobs: keys: - 'v1-dependencies-{{ checksum "package.json" }}' - v1-dependencies- - - run: apt-get update && apt-get install ca-certificates curl gnupg lsb-release -y - - run: mkdir -p /etc/apt/keyrings - - run: curl -fsSL https://download.docker.com/linux/ubuntu/gpg | gpg --dearmor -o /etc/apt/keyrings/docker.gpg - - run: echo "deb [arch=$(dpkg --print-architecture) signed-by=/etc/apt/keyrings/docker.gpg] https://download.docker.com/linux/ubuntu $(lsb_release -cs) stable" | tee /etc/apt/sources.list.d/docker.list > /dev/null - - run: apt-get update && apt-get install docker-ce docker-ce-cli containerd.io docker-compose-plugin + - run: apt-get update && apt-get install ca-certificates curl gnupg lsb-release wget -y + - run: wget https://download.docker.com/linux/ubuntu/dists/focal/pool/stable/amd64/docker-ce_20.10.9~3-0~ubuntu-focal_amd64.deb + - run: dpkg -i ../docker-ce_20.10.9~3-0~ubuntu-focal_amd64.deb +# - run: mkdir -p /etc/apt/keyrings +# - run: curl -fsSL https://download.docker.com/linux/ubuntu/gpg | gpg --dearmor -o /etc/apt/keyrings/docker.gpg +# - run: echo "deb [arch=$(dpkg --print-architecture) signed-by=/etc/apt/keyrings/docker.gpg] https://download.docker.com/linux/ubuntu $(lsb_release -cs) stable" | tee /etc/apt/sources.list.d/docker.list > /dev/null +# - run: apt-get update && apt-get install docker-ce docker-ce-cli containerd.io docker-compose-plugin - run: npm run test workflows: version: 2 From 9acdcf357d0df39c3ecfd1b1a664141926eef7d0 Mon Sep 17 00:00:00 2001 From: Brent Hoover Date: Sat, 20 Aug 2022 13:44:55 +0800 Subject: [PATCH 12/15] chore: download to specific directory Signed-off-by: Brent Hoover --- .circleci/config.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index 663ba9b..aea80bb 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -43,8 +43,8 @@ jobs: - 'v1-dependencies-{{ checksum "package.json" }}' - v1-dependencies- - run: apt-get update && apt-get install ca-certificates curl gnupg lsb-release wget -y - - run: wget https://download.docker.com/linux/ubuntu/dists/focal/pool/stable/amd64/docker-ce_20.10.9~3-0~ubuntu-focal_amd64.deb - - run: dpkg -i ../docker-ce_20.10.9~3-0~ubuntu-focal_amd64.deb + - run: wget https://download.docker.com/linux/ubuntu/dists/focal/pool/stable/amd64/docker-ce_20.10.9~3-0~ubuntu-focal_amd64.deb -P /tmp + - run: dpkg -i /tmp/docker-ce_20.10.9~3-0~ubuntu-focal_amd64.deb # - run: mkdir -p /etc/apt/keyrings # - run: curl -fsSL https://download.docker.com/linux/ubuntu/gpg | gpg --dearmor -o /etc/apt/keyrings/docker.gpg # - run: echo "deb [arch=$(dpkg --print-architecture) signed-by=/etc/apt/keyrings/docker.gpg] https://download.docker.com/linux/ubuntu $(lsb_release -cs) stable" | tee /etc/apt/sources.list.d/docker.list > /dev/null From 062baaf51412348ae29fb0000f68d123d2422953 Mon Sep 17 00:00:00 2001 From: Brent Hoover Date: Sun, 21 Aug 2022 14:38:43 +0800 Subject: [PATCH 13/15] chore: try to just fake dependencies Signed-off-by: Brent Hoover --- .circleci/config.yml | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index aea80bb..ebbd9fa 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -42,9 +42,8 @@ jobs: keys: - 'v1-dependencies-{{ checksum "package.json" }}' - v1-dependencies- - - run: apt-get update && apt-get install ca-certificates curl gnupg lsb-release wget -y - - run: wget https://download.docker.com/linux/ubuntu/dists/focal/pool/stable/amd64/docker-ce_20.10.9~3-0~ubuntu-focal_amd64.deb -P /tmp - - run: dpkg -i /tmp/docker-ce_20.10.9~3-0~ubuntu-focal_amd64.deb + - run: touch /usr/bin/docker && chmod +x /usr/bin/docker + - run: touch /usr/bin/docker-compose && chmod +x /usr/bin/docker-compose # - run: mkdir -p /etc/apt/keyrings # - run: curl -fsSL https://download.docker.com/linux/ubuntu/gpg | gpg --dearmor -o /etc/apt/keyrings/docker.gpg # - run: echo "deb [arch=$(dpkg --print-architecture) signed-by=/etc/apt/keyrings/docker.gpg] https://download.docker.com/linux/ubuntu $(lsb_release -cs) stable" | tee /etc/apt/sources.list.d/docker.list > /dev/null From 776be178c4836fe8ae61a0294b5ed0365291e461 Mon Sep 17 00:00:00 2001 From: Brent Hoover Date: Sun, 21 Aug 2022 14:40:46 +0800 Subject: [PATCH 14/15] fix: get tests running again Signed-off-by: Brent Hoover --- .circleci/config.yml | 4 ---- 1 file changed, 4 deletions(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index ebbd9fa..82d5141 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -44,10 +44,6 @@ jobs: - v1-dependencies- - run: touch /usr/bin/docker && chmod +x /usr/bin/docker - run: touch /usr/bin/docker-compose && chmod +x /usr/bin/docker-compose -# - run: mkdir -p /etc/apt/keyrings -# - run: curl -fsSL https://download.docker.com/linux/ubuntu/gpg | gpg --dearmor -o /etc/apt/keyrings/docker.gpg -# - run: echo "deb [arch=$(dpkg --print-architecture) signed-by=/etc/apt/keyrings/docker.gpg] https://download.docker.com/linux/ubuntu $(lsb_release -cs) stable" | tee /etc/apt/sources.list.d/docker.list > /dev/null -# - run: apt-get update && apt-get install docker-ce docker-ce-cli containerd.io docker-compose-plugin - run: npm run test workflows: version: 2 From 1262402db285223e726b5aa164faac3fe472a4bc Mon Sep 17 00:00:00 2001 From: Brent Hoover Date: Sun, 21 Aug 2022 14:42:31 +0800 Subject: [PATCH 15/15] fix: tweak README to emphasize installing from NPM Signed-off-by: Brent Hoover --- README.md | 27 +++++++++++++-------------- 1 file changed, 13 insertions(+), 14 deletions(-) diff --git a/README.md b/README.md index b48037c..9d1ab38 100644 --- a/README.md +++ b/README.md @@ -23,6 +23,19 @@ Before you can use the Open Commerce CLI, ensure you have all the base requireme Before you can use the Open Commerce CLI you need to install the command line tool: +### From NPM (Suggested method) +First install the cli by running: +``` +npm install -g @reactioncommerce/reaction-cli +``` + +You can test to see if it has worked here by running: + +``` +reaction help +``` +You should see the help text showing. + ### From a Cloned repo First clone the repo locally (substitute with whatever directory name you want to use) @@ -48,20 +61,6 @@ Then install the CLI globally (this may require `sudo` on some systems): npm install -g ``` - -### From NPM (Currently not available) -First install the cli by running: -``` -npm install -g @reactioncommerce/reaction-cli -``` - -You can test to see if it has worked here by running: - -``` -reaction help -``` -You should see the help text showing. - ## Creating a project ---