Skip to content

Commit

Permalink
Merge branch 'main' into qa/bcgov#1421-InstitutionManageDesignation
Browse files Browse the repository at this point in the history
  • Loading branch information
velang01 authored Oct 3, 2022
2 parents e0404aa + 0b8f589 commit a1f32c6
Show file tree
Hide file tree
Showing 1,152 changed files with 3,911 additions and 1,719 deletions.
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ dist/

#cypress
screenshots/
testing/**/report/
videos/
report/
cypress.env.json

4 changes: 2 additions & 2 deletions devops/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ define QA_DB_NAME
endef

define BUILD_TAG
"$(BUILD_REF)-$(BUILD_ID)"
"$(subst /,-,$(BUILD_REF))-$(BUILD_ID)"
endef

define BUILD_TEMPLATE_PATH
Expand Down Expand Up @@ -304,7 +304,7 @@ build-api:
test -n "$(BUILD_REF)"
test -n "$(BUILD_NAMESPACE)"
@echo "+\n++ BUILDING API with tag: $(BUILD_TAG)\n+"
@oc -n $(BUILD_NAMESPACE) process -f $(BUILD_TEMPLATE_PATH) -p TAG=$(BUILD_TAG) -p SOURCE_REPOSITORY_REF=$(BUILD_REF) -p BASE_IMAGE_NAME="nodejs-16" -p BASE_IMAGE_TAG="1" -p BASE_IMAGE_REPO="artifacts.developer.gov.bc.ca/redhat-docker-remote/ubi8/" -p SOURCE_CONTEXT_DIR=sources/packages/api -p NAME=$(API) | oc -n $(BUILD_NAMESPACE) apply -f -
@oc -n $(BUILD_NAMESPACE) process -f $(BUILD_TEMPLATE_PATH) -p TAG=$(BUILD_TAG) -p SOURCE_REPOSITORY_REF=$(BUILD_REF) -p BASE_IMAGE_NAME="nodejs-16" -p BASE_IMAGE_TAG="1" -p BASE_IMAGE_REPO="artifacts.developer.gov.bc.ca/redhat-docker-remote/ubi8/" -p SOURCE_CONTEXT_DIR=sources/packages/backend -p DOCKER_FILE_PATH=apps/api/Dockerfile -p NAME=$(API) | oc -n $(BUILD_NAMESPACE) apply -f -
@oc -n $(BUILD_NAMESPACE) start-build bc/$(API) --wait

build-web:
Expand Down
4 changes: 4 additions & 0 deletions devops/openshift/docker-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,7 @@ objects:
type: Git
strategy:
dockerStrategy:
dockerfilePath: "${DOCKER_FILE_PATH}"
pullSecret:
name: artifactory-secret-credential
from:
Expand All @@ -85,6 +86,9 @@ parameters:
value: https://github.com/bcgov/SIMS.git
- name: SOURCE_REPOSITORY_REF
required: true
- name: DOCKER_FILE_PATH
required: true
value: Dockerfile
- name: TAG
value: "latest"
- name: BASE_IMAGE_REPO
Expand Down
6 changes: 3 additions & 3 deletions sources/docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@ services:
image: api-${PROJECT_NAME}:${BUILD_REF}-${BUILD_ID}
container_name: api-${PROJECT_NAME}-${BUILD_REF}-${BUILD_ID}
build:
context: ./packages/api
dockerfile: Dockerfile.dev
context: ./packages/backend
dockerfile: ./apps/api/Dockerfile.dev
environment:
- NODE_ENV=docker
- PORT=${API_PORT}
Expand Down Expand Up @@ -76,7 +76,7 @@ services:
ports:
- ${API_PORT}:${API_PORT}
volumes:
- ./packages/api/src:/app/src
- ./packages/backend/apps/api/src:/app/src
networks:
- local-network
restart: always
Expand Down
17 changes: 0 additions & 17 deletions sources/packages/api/nest-cli.json

This file was deleted.

This file was deleted.

67 changes: 0 additions & 67 deletions sources/packages/api/src/database/__tests__/student.model.spec.ts

This file was deleted.

34 changes: 0 additions & 34 deletions sources/packages/api/src/database/__tests__/user.model.spec.ts

This file was deleted.

15 changes: 0 additions & 15 deletions sources/packages/api/src/database/database.module.ts

This file was deleted.

File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -18,10 +18,10 @@ RUN npm ci
COPY . .

# Building app
RUN npm run build
RUN npm run build api

# Exposing application port
EXPOSE ${PORT}

# Entry point
CMD [ "npm", "run", "start:prod" ]
CMD [ "npm", "run", "start:prod:api" ]
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@ ENV PATH $PATH:/app/node_modules/.bin
# Application Port
ENV PORT 3000

# Setting app as work dir
WORKDIR /app

# Copying package.json and package-lock.json
Expand All @@ -22,18 +21,10 @@ RUN npm ci
COPY . .

# Building app
RUN npm run build
RUN npm run build api

# Exposing application port
EXPOSE ${PORT}

# Entry point
CMD [ "npm", "run", "docker:start" ]

# Sample line to run the unit tests tests for now.
# Unit tests will be enabled on CI/CD on upcoming tasks.
# CMD [ "npm", "run", "test:local" ]

# Sample line to run the E2E tests for now.
# E2E tests will be enabled on CI/CD on upcoming tasks.
# CMD [ "npm", "run", "test:e2e" ]
CMD [ "npm", "run", "docker:start:api" ]
1 change: 1 addition & 0 deletions sources/packages/backend/apps/api/src-sql/test.sql
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
-- ## This is an empty test sql file.
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { Module } from "@nestjs/common";
import { DatabaseModule } from "./database/database.module";
import { DatabaseModule } from "@sims/sims-db";
import {
ApplicationService,
ConfigService,
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
require("../env_setup");
require("../../../env_setup");
import { Test, TestingModule } from "@nestjs/testing";
import { AppController } from "./app.controller";
import { AppService } from "./app.service";
import { DatabaseModule } from "./database/database.module";
import { DatabaseModule } from "@sims/sims-db";

describe("AppController", () => {
let appController: AppController;
Expand Down
File renamed without changes.
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { Module } from "@nestjs/common";
import { DatabaseModule } from "./database/database.module";
import { DatabaseModule } from "@sims/sims-db";
import {
ConfigService,
DesignationAgreementService,
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { Module } from "@nestjs/common";
import { AppController } from "./app.controller";
import { AppService } from "./app.service";
import { DatabaseModule } from "./database/database.module";
import { DatabaseModule } from "@sims/sims-db";
import { RouterModule } from "@nestjs/core";
import {
UserService,
Expand Down
File renamed without changes.
Loading

0 comments on commit a1f32c6

Please sign in to comment.