From a8a2283dfd777aba550e3937862f0f1b3f148212 Mon Sep 17 00:00:00 2001 From: shahanneda Date: Mon, 6 Jun 2022 19:14:16 -0700 Subject: [PATCH 01/36] added .drone.yml with staging deployement --- .drone.yml | 45 +++++++++++++++++++++++++++++++++++++++++++++ Dockerfile | 2 ++ 2 files changed, 47 insertions(+) create mode 100644 .drone.yml create mode 100644 Dockerfile diff --git a/.drone.yml b/.drone.yml new file mode 100644 index 0000000..1690891 --- /dev/null +++ b/.drone.yml @@ -0,0 +1,45 @@ +--- +kind: pipeline +type: docker +name: node16 + +steps: +- name: install-deps + image: node:16 + commands: + - npm install + +- name: lint + image: node:16 + depends_on: + - install-deps + commands: + - npm run lint + +- name: build + image: node:16 + depends_on: + - install-deps + commands: + - npm run build + +- name: export + image: node:16 + depends_on: + - build + commands: + - npm run export + +- name: publish + image: plugins/docker:latest + settings: + username: + from_secret: harbour_username + password: + from_secret: harbour_password + tags: latest + repo: registry.cloud.csclub.uwaterloo.ca/snedadah/csc-class-profile + + + + diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 0000000..dfb0893 --- /dev/null +++ b/Dockerfile @@ -0,0 +1,2 @@ +FROM nginx +COPY ./out /usr/share/nginx/html -- 2.39.2 From 6939c738146b3436806f9188ff7e1ad09ea76234 Mon Sep 17 00:00:00 2001 From: shahanneda Date: Mon, 6 Jun 2022 19:17:38 -0700 Subject: [PATCH 02/36] changed registry --- .drone.yml | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/.drone.yml b/.drone.yml index 1690891..d85a109 100644 --- a/.drone.yml +++ b/.drone.yml @@ -32,13 +32,16 @@ steps: - name: publish image: plugins/docker:latest + depends_on: + - export settings: username: from_secret: harbour_username password: from_secret: harbour_password tags: latest - repo: registry.cloud.csclub.uwaterloo.ca/snedadah/csc-class-profile + registry: registry.cloud.csclub.uwaterloo.ca + repo: snedadah/csc-class-profile -- 2.39.2 From 30d9eed4a082bf1036a4b2ca944fa626b88a3b5c Mon Sep 17 00:00:00 2001 From: shahanneda Date: Mon, 6 Jun 2022 19:24:03 -0700 Subject: [PATCH 03/36] updated repo --- .drone.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.drone.yml b/.drone.yml index d85a109..57b0a63 100644 --- a/.drone.yml +++ b/.drone.yml @@ -41,7 +41,7 @@ steps: from_secret: harbour_password tags: latest registry: registry.cloud.csclub.uwaterloo.ca - repo: snedadah/csc-class-profile + repo: registry.cloud.csclub.uwaterloo.ca/snedadah/csc-class-profile -- 2.39.2 From 6a9c4016c3c3d532baacdb6055c1a804ce0ff5e3 Mon Sep 17 00:00:00 2001 From: shahanneda Date: Mon, 6 Jun 2022 19:54:37 -0700 Subject: [PATCH 04/36] test --- .drone.yml | 1 + pages/index.tsx | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/.drone.yml b/.drone.yml index 57b0a63..a2450f9 100644 --- a/.drone.yml +++ b/.drone.yml @@ -41,6 +41,7 @@ steps: from_secret: harbour_password tags: latest registry: registry.cloud.csclub.uwaterloo.ca + repo: registry.cloud.csclub.uwaterloo.ca/snedadah/csc-class-profile diff --git a/pages/index.tsx b/pages/index.tsx index 4ff1fb7..e8b67c1 100644 --- a/pages/index.tsx +++ b/pages/index.tsx @@ -4,7 +4,7 @@ import React from "react"; export default function Home() { return (

- Click here to visit the playground + Click here to visit the playground 1

); } -- 2.39.2 From 0f830efee080cd802504063ee8e632003a1994fb Mon Sep 17 00:00:00 2001 From: shahanneda Date: Mon, 6 Jun 2022 21:19:02 -0700 Subject: [PATCH 05/36] Test --- .drone.yml | 4 ++-- pages/index.tsx | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.drone.yml b/.drone.yml index a2450f9..b2b5d22 100644 --- a/.drone.yml +++ b/.drone.yml @@ -41,8 +41,8 @@ steps: from_secret: harbour_password tags: latest registry: registry.cloud.csclub.uwaterloo.ca - - repo: registry.cloud.csclub.uwaterloo.ca/snedadah/csc-class-profile + + repo: registry.cloud.csclub.uwaterloo.ca/snedadah/csc-class-profile-staging diff --git a/pages/index.tsx b/pages/index.tsx index e8b67c1..d105a1d 100644 --- a/pages/index.tsx +++ b/pages/index.tsx @@ -4,7 +4,7 @@ import React from "react"; export default function Home() { return (

- Click here to visit the playground 1 + Click here to visit the playground 2

); } -- 2.39.2 From cd6673b1bf83ae08bd0581d2d6c54b8b0935f34b Mon Sep 17 00:00:00 2001 From: shahanneda Date: Mon, 6 Jun 2022 22:01:01 -0700 Subject: [PATCH 06/36] test --- pages/index.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pages/index.tsx b/pages/index.tsx index d105a1d..7480473 100644 --- a/pages/index.tsx +++ b/pages/index.tsx @@ -4,7 +4,7 @@ import React from "react"; export default function Home() { return (

- Click here to visit the playground 2 + Click here to visit the playground 3

); } -- 2.39.2 From 95dcbf4d7c4f079b145b624000ba401ce9204cc3 Mon Sep 17 00:00:00 2001 From: shahanneda Date: Mon, 6 Jun 2022 22:08:02 -0700 Subject: [PATCH 07/36] test --- pages/index.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pages/index.tsx b/pages/index.tsx index 7480473..830c52b 100644 --- a/pages/index.tsx +++ b/pages/index.tsx @@ -4,7 +4,7 @@ import React from "react"; export default function Home() { return (

- Click here to visit the playground 3 + Click here to visit the playground 4

); } -- 2.39.2 From ce345c84410a59403a2f673bb1af4fff04ed261d Mon Sep 17 00:00:00 2001 From: shahanneda Date: Mon, 6 Jun 2022 22:17:26 -0700 Subject: [PATCH 08/36] added webhook --- .drone.yml | 6 ++++++ pages/index.tsx | 2 +- 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/.drone.yml b/.drone.yml index b2b5d22..1741090 100644 --- a/.drone.yml +++ b/.drone.yml @@ -44,6 +44,12 @@ steps: repo: registry.cloud.csclub.uwaterloo.ca/snedadah/csc-class-profile-staging +- name: deploy + image: node16 + depends_on: + - publish + commands: + - 'curl https://csclub.uwaterloo.ca/~snedadah/webhooks/cscclassprofilestaging' diff --git a/pages/index.tsx b/pages/index.tsx index 830c52b..cf6dd3d 100644 --- a/pages/index.tsx +++ b/pages/index.tsx @@ -4,7 +4,7 @@ import React from "react"; export default function Home() { return (

- Click here to visit the playground 4 + Click here to visit the playground 5

); } -- 2.39.2 From e9f35eaca5fb912c106ef4286c3a4c6102a1b8c7 Mon Sep 17 00:00:00 2001 From: shahanneda Date: Mon, 6 Jun 2022 23:00:18 -0700 Subject: [PATCH 09/36] fixed typo --- .drone.yml | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/.drone.yml b/.drone.yml index 1741090..39f56a6 100644 --- a/.drone.yml +++ b/.drone.yml @@ -41,11 +41,10 @@ steps: from_secret: harbour_password tags: latest registry: registry.cloud.csclub.uwaterloo.ca - repo: registry.cloud.csclub.uwaterloo.ca/snedadah/csc-class-profile-staging - name: deploy - image: node16 + image: node:16 depends_on: - publish commands: -- 2.39.2 From 0949f3714246b8dbe8dc8650620d6d47afebcc57 Mon Sep 17 00:00:00 2001 From: shahanneda Date: Mon, 6 Jun 2022 23:12:41 -0700 Subject: [PATCH 10/36] Reran test --- pages/index.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pages/index.tsx b/pages/index.tsx index cf6dd3d..86047fc 100644 --- a/pages/index.tsx +++ b/pages/index.tsx @@ -4,7 +4,7 @@ import React from "react"; export default function Home() { return (

- Click here to visit the playground 5 + Click here to visit the playground 6

); } -- 2.39.2 From 787aecba1c1a2e01520b40bb05d80b6535d5a8bc Mon Sep 17 00:00:00 2001 From: shahanneda Date: Tue, 7 Jun 2022 00:07:31 -0700 Subject: [PATCH 11/36] reran test --- pages/index.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pages/index.tsx b/pages/index.tsx index 86047fc..372e142 100644 --- a/pages/index.tsx +++ b/pages/index.tsx @@ -4,7 +4,7 @@ import React from "react"; export default function Home() { return (

- Click here to visit the playground 6 + Click here to visit the playground 7

); } -- 2.39.2 From 36961ad6e67945a3bdbf6b54c3e964f72d75d808 Mon Sep 17 00:00:00 2001 From: shahanneda Date: Tue, 7 Jun 2022 18:16:58 -0700 Subject: [PATCH 12/36] test --- pages/index.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pages/index.tsx b/pages/index.tsx index 372e142..12eec0d 100644 --- a/pages/index.tsx +++ b/pages/index.tsx @@ -4,7 +4,7 @@ import React from "react"; export default function Home() { return (

- Click here to visit the playground 7 + Click here to visit the playground 8

); } -- 2.39.2 From 62db9d8ad0f42ec6187105cd3ea3c6e1dd928ccd Mon Sep 17 00:00:00 2001 From: shahanneda Date: Wed, 8 Jun 2022 18:37:36 -0700 Subject: [PATCH 13/36] test --- .drone.yml | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/.drone.yml b/.drone.yml index 39f56a6..d7d0c78 100644 --- a/.drone.yml +++ b/.drone.yml @@ -39,7 +39,9 @@ steps: from_secret: harbour_username password: from_secret: harbour_password - tags: latest + tags: + - ${DRONE_COMMIT_BRANCH} + - latest registry: registry.cloud.csclub.uwaterloo.ca repo: registry.cloud.csclub.uwaterloo.ca/snedadah/csc-class-profile-staging @@ -48,7 +50,7 @@ steps: depends_on: - publish commands: - - 'curl https://csclub.uwaterloo.ca/~snedadah/webhooks/cscclassprofilestaging' + - 'curl https://csclub.uwaterloo.ca/~snedadah/webhooks/cscclassprofilestaging?branch=${DRONE_COMMIT_BRANCH}' -- 2.39.2 From ca221a2282b6257f7bd29dda787b17726dc438f0 Mon Sep 17 00:00:00 2001 From: shahanneda Date: Wed, 8 Jun 2022 18:48:49 -0700 Subject: [PATCH 14/36] changed ref --- .drone.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.drone.yml b/.drone.yml index d7d0c78..d0a70cb 100644 --- a/.drone.yml +++ b/.drone.yml @@ -40,7 +40,7 @@ steps: password: from_secret: harbour_password tags: - - ${DRONE_COMMIT_BRANCH} + - ${DRONE_COMMIT_REF} - latest registry: registry.cloud.csclub.uwaterloo.ca repo: registry.cloud.csclub.uwaterloo.ca/snedadah/csc-class-profile-staging @@ -50,7 +50,7 @@ steps: depends_on: - publish commands: - - 'curl https://csclub.uwaterloo.ca/~snedadah/webhooks/cscclassprofilestaging?branch=${DRONE_COMMIT_BRANCH}' + - 'curl https://csclub.uwaterloo.ca/~snedadah/webhooks/cscclassprofilestaging?ref=${DRONE_COMMIT_REF}' -- 2.39.2 From 213c8f5756f48fccbd987afa19f72fb0ab869d39 Mon Sep 17 00:00:00 2001 From: shahanneda Date: Wed, 8 Jun 2022 18:59:20 -0700 Subject: [PATCH 15/36] Chagned ref --- .drone.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.drone.yml b/.drone.yml index d0a70cb..eb86da0 100644 --- a/.drone.yml +++ b/.drone.yml @@ -40,7 +40,7 @@ steps: password: from_secret: harbour_password tags: - - ${DRONE_COMMIT_REF} + - ${DRONE_COMMIT_SHA} - latest registry: registry.cloud.csclub.uwaterloo.ca repo: registry.cloud.csclub.uwaterloo.ca/snedadah/csc-class-profile-staging @@ -50,7 +50,7 @@ steps: depends_on: - publish commands: - - 'curl https://csclub.uwaterloo.ca/~snedadah/webhooks/cscclassprofilestaging?ref=${DRONE_COMMIT_REF}' + - 'curl https://csclub.uwaterloo.ca/~snedadah/webhooks/cscclassprofilestaging?ref=${DRONE_COMMIT_SHA}' -- 2.39.2 From 09d71776b43e6a1c3e6d8a9768ce8fcf5d7702b2 Mon Sep 17 00:00:00 2001 From: shahanneda Date: Wed, 8 Jun 2022 20:39:15 -0700 Subject: [PATCH 17/36] Changed ref --- .drone.yml | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/.drone.yml b/.drone.yml index eb86da0..83eb7e1 100644 --- a/.drone.yml +++ b/.drone.yml @@ -40,7 +40,7 @@ steps: password: from_secret: harbour_password tags: - - ${DRONE_COMMIT_SHA} + - ${DRONE_BRANCH//\//-} - latest registry: registry.cloud.csclub.uwaterloo.ca repo: registry.cloud.csclub.uwaterloo.ca/snedadah/csc-class-profile-staging @@ -50,7 +50,8 @@ steps: depends_on: - publish commands: - - 'curl https://csclub.uwaterloo.ca/~snedadah/webhooks/cscclassprofilestaging?ref=${DRONE_COMMIT_SHA}' + - echo "The docker build tag is ${DRONE_BRANCH//\//-}" + - 'curl https://csclub.uwaterloo.ca/~snedadah/webhooks/cscclassprofilestaging?ref=${DRONE_BRANCH//\//-}' -- 2.39.2 From 0d9dc49167651d940eef665b1bc562803ef063e7 Mon Sep 17 00:00:00 2001 From: shahanneda Date: Wed, 8 Jun 2022 20:56:02 -0700 Subject: [PATCH 19/36] rebuild test --- pages/index.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pages/index.tsx b/pages/index.tsx index 12eec0d..30fb6b5 100644 --- a/pages/index.tsx +++ b/pages/index.tsx @@ -4,7 +4,7 @@ import React from "react"; export default function Home() { return (

- Click here to visit the playground 8 + Click here to visit the playground 9

); } -- 2.39.2 From a03f4519e9ea6a53d5793817c2756739e0434a65 Mon Sep 17 00:00:00 2001 From: shahanneda Date: Wed, 8 Jun 2022 21:44:33 -0700 Subject: [PATCH 20/36] Added logging --- .drone.yml | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/.drone.yml b/.drone.yml index 83eb7e1..409783c 100644 --- a/.drone.yml +++ b/.drone.yml @@ -4,6 +4,11 @@ type: docker name: node16 steps: +- name: print-staging-url + image: node:16 + commands: + - echo "The staging site will be ${DRONE_BRANCH//\//-}-cscclassprofilestaging-snedadah.k8s.csclub.cloud" + - name: install-deps image: node:16 commands: -- 2.39.2 From 5fb3b90031579a8a1ef86cfa6050741edd6bfadd Mon Sep 17 00:00:00 2001 From: shahanneda Date: Wed, 8 Jun 2022 21:46:22 -0700 Subject: [PATCH 21/36] Udate log --- .drone.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.drone.yml b/.drone.yml index 409783c..3c89ec3 100644 --- a/.drone.yml +++ b/.drone.yml @@ -4,10 +4,10 @@ type: docker name: node16 steps: -- name: print-staging-url +- name: view-staging-url image: node:16 commands: - - echo "The staging site will be ${DRONE_BRANCH//\//-}-cscclassprofilestaging-snedadah.k8s.csclub.cloud" + - echo "staging url will be https://${DRONE_BRANCH//\//-}-cscclassprofilestaging-snedadah.k8s.csclub.cloud" - name: install-deps image: node:16 -- 2.39.2 From 0af1cbc614500bba1d2fa44cb2bed509cce1228a Mon Sep 17 00:00:00 2001 From: shahanneda Date: Mon, 13 Jun 2022 22:15:49 -0700 Subject: [PATCH 22/36] Added auth --- .drone.yml | 5 ++++- docs/CI.md | 4 ++++ 2 files changed, 8 insertions(+), 1 deletion(-) create mode 100644 docs/CI.md diff --git a/.drone.yml b/.drone.yml index 3c89ec3..cd1b105 100644 --- a/.drone.yml +++ b/.drone.yml @@ -54,9 +54,12 @@ steps: image: node:16 depends_on: - publish + environment: + AUTH_TOKEN: + from_secret: STAGING_AUTH_TOKEN commands: - echo "The docker build tag is ${DRONE_BRANCH//\//-}" - - 'curl https://csclub.uwaterloo.ca/~snedadah/webhooks/cscclassprofilestaging?ref=${DRONE_BRANCH//\//-}' + - 'curl -H "Authorization: $AUTH_TOKEN" https://csclub.uwaterloo.ca/~snedadah/webhooks/cscclassprofilestaging?ref=${DRONE_BRANCH//\//-}' diff --git a/docs/CI.md b/docs/CI.md new file mode 100644 index 0000000..6af3162 --- /dev/null +++ b/docs/CI.md @@ -0,0 +1,4 @@ +## Setting up CI + +- Follow instructions on [CSC cloud](https://docs.cloud.csclub.uwaterloo.ca/kubernetes/) to setup CI +- Setup the repository to store your docker images on [CSC Harbour](https://docs.cloud.csclub.uwaterloo.ca/registry/) -- 2.39.2 From 6a0384e073d103317bd8ff08665fafbd30b9685e Mon Sep 17 00:00:00 2001 From: shahanneda Date: Mon, 13 Jun 2022 22:27:53 -0700 Subject: [PATCH 23/36] Updated auth --- .drone.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.drone.yml b/.drone.yml index cd1b105..b04ad26 100644 --- a/.drone.yml +++ b/.drone.yml @@ -59,7 +59,7 @@ steps: from_secret: STAGING_AUTH_TOKEN commands: - echo "The docker build tag is ${DRONE_BRANCH//\//-}" - - 'curl -H "Authorization: $AUTH_TOKEN" https://csclub.uwaterloo.ca/~snedadah/webhooks/cscclassprofilestaging?ref=${DRONE_BRANCH//\//-}' + - "curl -H \"Authorization: $AUTH_TOKEN\" https://csclub.uwaterloo.ca/~snedadah/webhooks/cscclassprofilestaging?ref=${DRONE_BRANCH//\//-}" -- 2.39.2 From e706b2258623316978e5c725fbfd182dc05534c0 Mon Sep 17 00:00:00 2001 From: shahanneda Date: Mon, 13 Jun 2022 22:30:06 -0700 Subject: [PATCH 24/36] update auth --- .drone.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.drone.yml b/.drone.yml index b04ad26..f034602 100644 --- a/.drone.yml +++ b/.drone.yml @@ -55,11 +55,11 @@ steps: depends_on: - publish environment: - AUTH_TOKEN: + STAGING_AUTH_TOKEN: from_secret: STAGING_AUTH_TOKEN commands: - echo "The docker build tag is ${DRONE_BRANCH//\//-}" - - "curl -H \"Authorization: $AUTH_TOKEN\" https://csclub.uwaterloo.ca/~snedadah/webhooks/cscclassprofilestaging?ref=${DRONE_BRANCH//\//-}" + - 'curl -H "Authorization: $STAGING_AUTH_TOKEN" https://csclub.uwaterloo.ca/~snedadah/webhooks/cscclassprofilestaging?ref=${DRONE_BRANCH//\//-}" -- 2.39.2 From f5470f5596f403d32aef1877e626f7a3023b6689 Mon Sep 17 00:00:00 2001 From: shahanneda Date: Mon, 13 Jun 2022 22:30:27 -0700 Subject: [PATCH 25/36] fix typo --- .drone.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.drone.yml b/.drone.yml index f034602..850b010 100644 --- a/.drone.yml +++ b/.drone.yml @@ -59,7 +59,7 @@ steps: from_secret: STAGING_AUTH_TOKEN commands: - echo "The docker build tag is ${DRONE_BRANCH//\//-}" - - 'curl -H "Authorization: $STAGING_AUTH_TOKEN" https://csclub.uwaterloo.ca/~snedadah/webhooks/cscclassprofilestaging?ref=${DRONE_BRANCH//\//-}" + - 'curl -H "Authorization: $STAGING_AUTH_TOKEN" https://csclub.uwaterloo.ca/~snedadah/webhooks/cscclassprofilestaging?ref=${DRONE_BRANCH//\//-}' -- 2.39.2 From 6ed1ace6cb83e99f3af41ddb8db71c98129d6773 Mon Sep 17 00:00:00 2001 From: shahanneda Date: Mon, 13 Jun 2022 22:56:45 -0700 Subject: [PATCH 26/36] Updated docs and secret naming --- .drone.yml | 4 ++-- docs/CI.md | 8 ++++++-- 2 files changed, 8 insertions(+), 4 deletions(-) diff --git a/.drone.yml b/.drone.yml index 850b010..646e675 100644 --- a/.drone.yml +++ b/.drone.yml @@ -41,9 +41,9 @@ steps: - export settings: username: - from_secret: harbour_username + from_secret: HARBOUR_USERNAME password: - from_secret: harbour_password + from_secret: HARBOUR_PASSWORD tags: - ${DRONE_BRANCH//\//-} - latest diff --git a/docs/CI.md b/docs/CI.md index 6af3162..461dfbe 100644 --- a/docs/CI.md +++ b/docs/CI.md @@ -1,4 +1,8 @@ ## Setting up CI -- Follow instructions on [CSC cloud](https://docs.cloud.csclub.uwaterloo.ca/kubernetes/) to setup CI -- Setup the repository to store your docker images on [CSC Harbour](https://docs.cloud.csclub.uwaterloo.ca/registry/) +- Follow instructions on [CSC cloud](https://docs.cloud.csclub.uwaterloo.ca/kubernetes/) to setup csccloud. +- Setup the repository to store your docker images on [CSC Harbour](https://docs.cloud.csclub.uwaterloo.ca/registry/). + - Make sure to add harbour auth tokens to drone. Click the my profile page on harbour, and set HARBOUR_USERNAME and HARBOUR_PASSWORD on drone secrets to the username and cli secret from the harbour profile page. +- Clone the server [repo](https://git.csclub.uwaterloo.ca/snedadah/webhooks), fill in desired links, update env file with the auth token, update STAGING_AUTH_TOKEN in drone to match. Run `./run.sh` to start server in the background. + + -- 2.39.2 From 3f855bb634f522cb71ee267942c4a46659b47139 Mon Sep 17 00:00:00 2001 From: shahanneda Date: Mon, 13 Jun 2022 23:00:58 -0700 Subject: [PATCH 27/36] Updated docs --- docs/CI.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/CI.md b/docs/CI.md index 461dfbe..58f0bad 100644 --- a/docs/CI.md +++ b/docs/CI.md @@ -3,6 +3,6 @@ - Follow instructions on [CSC cloud](https://docs.cloud.csclub.uwaterloo.ca/kubernetes/) to setup csccloud. - Setup the repository to store your docker images on [CSC Harbour](https://docs.cloud.csclub.uwaterloo.ca/registry/). - Make sure to add harbour auth tokens to drone. Click the my profile page on harbour, and set HARBOUR_USERNAME and HARBOUR_PASSWORD on drone secrets to the username and cli secret from the harbour profile page. -- Clone the server [repo](https://git.csclub.uwaterloo.ca/snedadah/webhooks), fill in desired links, update env file with the auth token, update STAGING_AUTH_TOKEN in drone to match. Run `./run.sh` to start server in the background. +- Clone the [server repo](https://git.csclub.uwaterloo.ca/snedadah/webhooks), fill in desired links, update env file with the auth token, update STAGING_AUTH_TOKEN in drone to match. Run `./run.sh` to start server in the background. -- 2.39.2 From 5c0259693841ba4db1d749d97b87d6d19fda4f1c Mon Sep 17 00:00:00 2001 From: shahanneda Date: Mon, 13 Jun 2022 23:12:36 -0700 Subject: [PATCH 28/36] Updated url preview --- .drone.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.drone.yml b/.drone.yml index 646e675..9744765 100644 --- a/.drone.yml +++ b/.drone.yml @@ -7,7 +7,7 @@ steps: - name: view-staging-url image: node:16 commands: - - echo "staging url will be https://${DRONE_BRANCH//\//-}-cscclassprofilestaging-snedadah.k8s.csclub.cloud" + - echo "staging url will be https://${DRONE_BRANCH//\//-}-csc-class-profile-staging-snedadah.k8s.csclub.cloud" - name: install-deps image: node:16 -- 2.39.2 From 35db02a0c8e922007cb474612d516a73008f8c82 Mon Sep 17 00:00:00 2001 From: shahanneda Date: Mon, 13 Jun 2022 23:57:22 -0700 Subject: [PATCH 29/36] Reverted change to playground and fixed duplicate pr builds --- .drone.yml | 4 ++++ pages/index.tsx | 2 +- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/.drone.yml b/.drone.yml index 9744765..9a2840d 100644 --- a/.drone.yml +++ b/.drone.yml @@ -61,5 +61,9 @@ steps: - echo "The docker build tag is ${DRONE_BRANCH//\//-}" - 'curl -H "Authorization: $STAGING_AUTH_TOKEN" https://csclub.uwaterloo.ca/~snedadah/webhooks/cscclassprofilestaging?ref=${DRONE_BRANCH//\//-}' +trigger: + event: + exclude: + - pull_request #avoid double build on PRs diff --git a/pages/index.tsx b/pages/index.tsx index 30fb6b5..4ff1fb7 100644 --- a/pages/index.tsx +++ b/pages/index.tsx @@ -4,7 +4,7 @@ import React from "react"; export default function Home() { return (

- Click here to visit the playground 9 + Click here to visit the playground

); } -- 2.39.2 From f36ce140cabf27a2d168016bbdb33f481683c10e Mon Sep 17 00:00:00 2001 From: shahanneda Date: Wed, 15 Jun 2022 16:50:33 -0700 Subject: [PATCH 30/36] Updated docs --- docs/CI.md | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/docs/CI.md b/docs/CI.md index 58f0bad..f1152ca 100644 --- a/docs/CI.md +++ b/docs/CI.md @@ -2,7 +2,8 @@ - Follow instructions on [CSC cloud](https://docs.cloud.csclub.uwaterloo.ca/kubernetes/) to setup csccloud. - Setup the repository to store your docker images on [CSC Harbour](https://docs.cloud.csclub.uwaterloo.ca/registry/). - - Make sure to add harbour auth tokens to drone. Click the my profile page on harbour, and set HARBOUR_USERNAME and HARBOUR_PASSWORD on drone secrets to the username and cli secret from the harbour profile page. +- Make sure to add harbour auth tokens to drone. Click the my profile page on harbour, and set HARBOUR_USERNAME and HARBOUR_PASSWORD on drone secrets to the username and cli secret from the harbour profile page. - Clone the [server repo](https://git.csclub.uwaterloo.ca/snedadah/webhooks), fill in desired links, update env file with the auth token, update STAGING_AUTH_TOKEN in drone to match. Run `./run.sh` to start server in the background. +- Possibly put a crontab to restart the script on [startup](https://stackoverflow.com/questions/12973777/how-to-run-a-shell-script-at-startup) -- 2.39.2 From 64c9c57ad741eec099bbe998bc10cca03a85ea09 Mon Sep 17 00:00:00 2001 From: shahanneda Date: Wed, 15 Jun 2022 16:56:23 -0700 Subject: [PATCH 31/36] Debug docker --- .drone.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.drone.yml b/.drone.yml index 9a2840d..4a6bd16 100644 --- a/.drone.yml +++ b/.drone.yml @@ -47,6 +47,7 @@ steps: tags: - ${DRONE_BRANCH//\//-} - latest + debug: true registry: registry.cloud.csclub.uwaterloo.ca repo: registry.cloud.csclub.uwaterloo.ca/snedadah/csc-class-profile-staging -- 2.39.2 From c7e5fb59b2d16a259a39cc34f7283350cd055441 Mon Sep 17 00:00:00 2001 From: shahanneda Date: Wed, 15 Jun 2022 21:01:53 -0700 Subject: [PATCH 32/36] Reverted debug --- .drone.yml | 1 - 1 file changed, 1 deletion(-) diff --git a/.drone.yml b/.drone.yml index 4a6bd16..9a2840d 100644 --- a/.drone.yml +++ b/.drone.yml @@ -47,7 +47,6 @@ steps: tags: - ${DRONE_BRANCH//\//-} - latest - debug: true registry: registry.cloud.csclub.uwaterloo.ca repo: registry.cloud.csclub.uwaterloo.ca/snedadah/csc-class-profile-staging -- 2.39.2 From 2a032764190577acf38e13e4841c44765e82c561 Mon Sep 17 00:00:00 2001 From: shahanneda Date: Wed, 15 Jun 2022 21:17:51 -0700 Subject: [PATCH 33/36] test change --- pages/index.tsx | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/pages/index.tsx b/pages/index.tsx index 4ff1fb7..9fdbb1c 100644 --- a/pages/index.tsx +++ b/pages/index.tsx @@ -4,7 +4,8 @@ import React from "react"; export default function Home() { return (

- Click here to visit the playground + Click here to visit the playground new + changes

); } -- 2.39.2 From 540132bfd44bd9c2fba73e4af9b83fc7597e9c76 Mon Sep 17 00:00:00 2001 From: shahanneda Date: Sat, 18 Jun 2022 12:30:11 -0700 Subject: [PATCH 34/36] Reverted changes --- docs/CI.md | 1 - pages/index.tsx | 3 +-- 2 files changed, 1 insertion(+), 3 deletions(-) diff --git a/docs/CI.md b/docs/CI.md index f1152ca..d29a2fb 100644 --- a/docs/CI.md +++ b/docs/CI.md @@ -6,4 +6,3 @@ - Clone the [server repo](https://git.csclub.uwaterloo.ca/snedadah/webhooks), fill in desired links, update env file with the auth token, update STAGING_AUTH_TOKEN in drone to match. Run `./run.sh` to start server in the background. - Possibly put a crontab to restart the script on [startup](https://stackoverflow.com/questions/12973777/how-to-run-a-shell-script-at-startup) - diff --git a/pages/index.tsx b/pages/index.tsx index 9fdbb1c..4ff1fb7 100644 --- a/pages/index.tsx +++ b/pages/index.tsx @@ -4,8 +4,7 @@ import React from "react"; export default function Home() { return (

- Click here to visit the playground new - changes + Click here to visit the playground

); } -- 2.39.2 From 3396de157a236d909be045475e0a749fe2494cf2 Mon Sep 17 00:00:00 2001 From: shahanneda Date: Sat, 18 Jun 2022 12:37:16 -0700 Subject: [PATCH 35/36] Updated docs --- docs/CI.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/CI.md b/docs/CI.md index d29a2fb..774965f 100644 --- a/docs/CI.md +++ b/docs/CI.md @@ -3,6 +3,6 @@ - Follow instructions on [CSC cloud](https://docs.cloud.csclub.uwaterloo.ca/kubernetes/) to setup csccloud. - Setup the repository to store your docker images on [CSC Harbour](https://docs.cloud.csclub.uwaterloo.ca/registry/). - Make sure to add harbour auth tokens to drone. Click the my profile page on harbour, and set HARBOUR_USERNAME and HARBOUR_PASSWORD on drone secrets to the username and cli secret from the harbour profile page. -- Clone the [server repo](https://git.csclub.uwaterloo.ca/snedadah/webhooks), fill in desired links, update env file with the auth token, update STAGING_AUTH_TOKEN in drone to match. Run `./run.sh` to start server in the background. +- Clone the [server repo](https://git.csclub.uwaterloo.ca/snedadah/csc-webhooks), fill in desired links, update env file with the auth token, update STAGING_AUTH_TOKEN in drone to match. Run `./run.sh` to start server in the background. - Possibly put a crontab to restart the script on [startup](https://stackoverflow.com/questions/12973777/how-to-run-a-shell-script-at-startup) -- 2.39.2 From 8589c0bc3a8117925b98c32c1f6a5e085eef0f96 Mon Sep 17 00:00:00 2001 From: shahanneda Date: Sun, 26 Jun 2022 12:58:18 -0700 Subject: [PATCH 36/36] updated docs --- docs/CI.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/CI.md b/docs/CI.md index 774965f..bdc8238 100644 --- a/docs/CI.md +++ b/docs/CI.md @@ -3,6 +3,6 @@ - Follow instructions on [CSC cloud](https://docs.cloud.csclub.uwaterloo.ca/kubernetes/) to setup csccloud. - Setup the repository to store your docker images on [CSC Harbour](https://docs.cloud.csclub.uwaterloo.ca/registry/). - Make sure to add harbour auth tokens to drone. Click the my profile page on harbour, and set HARBOUR_USERNAME and HARBOUR_PASSWORD on drone secrets to the username and cli secret from the harbour profile page. -- Clone the [server repo](https://git.csclub.uwaterloo.ca/snedadah/csc-webhooks), fill in desired links, update env file with the auth token, update STAGING_AUTH_TOKEN in drone to match. Run `./run.sh` to start server in the background. +- Clone the [server repo](https://git.csclub.uwaterloo.ca/snedadah/csc-webhooks), fill in desired links, update env file with the auth token, update STAGING_AUTH_TOKEN in drone to match. Run `npm start` to start server in the background. - Possibly put a crontab to restart the script on [startup](https://stackoverflow.com/questions/12973777/how-to-run-a-shell-script-at-startup) -- 2.39.2