From 14c76f54ede66952ea0da4c33656f00ee4b7d536 Mon Sep 17 00:00:00 2001 From: Joseph Hughes Date: Fri, 27 Sep 2019 15:32:47 -0400 Subject: [PATCH 01/38] fix: add circle config --- .circleci/config.yml | 22 ++++++++++++++++++++++ cross.dockerfile | 11 +++++++++++ 2 files changed, 33 insertions(+) create mode 100644 .circleci/config.yml create mode 100644 cross.dockerfile diff --git a/.circleci/config.yml b/.circleci/config.yml new file mode 100644 index 000000000..b49731922 --- /dev/null +++ b/.circleci/config.yml @@ -0,0 +1,22 @@ +# -*- yaml -*- +version: 2.1 +orbs: + go-module: timakin/go-module@0.3.0 + sixrs-gke: sixriversystems/sixrs-gke@0.1.1 +jobs: + build: + docker: + - image: balenalib/aarch64-ubuntu-node:10-cosmic + steps: + - apt-get update && apt-get install git libsqlite3-dev build-essential python-dev + - checkout + - npm install + + +workflows: + build_and_release: + jobs: + - build: + context: 6rs-circle + + diff --git a/cross.dockerfile b/cross.dockerfile new file mode 100644 index 000000000..535ad5c48 --- /dev/null +++ b/cross.dockerfile @@ -0,0 +1,11 @@ +FROM balenalib/aarch64-ubuntu-node:10-cosmic + +RUN [ "cross-build-start" ] + +RUN apt-get update && apt-get install -y libsqlite3-dev build-essential python-dev + +COPY . . + +RUN npm install + + From 4980fc52505b9585393ddc2eafdb9c2326c9384d Mon Sep 17 00:00:00 2001 From: Joseph Hughes Date: Fri, 27 Sep 2019 15:33:49 -0400 Subject: [PATCH 02/38] fix: add circle config --- .circleci/config.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index b49731922..ab2319e01 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -8,9 +8,9 @@ jobs: docker: - image: balenalib/aarch64-ubuntu-node:10-cosmic steps: - - apt-get update && apt-get install git libsqlite3-dev build-essential python-dev + - run: apt-get update && apt-get install git libsqlite3-dev build-essential python-dev - checkout - - npm install + - run: npm install workflows: From 9f965c6782bf1cc3913bf0f18b71233800d0f1ee Mon Sep 17 00:00:00 2001 From: Joseph Hughes Date: Fri, 27 Sep 2019 15:45:16 -0400 Subject: [PATCH 03/38] fix: crossbuild it --- .circleci/config.yml | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index ab2319e01..561edbc7c 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -6,13 +6,15 @@ orbs: jobs: build: docker: - - image: balenalib/aarch64-ubuntu-node:10-cosmic + - image: docker:18.09.9-git steps: - - run: apt-get update && apt-get install git libsqlite3-dev build-essential python-dev - checkout - - run: npm install - - + - setup_remote_docker + - docker build -t arm64 -f cross.dockerfile . + - docker run --name temp-container arm64 /bin/true + - docker cp temp-container:build/stage/sqlite3/v4.1.0/node-v64-linux-arm64.tar.gz ./ + - docker rm temp-container + - ls -la workflows: build_and_release: jobs: From dd2df2639eab9217f8945789e37db67edc3709f4 Mon Sep 17 00:00:00 2001 From: Joseph Hughes Date: Fri, 27 Sep 2019 15:46:05 -0400 Subject: [PATCH 04/38] fix: crossbuild it --- .circleci/config.yml | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index 561edbc7c..6b135cdf6 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -10,11 +10,11 @@ jobs: steps: - checkout - setup_remote_docker - - docker build -t arm64 -f cross.dockerfile . - - docker run --name temp-container arm64 /bin/true - - docker cp temp-container:build/stage/sqlite3/v4.1.0/node-v64-linux-arm64.tar.gz ./ - - docker rm temp-container - - ls -la + - run: docker build -t arm64 -f cross.dockerfile . + - run: docker run --name temp-container arm64 /bin/true + - run: docker cp temp-container:build/stage/sqlite3/v4.1.0/node-v64-linux-arm64.tar.gz ./ + - run: docker rm temp-container + - run: ls -la workflows: build_and_release: jobs: From e62ad1f0ac7754c8a796a7fa48af1719f98af43d Mon Sep 17 00:00:00 2001 From: Joseph Hughes Date: Fri, 27 Sep 2019 15:49:12 -0400 Subject: [PATCH 05/38] fix: add package build --- cross.dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cross.dockerfile b/cross.dockerfile index 535ad5c48..58704ad80 100644 --- a/cross.dockerfile +++ b/cross.dockerfile @@ -8,4 +8,4 @@ COPY . . RUN npm install - +RUN ./node_modules/.bin/node-pre-gyp build package \ No newline at end of file From 6fb9abd3a643cd83042b5be85350d4685bd91afc Mon Sep 17 00:00:00 2001 From: Joseph Hughes Date: Fri, 27 Sep 2019 19:22:22 -0400 Subject: [PATCH 06/38] fix: try to avoid timeout --- .circleci/config.yml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index 6b135cdf6..9ba786813 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -10,7 +10,9 @@ jobs: steps: - checkout - setup_remote_docker - - run: docker build -t arm64 -f cross.dockerfile . + - run: + command: docker build -t arm64 -f cross.dockerfile . + no_output_timeout: 3600 - run: docker run --name temp-container arm64 /bin/true - run: docker cp temp-container:build/stage/sqlite3/v4.1.0/node-v64-linux-arm64.tar.gz ./ - run: docker rm temp-container From 779a8fbd4c909798eab5196f7715c49b3d35d2af Mon Sep 17 00:00:00 2001 From: Joseph Hughes Date: Fri, 27 Sep 2019 19:24:51 -0400 Subject: [PATCH 07/38] fix: amd64 and arm --- .circleci/config.yml | 21 ++++++++++++++++++--- amd64.dockerfile | 9 +++++++++ cross.dockerfile => arm64.dockerfile | 0 3 files changed, 27 insertions(+), 3 deletions(-) create mode 100644 amd64.dockerfile rename cross.dockerfile => arm64.dockerfile (100%) diff --git a/.circleci/config.yml b/.circleci/config.yml index 9ba786813..17cab6890 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -4,14 +4,27 @@ orbs: go-module: timakin/go-module@0.3.0 sixrs-gke: sixriversystems/sixrs-gke@0.1.1 jobs: - build: + build-amd64: docker: - image: docker:18.09.9-git steps: - checkout - setup_remote_docker - run: - command: docker build -t arm64 -f cross.dockerfile . + command: docker build -t amd64-f amd64.dockerfile . + no_output_timeout: 3600 + - run: docker run --name temp-container amd64 /bin/true + - run: docker cp temp-container:build/stage/sqlite3/v4.1.0/node-v64-linux-amd64.tar.gz ./ + - run: docker rm temp-container + - run: ls -la + build-arm64: + docker: + - image: docker:18.09.9-git + steps: + - checkout + - setup_remote_docker + - run: + command: docker build -t arm64 -f arm64.dockerfile . no_output_timeout: 3600 - run: docker run --name temp-container arm64 /bin/true - run: docker cp temp-container:build/stage/sqlite3/v4.1.0/node-v64-linux-arm64.tar.gz ./ @@ -20,7 +33,9 @@ jobs: workflows: build_and_release: jobs: - - build: + - build-arm64: + context: 6rs-circle + - build-amd64: context: 6rs-circle diff --git a/amd64.dockerfile b/amd64.dockerfile new file mode 100644 index 000000000..5920f325c --- /dev/null +++ b/amd64.dockerfile @@ -0,0 +1,9 @@ +FROM balenalib/amd64-ubuntu-node:10-cosmic + +RUN apt-get update && apt-get install -y libsqlite3-dev build-essential python-dev + +COPY . . + +RUN npm install + +RUN ./node_modules/.bin/node-pre-gyp build package \ No newline at end of file diff --git a/cross.dockerfile b/arm64.dockerfile similarity index 100% rename from cross.dockerfile rename to arm64.dockerfile From 0ff598b9a666e7b9e8c3092b2390109dc53e5dec Mon Sep 17 00:00:00 2001 From: Joseph Hughes Date: Fri, 27 Sep 2019 19:26:29 -0400 Subject: [PATCH 08/38] fix: amd64 and arm --- .circleci/config.yml | 2 +- amd64.dockerfile | 2 +- arm64.dockerfile | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index 17cab6890..957feff54 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -11,7 +11,7 @@ jobs: - checkout - setup_remote_docker - run: - command: docker build -t amd64-f amd64.dockerfile . + command: docker build -t amd64 -f amd64.dockerfile . no_output_timeout: 3600 - run: docker run --name temp-container amd64 /bin/true - run: docker cp temp-container:build/stage/sqlite3/v4.1.0/node-v64-linux-amd64.tar.gz ./ diff --git a/amd64.dockerfile b/amd64.dockerfile index 5920f325c..88805ba9b 100644 --- a/amd64.dockerfile +++ b/amd64.dockerfile @@ -4,6 +4,6 @@ RUN apt-get update && apt-get install -y libsqlite3-dev build-essential python-d COPY . . -RUN npm install +RUN npm install --build-from-source --sqlite=/usr/local RUN ./node_modules/.bin/node-pre-gyp build package \ No newline at end of file diff --git a/arm64.dockerfile b/arm64.dockerfile index 58704ad80..e97e41783 100644 --- a/arm64.dockerfile +++ b/arm64.dockerfile @@ -6,6 +6,6 @@ RUN apt-get update && apt-get install -y libsqlite3-dev build-essential python-d COPY . . -RUN npm install +RUN npm install --build-from-source --sqlite=/usr/local RUN ./node_modules/.bin/node-pre-gyp build package \ No newline at end of file From 4fbbd6324e27fafa63167b3250ca1a8e4398b61c Mon Sep 17 00:00:00 2001 From: Joseph Hughes Date: Fri, 27 Sep 2019 19:30:55 -0400 Subject: [PATCH 09/38] fix: amd64 --- .circleci/config.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index 957feff54..4a897c206 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -14,7 +14,7 @@ jobs: command: docker build -t amd64 -f amd64.dockerfile . no_output_timeout: 3600 - run: docker run --name temp-container amd64 /bin/true - - run: docker cp temp-container:build/stage/sqlite3/v4.1.0/node-v64-linux-amd64.tar.gz ./ + - run: docker cp temp-container:build/stage/sqlite3/v4.1.0/node-v64-linux-x64.tar.gz ./ - run: docker rm temp-container - run: ls -la build-arm64: From 67223cb6f6ab1083c7c6ff445fd58cbf8d7e8224 Mon Sep 17 00:00:00 2001 From: Joseph Hughes Date: Fri, 27 Sep 2019 19:34:31 -0400 Subject: [PATCH 10/38] fix: stop crossbuild --- arm64.dockerfile | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/arm64.dockerfile b/arm64.dockerfile index e97e41783..f57050823 100644 --- a/arm64.dockerfile +++ b/arm64.dockerfile @@ -8,4 +8,6 @@ COPY . . RUN npm install --build-from-source --sqlite=/usr/local -RUN ./node_modules/.bin/node-pre-gyp build package \ No newline at end of file +RUN ./node_modules/.bin/node-pre-gyp build package + +RUN [ "cross-build-stop" ] \ No newline at end of file From 29990aa9a5e449e2c08c6b70a09f6edba760dcc5 Mon Sep 17 00:00:00 2001 From: Joseph Hughes Date: Fri, 27 Sep 2019 19:42:38 -0400 Subject: [PATCH 11/38] fix: stop crossbuild --- arm64.dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/arm64.dockerfile b/arm64.dockerfile index f57050823..a92d7b3ec 100644 --- a/arm64.dockerfile +++ b/arm64.dockerfile @@ -10,4 +10,4 @@ RUN npm install --build-from-source --sqlite=/usr/local RUN ./node_modules/.bin/node-pre-gyp build package -RUN [ "cross-build-stop" ] \ No newline at end of file +RUN [ "cross-build-end" ] \ No newline at end of file From dacbb16ddeab10caff4d7d7c9a95a520b43b1748 Mon Sep 17 00:00:00 2001 From: Joseph Hughes Date: Fri, 27 Sep 2019 19:57:08 -0400 Subject: [PATCH 12/38] fix: stop crossbuild --- .circleci/config.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index 4a897c206..20308c0d4 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -13,7 +13,7 @@ jobs: - run: command: docker build -t amd64 -f amd64.dockerfile . no_output_timeout: 3600 - - run: docker run --name temp-container amd64 /bin/true + - run: docker run -it --name temp-container amd64 /bin/bash & - run: docker cp temp-container:build/stage/sqlite3/v4.1.0/node-v64-linux-x64.tar.gz ./ - run: docker rm temp-container - run: ls -la From 94db3217bdeb064f7a1e96a7f1647d4c6e24bc75 Mon Sep 17 00:00:00 2001 From: Joseph Hughes Date: Fri, 27 Sep 2019 20:06:46 -0400 Subject: [PATCH 13/38] fix: try inf loop --- .circleci/config.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index 20308c0d4..9a4d502d6 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -13,7 +13,7 @@ jobs: - run: command: docker build -t amd64 -f amd64.dockerfile . no_output_timeout: 3600 - - run: docker run -it --name temp-container amd64 /bin/bash & + - run: docker run --name temp-container amd64 /bin/bash while sleep 2; do echo thinking; done - run: docker cp temp-container:build/stage/sqlite3/v4.1.0/node-v64-linux-x64.tar.gz ./ - run: docker rm temp-container - run: ls -la From a47a3b0ec0d56ed641d5a83d53de2cf60493565a Mon Sep 17 00:00:00 2001 From: Joseph Hughes Date: Fri, 27 Sep 2019 20:10:35 -0400 Subject: [PATCH 14/38] fix: try inf loop --- .circleci/config.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index 9a4d502d6..5e2ef35e1 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -13,7 +13,7 @@ jobs: - run: command: docker build -t amd64 -f amd64.dockerfile . no_output_timeout: 3600 - - run: docker run --name temp-container amd64 /bin/bash while sleep 2; do echo thinking; done + - run: docker run --name temp-container amd64 /bin/bash -c "while sleep 2; do echo thinking; done" - run: docker cp temp-container:build/stage/sqlite3/v4.1.0/node-v64-linux-x64.tar.gz ./ - run: docker rm temp-container - run: ls -la From f30d6758269613a56a258408d0a9a5b87660d227 Mon Sep 17 00:00:00 2001 From: Joseph Hughes Date: Fri, 27 Sep 2019 20:21:36 -0400 Subject: [PATCH 15/38] fix: try inf loop --- .circleci/config.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index 5e2ef35e1..99643e019 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -13,7 +13,7 @@ jobs: - run: command: docker build -t amd64 -f amd64.dockerfile . no_output_timeout: 3600 - - run: docker run --name temp-container amd64 /bin/bash -c "while sleep 2; do echo thinking; done" + - run: docker run --name temp-container amd64 /bin/bash -c "echo thinking;" - run: docker cp temp-container:build/stage/sqlite3/v4.1.0/node-v64-linux-x64.tar.gz ./ - run: docker rm temp-container - run: ls -la @@ -26,7 +26,7 @@ jobs: - run: command: docker build -t arm64 -f arm64.dockerfile . no_output_timeout: 3600 - - run: docker run --name temp-container arm64 /bin/true + - run: docker run --name temp-container arm64 /bin/bash -c "echo thinking;" - run: docker cp temp-container:build/stage/sqlite3/v4.1.0/node-v64-linux-arm64.tar.gz ./ - run: docker rm temp-container - run: ls -la From 4d4b0b9e277ed1f4e60978fa0e9218938cba78fe Mon Sep 17 00:00:00 2001 From: Joseph Hughes Date: Fri, 27 Sep 2019 20:34:05 -0400 Subject: [PATCH 16/38] fix: try inf loop --- .circleci/config.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index 99643e019..e17613086 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -13,7 +13,7 @@ jobs: - run: command: docker build -t amd64 -f amd64.dockerfile . no_output_timeout: 3600 - - run: docker run --name temp-container amd64 /bin/bash -c "echo thinking;" + - run: docker run --name temp-container amd64 cross-build-start; echo thinking; - run: docker cp temp-container:build/stage/sqlite3/v4.1.0/node-v64-linux-x64.tar.gz ./ - run: docker rm temp-container - run: ls -la From bd31a3b51f2f81b1efdf424326a99b83495b29ac Mon Sep 17 00:00:00 2001 From: Joseph Hughes Date: Fri, 27 Sep 2019 21:04:45 -0400 Subject: [PATCH 17/38] fix: use multistate builds --- .circleci/config.yml | 6 +++--- arm64.dockerfile | 16 +++++++++++++++- 2 files changed, 18 insertions(+), 4 deletions(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index e17613086..600f91c11 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -13,7 +13,7 @@ jobs: - run: command: docker build -t amd64 -f amd64.dockerfile . no_output_timeout: 3600 - - run: docker run --name temp-container amd64 cross-build-start; echo thinking; + - run: docker run --name temp-container amd64 /bin/true - run: docker cp temp-container:build/stage/sqlite3/v4.1.0/node-v64-linux-x64.tar.gz ./ - run: docker rm temp-container - run: ls -la @@ -26,8 +26,8 @@ jobs: - run: command: docker build -t arm64 -f arm64.dockerfile . no_output_timeout: 3600 - - run: docker run --name temp-container arm64 /bin/bash -c "echo thinking;" - - run: docker cp temp-container:build/stage/sqlite3/v4.1.0/node-v64-linux-arm64.tar.gz ./ + - run: docker run --name temp-container arm64 /bin/true + - run: docker cp temp-container:/node-v64-linux-arm64.tar.gz . - run: docker rm temp-container - run: ls -la workflows: diff --git a/arm64.dockerfile b/arm64.dockerfile index a92d7b3ec..ce65a07e4 100644 --- a/arm64.dockerfile +++ b/arm64.dockerfile @@ -9,5 +9,19 @@ COPY . . RUN npm install --build-from-source --sqlite=/usr/local RUN ./node_modules/.bin/node-pre-gyp build package +# +# RUN echo "deb [signed-by=/usr/share/keyrings/cloud.google.gpg] https://packages.cloud.google.com/apt cloud-sdk main" | sudo tee -a /etc/apt/sources.list.d/google-cloud-sdk.list +# -RUN [ "cross-build-end" ] \ No newline at end of file +# RUN apt-get install apt-transport-https ca-certificates curl +# +# RUN curl https://packages.cloud.google.com/apt/doc/apt-key.gpg | sudo apt-key --keyring /usr/share/keyrings/cloud.google.gpg add - +# +# RUN apt-get update && apt-get install google-cloud-sdk + +RUN [ "cross-build-end" ] + + +FROM google/cloud-sdk:alpine +WORKDIR / +COPY --from=0 /build/stage/sqlite3/v4.1.0/node-v64-linux-arm64.tar.gz . From 505d7269bbb37ca61c63a75875987bbfb1b04ff2 Mon Sep 17 00:00:00 2001 From: Joseph Hughes Date: Fri, 27 Sep 2019 21:28:02 -0400 Subject: [PATCH 18/38] fix: prepare upload --- .circleci/config.yml | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) diff --git a/.circleci/config.yml b/.circleci/config.yml index 600f91c11..17991186d 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -17,6 +17,10 @@ jobs: - run: docker cp temp-container:build/stage/sqlite3/v4.1.0/node-v64-linux-x64.tar.gz ./ - run: docker rm temp-container - run: ls -la + - persist_to_workspace: + root: ./ + paths: + - node-v64-linux-x64.tar.gz build-arm64: docker: - image: docker:18.09.9-git @@ -30,6 +34,18 @@ jobs: - run: docker cp temp-container:/node-v64-linux-arm64.tar.gz . - run: docker rm temp-container - run: ls -la + - persist_to_workspace: + root: ./ + paths: + - node-v64-linux-arm64.tar.gz + upload: + docker: + - image: google/cloud-sdk:alpine + steps: + - attach_workspace: + at: . + - run: ls -la + workflows: build_and_release: jobs: @@ -37,5 +53,8 @@ workflows: context: 6rs-circle - build-amd64: context: 6rs-circle + - upload: + context: 6rs-circle + From 586c0127bd3a605e7b82aa409db453d74f9f9917 Mon Sep 17 00:00:00 2001 From: Joseph Hughes Date: Fri, 27 Sep 2019 21:32:17 -0400 Subject: [PATCH 19/38] fix: prepare upload --- .circleci/config.yml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/.circleci/config.yml b/.circleci/config.yml index 17991186d..e8ff8398b 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -55,6 +55,9 @@ workflows: context: 6rs-circle - upload: context: 6rs-circle + requires: + - build-amd64 + - build-arm64 From 095da7be038e691a929ba519f908fd69bdb3000a Mon Sep 17 00:00:00 2001 From: Joseph Hughes Date: Fri, 27 Sep 2019 21:39:44 -0400 Subject: [PATCH 20/38] fix: actually upload --- .circleci/config.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.circleci/config.yml b/.circleci/config.yml index e8ff8398b..85b3f8a3e 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -45,6 +45,7 @@ jobs: - attach_workspace: at: . - run: ls -la + - run: gsutil cp -r *.tar.gz gs://public-nodejs-binary/sqlite3/v4.1.0/ workflows: build_and_release: From 24b6dca193300823cf16c43a3791eebcd2e538a6 Mon Sep 17 00:00:00 2001 From: Joseph Hughes Date: Fri, 27 Sep 2019 21:51:11 -0400 Subject: [PATCH 21/38] fix: add circle config --- .circleci/config.yml | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/.circleci/config.yml b/.circleci/config.yml index 85b3f8a3e..579bf0fdb 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -45,6 +45,10 @@ jobs: - attach_workspace: at: . - run: ls -la + - run: activate gcloud + command: | + echo "${CLIENT_SECRET}" | base64 -d > /tmp/client-secret.json + gcloud auth activate-service-account --key-file /tmp/client-secret.json - run: gsutil cp -r *.tar.gz gs://public-nodejs-binary/sqlite3/v4.1.0/ workflows: From c574f546aeb978cdc25c987d318db64cc4839a56 Mon Sep 17 00:00:00 2001 From: Joseph Hughes Date: Fri, 27 Sep 2019 21:52:37 -0400 Subject: [PATCH 22/38] fix: add circle config --- .circleci/config.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index 579bf0fdb..b84780c39 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -45,7 +45,8 @@ jobs: - attach_workspace: at: . - run: ls -la - - run: activate gcloud + - run: + name: Activate gcloud command: | echo "${CLIENT_SECRET}" | base64 -d > /tmp/client-secret.json gcloud auth activate-service-account --key-file /tmp/client-secret.json From 6de26a0724a314fb84b3c6a4dfb053e93010fcc1 Mon Sep 17 00:00:00 2001 From: Joseph Hughes Date: Sat, 28 Sep 2019 19:48:37 -0400 Subject: [PATCH 23/38] fix: make solution more generic --- .circleci/config.yml | 12 +++++++++--- amd64.dockerfile | 10 +++++++++- arm64.dockerfile | 16 +++++----------- 3 files changed, 23 insertions(+), 15 deletions(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index b84780c39..f66258fa3 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -14,7 +14,7 @@ jobs: command: docker build -t amd64 -f amd64.dockerfile . no_output_timeout: 3600 - run: docker run --name temp-container amd64 /bin/true - - run: docker cp temp-container:build/stage/sqlite3/v4.1.0/node-v64-linux-x64.tar.gz ./ + - run: docker cp temp-container:*.tar.gz ./ - run: docker rm temp-container - run: ls -la - persist_to_workspace: @@ -31,12 +31,14 @@ jobs: command: docker build -t arm64 -f arm64.dockerfile . no_output_timeout: 3600 - run: docker run --name temp-container arm64 /bin/true - - run: docker cp temp-container:/node-v64-linux-arm64.tar.gz . + - run: docker cp temp-container:/*.tar.gz . + - run: docker cp temp-container:/target_path.txt . - run: docker rm temp-container - run: ls -la - persist_to_workspace: root: ./ paths: + - target_path.txt - node-v64-linux-arm64.tar.gz upload: docker: @@ -50,7 +52,11 @@ jobs: command: | echo "${CLIENT_SECRET}" | base64 -d > /tmp/client-secret.json gcloud auth activate-service-account --key-file /tmp/client-secret.json - - run: gsutil cp -r *.tar.gz gs://public-nodejs-binary/sqlite3/v4.1.0/ + - run: + name: Upload to gcloud + command: | + TARGET_PATH=$(dirname $(cat target_path.txt)) + gsutil cp -r *.tar.gz gs://public-nodejs-binary/${TARGET_PATH}/ workflows: build_and_release: diff --git a/amd64.dockerfile b/amd64.dockerfile index 88805ba9b..dde78a558 100644 --- a/amd64.dockerfile +++ b/amd64.dockerfile @@ -6,4 +6,12 @@ COPY . . RUN npm install --build-from-source --sqlite=/usr/local -RUN ./node_modules/.bin/node-pre-gyp build package \ No newline at end of file +RUN ./node_modules/.bin/node-pre-gyp build package +RUN find build/stage -iname "*.tar.gz" > binary_path.txt +RUN find build/stage -iname "*.tar.gz" | sed 's/^.*sqlite3/sqlite3/' > target_path.txt + +FROM google/cloud-sdk:alpine +WORKDIR / +COPY --from=0 /binary_path.txt . +COPY --from=0 /target_path.txt . +COPY --from=0 /build/stage/**/**/*.tar.gz . diff --git a/arm64.dockerfile b/arm64.dockerfile index ce65a07e4..60a9ece41 100644 --- a/arm64.dockerfile +++ b/arm64.dockerfile @@ -9,19 +9,13 @@ COPY . . RUN npm install --build-from-source --sqlite=/usr/local RUN ./node_modules/.bin/node-pre-gyp build package -# -# RUN echo "deb [signed-by=/usr/share/keyrings/cloud.google.gpg] https://packages.cloud.google.com/apt cloud-sdk main" | sudo tee -a /etc/apt/sources.list.d/google-cloud-sdk.list -# - -# RUN apt-get install apt-transport-https ca-certificates curl -# -# RUN curl https://packages.cloud.google.com/apt/doc/apt-key.gpg | sudo apt-key --keyring /usr/share/keyrings/cloud.google.gpg add - -# -# RUN apt-get update && apt-get install google-cloud-sdk - +RUN find build/stage -iname "*.tar.gz" > binary_path.txt +RUN find build/stage -iname "*.tar.gz" | sed 's/^.*sqlite3/sqlite3/' > target_path.txt RUN [ "cross-build-end" ] FROM google/cloud-sdk:alpine WORKDIR / -COPY --from=0 /build/stage/sqlite3/v4.1.0/node-v64-linux-arm64.tar.gz . +COPY --from=0 /binary_path.txt . +COPY --from=0 /target_path.txt . +COPY --from=0 /build/stage/**/**/*.tar.gz . From b8214576f098384813edf783d87bc94b47f9589c Mon Sep 17 00:00:00 2001 From: Joseph Hughes Date: Sat, 28 Sep 2019 20:41:12 -0400 Subject: [PATCH 24/38] fix: update for build --- .circleci/config.yml | 4 ++++ amd64.dockerfile | 4 ++-- arm64.dockerfile | 2 +- package.json | 4 ++-- 4 files changed, 9 insertions(+), 5 deletions(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index f66258fa3..f34c07163 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -55,8 +55,12 @@ jobs: - run: name: Upload to gcloud command: | + BINARY_PATH=$(dirname $(cat binary_path.txt)) TARGET_PATH=$(dirname $(cat target_path.txt)) + ls -la ${BINARY_PATH} + cp -r ${BINARY_PATH}/*.tar.gz . gsutil cp -r *.tar.gz gs://public-nodejs-binary/${TARGET_PATH}/ + gsutil acl ch -r -u AllUsers:R gs://public-nodejs-binary/${TARGET_PATH} workflows: build_and_release: diff --git a/amd64.dockerfile b/amd64.dockerfile index dde78a558..8634b3e74 100644 --- a/amd64.dockerfile +++ b/amd64.dockerfile @@ -4,7 +4,7 @@ RUN apt-get update && apt-get install -y libsqlite3-dev build-essential python-d COPY . . -RUN npm install --build-from-source --sqlite=/usr/local +RUN npm install --build-from-source RUN ./node_modules/.bin/node-pre-gyp build package RUN find build/stage -iname "*.tar.gz" > binary_path.txt @@ -14,4 +14,4 @@ FROM google/cloud-sdk:alpine WORKDIR / COPY --from=0 /binary_path.txt . COPY --from=0 /target_path.txt . -COPY --from=0 /build/stage/**/**/*.tar.gz . +COPY --from=0 /build/stage/ . diff --git a/arm64.dockerfile b/arm64.dockerfile index 60a9ece41..9423769e1 100644 --- a/arm64.dockerfile +++ b/arm64.dockerfile @@ -18,4 +18,4 @@ FROM google/cloud-sdk:alpine WORKDIR / COPY --from=0 /binary_path.txt . COPY --from=0 /target_path.txt . -COPY --from=0 /build/stage/**/**/*.tar.gz . +COPY --from=0 /build/stage/ . diff --git a/package.json b/package.json index 530f3c709..331ef8af3 100644 --- a/package.json +++ b/package.json @@ -1,5 +1,5 @@ { - "name": "sqlite3", + "name": "@6river/sqlite3", "description": "Asynchronous, non-blocking SQLite3 bindings", "version": "4.1.0", "homepage": "https://github.com/mapbox/node-sqlite3", @@ -10,7 +10,7 @@ "binary": { "module_name": "node_sqlite3", "module_path": "./lib/binding/{node_abi}-{platform}-{arch}", - "host": "https://mapbox-node-binary.s3.amazonaws.com", + "host": "https://storage.cloud.google.com/public-nodejs-binary", "remote_path": "./{name}/v{version}/{toolset}/", "package_name": "{node_abi}-{platform}-{arch}.tar.gz" }, From 3eecf0943ca7719b68a59f93db81566927eb273e Mon Sep 17 00:00:00 2001 From: Joseph Hughes Date: Sat, 28 Sep 2019 20:46:33 -0400 Subject: [PATCH 25/38] fix: update for build --- .circleci/config.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index f34c07163..c431864b8 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -14,7 +14,7 @@ jobs: command: docker build -t amd64 -f amd64.dockerfile . no_output_timeout: 3600 - run: docker run --name temp-container amd64 /bin/true - - run: docker cp temp-container:*.tar.gz ./ + - run: docker cp temp-container:/build/stage/ ./ - run: docker rm temp-container - run: ls -la - persist_to_workspace: @@ -31,7 +31,7 @@ jobs: command: docker build -t arm64 -f arm64.dockerfile . no_output_timeout: 3600 - run: docker run --name temp-container arm64 /bin/true - - run: docker cp temp-container:/*.tar.gz . + - run: docker cp temp-container:/build/stage/ . - run: docker cp temp-container:/target_path.txt . - run: docker rm temp-container - run: ls -la From a5d3bf21d17ba8fd4a29c64d36495ab21d0b3dd1 Mon Sep 17 00:00:00 2001 From: Joseph Hughes Date: Sat, 28 Sep 2019 20:50:20 -0400 Subject: [PATCH 26/38] fix: update for build --- .circleci/config.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index c431864b8..8af2fdc0c 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -14,7 +14,7 @@ jobs: command: docker build -t amd64 -f amd64.dockerfile . no_output_timeout: 3600 - run: docker run --name temp-container amd64 /bin/true - - run: docker cp temp-container:/build/stage/ ./ + - run: docker cp temp-container:/@6river/ ./ - run: docker rm temp-container - run: ls -la - persist_to_workspace: @@ -31,7 +31,7 @@ jobs: command: docker build -t arm64 -f arm64.dockerfile . no_output_timeout: 3600 - run: docker run --name temp-container arm64 /bin/true - - run: docker cp temp-container:/build/stage/ . + - run: docker cp temp-container:/@6river/ . - run: docker cp temp-container:/target_path.txt . - run: docker rm temp-container - run: ls -la From f3716a78b111d7b52fa32ae4dfd62ad216acdb02 Mon Sep 17 00:00:00 2001 From: Joseph Hughes Date: Sat, 28 Sep 2019 20:55:17 -0400 Subject: [PATCH 27/38] fix: update for build --- .circleci/config.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index 8af2fdc0c..5089f2e5e 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -20,7 +20,7 @@ jobs: - persist_to_workspace: root: ./ paths: - - node-v64-linux-x64.tar.gz + - @6river build-arm64: docker: - image: docker:18.09.9-git @@ -39,7 +39,7 @@ jobs: root: ./ paths: - target_path.txt - - node-v64-linux-arm64.tar.gz + - @6river upload: docker: - image: google/cloud-sdk:alpine From c17b4967ab3f5dafcc77a8ed00f95d3e22d7372d Mon Sep 17 00:00:00 2001 From: Joseph Hughes Date: Sat, 28 Sep 2019 20:56:37 -0400 Subject: [PATCH 28/38] fix: update for build --- .circleci/config.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index 5089f2e5e..aa3554cc3 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -20,7 +20,7 @@ jobs: - persist_to_workspace: root: ./ paths: - - @6river + - '@6river' build-arm64: docker: - image: docker:18.09.9-git @@ -39,7 +39,7 @@ jobs: root: ./ paths: - target_path.txt - - @6river + - '@6river' upload: docker: - image: google/cloud-sdk:alpine From cba547defcb247dacff4ef0087799242db1fabf3 Mon Sep 17 00:00:00 2001 From: Joseph Hughes Date: Sat, 28 Sep 2019 21:11:31 -0400 Subject: [PATCH 29/38] fix: update for build --- .circleci/config.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.circleci/config.yml b/.circleci/config.yml index aa3554cc3..a46d3b36a 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -39,6 +39,7 @@ jobs: root: ./ paths: - target_path.txt + - binary_path.txt - '@6river' upload: docker: From dc1732c95f6ff2976bff96c20d027cf62a516e8b Mon Sep 17 00:00:00 2001 From: Joseph Hughes Date: Sat, 28 Sep 2019 21:22:02 -0400 Subject: [PATCH 30/38] fix: update for build --- .circleci/config.yml | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index a46d3b36a..9d42dce67 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -14,7 +14,9 @@ jobs: command: docker build -t amd64 -f amd64.dockerfile . no_output_timeout: 3600 - run: docker run --name temp-container amd64 /bin/true - - run: docker cp temp-container:/@6river/ ./ + - run: docker cp temp-container:/@6river/ . + - run: docker cp temp-container:/target_path.txt . + - run: docker cp temp-container:/binary_path.txt . - run: docker rm temp-container - run: ls -la - persist_to_workspace: @@ -32,7 +34,6 @@ jobs: no_output_timeout: 3600 - run: docker run --name temp-container arm64 /bin/true - run: docker cp temp-container:/@6river/ . - - run: docker cp temp-container:/target_path.txt . - run: docker rm temp-container - run: ls -la - persist_to_workspace: From 4104a1890f30fd6e3c1f19716b2e818932b162fe Mon Sep 17 00:00:00 2001 From: Joseph Hughes Date: Sat, 28 Sep 2019 21:30:33 -0400 Subject: [PATCH 31/38] fix: update for build --- .circleci/config.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index 9d42dce67..84bc7a622 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -22,6 +22,8 @@ jobs: - persist_to_workspace: root: ./ paths: + - target_path.txt + - binary_path.txt - '@6river' build-arm64: docker: @@ -39,8 +41,6 @@ jobs: - persist_to_workspace: root: ./ paths: - - target_path.txt - - binary_path.txt - '@6river' upload: docker: From 3369b52ef563d90e88a17ae26ba68d05640570a9 Mon Sep 17 00:00:00 2001 From: Joseph Hughes Date: Sat, 28 Sep 2019 21:42:08 -0400 Subject: [PATCH 32/38] fix: update for build --- amd64.dockerfile | 2 +- arm64.dockerfile | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/amd64.dockerfile b/amd64.dockerfile index 8634b3e74..86368a1be 100644 --- a/amd64.dockerfile +++ b/amd64.dockerfile @@ -7,7 +7,7 @@ COPY . . RUN npm install --build-from-source RUN ./node_modules/.bin/node-pre-gyp build package -RUN find build/stage -iname "*.tar.gz" > binary_path.txt +RUN find build/stage -iname "*.tar.gz" | sed 's/^.*@6river/@6river/' > binary_path.txt RUN find build/stage -iname "*.tar.gz" | sed 's/^.*sqlite3/sqlite3/' > target_path.txt FROM google/cloud-sdk:alpine diff --git a/arm64.dockerfile b/arm64.dockerfile index 9423769e1..4dacc49c4 100644 --- a/arm64.dockerfile +++ b/arm64.dockerfile @@ -9,7 +9,7 @@ COPY . . RUN npm install --build-from-source --sqlite=/usr/local RUN ./node_modules/.bin/node-pre-gyp build package -RUN find build/stage -iname "*.tar.gz" > binary_path.txt +RUN find build/stage -iname "*.tar.gz" | sed 's/^.*@6river/@6river/' > binary_path.txt RUN find build/stage -iname "*.tar.gz" | sed 's/^.*sqlite3/sqlite3/' > target_path.txt RUN [ "cross-build-end" ] From 340e2c7f2f45d7ab24853c4aeae126309b6cc0d6 Mon Sep 17 00:00:00 2001 From: Joseph Hughes Date: Sat, 28 Sep 2019 21:56:12 -0400 Subject: [PATCH 33/38] fix: update for build --- arm64.dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/arm64.dockerfile b/arm64.dockerfile index 4dacc49c4..5d3f42469 100644 --- a/arm64.dockerfile +++ b/arm64.dockerfile @@ -6,7 +6,7 @@ RUN apt-get update && apt-get install -y libsqlite3-dev build-essential python-d COPY . . -RUN npm install --build-from-source --sqlite=/usr/local +RUN npm install RUN ./node_modules/.bin/node-pre-gyp build package RUN find build/stage -iname "*.tar.gz" | sed 's/^.*@6river/@6river/' > binary_path.txt From 4d1bf54173f78fe2f241408897c11aeae018b33b Mon Sep 17 00:00:00 2001 From: Joseph Hughes Date: Sat, 28 Sep 2019 22:49:15 -0400 Subject: [PATCH 34/38] fix: path --- .circleci/config.yml | 2 +- package.json | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index 84bc7a622..50010d1e5 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -62,7 +62,7 @@ jobs: ls -la ${BINARY_PATH} cp -r ${BINARY_PATH}/*.tar.gz . gsutil cp -r *.tar.gz gs://public-nodejs-binary/${TARGET_PATH}/ - gsutil acl ch -r -u AllUsers:R gs://public-nodejs-binary/${TARGET_PATH} + gsutil acl ch -r -u AllUsers:R gs://public-nodejs-binary/@6river/${TARGET_PATH} workflows: build_and_release: diff --git a/package.json b/package.json index 331ef8af3..5dce20c1a 100644 --- a/package.json +++ b/package.json @@ -10,7 +10,7 @@ "binary": { "module_name": "node_sqlite3", "module_path": "./lib/binding/{node_abi}-{platform}-{arch}", - "host": "https://storage.cloud.google.com/public-nodejs-binary", + "host": "https://storage.googleapis.com/public-nodejs-binary", "remote_path": "./{name}/v{version}/{toolset}/", "package_name": "{node_abi}-{platform}-{arch}.tar.gz" }, From 8a2236082aec77b6b17fa627ad892ce4e4defd87 Mon Sep 17 00:00:00 2001 From: Joseph Hughes Date: Sun, 29 Sep 2019 20:21:10 -0400 Subject: [PATCH 35/38] fix: issue with path --- .circleci/config.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index 50010d1e5..ab0bfcc8e 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -61,7 +61,8 @@ jobs: TARGET_PATH=$(dirname $(cat target_path.txt)) ls -la ${BINARY_PATH} cp -r ${BINARY_PATH}/*.tar.gz . - gsutil cp -r *.tar.gz gs://public-nodejs-binary/${TARGET_PATH}/ + printf "gsutil cp -r *.tar.gz gs://public-nodejs-binary/@6river/${TARGET_PATH}/" + gsutil cp -r *.tar.gz gs://public-nodejs-binary/@6river/${TARGET_PATH}/ gsutil acl ch -r -u AllUsers:R gs://public-nodejs-binary/@6river/${TARGET_PATH} workflows: From 7661b414c3361424e71da9769ed43178ff39f299 Mon Sep 17 00:00:00 2001 From: Joseph Hughes Date: Sun, 29 Sep 2019 20:30:57 -0400 Subject: [PATCH 36/38] fix: --build-from-source --- arm64.dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/arm64.dockerfile b/arm64.dockerfile index 5d3f42469..8558f0793 100644 --- a/arm64.dockerfile +++ b/arm64.dockerfile @@ -6,7 +6,7 @@ RUN apt-get update && apt-get install -y libsqlite3-dev build-essential python-d COPY . . -RUN npm install +RUN npm install --build-from-source RUN ./node_modules/.bin/node-pre-gyp build package RUN find build/stage -iname "*.tar.gz" | sed 's/^.*@6river/@6river/' > binary_path.txt From 787ccb7d70e962f0f8f08e6db79fbfad4bdadca8 Mon Sep 17 00:00:00 2001 From: Joseph Hughes Date: Sun, 29 Sep 2019 20:33:46 -0400 Subject: [PATCH 37/38] fix: upload to npm --- .circleci/config.yml | 25 +++++++++++++++++++++---- 1 file changed, 21 insertions(+), 4 deletions(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index ab0bfcc8e..b05959a78 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -64,19 +64,36 @@ jobs: printf "gsutil cp -r *.tar.gz gs://public-nodejs-binary/@6river/${TARGET_PATH}/" gsutil cp -r *.tar.gz gs://public-nodejs-binary/@6river/${TARGET_PATH}/ gsutil acl ch -r -u AllUsers:R gs://public-nodejs-binary/@6river/${TARGET_PATH} + publish: + docker: + - image: circleci/node:10.15.3 + steps: + - attach_workspace: + at: ./ + - run: + name: Setup NPM + command: npm config set //registry.npmjs.org/:_authToken "${NPM_TOKEN}" + - run: + name: Publish + command: npm publish --access public workflows: build_and_release: jobs: - - build-arm64: - context: 6rs-circle - - build-amd64: - context: 6rs-circle + - build-arm64 + - build-amd64 - upload: context: 6rs-circle requires: - build-amd64 - build-arm64 + - publish: + context: 6rs-public-npm + requires: + - upload + filters: + branches: + only: master From 390ccc4bd8bc156ece347b71e5938ee0a700aa43 Mon Sep 17 00:00:00 2001 From: Joseph Hughes Date: Sun, 29 Sep 2019 21:12:58 -0400 Subject: [PATCH 38/38] fix: upload to npm --- .circleci/config.yml | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index b05959a78..77622997b 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -68,8 +68,7 @@ jobs: docker: - image: circleci/node:10.15.3 steps: - - attach_workspace: - at: ./ + - checkout - run: name: Setup NPM command: npm config set //registry.npmjs.org/:_authToken "${NPM_TOKEN}"