2022-06-06 22:14:16 -04:00
|
|
|
---
|
|
|
|
kind: pipeline
|
|
|
|
type: docker
|
|
|
|
name: node16
|
|
|
|
|
|
|
|
steps:
|
2022-06-09 00:46:22 -04:00
|
|
|
- name: view-staging-url
|
2022-06-09 00:44:33 -04:00
|
|
|
image: node:16
|
|
|
|
commands:
|
2022-06-09 00:46:22 -04:00
|
|
|
- echo "staging url will be https://${DRONE_BRANCH//\//-}-cscclassprofilestaging-snedadah.k8s.csclub.cloud"
|
2022-06-09 00:44:33 -04:00
|
|
|
|
2022-06-06 22:14:16 -04:00
|
|
|
- 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
|
2022-06-06 22:17:38 -04:00
|
|
|
depends_on:
|
|
|
|
- export
|
2022-06-06 22:14:16 -04:00
|
|
|
settings:
|
|
|
|
username:
|
2022-06-14 01:56:45 -04:00
|
|
|
from_secret: HARBOUR_USERNAME
|
2022-06-06 22:14:16 -04:00
|
|
|
password:
|
2022-06-14 01:56:45 -04:00
|
|
|
from_secret: HARBOUR_PASSWORD
|
2022-06-08 21:37:36 -04:00
|
|
|
tags:
|
2022-06-08 23:39:15 -04:00
|
|
|
- ${DRONE_BRANCH//\//-}
|
2022-06-08 21:37:36 -04:00
|
|
|
- latest
|
2022-06-06 22:17:38 -04:00
|
|
|
registry: registry.cloud.csclub.uwaterloo.ca
|
2022-06-07 00:19:02 -04:00
|
|
|
repo: registry.cloud.csclub.uwaterloo.ca/snedadah/csc-class-profile-staging
|
2022-06-06 22:14:16 -04:00
|
|
|
|
2022-06-07 01:17:26 -04:00
|
|
|
- name: deploy
|
2022-06-07 02:00:18 -04:00
|
|
|
image: node:16
|
2022-06-07 01:17:26 -04:00
|
|
|
depends_on:
|
|
|
|
- publish
|
2022-06-14 01:15:49 -04:00
|
|
|
environment:
|
2022-06-14 01:30:06 -04:00
|
|
|
STAGING_AUTH_TOKEN:
|
2022-06-14 01:15:49 -04:00
|
|
|
from_secret: STAGING_AUTH_TOKEN
|
2022-06-07 01:17:26 -04:00
|
|
|
commands:
|
2022-06-08 23:39:15 -04:00
|
|
|
- echo "The docker build tag is ${DRONE_BRANCH//\//-}"
|
2022-06-14 01:30:27 -04:00
|
|
|
- 'curl -H "Authorization: $STAGING_AUTH_TOKEN" https://csclub.uwaterloo.ca/~snedadah/webhooks/cscclassprofilestaging?ref=${DRONE_BRANCH//\//-}'
|
2022-06-06 22:14:16 -04:00
|
|
|
|
|
|
|
|
|
|
|
|