From bdde6a5413ce9bda1dfe9fbf0661d763d213c5e0 Mon Sep 17 00:00:00 2001 From: Cadence Ember Date: Tue, 20 Oct 2020 02:16:38 +1300 Subject: [PATCH 1/8] Drone (1) --- .drone.yml | 10 ++++++++++ 1 file changed, 10 insertions(+) create mode 100644 .drone.yml diff --git a/.drone.yml b/.drone.yml new file mode 100644 index 0000000..43ae67c --- /dev/null +++ b/.drone.yml @@ -0,0 +1,10 @@ +--- +kind: pipeline +type: exec +name: default + +steps: + - name: carbon + commands: + - npm install -D + - npm run rebuild From da6f08c9d057a690eb39d47ae6510f90fbea805a Mon Sep 17 00:00:00 2001 From: Cadence Ember Date: Tue, 20 Oct 2020 02:25:57 +1300 Subject: [PATCH 2/8] Drop seconds from message dates --- build/static/Timeline.js | 2 +- src/js/Timeline.js | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/build/static/Timeline.js b/build/static/Timeline.js index 0adce82..a957a1c 100644 --- a/build/static/Timeline.js +++ b/build/static/Timeline.js @@ -5,7 +5,7 @@ import {Anchor} from "./Anchor.js" import * as lsm from "./lsm.js" import {resolveMxc} from "./functions.js" -const dateFormatter = Intl.DateTimeFormat("default", {hour: "numeric", minute: "numeric", second: "numeric", day: "numeric", month: "short", year: "numeric"}) +const dateFormatter = Intl.DateTimeFormat("default", {hour: "numeric", minute: "numeric", day: "numeric", month: "short", year: "numeric"}) let sentIndex = 0 diff --git a/src/js/Timeline.js b/src/js/Timeline.js index 0adce82..a957a1c 100644 --- a/src/js/Timeline.js +++ b/src/js/Timeline.js @@ -5,7 +5,7 @@ import {Anchor} from "./Anchor.js" import * as lsm from "./lsm.js" import {resolveMxc} from "./functions.js" -const dateFormatter = Intl.DateTimeFormat("default", {hour: "numeric", minute: "numeric", second: "numeric", day: "numeric", month: "short", year: "numeric"}) +const dateFormatter = Intl.DateTimeFormat("default", {hour: "numeric", minute: "numeric", day: "numeric", month: "short", year: "numeric"}) let sentIndex = 0 From 2627de72caf34843e40e0e1d4040dfea913e674b Mon Sep 17 00:00:00 2001 From: Bad Date: Mon, 19 Oct 2020 16:17:29 +0200 Subject: [PATCH 3/8] Fix drone I think idk really --- .drone.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.drone.yml b/.drone.yml index 43ae67c..a61e98a 100644 --- a/.drone.yml +++ b/.drone.yml @@ -1,10 +1,10 @@ ---- kind: pipeline -type: exec +type: docker name: default steps: - - name: carbon + - name: build + image: node:14 commands: - npm install -D - npm run rebuild From a5280f73f1f13248352f184b31c3475e3b761379 Mon Sep 17 00:00:00 2001 From: Bad Date: Mon, 19 Oct 2020 16:54:42 +0200 Subject: [PATCH 4/8] Switch to alpine-node instead of node container --- .drone.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.drone.yml b/.drone.yml index a61e98a..1ab44d0 100644 --- a/.drone.yml +++ b/.drone.yml @@ -4,7 +4,7 @@ name: default steps: - name: build - image: node:14 + image: node:current-alpine3.12 commands: - npm install -D - npm run rebuild From 490066a292bafefdfd8e2cce2f11cc09a2df44f5 Mon Sep 17 00:00:00 2001 From: Bad Date: Tue, 20 Oct 2020 10:39:10 +0200 Subject: [PATCH 5/8] Upload drone artifacts --- .drone.yml | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) diff --git a/.drone.yml b/.drone.yml index 1ab44d0..fa569c6 100644 --- a/.drone.yml +++ b/.drone.yml @@ -8,3 +8,27 @@ steps: commands: - npm install -D - npm run rebuild +#Todo make this into a separate container + - name: package + image: alpine + commands: + - apk update + - apk add zip git + - echo FILENAME=`date +%Y%m%d%H%m`-`git rev-parse --short HEAD`.zip >> environment + - source environment + - zip -r $FILENAME build + + - name: b2 + image: tianon/backblaze-b2:2 + + environment: + BUCKET: carbon-artifacts + ACCOUNT: + from_secret: b2_account_id + KEY: + from_secret: b2_application_key + commands: + - source environment + - b2 authorize-account $ACCOUNT $KEY + - b2 upload-file $BUCKET $FILENAME $FILENAME + - echo Build artifacts avaliable at `b2 make-friendly-url $BUCKET $FILENAME` From 01b4b69706aa9600a0dc781b45e26510df423a41 Mon Sep 17 00:00:00 2001 From: Bad Date: Tue, 20 Oct 2020 10:46:35 +0200 Subject: [PATCH 6/8] Fix artifact uploads(hopefully) --- .drone.yml | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/.drone.yml b/.drone.yml index fa569c6..a07100a 100644 --- a/.drone.yml +++ b/.drone.yml @@ -23,12 +23,11 @@ steps: environment: BUCKET: carbon-artifacts - ACCOUNT: + B2_ACCOUNT_ID: from_secret: b2_account_id - KEY: + B2_APPLICATION_KEY: from_secret: b2_application_key commands: - source environment - - b2 authorize-account $ACCOUNT $KEY - b2 upload-file $BUCKET $FILENAME $FILENAME - echo Build artifacts avaliable at `b2 make-friendly-url $BUCKET $FILENAME` From 70649e4f5e7e557aae316c5ee45cfef60ed6a719 Mon Sep 17 00:00:00 2001 From: Bad Date: Tue, 20 Oct 2020 10:47:14 +0200 Subject: [PATCH 7/8] Revert "Fix artifact uploads(hopefully)" This reverts commit 01b4b69706aa9600a0dc781b45e26510df423a41. --- .drone.yml | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/.drone.yml b/.drone.yml index a07100a..fa569c6 100644 --- a/.drone.yml +++ b/.drone.yml @@ -23,11 +23,12 @@ steps: environment: BUCKET: carbon-artifacts - B2_ACCOUNT_ID: + ACCOUNT: from_secret: b2_account_id - B2_APPLICATION_KEY: + KEY: from_secret: b2_application_key commands: - source environment + - b2 authorize-account $ACCOUNT $KEY - b2 upload-file $BUCKET $FILENAME $FILENAME - echo Build artifacts avaliable at `b2 make-friendly-url $BUCKET $FILENAME` From c725b336792d3dd8dc81ca2764d47f6a5acb355f Mon Sep 17 00:00:00 2001 From: Bad Date: Tue, 20 Oct 2020 11:30:08 +0200 Subject: [PATCH 8/8] Update drone.yml to use a separate zip container --- .drone.yml | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/.drone.yml b/.drone.yml index fa569c6..f0524b8 100644 --- a/.drone.yml +++ b/.drone.yml @@ -8,19 +8,17 @@ steps: commands: - npm install -D - npm run rebuild -#Todo make this into a separate container + - name: package - image: alpine + image: fuww/alpine-zip commands: - - apk update - - apk add zip git - - echo FILENAME=`date +%Y%m%d%H%m`-`git rev-parse --short HEAD`.zip >> environment + - SHORTREV=`echo $DRONE_COMMIT | cut -b 1-8` + - echo FILENAME=`date +%Y%m%d%H%m`-$SHORTREV.zip >> environment - source environment - zip -r $FILENAME build - name: b2 image: tianon/backblaze-b2:2 - environment: BUCKET: carbon-artifacts ACCOUNT: