Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
220 commits
Select commit Hold shift + click to select a range
c9b3c16
task queue service initial setup (#23)
tim738745 Mar 13, 2025
09a1248
Add files via upload (#29)
ArawuSamuel1 Mar 13, 2025
8c2c456
credit transfer model refinements and various small changes (#31)
tim738745 Mar 13, 2025
8c38e6d
Update issue templates
ArawuSamuel1 Mar 13, 2025
81fcede
Update issue templates
ArawuSamuel1 Mar 13, 2025
f9fdf0c
Update issue templates
ArawuSamuel1 Mar 13, 2025
e122647
Update issue templates
ArawuSamuel1 Mar 13, 2025
4c8b091
10 - further credit transfer model refinements/cleanup (#32)
tim738745 Mar 14, 2025
e1ec2f4
zev unit transfer type changes + seed file changes (#33)
tim738745 Mar 14, 2025
be312a2
add new pipeline
kuanfandevops Mar 17, 2025
5c1db7a
add Dockerfile-Openshift
kuanfandevops Mar 18, 2025
cabc23e
Update deve-ci.yaml
kuanfandevops Mar 18, 2025
5eb846e
<Row> / <Col> components to cut out some excess tailwind attributes …
jdtoombs Mar 20, 2025
2d89c85
12 - ZEV unit transfer details page + cleanup (#36)
tim738745 Mar 20, 2025
4b15e70
Add pipelines to develop (#41)
kuanfandevops Mar 20, 2025
4417765
remove deve-ci
kuanfandevops Mar 20, 2025
2760460
update pipeline messages
kuanfandevops Mar 21, 2025
d60a149
Task: User Notifications #37 (#42)
JulianForeman Mar 27, 2025
90d2827
zev unit transfer actions + transfer creation client component (#46)
tim738745 Apr 2, 2025
ee62b74
Table Component / Credit Transfer List View (#40)
jdtoombs Apr 2, 2025
df06d23
use getUserInfo (#48)
tim738745 Apr 2, 2025
5aa7a28
Create pr-build.yaml
kuanfandevops Apr 2, 2025
ccbfb76
Update pr build (#49)
kuanfandevops Apr 3, 2025
dac9382
update pr ref
kuanfandevops Apr 3, 2025
fe638cc
clean up pipelines
kuanfandevops Apr 3, 2025
af63714
update build template
kuanfandevops Apr 3, 2025
37b59ef
update pr-build to use pull_request_target
kuanfandevops Apr 3, 2025
43943a1
updat build template
kuanfandevops Apr 3, 2025
8432883
add author verify for pr build
kuanfandevops Apr 3, 2025
7e8e775
update pr verify
kuanfandevops Apr 3, 2025
ea6b7f5
Pipeline2 (#52)
kuanfandevops Apr 4, 2025
b2ca9fb
update tag steps
kuanfandevops Apr 4, 2025
d5b9af6
update job titles
kuanfandevops Apr 4, 2025
403db33
feat: 47 - zev unit transfer actions (#53)
tim738745 Apr 8, 2025
a3107dd
add pr-teardown
kuanfandevops Apr 8, 2025
834c2f0
add pr-teardown
kuanfandevops Apr 8, 2025
e26349a
add auto-versioning
kuanfandevops Apr 8, 2025
6ba0f86
update auto versioning
kuanfandevops Apr 8, 2025
c09e1f0
update auto versioning
kuanfandevops Apr 8, 2025
0679526
update auto versioning
kuanfandevops Apr 8, 2025
0bf9297
update auto versioning
kuanfandevops Apr 8, 2025
85bc505
update auto versioning
kuanfandevops Apr 8, 2025
3683da3
update auto versioning
kuanfandevops Apr 8, 2025
8dd761b
auto version create local branch
kuanfandevops Apr 8, 2025
9631f72
auto version create local branch
kuanfandevops Apr 8, 2025
06a87b3
auto version create local branch
kuanfandevops Apr 8, 2025
d64589f
make sure checkout correct branch
kuanfandevops Apr 8, 2025
ce23e4d
checkout pr
kuanfandevops Apr 8, 2025
6ac8621
checkout pr
kuanfandevops Apr 8, 2025
3101e4d
pull oc command during tagging
kuanfandevops Apr 9, 2025
c6de425
pull oc command during db setup
kuanfandevops Apr 9, 2025
b7cb1d8
update postgres-pr path
kuanfandevops Apr 9, 2025
8088826
update pr build flow
kuanfandevops Apr 9, 2025
2e3a3a3
remove redis and pvc when tear down pr
kuanfandevops Apr 9, 2025
a954fa1
Update pr-build (#58)
kuanfandevops Apr 10, 2025
a601e30
Add sonar and update dockerbuild for next (#61)
kuanfandevops Apr 11, 2025
bf43d80
update docker file for vault
kuanfandevops Apr 14, 2025
aa41fbe
only source the config script for vaule if it exists
kuanfandevops Apr 15, 2025
e7bb1d5
rename the version number for pr build
kuanfandevops Apr 15, 2025
3c27046
remove testing branch for pr build
kuanfandevops Apr 15, 2025
e6e3b2c
update sem version for pr build
kuanfandevops Apr 15, 2025
55763e3
run vault secret if it exists
kuanfandevops Apr 15, 2025
64317ce
34 - Email Service Module (with unit tests) (#60)
rogerlcleung Apr 16, 2025
12f77a0
Initialize BCGovPubCode yaml file (#64)
rogerlcleung Apr 16, 2025
f0bed32
feat: 44 - server side pagination, filtering, and sorting for Table c…
tim738745 Apr 22, 2025
0a4073e
Cleanup images (#66)
kuanfandevops Apr 23, 2025
17bbef5
add comments and docs for pipelines (#69)
kuanfandevops Apr 24, 2025
88ec6ae
move approval step before tag-images
kuanfandevops Apr 24, 2025
1488c6a
feat: 43 - vehicle models (#71)
tim738745 Apr 24, 2025
6353c63
update developer guide (#35)
kuanfandevops Apr 24, 2025
87b1cd6
update pipeline document
kuanfandevops Apr 25, 2025
d8f2fa0
update getversion to prevent minor version increase when pr merged in…
kuanfandevops Apr 25, 2025
3b102df
update CICD diagram
kuanfandevops Apr 30, 2025
812e81b
feat: 56 - upload icbc file (#75)
tim738745 May 1, 2025
6a5c214
55 ZEV-Unit Transfer Comments Refactoring (#76)
rogerlcleung May 5, 2025
923a549
feat: 44 - vehicles list page (#77)
tim738745 May 5, 2025
cb7148d
zeva 2 #45 feat: adds vehicle details page with history and comments …
emi-hi May 8, 2025
15dea15
45: some minor changes (#86)
tim738745 May 8, 2025
b7e9f3a
79 Feat: Vehicle comments (#87)
emi-hi May 14, 2025
800d004
formatting and ts error fixes (#89)
tim738745 May 14, 2025
24f0b16
65: zev unit balances (#94)
tim738745 May 21, 2025
7999fa5
feat #78: Update Vehicle Status (#91)
emi-hi May 22, 2025
f34ce16
80 Organizations (Vehicle Suppliers) Page (#95)
rogerlcleung May 22, 2025
c61a916
fix ts error (#98)
tim738745 May 22, 2025
2878bf3
fix next build error (#99)
tim738745 May 22, 2025
d1844e6
fix: updates reverse for comments (#100)
emi-hi May 27, 2025
2aa449e
80 - Organization Details Page (#102)
rogerlcleung Jun 9, 2025
e5d479c
57 - credit applications (#103)
tim738745 Jun 10, 2025
5a5e70c
application histories - small fix (#117)
tim738745 Jun 10, 2025
da31938
Feat: Users #81 (#116)
JulianForeman Jun 11, 2025
0979b0f
fix build error (#121)
tim738745 Jun 11, 2025
c291128
create vehicles form (#122)
emi-hi Jun 17, 2025
29f07d9
formatting (#124)
tim738745 Jun 17, 2025
18afff0
80-Organization Create/Update (#131)
rogerlcleung Jun 19, 2025
4400e9f
96 - penalty credits (#134)
tim738745 Jun 23, 2025
b4d99a7
feat 123: edit vehicle form (#133)
emi-hi Jun 24, 2025
28eea39
fix build error (#136)
tim738745 Jun 24, 2025
e64a120
vehicle form updates (#137)
tim738745 Jun 24, 2025
5b11789
scan vault secret database
kuanfandevops Jun 26, 2025
a84645b
Unit Tests: Organization Action & Utils Functions (#135)
rogerlcleung Jul 5, 2025
64df344
128 - users (#141)
tim738745 Jul 5, 2025
bc06484
Add sub-menu in navigation bar, and link pages to that. (#142)
rogerlcleung Jul 5, 2025
02e2905
formatting + change idir to idir-mfa (#143)
tim738745 Jul 5, 2025
155b260
instrumentation (#144)
tim738745 Jul 6, 2025
0736f67
console trace (#145)
tim738745 Jul 6, 2025
f6f726e
remove trace and instrumentation (#146)
tim738745 Jul 6, 2025
0705973
cleanup (#147)
tim738745 Jul 7, 2025
e23aca8
update seed file (#149)
tim738745 Jul 7, 2025
f184e77
Task: Filtering & Sorting Users on Backend #118 (#148)
JulianForeman Jul 7, 2025
b37de23
more cleanup (#150)
tim738745 Jul 7, 2025
5259ec7
fix build error (#151)
tim738745 Jul 7, 2025
6e12a90
new actionResponse utils (#152)
tim738745 Jul 8, 2025
21e310e
add AUTH_URL for pr build
kuanfandevops Jul 9, 2025
065dc9a
update dockerfile entry
kuanfandevops Jul 9, 2025
64fbbf2
129: icbc list page (#155)
tim738745 Jul 10, 2025
e959ec1
update redis connection (#156)
tim738745 Jul 10, 2025
4200e8e
update redis connection again (#157)
tim738745 Jul 10, 2025
bd06002
redis connection updates (#160)
tim738745 Jul 14, 2025
addd410
154 - Agreements Data Model (#158)
rogerlcleung Jul 15, 2025
d13360e
153: refactor actions and calling components (#161)
tim738745 Jul 15, 2025
c4b9c5c
add REDIS_TLS_ENABLED
kuanfandevops Jul 16, 2025
9c92189
update pr build for redis
kuanfandevops Jul 16, 2025
eaaa076
update redis pr build version
kuanfandevops Jul 16, 2025
f6ed1ca
159 Agreements List View (#167)
rogerlcleung Jul 21, 2025
812ba48
2520 and 138 - table refinements/highlighting (#169)
tim738745 Jul 21, 2025
0354ead
138: table refinements - follow-up (#170)
tim738745 Jul 21, 2025
5feeb6b
Feat: Credit Application Comments #2513 (#166)
JulianForeman Jul 22, 2025
aec506f
fix ts errors + update minio stuff (#172)
tim738745 Jul 22, 2025
7743f5e
update pr build
kuanfandevops Jul 23, 2025
66f9086
allow build pr created by dependabot
kuanfandevops Jul 24, 2025
2693fb3
correct pr build file
kuanfandevops Jul 24, 2025
7255ecc
update pr build
kuanfandevops Jul 24, 2025
32425e6
update podAnnotations.rolloutTriggered:
kuanfandevops Jul 24, 2025
7ec07be
add step to build bullmq pr
kuanfandevops Jul 24, 2025
5fb99ff
remove rolloutTriggered set
kuanfandevops Jul 24, 2025
adb2215
correctly update rolloutTriggered
kuanfandevops Jul 24, 2025
7cc67fa
130: vehicle attachments (#176)
tim738745 Jul 24, 2025
2648413
vehicleForm - small fix (#177)
tim738745 Jul 24, 2025
2471390
add rolloutTriggered
kuanfandevops Jul 24, 2025
6b1c19a
replase REDIS_HOST for pr build
kuanfandevops Jul 24, 2025
b0f6830
remove rolloutTriggered for pr build
kuanfandevops Jul 24, 2025
3518ef6
update dropzone component (#179)
tim738745 Jul 25, 2025
39e4fc9
168-Agreements Creation (#180)
rogerlcleung Jul 28, 2025
5887a32
Bump form-data from 4.0.2 to 4.0.4 in /next (#171)
dependabot[bot] Jul 29, 2025
763c04f
Bump brace-expansion from 1.1.11 to 1.1.12 in /next (#125)
dependabot[bot] Jul 29, 2025
0ad964e
Bump esbuild and tsx in /next (#126)
dependabot[bot] Jul 29, 2025
4dfddb8
update bas branch to release/**
kuanfandevops Aug 6, 2025
70736d9
update deploy template
kuanfandevops Aug 7, 2025
000efa5
181-Agreement Details View (#188)
rogerlcleung Aug 11, 2025
cb3a70d
Task: Vehicle Credits #163 (#183)
JulianForeman Aug 12, 2025
587b353
vehicles refactoring (#191)
tim738745 Aug 13, 2025
fc705e0
162 - model year reports and assessments (#189)
tim738745 Aug 13, 2025
a1640f9
feat: styles sigin page, adds logos, adds classname prop to button (…
emi-hi Aug 14, 2025
6e8b53d
feat: more vehicle changes/refinements (#193)
tim738745 Aug 14, 2025
76ceba9
162: myrs and assessments - part 2 (#194)
tim738745 Aug 18, 2025
6869e2f
Initiate agreement comments (#195)
rogerlcleung Aug 18, 2025
a47c51c
Bump tmp from 0.2.3 to 0.2.4 in /next (#184)
dependabot[bot] Aug 19, 2025
be7d68a
140 - credit transfers refactor (#199)
tim738745 Aug 20, 2025
674ce96
use inverse maps (#200)
tim738745 Aug 20, 2025
8cc2dcd
some validation fixes (#201)
tim738745 Aug 20, 2025
0debc96
some refactoring (#202)
tim738745 Aug 21, 2025
393fead
165: notifications (#207)
tim738745 Aug 27, 2025
73b8b01
try to resolve hanging build (#209)
tim738745 Aug 27, 2025
fc74f04
Revert "try to resolve hanging build (#209)" (#210)
tim738745 Aug 27, 2025
c9378b2
revert last 3 commits (#211)
tim738745 Aug 28, 2025
61fa4c1
put back notifications (#212)
tim738745 Aug 28, 2025
12bb5b2
196 Agreement Attachments (#214)
rogerlcleung Aug 29, 2025
e178e42
formatting (#215)
tim738745 Aug 30, 2025
c6d2b2e
set workerThreads to false (#216)
tim738745 Aug 30, 2025
6d8cc8c
upgrade next and prisma (#218)
tim738745 Aug 30, 2025
e5d3b97
update package-lock.json (#221)
tim738745 Sep 12, 2025
0bd90a9
Refactor organization edit form (#223)
rogerlcleung Sep 17, 2025
537981f
reassessments (#224)
tim738745 Sep 18, 2025
1ac0979
139: models mismatch view (#226)
tim738745 Oct 28, 2025
70fbccc
Unit tests - Agreement Actions (#225)
rogerlcleung Oct 28, 2025
332c2c5
remove minio pr build
Nov 4, 2025
95a7ba0
Adding modal component and update message when changing user status (…
JulianForeman Nov 10, 2025
4d069e0
zeva2 208 - implement color tokens (#231)
emi-hi Nov 18, 2025
8aebe66
myrs and assessments v2 (#230)
tim738745 Nov 18, 2025
36a7535
active/inactive filter for users (#237)
tim738745 Nov 18, 2025
eb33447
small fix + formatting (#239)
tim738745 Nov 18, 2025
f862789
increase postgres version for pr build
Nov 20, 2025
14ef333
213: modal styling (#244)
tim738745 Nov 24, 2025
a6a231c
Task: Role Change Confirmation Modal #205 (#245)
JulianForeman Nov 25, 2025
5f0b806
small fixes (#248)
tim738745 Nov 25, 2025
7ad5f1a
small fix (#249)
tim738745 Nov 25, 2025
1377376
update developer guide (#250)
tim738745 Nov 25, 2025
225de2c
update approval list
Nov 25, 2025
292286b
feat: ZEVA-206 - Warning modal (#251)
dallascrichmond Nov 28, 2025
b67dd19
Added shadow levels (#253)
dallascrichmond Dec 2, 2025
ce178e0
2549: legacy and non-legacy reassessments (#252)
tim738745 Dec 4, 2025
9366e5a
Task: [ZEVA2-234] Reusable button (#262)
dallascrichmond Dec 8, 2025
9d1de89
fix reference error + formatting (#264)
tim738745 Dec 8, 2025
974fae6
233: iconography (#265)
tim738745 Dec 9, 2025
ef39194
Task: Style Admin Pages #247 (#261)
JulianForeman Dec 9, 2025
245c28d
chore: upgrade next and other packages + jwt callback changes (#266)
tim738745 Dec 11, 2025
c1a441c
set number of cpus to use for build (#267)
tim738745 Dec 11, 2025
4149c26
fix more react vulnerabilities (#269)
tim738745 Dec 16, 2025
27630e5
174: credit application attachments + additional refinements to CAs a…
tim738745 Jan 6, 2026
5548f66
Most likely needs some docker-compose and minio file clean up
dallascrichmond Jan 5, 2026
387f6d7
Revert "Most likely needs some docker-compose and minio file clean up…
tim738745 Jan 6, 2026
20d10ed
175: attachment changes + some refactoring (#273)
tim738745 Jan 13, 2026
ff7c056
check for attachments (#274)
tim738745 Jan 13, 2026
24dfc69
242: myr changes (#277)
tim738745 Jan 20, 2026
b0c6044
Bump lodash from 4.17.21 to 4.17.23 in /next (#280)
dependabot[bot] Jan 28, 2026
6818f1e
Add a test automation workflow (#291)
kuanfandevops Jan 28, 2026
19af87f
Revert "Bump lodash from 4.17.21 to 4.17.23 in /next (#280)" (#292)
kuanfandevops Jan 28, 2026
8a71589
revise all workflows
Jan 29, 2026
3994f53
feat: [ZEVA2-241] Client Side Table (#289)
dallascrichmond Feb 2, 2026
b5ef81c
Updating roles and idir admin page (#298)
JulianForeman Feb 2, 2026
75a78b5
Updated Zeva User role name (Primarily a UI change) (#299)
dallascrichmond Feb 2, 2026
9b3e9b5
275: supplementary reports (#300)
tim738745 Feb 2, 2026
fd7ae36
update forecast report template (#301)
tim738745 Feb 2, 2026
e58262c
small fix (#302)
tim738745 Feb 2, 2026
2d86894
forecast report refinements (#303)
tim738745 Feb 3, 2026
07fd38b
small fix (#304)
tim738745 Feb 3, 2026
2b93929
ci: add trunk based development pipeline (#305)
kuanfandevops Feb 4, 2026
ff96f45
ci: cleanup old workflows (#307)
kuanfandevops Feb 4, 2026
2e23171
ci: update branch name in workflows and remove GitVersion.yml
Feb 4, 2026
4ace0fe
ci: update version in package.json
Feb 4, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
3 changes: 3 additions & 0 deletions .commitlintrc.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
"extends": ["@commitlint/config-conventional"]
}
Binary file added .github/CICD-diagram.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
28 changes: 28 additions & 0 deletions .github/ISSUE_TEMPLATE/bug.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
---
name: Bug
about: An undesirable behaviour that needs correction
title: ''
labels: ''
assignees: ''

---

**Describe the Bug**
A clear and concise description of what the bug is.

**Expected Behaviour**
A clear and concise description of what you expected to happen.

**Actual Behaviour**
A clear and concise description of what actually happens.

**Implications**
A clear and concise description of any implications.

**Steps To Reproduce**
Steps to reproduce the behaviour:
User/Role:
1. Go to '...'
2. Click on '....'
3. Scroll down to '....'
4. See error
26 changes: 26 additions & 0 deletions .github/ISSUE_TEMPLATE/spike.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
---
name: Spike
about: Research options prior to development work
title: ''
labels: ''
assignees: ''

---

**Problem Description**
**In order to** (achieve some goal), (a system or persona) **needs to** (some action).

**Solution Needs**
- Enter the non-negotiables of the solution (what are the needs vs. what are the wants)

**Timebox**
- How much effort are we committing to this research?

**Outcome**
Details describing the outcome of the research
- Was it successful? What direction should the work go?
- Was it unsuccessful? Discuss next steps with team

**Additional Context**
- enter text here
- enter text here
23 changes: 23 additions & 0 deletions .github/ISSUE_TEMPLATE/task.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
---
name: Task
about: Any work that does not directly impact the user
title: ''
labels: ''
assignees: ''

---

**Describe the task**
A clear and concise description of what the task is.

**Purpose**
The reason why this task is needed and/or what value it adds.

**Acceptance Criteria**
- [ ] first
- [ ] second
- [ ] third

**Additional context**
- Add any other context about the task here.
- Or here
27 changes: 27 additions & 0 deletions .github/ISSUE_TEMPLATE/user-story.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
---
name: User Story
about: This template is to be used when describing a feature from the user's perspective
title: ''
labels: ''
assignees: ''

---

**Description:**
- [ ] "As a [type of user]" "I want [an action or feature]" "So that [benefit or value]" -

**Wireframe:** <link>

**Purpose and benefit to user:**

**Acceptance Criteria:**

- [ ] Given I am a <role>, When I am <doing something>, then <this happens>
- [ ] Given I am a <role>, When I am <doing something>, then <this happens>

**Development Checklist:**
- [ ] A
- [ ] B
- [ ] C

**Notes:**
76 changes: 76 additions & 0 deletions .github/Readme.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,76 @@
# Zeva2 Continuous Delivery Structure

![alt text](CICD-diagram.png)

# Zeva2 Trunk Based Release Model

Learn why this version control management practice is common practice among DevOps teams. https://www.atlassian.com/continuous-delivery/continuous-integration/trunk-based-development

![Here](zeva2-trunk-based-release-model.png)

## Semantic Release

Fully automated version management and package publishing https://github.com/semantic-release/semantic-release

## Conventional Commit

Simple conventional commit messages:

- feat: add export button → Yes (minor release)
- fix: handle null user → Yes (patch release)
- perf: optimize search query → Yes (patch release)
- chore: update dependencies → No
- docs: update README → No
- refactor: simplify auth middleware → No
- test: add user service tests → No
- ci: adjust release workflow → No
- build: bump Node version → No
- style: format lint rules → No

With scopes:

- feat(api): add pagination → Yes (minor release)
- fix(ui): prevent double submit → Yes (minor release)
- chore(ci): update GitHub actions → No
- docs(README): add setup guide → No

Breaking changes:

- feat! : remove legacy endpoint → Yes (major release)
- refactor(auth)! : change token format → Yes (major release)
- feat: remove legacy endpoint + BREAKING CHANGE: ... → Yes (major release)

Semantic release commit message (auto generated by semantic release):

- chore(release): 1.2.3 [skip ci] → No (it’s the release commit itself, and [skip ci] prevents CI)

## Husky

A npm package to enforce the conventional commit

## Feature Flag

Use feature flags to disable the unmatured feature on prod release

# Zeva2 Pipelines

## release-dev.yaml

Every commit to main triggers this pipeline. It does the following:

- run the jest test suit
- based on the conventional commit history, the semantic release process decides if needs to create a release
- if there is a new release created, build the images on Openshift Tools namespace
- deploy the images on Openshift Dev environment.

## promote-test.yaml

Manually triggered pipelin to deploy the images to Openshift Test

- provide the image version to be deployed
- create the pull request with the version changed in CD Repo
- once the pull request is approved, the version will be deployed on Oepnshift Test environment

## release-prod.yaml

Manually triggered pipelin to deploy the images to Openshift Prod. Same logic as the test deployment.
49 changes: 0 additions & 49 deletions .github/workflows/auto-versioning.yaml

This file was deleted.

81 changes: 81 additions & 0 deletions .github/workflows/build-template.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,81 @@

# This workfile is a template for building the Zeva2 application in OpenShift.
# It uses the OpenShift CLI (oc) to process and apply build configurations for the Next.js and BullMQ components of the application.
# The workflow is triggered by a call from another workflow and requires certain inputs and secrets to be provided.
name: Build Template

on:
workflow_call:
inputs:
# The git reference to check out the repository
git_ref:
required: true
type: string
# The version of the application to build
# This is typically set by the GitVersion action in the calling workflow
version:
required: true
type: string
secrets:
tools-namespace:
required: true
openshift-server:
required: true
openshift-token:
required: true

permissions:
contents: read

jobs:
build:
name: Build Zeva2
runs-on: ubuntu-latest
timeout-minutes: 60

steps:
- name: Check out repository
uses: actions/checkout@v4.1.1
with:
ref: ${{ inputs.git_ref }}

- name: Restore oc command from Cache
uses: actions/cache@v4.2.0
with:
path: /usr/local/bin/oc
key: oc-cli-${{ runner.os }}

- name: Log in to Openshift
uses: redhat-actions/oc-login@v1.3
with:
openshift_server_url: ${{ secrets.openshift-server }}
openshift_token: ${{ secrets.openshift-token }}
insecure_skip_tls_verify: true
namespace: ${{ secrets.tools-namespace }}

- name: Build Next
run: |
echo "VERSION=${{ inputs.version }}"
oc projects
cd openshift/templates
oc process -f ./next-bc.yaml VERSION=${{ inputs.version }} GIT_REF=${{ inputs.git_ref }} | oc apply --wait=true -f - -n ${{ secrets.tools-namespace }}
# cancel existing builds if there are any
for build in $(oc -n ${{ secrets.tools-namespace }} get builds -l buildconfig=zeva2-next-${{ inputs.version }} -o jsonpath='{.items[?(@.status.phase=="Running")].metadata.name}'); do
echo "canceling $build"
oc -n ${{ secrets.tools-namespace }} cancel-build $build
done
oc -n ${{ secrets.tools-namespace }} start-build zeva2-next-${{ inputs.version }} --wait=true

- name: Build Bullmq
run: |
echo "VERSION=${{ inputs.version }}"
oc projects
cd openshift/templates
oc process -f ./bullmq-bc.yaml VERSION=${{ inputs.version }} GIT_REF=${{ inputs.git_ref }} | oc apply --wait=true -f - -n ${{ secrets.tools-namespace }}
# cancel existing builds if there are any
for build in $(oc -n ${{ secrets.tools-namespace }} get builds -l buildconfig=zeva2-bullmq-${{ inputs.version }} -o jsonpath='{.items[?(@.status.phase=="Running")].metadata.name}'); do
echo "canceling $build"
oc -n ${{ secrets.tools-namespace }} cancel-build $build
done
oc -n ${{ secrets.tools-namespace }} start-build zeva2-bullmq-${{ inputs.version }} --wait=true

25 changes: 25 additions & 0 deletions .github/workflows/cron-cleanup-workflow-runs.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
# This workflow is triggered on a schedule and manually to delete old workflow runs.
# It uses the Mattraks/delete-workflow-runs action to delete workflow runs older than 5 days,
# while keeping a minimum of 10 runs.
name: Cleanup Workflow Runs
on:
workflow_dispatch:
schedule:
- cron: "0 8 * * *"

permissions:
contents: read

jobs:
del_runs:
runs-on: ubuntu-latest
permissions:
actions: write
steps:
- name: Delete workflow runs
uses: Mattraks/delete-workflow-runs@v2.0.6
with:
token: ${{ github.token }}
repository: ${{ github.repository }}
retain_days: 5
keep_minimum_runs: 10
Loading