Skip to content

Commit 1c7169d

Browse files
author
James
committed
fix merge conflict
2 parents a452174 + 5dc7bb2 commit 1c7169d

File tree

239 files changed

+9844
-3292
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

239 files changed

+9844
-3292
lines changed

.github/workflows/docker.yml

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,14 +9,16 @@ jobs:
99
strategy:
1010
fail-fast: true
1111
matrix:
12-
component: [backend, frontend, next]
12+
component: [backend, frontend, next, postgres]
1313
include:
1414
- component: backend
1515
name: cms-backend
1616
- component: frontend
1717
name: cms-frontend
1818
- component: next
1919
name: website-frontend
20+
- component: postgres
21+
name: cms-migrations
2022
permissions:
2123
contents: read
2224
packages: write
@@ -61,7 +63,7 @@ jobs:
6163
repository: csesoc/deployment
6264
token: ${{ secrets.GH_TOKEN }}
6365
- name: Install yq - portable yaml processor
64-
uses: mikefarah/yq@v4.25.1
66+
uses: mikefarah/yq@v4.28.1
6567
- name: Update deployment
6668
env:
6769
GITHUB_TOKEN: ${{ secrets.GH_TOKEN }}
@@ -71,6 +73,7 @@ jobs:
7173
git checkout -b update/cms/${{ github.sha }}
7274
yq -i '.items[0].spec.template.spec.containers[0].image = "ghcr.io/csesoc/cms-frontend:${{ github.sha }}"' apps/projects/cms/staging/deploy-cms-frontend.yml
7375
yq -i '.items[0].spec.template.spec.containers[0].image = "ghcr.io/csesoc/cms-backend:${{ github.sha }}"' apps/projects/cms/staging/deploy-cms-backend.yml
76+
yq -i '.items[0].spec.template.spec.initContainers[0].image = "ghcr.io/csesoc/cms-migrations:${{ github.sha }}"' apps/projects/cms/staging/deploy-cms-backend.yml
7477
yq -i '.items[0].spec.template.spec.containers[0].image = "ghcr.io/csesoc/website-frontend:${{ github.sha }}"' apps/projects/cms/staging/deploy-website-frontend.yml
7578
git add .
7679
git commit -m "feat(cms/staging): update images"

CODEOWNERS

Lines changed: 10 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,10 @@
1-
frontend/* @csesoc/Websites-Frontend
2-
next/* @csesoc/Websites-Frontend
3-
scripts/* @csesoc/Websites-Backend
4-
backend/* @csesoc/Websites-Backend
5-
postgres/* @csesoc/Websites-Backend
1+
backend/ @Varun-Sethu
2+
postgres/ @Varun-Sethu
3+
utilities/ @Varun-Sethu
4+
5+
frontend/ @fafnirZ
6+
next/ @fafnirZ
7+
8+
.github/ @csesoc/technical
9+
renovate.json @csesoc/technical
10+
Dockerfile @csesoc/technical

backend/Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
FROM golang:1.18-alpine as app-builder
1+
FROM golang:1.19-alpine as app-builder
22
WORKDIR /go/src/app
33
COPY . .
44
RUN apk add git

backend/Dockerfile.development

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
FROM golang:1.18-alpine as build-env
1+
FROM golang:1.19-alpine as build-env
22

33
# make current working directory /app
44
WORKDIR /go/src/cms.csesoc.unsw.edu.au

backend/OTClient/operation.ts

Lines changed: 0 additions & 139 deletions
This file was deleted.

backend/OTClient/operationModel.ts

Lines changed: 0 additions & 42 deletions
This file was deleted.

backend/OTClient/package.json

Lines changed: 0 additions & 21 deletions
This file was deleted.

backend/database/contexts/testing_context.go

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,6 @@ func (ctx *TestingContext) Query(query string, sqlArgs []interface{}, resultOutp
4444
func (ctx *TestingContext) QueryRow(query string, sqlArgs []interface{}) (pgx.Rows, error) {
4545
ctx.verifyEnvironment()
4646
return ctx.activeTransaction.Query(context.Background(), query, sqlArgs...)
47-
4847
}
4948

5049
func (ctx *TestingContext) Exec(query string, sqlArgs []interface{}) error {
@@ -62,7 +61,6 @@ func (context *TestingContext) Close() {
6261
// RunTest sets up a new testing environment on the testing context (creates a transaction),
6362
// it then performs the given test method and finally rolls back any updates it had made
6463
func (ctx *TestingContext) RunTest(methodToTest func()) {
65-
6664
if testingTransaction, err := ctx.conn.Begin(context.Background()); err == nil {
6765

6866
ctx.startTestMode(testingTransaction)

backend/database/repositories/dockerfilesystem.go

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ type dockerPublishedFileSystemRepository struct {
2828
}
2929

3030
// create new instances of the corresponding repository types
31-
func NewDockerPublishedFileSystemRepository() (*dockerPublishedFileSystemRepository, error) {
31+
func newDockerPublishedFileSystemRepository() (*dockerPublishedFileSystemRepository, error) {
3232
inner, err := newDockerFilesystemRepositoryCore(publishedVolumePath)
3333
if err != nil {
3434
return nil, err
@@ -40,7 +40,7 @@ func NewDockerPublishedFileSystemRepository() (*dockerPublishedFileSystemReposit
4040
}
4141

4242
// create new instances of the corresponding repository types
43-
func NewDockerUnpublishedFileSystemRepository() (*dockerUnpublishedFileSystemRepository, error) {
43+
func newDockerUnpublishedFileSystemRepository() (*dockerUnpublishedFileSystemRepository, error) {
4444
inner, err := newDockerFilesystemRepositoryCore(unpublishedVolumePath)
4545
if err != nil {
4646
return nil, err
@@ -68,25 +68,25 @@ func (c *dockerFileSystemRepositoryCore) AddToVolume(filename string) error {
6868
// Check if source file is valid
6969
src, err := os.Open(filename)
7070
if err != nil {
71-
return errors.New("Couldn't open source file")
71+
return errors.New("couldn't open source file")
7272
}
7373
defer src.Close()
7474
// Create/update destination file and check it is valid
7575
filepath := filepath.Join(c.volumePath, filename)
7676
moved, err := os.OpenFile(filepath, os.O_RDWR|os.O_CREATE, 0o755)
7777
if err != nil {
78-
return errors.New("Couldn't read/create the destination file")
78+
return errors.New("couldn't read/create the destination file")
7979
}
8080
defer moved.Close()
8181
// Copy source to destination
8282
_, err = io.Copy(moved, src)
8383
if err != nil {
84-
return errors.New("File couldn't be copied to destination")
84+
return errors.New("file couldn't be copied to destination")
8585
}
8686
// Delete source file
8787
err = os.Remove(filename)
8888
if err != nil {
89-
return errors.New("Couldn't remove the source file")
89+
return errors.New("couldn't remove the source file")
9090
}
9191
return nil
9292
}
@@ -98,13 +98,13 @@ func (c *dockerFileSystemRepositoryCore) CopyToVolume(src *os.File, filename str
9898
filepath := filepath.Join(c.volumePath, filename)
9999
copied, err := os.OpenFile(filepath, os.O_RDWR|os.O_CREATE, 0o755)
100100
if err != nil {
101-
return errors.New("Couldn't read/create the destination file")
101+
return errors.New("couldn't read/create the destination file")
102102
}
103103
defer copied.Close()
104104
// Copy source to destination
105105
_, err = io.Copy(copied, src)
106106
if err != nil {
107-
return errors.New("File couldn't be copied to destination")
107+
return errors.New("file couldn't be copied to destination")
108108
}
109109
return nil
110110
}
@@ -126,12 +126,12 @@ func (c *dockerFileSystemRepositoryCore) DeleteFromVolume(filename string) error
126126
filepath := filepath.Join(c.volumePath, filename)
127127
file, err := os.Open(filepath)
128128
if err != nil {
129-
return errors.New("File doesn't exist")
129+
return errors.New("file doesn't exist")
130130
}
131131
file.Close()
132132
os.Remove(filepath)
133133
if err = os.Remove(filepath); err != nil {
134-
return errors.New("Couldn't remove the source file")
134+
return errors.New("couldn't remove the source file")
135135
}
136136
return nil
137137
}

0 commit comments

Comments
 (0)