Compare commits

...

30 Commits

Author SHA1 Message Date
Shahan Nedadahandeh 7b333d09fe
Fixed doulbe pr builds
continuous-integration/drone/push Build is passing Details
2022-06-13 23:46:17 -07:00
Shahan Nedadahandeh f66120ba9a
test
continuous-integration/drone/push Build is passing Details
2022-06-13 23:41:52 -07:00
Shahan Nedadahandeh 5c02596938
Updated url preview
continuous-integration/drone/push Build is passing Details
continuous-integration/drone/pr Build is failing Details
2022-06-13 23:12:36 -07:00
Shahan Nedadahandeh 3f855bb634
Updated docs
continuous-integration/drone/push Build is passing Details
2022-06-13 23:00:58 -07:00
Shahan Nedadahandeh 6ed1ace6cb
Updated docs and secret naming
continuous-integration/drone/push Build is passing Details
2022-06-13 22:56:55 -07:00
Shahan Nedadahandeh f5470f5596
fix typo
continuous-integration/drone/push Build is passing Details
2022-06-13 22:30:27 -07:00
Shahan Nedadahandeh e706b22586
update auth 2022-06-13 22:30:06 -07:00
Shahan Nedadahandeh 6a0384e073
Updated auth 2022-06-13 22:27:53 -07:00
Shahan Nedadahandeh 0af1cbc614
Added auth
continuous-integration/drone/push Build is passing Details
2022-06-13 22:15:49 -07:00
Shahan Nedadahandeh 5fb3b90031
Udate log
continuous-integration/drone/push Build is passing Details
2022-06-08 21:47:54 -07:00
Shahan Nedadahandeh a03f4519e9
Added logging
continuous-integration/drone/push Build is passing Details
2022-06-08 21:44:33 -07:00
Shahan Nedadahandeh 0d9dc49167
rebuild test
continuous-integration/drone/push Build is passing Details
2022-06-08 20:56:02 -07:00
Shahan Nedadahandeh d20c28f35a
rebuild test
continuous-integration/drone/push Build was killed Details
2022-06-08 20:55:43 -07:00
Shahan Nedadahandeh 09d71776b4
Changed ref
continuous-integration/drone/push Build is passing Details
2022-06-08 20:39:15 -07:00
Shahan Nedadahandeh f73aa6ca95
test
continuous-integration/drone/push Build is passing Details
2022-06-08 20:20:56 -07:00
Shahan Nedadahandeh 213c8f5756
Chagned ref
continuous-integration/drone/push Build is passing Details
2022-06-08 18:59:20 -07:00
Shahan Nedadahandeh ca221a2282
changed ref
continuous-integration/drone/push Build is failing Details
2022-06-08 18:48:49 -07:00
Shahan Nedadahandeh 62db9d8ad0
test
continuous-integration/drone/push Build is failing Details
2022-06-08 18:37:36 -07:00
Shahan Nedadahandeh 36961ad6e6
test
continuous-integration/drone/push Build is passing Details
2022-06-07 18:16:58 -07:00
Shahan Nedadahandeh 787aecba1c
reran test
continuous-integration/drone/push Build is passing Details
2022-06-07 00:07:31 -07:00
Shahan Nedadahandeh 0949f37142
Reran test
continuous-integration/drone/push Build is passing Details
2022-06-06 23:12:41 -07:00
Shahan Nedadahandeh e9f35eaca5
fixed typo
continuous-integration/drone/push Build is passing Details
2022-06-06 23:00:18 -07:00
Shahan Nedadahandeh ce345c8441
added webhook
continuous-integration/drone/push Build encountered an error Details
2022-06-06 22:17:26 -07:00
Shahan Nedadahandeh 95dcbf4d7c
test
continuous-integration/drone/push Build is passing Details
2022-06-06 22:08:02 -07:00
Shahan Nedadahandeh cd6673b1bf
test
continuous-integration/drone/push Build is passing Details
2022-06-06 22:01:01 -07:00
Shahan Nedadahandeh 0f830efee0
Test
continuous-integration/drone/push Build is passing Details
2022-06-06 21:19:02 -07:00
Shahan Nedadahandeh 6a9c4016c3
test
continuous-integration/drone/push Build is passing Details
2022-06-06 19:54:37 -07:00
Shahan Nedadahandeh 30d9eed4a0
updated repo
continuous-integration/drone/push Build is passing Details
2022-06-06 19:24:03 -07:00
Shahan Nedadahandeh 6939c73814
changed registry
continuous-integration/drone/push Build is failing Details
2022-06-06 19:17:38 -07:00
Shahan Nedadahandeh a8a2283dfd
added .drone.yml with staging deployement
continuous-integration/drone/push Build is failing Details
2022-06-06 19:14:16 -07:00
4 changed files with 80 additions and 1 deletions

69
.drone.yml Normal file
View File

@ -0,0 +1,69 @@
---
kind: pipeline
type: docker
name: node16
steps:
- name: view-staging-url
image: node:16
commands:
- echo "staging url will be https://${DRONE_BRANCH//\//-}-csc-class-profile-staging-snedadah.k8s.csclub.cloud"
- 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
depends_on:
- export
settings:
username:
from_secret: HARBOUR_USERNAME
password:
from_secret: HARBOUR_PASSWORD
tags:
- ${DRONE_BRANCH//\//-}
- latest
registry: registry.cloud.csclub.uwaterloo.ca
repo: registry.cloud.csclub.uwaterloo.ca/snedadah/csc-class-profile-staging
- name: deploy
image: node:16
depends_on:
- publish
environment:
STAGING_AUTH_TOKEN:
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//\//-}'
trigger:
event:
exclude:
- pull_request #avoid double build on PRs

2
Dockerfile Normal file
View File

@ -0,0 +1,2 @@
FROM nginx
COPY ./out /usr/share/nginx/html

8
docs/CI.md Normal file
View File

@ -0,0 +1,8 @@
## Setting up CI
- 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.

View File

@ -4,7 +4,7 @@ import React from "react";
export default function Home() {
return (
<p>
Click <Link href="/playground">here</Link> to visit the playground
Click <Link href="/playground">here</Link> to visit the playground 10
</p>
);
}