From b8dc6153dda0e4d90efa3498050fb3016c84df95 Mon Sep 17 00:00:00 2001 From: Aaron Date: Wed, 6 May 2020 17:14:56 +1000 Subject: [PATCH 1/3] Add workbench build trigger to develop --- .circleci/config.yml | 12 ++++++++++++ trigger-demo-build.sh | 1 + 2 files changed, 13 insertions(+) create mode 100755 trigger-demo-build.sh diff --git a/.circleci/config.yml b/.circleci/config.yml index 66432a6..6b7e86e 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -58,6 +58,13 @@ jobs: - run: mkdir /root/project/deploy-temp/${VERSION} - run: mv /root/project/dist/iife/*.js /root/project/deploy-temp/${VERSION}/ - run: aws s3 sync /root/project/deploy-temp/${VERSION}/ s3://sdk.blocknative.com/${VERSION}/ --content-type "text/javascript" --content-encoding "gzip" --cache-control "max-age=31536000" --grants read=uri=http://acs.amazonaws.com/groups/global/AllUsers + deploy_demo: + docker: + - image: circleci/node:10.18.1-browsers + user: root + steps: + - checkout + - run: sh ./trigger-demo-build.sh $CIRCLE_TOKEN workflows: version: 2 test_build: @@ -77,3 +84,8 @@ workflows: branches: only: - master + - deploy_demo: + filters: + branches: + only: + - develop diff --git a/trigger-demo-build.sh b/trigger-demo-build.sh new file mode 100755 index 0000000..7261da6 --- /dev/null +++ b/trigger-demo-build.sh @@ -0,0 +1 @@ +curl -X POST --header "Content-Type: application/json" -d '{"build_parameters": {"CIRCLE_JOB": "deploy_stage"}}' https://circleci.com/api/v1/project/blocknative/workbench/tree/develop?circle-token=$1 \ No newline at end of file From 73f9e1fc173d623f7f60f29f9d0e039e1eb18953 Mon Sep 17 00:00:00 2001 From: Aaron Date: Wed, 6 May 2020 17:16:28 +1000 Subject: [PATCH 2/3] Modify job name --- .circleci/config.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index 6b7e86e..a44eb8d 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -58,7 +58,7 @@ jobs: - run: mkdir /root/project/deploy-temp/${VERSION} - run: mv /root/project/dist/iife/*.js /root/project/deploy-temp/${VERSION}/ - run: aws s3 sync /root/project/deploy-temp/${VERSION}/ s3://sdk.blocknative.com/${VERSION}/ --content-type "text/javascript" --content-encoding "gzip" --cache-control "max-age=31536000" --grants read=uri=http://acs.amazonaws.com/groups/global/AllUsers - deploy_demo: + deploy_workbench_staging: docker: - image: circleci/node:10.18.1-browsers user: root @@ -84,7 +84,7 @@ workflows: branches: only: - master - - deploy_demo: + - deploy_workbench_staging: filters: branches: only: From f64bbe436322e4b487cdca9274628e3d94d806fd Mon Sep 17 00:00:00 2001 From: Aaron Date: Mon, 11 May 2020 08:09:58 +1000 Subject: [PATCH 3/3] Allow for local networks --- src/messages.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/messages.ts b/src/messages.ts index d0e7e0e..afec51c 100644 --- a/src/messages.ts +++ b/src/messages.ts @@ -192,7 +192,7 @@ function createEventLog(this: any, msg: EventObject): string { version, blockchain: { system: this._system, - network: networkName(this._system, this._networkId) + network: networkName(this._system, this._networkId) || 'local' }, ...msg })