Compare commits

...

28 Commits

Author SHA1 Message Date
Shahan Nedadahandeh 9e145a2cab
test commit 6 months ago
Shahan Nedadahandeh 3f855bb634
Updated docs 6 months ago
Shahan Nedadahandeh 6ed1ace6cb
Updated docs and secret naming 6 months ago
Shahan Nedadahandeh f5470f5596
fix typo 6 months ago
Shahan Nedadahandeh e706b22586
update auth 6 months ago
Shahan Nedadahandeh 6a0384e073
Updated auth 6 months ago
Shahan Nedadahandeh 0af1cbc614
Added auth 6 months ago
Shahan Nedadahandeh 5fb3b90031
Udate log 6 months ago
Shahan Nedadahandeh a03f4519e9
Added logging 6 months ago
Shahan Nedadahandeh 0d9dc49167
rebuild test 6 months ago
Shahan Nedadahandeh d20c28f35a
rebuild test 6 months ago
Shahan Nedadahandeh 09d71776b4
Changed ref 6 months ago
Shahan Nedadahandeh f73aa6ca95
test 6 months ago
Shahan Nedadahandeh 213c8f5756
Chagned ref 6 months ago
Shahan Nedadahandeh ca221a2282
changed ref 6 months ago
Shahan Nedadahandeh 62db9d8ad0
test 6 months ago
Shahan Nedadahandeh 36961ad6e6
test 6 months ago
Shahan Nedadahandeh 787aecba1c
reran test 6 months ago
Shahan Nedadahandeh 0949f37142
Reran test 6 months ago
Shahan Nedadahandeh e9f35eaca5
fixed typo 6 months ago
Shahan Nedadahandeh ce345c8441
added webhook 6 months ago
Shahan Nedadahandeh 95dcbf4d7c
test 6 months ago
Shahan Nedadahandeh cd6673b1bf
test 6 months ago
Shahan Nedadahandeh 0f830efee0
Test 6 months ago
Shahan Nedadahandeh 6a9c4016c3
test 6 months ago
Shahan Nedadahandeh 30d9eed4a0
updated repo 6 months ago
Shahan Nedadahandeh 6939c73814
changed registry 6 months ago
Shahan Nedadahandeh a8a2283dfd
added .drone.yml with staging deployement 6 months ago
  1. 65
      .drone.yml
  2. 2
      Dockerfile
  3. 8
      docs/CI.md
  4. 3
      pages/index.tsx

@ -0,0 +1,65 @@
---
kind: pipeline
type: docker
name: node16
steps:
- name: view-staging-url
image: node:16
commands:
- echo "staging url will be https://${DRONE_BRANCH//\//-}-cscclassprofilestaging-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//\//-}'

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

@ -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.

@ -4,7 +4,8 @@ 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 on test
ci 2
</p>
);
}

Loading…
Cancel
Save