From d94b6177d9052afe5c0bb412875e72e597a4e830 Mon Sep 17 00:00:00 2001 From: Guru-AOT Date: Fri, 8 Dec 2023 10:09:46 -0700 Subject: [PATCH 01/21] initial commit --- devops/Makefile | 12 +++++----- devops/openshift/docker-build.yml | 22 ------------------- sources/packages/backend/apps/api/Dockerfile | 2 +- .../backend/apps/db-migrations/Dockerfile | 2 +- .../backend/apps/load-test-gateway/Dockerfile | 2 +- .../backend/apps/queue-consumers/Dockerfile | 2 +- .../packages/backend/apps/workers/Dockerfile | 2 +- sources/packages/web/Dockerfile | 2 +- 8 files changed, 12 insertions(+), 34 deletions(-) diff --git a/devops/Makefile b/devops/Makefile index 7ae2d53bb0..df7b90a05b 100644 --- a/devops/Makefile +++ b/devops/Makefile @@ -242,7 +242,7 @@ build-db-migrations: test -n "$(BUILD_REF)" test -n "$(DB_MIGRATIONS_BUILD_REF)" @echo "+\n++ BUILDING DB migrations with tag: $(BUILD_REF)\n+" - @oc -n $(BUILD_NAMESPACE) process -f $(BUILD_TEMPLATE_PATH) -p TAG=$(BUILD_REF) -p SOURCE_REPOSITORY_REF=$(BUILD_REF) -p BASE_IMAGE_NAME="nodejs-18" -p BASE_IMAGE_TAG="1-71.1697652955" -p BASE_IMAGE_REPO="artifacts.developer.gov.bc.ca/redhat-access-docker-remote/ubi8/" -p SOURCE_CONTEXT_DIR=$(SOURCE_CONTEXT_DIR)backend -p DOCKER_FILE_PATH=apps/db-migrations/Dockerfile -p NAME=$(DB_MIGRATIONS_BUILD_REF) | oc -n $(BUILD_NAMESPACE) apply -f - + @oc -n $(BUILD_NAMESPACE) process -f $(BUILD_TEMPLATE_PATH) -p TAG=$(BUILD_REF) -p SOURCE_REPOSITORY_REF=$(BUILD_REF) -p BASE_IMAGE_REPO="artifacts.developer.gov.bc.ca/redhat-access-docker-remote/ubi8/" -p SOURCE_CONTEXT_DIR=$(SOURCE_CONTEXT_DIR)backend -p DOCKER_FILE_PATH=apps/db-migrations/Dockerfile -p NAME=$(DB_MIGRATIONS_BUILD_REF) | oc -n $(BUILD_NAMESPACE) apply -f - @oc -n $(BUILD_NAMESPACE) start-build bc/$(DB_MIGRATIONS_BUILD_REF) --wait build-api: @@ -250,7 +250,7 @@ build-api: test -n "$(BUILD_REF)" test -n "$(API_BUILD_REF)" @echo "+\n++ BUILDING API with tag: $(BUILD_REF)\n+" - @oc -n $(BUILD_NAMESPACE) process -f $(BUILD_TEMPLATE_PATH) -p TAG=$(BUILD_REF) -p SOURCE_REPOSITORY_REF=$(BUILD_REF) -p BASE_IMAGE_NAME="nodejs-18" -p BASE_IMAGE_TAG="1-71.1697652955" -p BASE_IMAGE_REPO="artifacts.developer.gov.bc.ca/redhat-access-docker-remote/ubi8/" -p SOURCE_CONTEXT_DIR=$(SOURCE_CONTEXT_DIR)backend -p DOCKER_FILE_PATH=apps/api/Dockerfile -p NAME=$(API_BUILD_REF) | oc -n $(BUILD_NAMESPACE) apply -f - + @oc -n $(BUILD_NAMESPACE) process -f $(BUILD_TEMPLATE_PATH) -p TAG=$(BUILD_REF) -p SOURCE_REPOSITORY_REF=$(BUILD_REF) -p BASE_IMAGE_REPO="artifacts.developer.gov.bc.ca/redhat-access-docker-remote/ubi8/" -p SOURCE_CONTEXT_DIR=$(SOURCE_CONTEXT_DIR)backend -p DOCKER_FILE_PATH=apps/api/Dockerfile -p NAME=$(API_BUILD_REF) | oc -n $(BUILD_NAMESPACE) apply -f - @oc -n $(BUILD_NAMESPACE) start-build bc/$(API_BUILD_REF) --wait build-workers: @@ -258,7 +258,7 @@ build-workers: test -n "$(BUILD_REF)" test -n "$(WORKERS_BUILD_REF)" @echo "+\n++ BUILDING WORKERS with tag: $(BUILD_REF)\n+" - @oc -n $(BUILD_NAMESPACE) process -f $(BUILD_TEMPLATE_PATH) -p TAG=$(BUILD_REF) -p SOURCE_REPOSITORY_REF=$(BUILD_REF) -p BASE_IMAGE_NAME="nodejs-18" -p BASE_IMAGE_TAG="1-71.1697652955" -p BASE_IMAGE_REPO="artifacts.developer.gov.bc.ca/redhat-access-docker-remote/ubi8/" -p SOURCE_CONTEXT_DIR=$(SOURCE_CONTEXT_DIR)backend -p DOCKER_FILE_PATH=apps/workers/Dockerfile -p NAME=$(WORKERS_BUILD_REF) | oc -n $(BUILD_NAMESPACE) apply -f - + @oc -n $(BUILD_NAMESPACE) process -f $(BUILD_TEMPLATE_PATH) -p TAG=$(BUILD_REF) -p SOURCE_REPOSITORY_REF=$(BUILD_REF) -p BASE_IMAGE_REPO="artifacts.developer.gov.bc.ca/redhat-access-docker-remote/ubi8/" -p SOURCE_CONTEXT_DIR=$(SOURCE_CONTEXT_DIR)backend -p DOCKER_FILE_PATH=apps/workers/Dockerfile -p NAME=$(WORKERS_BUILD_REF) | oc -n $(BUILD_NAMESPACE) apply -f - @oc -n $(BUILD_NAMESPACE) start-build bc/$(WORKERS_BUILD_REF) --wait build-queue-consumers: @@ -266,7 +266,7 @@ build-queue-consumers: test -n "$(BUILD_REF)" test -n "$(QUEUE_CONSUMERS_BUILD_REF)" @echo "+\n++ BUILDING QUEUE_CONSUMERS with tag: $(BUILD_REF)\n+" - @oc -n $(BUILD_NAMESPACE) process -f $(BUILD_TEMPLATE_PATH) -p TAG=$(BUILD_REF) -p SOURCE_REPOSITORY_REF=$(BUILD_REF) -p BASE_IMAGE_NAME="nodejs-18" -p BASE_IMAGE_TAG="1-71.1697652955" -p BASE_IMAGE_REPO="artifacts.developer.gov.bc.ca/redhat-access-docker-remote/ubi8/" -p SOURCE_CONTEXT_DIR=$(SOURCE_CONTEXT_DIR)backend -p DOCKER_FILE_PATH=apps/queue-consumers/Dockerfile -p NAME=$(QUEUE_CONSUMERS_BUILD_REF) | oc -n $(BUILD_NAMESPACE) apply -f - + @oc -n $(BUILD_NAMESPACE) process -f $(BUILD_TEMPLATE_PATH) -p TAG=$(BUILD_REF) -p SOURCE_REPOSITORY_REF=$(BUILD_REF) -p BASE_IMAGE_REPO="artifacts.developer.gov.bc.ca/redhat-access-docker-remote/ubi8/" -p SOURCE_CONTEXT_DIR=$(SOURCE_CONTEXT_DIR)backend -p DOCKER_FILE_PATH=apps/queue-consumers/Dockerfile -p NAME=$(QUEUE_CONSUMERS_BUILD_REF) | oc -n $(BUILD_NAMESPACE) apply -f - @oc -n $(BUILD_NAMESPACE) start-build bc/$(QUEUE_CONSUMERS_BUILD_REF) --wait build-load-test-gateway: @@ -274,7 +274,7 @@ build-load-test-gateway: test -n "$(BUILD_REF)" test -n "$(LOAD_TEST_GATEWAY_BUILD_REF)" @echo "+\n++ BUILDING LOAD_TEST_GATEWAY with tag: $(BUILD_REF)\n+" - @oc -n $(BUILD_NAMESPACE) process -f $(BUILD_TEMPLATE_PATH) -p TAG=$(BUILD_REF) -p SOURCE_REPOSITORY_REF=$(BUILD_REF) -p BASE_IMAGE_NAME="nodejs-18" -p BASE_IMAGE_TAG="1-71.1697652955" -p BASE_IMAGE_REPO="artifacts.developer.gov.bc.ca/redhat-access-docker-remote/ubi8/" -p SOURCE_CONTEXT_DIR=$(SOURCE_CONTEXT_DIR)backend -p DOCKER_FILE_PATH=apps/load-test-gateway/Dockerfile -p NAME=$(LOAD_TEST_GATEWAY_BUILD_REF) | oc -n $(BUILD_NAMESPACE) apply -f - + @oc -n $(BUILD_NAMESPACE) process -f $(BUILD_TEMPLATE_PATH) -p TAG=$(BUILD_REF) -p SOURCE_REPOSITORY_REF=$(BUILD_REF) -p BASE_IMAGE_REPO="artifacts.developer.gov.bc.ca/redhat-access-docker-remote/ubi8/" -p SOURCE_CONTEXT_DIR=$(SOURCE_CONTEXT_DIR)backend -p DOCKER_FILE_PATH=apps/load-test-gateway/Dockerfile -p NAME=$(LOAD_TEST_GATEWAY_BUILD_REF) | oc -n $(BUILD_NAMESPACE) apply -f - @oc -n $(BUILD_NAMESPACE) start-build bc/$(LOAD_TEST_GATEWAY_BUILD_REF) --wait build-web: @@ -282,7 +282,7 @@ build-web: test -n "$(BUILD_REF)" test -n "$(WEB_BUILD_REF)" @echo "+\n++ BUILDING WEB with tag: $(BUILD_REF)\n+" - @oc -n $(BUILD_NAMESPACE) process -f $(BUILD_TEMPLATE_PATH) -p TAG=$(BUILD_REF) -p SOURCE_REPOSITORY_REF=$(BUILD_REF) -p BASE_IMAGE_NAME="nginx-122" -p BASE_IMAGE_TAG="1" -p BASE_IMAGE_REPO="artifacts.developer.gov.bc.ca/redhat-access-docker-remote/ubi8/" -p SOURCE_CONTEXT_DIR=$(SOURCE_CONTEXT_DIR)web -p NAME=$(WEB_BUILD_REF) | oc -n $(BUILD_NAMESPACE) apply -f - + @oc -n $(BUILD_NAMESPACE) process -f $(BUILD_TEMPLATE_PATH) -p TAG=$(BUILD_REF) -p SOURCE_REPOSITORY_REF=$(BUILD_REF) -p BASE_IMAGE_REPO="artifacts.developer.gov.bc.ca/redhat-access-docker-remote/ubi8/" -p SOURCE_CONTEXT_DIR=$(SOURCE_CONTEXT_DIR)web -p NAME=$(WEB_BUILD_REF) | oc -n $(BUILD_NAMESPACE) apply -f - @oc -n $(BUILD_NAMESPACE) start-build bc/$(WEB_BUILD_REF) --wait init-patroni: diff --git a/devops/openshift/docker-build.yml b/devops/openshift/docker-build.yml index 40f312152b..754300be8c 100644 --- a/devops/openshift/docker-build.yml +++ b/devops/openshift/docker-build.yml @@ -7,26 +7,9 @@ metadata: objects: - apiVersion: image.openshift.io/v1 kind: ImageStream - metadata: - name: ${BASE_IMAGE_NAME} spec: lookupPolicy: local: false - - apiVersion: v1 - kind: ImageStreamTag - lookupPolicy: - local: false - metadata: - name: ${BASE_IMAGE_NAME}:${BASE_IMAGE_TAG} - tag: - annotations: null - from: - kind: DockerImage - name: ${BASE_IMAGE_REPO}${BASE_IMAGE_NAME}:${BASE_IMAGE_TAG} - importPolicy: - scheduled: true - referencePolicy: - type: Source - kind: ImageStream apiVersion: v1 metadata: @@ -88,11 +71,6 @@ parameters: value: Dockerfile - name: TAG value: "latest" - - name: BASE_IMAGE_REPO - - name: BASE_IMAGE_NAME - required: true - - name: BASE_IMAGE_TAG - required: true - name: CPU_LIMIT value: "2" - name: MEMORY_LIMIT diff --git a/sources/packages/backend/apps/api/Dockerfile b/sources/packages/backend/apps/api/Dockerfile index 9e1ee6730e..65e1b20454 100644 --- a/sources/packages/backend/apps/api/Dockerfile +++ b/sources/packages/backend/apps/api/Dockerfile @@ -1,5 +1,5 @@ # Base Image -FROM artifacts.developer.gov.bc.ca/redhat-access-docker-remote/ubi8/nodejs-18:1-71.1697652955 +FROM artifacts.developer.gov.bc.ca/redhat-access-docker-remote/ubi8/nodejs-18:1-81 LABEL maintainer="BC GOV" diff --git a/sources/packages/backend/apps/db-migrations/Dockerfile b/sources/packages/backend/apps/db-migrations/Dockerfile index a20c2e8a5d..84eeacf1db 100644 --- a/sources/packages/backend/apps/db-migrations/Dockerfile +++ b/sources/packages/backend/apps/db-migrations/Dockerfile @@ -1,5 +1,5 @@ # Base Image -FROM artifacts.developer.gov.bc.ca/redhat-access-docker-remote/ubi8/nodejs-18:1-71.1697652955 +FROM artifacts.developer.gov.bc.ca/redhat-access-docker-remote/ubi8/nodejs-18:1-81 LABEL maintainer="BC GOV" diff --git a/sources/packages/backend/apps/load-test-gateway/Dockerfile b/sources/packages/backend/apps/load-test-gateway/Dockerfile index 3b358ce4bb..9201941855 100644 --- a/sources/packages/backend/apps/load-test-gateway/Dockerfile +++ b/sources/packages/backend/apps/load-test-gateway/Dockerfile @@ -1,5 +1,5 @@ # Base Image -FROM artifacts.developer.gov.bc.ca/redhat-access-docker-remote/ubi8/nodejs-18:1-71.1697652955 +FROM artifacts.developer.gov.bc.ca/redhat-access-docker-remote/ubi8/nodejs-18:1-81 LABEL maintainer="BC GOV" diff --git a/sources/packages/backend/apps/queue-consumers/Dockerfile b/sources/packages/backend/apps/queue-consumers/Dockerfile index 7864a08e7b..29fec01cd7 100644 --- a/sources/packages/backend/apps/queue-consumers/Dockerfile +++ b/sources/packages/backend/apps/queue-consumers/Dockerfile @@ -1,5 +1,5 @@ # Base Image -FROM artifacts.developer.gov.bc.ca/redhat-access-docker-remote/ubi8/nodejs-18:1-71.1697652955 +FROM artifacts.developer.gov.bc.ca/redhat-access-docker-remote/ubi8/nodejs-18:1-81 LABEL maintainer="BC GOV" diff --git a/sources/packages/backend/apps/workers/Dockerfile b/sources/packages/backend/apps/workers/Dockerfile index 976ab01e8a..4a4e64311e 100644 --- a/sources/packages/backend/apps/workers/Dockerfile +++ b/sources/packages/backend/apps/workers/Dockerfile @@ -1,5 +1,5 @@ # Base Image -FROM artifacts.developer.gov.bc.ca/redhat-access-docker-remote/ubi8/nodejs-18:1-71.1697652955 +FROM artifacts.developer.gov.bc.ca/redhat-access-docker-remote/ubi8/nodejs-18:1-81 LABEL maintainer="BC GOV" diff --git a/sources/packages/web/Dockerfile b/sources/packages/web/Dockerfile index 2db8bc2110..8a57ddd13e 100644 --- a/sources/packages/web/Dockerfile +++ b/sources/packages/web/Dockerfile @@ -1,4 +1,4 @@ -FROM artifacts.developer.gov.bc.ca/redhat-access-docker-remote/ubi8/nodejs-18:1-71.1697652955 AS builder +FROM artifacts.developer.gov.bc.ca/redhat-access-docker-remote/ubi8/nodejs-18:1-81 AS builder # Application Port. ENV PORT 3030 From 644e455397e96a228f30395d5a23f5b12e36ba0d Mon Sep 17 00:00:00 2001 From: Guru-AOT Date: Fri, 8 Dec 2023 10:14:02 -0700 Subject: [PATCH 02/21] updated --- devops/Makefile | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/devops/Makefile b/devops/Makefile index df7b90a05b..740f703d01 100644 --- a/devops/Makefile +++ b/devops/Makefile @@ -242,7 +242,7 @@ build-db-migrations: test -n "$(BUILD_REF)" test -n "$(DB_MIGRATIONS_BUILD_REF)" @echo "+\n++ BUILDING DB migrations with tag: $(BUILD_REF)\n+" - @oc -n $(BUILD_NAMESPACE) process -f $(BUILD_TEMPLATE_PATH) -p TAG=$(BUILD_REF) -p SOURCE_REPOSITORY_REF=$(BUILD_REF) -p BASE_IMAGE_REPO="artifacts.developer.gov.bc.ca/redhat-access-docker-remote/ubi8/" -p SOURCE_CONTEXT_DIR=$(SOURCE_CONTEXT_DIR)backend -p DOCKER_FILE_PATH=apps/db-migrations/Dockerfile -p NAME=$(DB_MIGRATIONS_BUILD_REF) | oc -n $(BUILD_NAMESPACE) apply -f - + @oc -n $(BUILD_NAMESPACE) process -f $(BUILD_TEMPLATE_PATH) -p TAG=$(BUILD_REF) -p SOURCE_REPOSITORY_REF=$(BUILD_REF) -p SOURCE_CONTEXT_DIR=$(SOURCE_CONTEXT_DIR)backend -p DOCKER_FILE_PATH=apps/db-migrations/Dockerfile -p NAME=$(DB_MIGRATIONS_BUILD_REF) | oc -n $(BUILD_NAMESPACE) apply -f - @oc -n $(BUILD_NAMESPACE) start-build bc/$(DB_MIGRATIONS_BUILD_REF) --wait build-api: @@ -250,7 +250,7 @@ build-api: test -n "$(BUILD_REF)" test -n "$(API_BUILD_REF)" @echo "+\n++ BUILDING API with tag: $(BUILD_REF)\n+" - @oc -n $(BUILD_NAMESPACE) process -f $(BUILD_TEMPLATE_PATH) -p TAG=$(BUILD_REF) -p SOURCE_REPOSITORY_REF=$(BUILD_REF) -p BASE_IMAGE_REPO="artifacts.developer.gov.bc.ca/redhat-access-docker-remote/ubi8/" -p SOURCE_CONTEXT_DIR=$(SOURCE_CONTEXT_DIR)backend -p DOCKER_FILE_PATH=apps/api/Dockerfile -p NAME=$(API_BUILD_REF) | oc -n $(BUILD_NAMESPACE) apply -f - + @oc -n $(BUILD_NAMESPACE) process -f $(BUILD_TEMPLATE_PATH) -p TAG=$(BUILD_REF) -p SOURCE_REPOSITORY_REF=$(BUILD_REF) -p SOURCE_CONTEXT_DIR=$(SOURCE_CONTEXT_DIR)backend -p DOCKER_FILE_PATH=apps/api/Dockerfile -p NAME=$(API_BUILD_REF) | oc -n $(BUILD_NAMESPACE) apply -f - @oc -n $(BUILD_NAMESPACE) start-build bc/$(API_BUILD_REF) --wait build-workers: @@ -258,7 +258,7 @@ build-workers: test -n "$(BUILD_REF)" test -n "$(WORKERS_BUILD_REF)" @echo "+\n++ BUILDING WORKERS with tag: $(BUILD_REF)\n+" - @oc -n $(BUILD_NAMESPACE) process -f $(BUILD_TEMPLATE_PATH) -p TAG=$(BUILD_REF) -p SOURCE_REPOSITORY_REF=$(BUILD_REF) -p BASE_IMAGE_REPO="artifacts.developer.gov.bc.ca/redhat-access-docker-remote/ubi8/" -p SOURCE_CONTEXT_DIR=$(SOURCE_CONTEXT_DIR)backend -p DOCKER_FILE_PATH=apps/workers/Dockerfile -p NAME=$(WORKERS_BUILD_REF) | oc -n $(BUILD_NAMESPACE) apply -f - + @oc -n $(BUILD_NAMESPACE) process -f $(BUILD_TEMPLATE_PATH) -p TAG=$(BUILD_REF) -p SOURCE_REPOSITORY_REF=$(BUILD_REF) -p SOURCE_CONTEXT_DIR=$(SOURCE_CONTEXT_DIR)backend -p DOCKER_FILE_PATH=apps/workers/Dockerfile -p NAME=$(WORKERS_BUILD_REF) | oc -n $(BUILD_NAMESPACE) apply -f - @oc -n $(BUILD_NAMESPACE) start-build bc/$(WORKERS_BUILD_REF) --wait build-queue-consumers: @@ -266,7 +266,7 @@ build-queue-consumers: test -n "$(BUILD_REF)" test -n "$(QUEUE_CONSUMERS_BUILD_REF)" @echo "+\n++ BUILDING QUEUE_CONSUMERS with tag: $(BUILD_REF)\n+" - @oc -n $(BUILD_NAMESPACE) process -f $(BUILD_TEMPLATE_PATH) -p TAG=$(BUILD_REF) -p SOURCE_REPOSITORY_REF=$(BUILD_REF) -p BASE_IMAGE_REPO="artifacts.developer.gov.bc.ca/redhat-access-docker-remote/ubi8/" -p SOURCE_CONTEXT_DIR=$(SOURCE_CONTEXT_DIR)backend -p DOCKER_FILE_PATH=apps/queue-consumers/Dockerfile -p NAME=$(QUEUE_CONSUMERS_BUILD_REF) | oc -n $(BUILD_NAMESPACE) apply -f - + @oc -n $(BUILD_NAMESPACE) process -f $(BUILD_TEMPLATE_PATH) -p TAG=$(BUILD_REF) -p SOURCE_REPOSITORY_REF=$(BUILD_REF) -p SOURCE_CONTEXT_DIR=$(SOURCE_CONTEXT_DIR)backend -p DOCKER_FILE_PATH=apps/queue-consumers/Dockerfile -p NAME=$(QUEUE_CONSUMERS_BUILD_REF) | oc -n $(BUILD_NAMESPACE) apply -f - @oc -n $(BUILD_NAMESPACE) start-build bc/$(QUEUE_CONSUMERS_BUILD_REF) --wait build-load-test-gateway: @@ -274,7 +274,7 @@ build-load-test-gateway: test -n "$(BUILD_REF)" test -n "$(LOAD_TEST_GATEWAY_BUILD_REF)" @echo "+\n++ BUILDING LOAD_TEST_GATEWAY with tag: $(BUILD_REF)\n+" - @oc -n $(BUILD_NAMESPACE) process -f $(BUILD_TEMPLATE_PATH) -p TAG=$(BUILD_REF) -p SOURCE_REPOSITORY_REF=$(BUILD_REF) -p BASE_IMAGE_REPO="artifacts.developer.gov.bc.ca/redhat-access-docker-remote/ubi8/" -p SOURCE_CONTEXT_DIR=$(SOURCE_CONTEXT_DIR)backend -p DOCKER_FILE_PATH=apps/load-test-gateway/Dockerfile -p NAME=$(LOAD_TEST_GATEWAY_BUILD_REF) | oc -n $(BUILD_NAMESPACE) apply -f - + @oc -n $(BUILD_NAMESPACE) process -f $(BUILD_TEMPLATE_PATH) -p TAG=$(BUILD_REF) -p SOURCE_REPOSITORY_REF=$(BUILD_REF) -p SOURCE_CONTEXT_DIR=$(SOURCE_CONTEXT_DIR)backend -p DOCKER_FILE_PATH=apps/load-test-gateway/Dockerfile -p NAME=$(LOAD_TEST_GATEWAY_BUILD_REF) | oc -n $(BUILD_NAMESPACE) apply -f - @oc -n $(BUILD_NAMESPACE) start-build bc/$(LOAD_TEST_GATEWAY_BUILD_REF) --wait build-web: @@ -282,7 +282,7 @@ build-web: test -n "$(BUILD_REF)" test -n "$(WEB_BUILD_REF)" @echo "+\n++ BUILDING WEB with tag: $(BUILD_REF)\n+" - @oc -n $(BUILD_NAMESPACE) process -f $(BUILD_TEMPLATE_PATH) -p TAG=$(BUILD_REF) -p SOURCE_REPOSITORY_REF=$(BUILD_REF) -p BASE_IMAGE_REPO="artifacts.developer.gov.bc.ca/redhat-access-docker-remote/ubi8/" -p SOURCE_CONTEXT_DIR=$(SOURCE_CONTEXT_DIR)web -p NAME=$(WEB_BUILD_REF) | oc -n $(BUILD_NAMESPACE) apply -f - + @oc -n $(BUILD_NAMESPACE) process -f $(BUILD_TEMPLATE_PATH) -p TAG=$(BUILD_REF) -p SOURCE_REPOSITORY_REF=$(BUILD_REF) -p SOURCE_CONTEXT_DIR=$(SOURCE_CONTEXT_DIR)web -p NAME=$(WEB_BUILD_REF) | oc -n $(BUILD_NAMESPACE) apply -f - @oc -n $(BUILD_NAMESPACE) start-build bc/$(WEB_BUILD_REF) --wait init-patroni: From 6dc5caabbb4ce674a06d3b276d083cbbf42b1829 Mon Sep 17 00:00:00 2001 From: Guru-AOT Date: Fri, 8 Dec 2023 10:17:51 -0700 Subject: [PATCH 03/21] updated --- devops/openshift/docker-build.yml | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) diff --git a/devops/openshift/docker-build.yml b/devops/openshift/docker-build.yml index 754300be8c..b4e3f85a55 100644 --- a/devops/openshift/docker-build.yml +++ b/devops/openshift/docker-build.yml @@ -7,9 +7,24 @@ metadata: objects: - apiVersion: image.openshift.io/v1 kind: ImageStream + metadata: + name: ${BASE_IMAGE_NAME} spec: lookupPolicy: local: false + - apiVersion: v1 + kind: ImageStreamTag + lookupPolicy: + local: false + tag: + annotations: null + from: + kind: DockerImage + name: ${BASE_IMAGE_REPO}${BASE_IMAGE_NAME}:${BASE_IMAGE_TAG} + importPolicy: + scheduled: true + referencePolicy: + type: Source - kind: ImageStream apiVersion: v1 metadata: @@ -71,6 +86,12 @@ parameters: value: Dockerfile - name: TAG value: "latest" + - name: BASE_IMAGE_REPO + value: "artifacts.developer.gov.bc.ca/redhat-access-docker-remote/ubi8/" + - name: BASE_IMAGE_NAME + value: "nodejs-18" + - name: BASE_IMAGE_TAG + value: "1-18" - name: CPU_LIMIT value: "2" - name: MEMORY_LIMIT From 3e79d870708a671f4d17ee25015c9bbab2697c67 Mon Sep 17 00:00:00 2001 From: Guru-AOT Date: Fri, 8 Dec 2023 10:27:25 -0700 Subject: [PATCH 04/21] updated --- devops/openshift/docker-build.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/devops/openshift/docker-build.yml b/devops/openshift/docker-build.yml index b4e3f85a55..83f8bdb793 100644 --- a/devops/openshift/docker-build.yml +++ b/devops/openshift/docker-build.yml @@ -16,6 +16,8 @@ objects: kind: ImageStreamTag lookupPolicy: local: false + metadata: + name: ${BASE_IMAGE_NAME}:${BASE_IMAGE_TAG} tag: annotations: null from: From f987c4c8d2d81d249e31dc27eab76d1ac0be0e34 Mon Sep 17 00:00:00 2001 From: Guru-AOT Date: Fri, 8 Dec 2023 10:27:53 -0700 Subject: [PATCH 05/21] updated --- devops/openshift/docker-build.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/devops/openshift/docker-build.yml b/devops/openshift/docker-build.yml index 83f8bdb793..126dc631a9 100644 --- a/devops/openshift/docker-build.yml +++ b/devops/openshift/docker-build.yml @@ -16,7 +16,7 @@ objects: kind: ImageStreamTag lookupPolicy: local: false - metadata: + metadata: name: ${BASE_IMAGE_NAME}:${BASE_IMAGE_TAG} tag: annotations: null From 280934f6cd2158d7e406ae8561f04ab4c3630ac1 Mon Sep 17 00:00:00 2001 From: Guru-AOT Date: Fri, 8 Dec 2023 10:41:01 -0700 Subject: [PATCH 06/21] updated --- devops/openshift/docker-build.yml | 28 ---------------------------- 1 file changed, 28 deletions(-) diff --git a/devops/openshift/docker-build.yml b/devops/openshift/docker-build.yml index 126dc631a9..0717eb97d1 100644 --- a/devops/openshift/docker-build.yml +++ b/devops/openshift/docker-build.yml @@ -5,28 +5,6 @@ kind: Template metadata: name: ${NAME} objects: - - apiVersion: image.openshift.io/v1 - kind: ImageStream - metadata: - name: ${BASE_IMAGE_NAME} - spec: - lookupPolicy: - local: false - - apiVersion: v1 - kind: ImageStreamTag - lookupPolicy: - local: false - metadata: - name: ${BASE_IMAGE_NAME}:${BASE_IMAGE_TAG} - tag: - annotations: null - from: - kind: DockerImage - name: ${BASE_IMAGE_REPO}${BASE_IMAGE_NAME}:${BASE_IMAGE_TAG} - importPolicy: - scheduled: true - referencePolicy: - type: Source - kind: ImageStream apiVersion: v1 metadata: @@ -88,12 +66,6 @@ parameters: value: Dockerfile - name: TAG value: "latest" - - name: BASE_IMAGE_REPO - value: "artifacts.developer.gov.bc.ca/redhat-access-docker-remote/ubi8/" - - name: BASE_IMAGE_NAME - value: "nodejs-18" - - name: BASE_IMAGE_TAG - value: "1-18" - name: CPU_LIMIT value: "2" - name: MEMORY_LIMIT From 4924fbd4302d4ef3cccee6bb6780c5f395e1115e Mon Sep 17 00:00:00 2001 From: Guru-AOT Date: Mon, 11 Dec 2023 10:50:45 -0700 Subject: [PATCH 07/21] updated --- sources/packages/backend/apps/api/Dockerfile | 3 +++ 1 file changed, 3 insertions(+) diff --git a/sources/packages/backend/apps/api/Dockerfile b/sources/packages/backend/apps/api/Dockerfile index 65e1b20454..d152d2be1b 100644 --- a/sources/packages/backend/apps/api/Dockerfile +++ b/sources/packages/backend/apps/api/Dockerfile @@ -23,5 +23,8 @@ RUN npm run build api # Exposing application port EXPOSE ${PORT} +# Executing the image with a non-root user. +USER 1001 + # Entry point CMD [ "npm", "run", "start:prod:api" ] \ No newline at end of file From 385f647d66df2d5dcb7c21d581f1517fe3d68e15 Mon Sep 17 00:00:00 2001 From: Guru-AOT Date: Mon, 11 Dec 2023 12:16:42 -0700 Subject: [PATCH 08/21] updated --- sources/packages/backend/apps/api/Dockerfile | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/sources/packages/backend/apps/api/Dockerfile b/sources/packages/backend/apps/api/Dockerfile index d152d2be1b..472ae031e7 100644 --- a/sources/packages/backend/apps/api/Dockerfile +++ b/sources/packages/backend/apps/api/Dockerfile @@ -23,8 +23,8 @@ RUN npm run build api # Exposing application port EXPOSE ${PORT} -# Executing the image with a non-root user. -USER 1001 +RUN chgrp -R 0 /.npm && \ + chmod -R g-u /.npm # Entry point CMD [ "npm", "run", "start:prod:api" ] \ No newline at end of file From 36c5f1f54ea6dfe36114c63f78b2ffe728dbad18 Mon Sep 17 00:00:00 2001 From: Guru-AOT Date: Mon, 11 Dec 2023 12:21:09 -0700 Subject: [PATCH 09/21] updated --- sources/packages/backend/apps/api/Dockerfile | 2 ++ 1 file changed, 2 insertions(+) diff --git a/sources/packages/backend/apps/api/Dockerfile b/sources/packages/backend/apps/api/Dockerfile index 472ae031e7..10df30e24d 100644 --- a/sources/packages/backend/apps/api/Dockerfile +++ b/sources/packages/backend/apps/api/Dockerfile @@ -23,6 +23,8 @@ RUN npm run build api # Exposing application port EXPOSE ${PORT} +RUN mkdir /.npm + RUN chgrp -R 0 /.npm && \ chmod -R g-u /.npm From 61b074ba6917cfc62f8b88b634de332464b080a0 Mon Sep 17 00:00:00 2001 From: Guru-AOT Date: Mon, 11 Dec 2023 12:26:06 -0700 Subject: [PATCH 10/21] updated --- sources/packages/backend/apps/api/Dockerfile | 1 + 1 file changed, 1 insertion(+) diff --git a/sources/packages/backend/apps/api/Dockerfile b/sources/packages/backend/apps/api/Dockerfile index 10df30e24d..55c668a142 100644 --- a/sources/packages/backend/apps/api/Dockerfile +++ b/sources/packages/backend/apps/api/Dockerfile @@ -5,6 +5,7 @@ LABEL maintainer="BC GOV" # Application Port ENV PORT 3000 +WORKDIR /opt/app-root/src # Copying root files to image workdir. COPY /*.json /*.js ./ From af8dc39dc60c9421d22014fb0868a68d51159380 Mon Sep 17 00:00:00 2001 From: Guru-AOT Date: Mon, 11 Dec 2023 12:31:25 -0700 Subject: [PATCH 11/21] updated --- sources/packages/backend/apps/api/Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sources/packages/backend/apps/api/Dockerfile b/sources/packages/backend/apps/api/Dockerfile index 55c668a142..e45f357b1d 100644 --- a/sources/packages/backend/apps/api/Dockerfile +++ b/sources/packages/backend/apps/api/Dockerfile @@ -5,7 +5,7 @@ LABEL maintainer="BC GOV" # Application Port ENV PORT 3000 -WORKDIR /opt/app-root/src +WORKDIR /opt/app-root/src/apps # Copying root files to image workdir. COPY /*.json /*.js ./ From 3ac6dad351cd7fb7fb2b020fd98beb5c2a8e7991 Mon Sep 17 00:00:00 2001 From: Guru-AOT Date: Mon, 11 Dec 2023 12:32:52 -0700 Subject: [PATCH 12/21] updated --- sources/packages/backend/apps/api/Dockerfile | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/sources/packages/backend/apps/api/Dockerfile b/sources/packages/backend/apps/api/Dockerfile index e45f357b1d..2eb10122f0 100644 --- a/sources/packages/backend/apps/api/Dockerfile +++ b/sources/packages/backend/apps/api/Dockerfile @@ -7,6 +7,11 @@ LABEL maintainer="BC GOV" ENV PORT 3000 WORKDIR /opt/app-root/src/apps +RUN mkdir /.npm + +RUN chgrp -R 0 /.npm && \ + chmod -R g-u /.npm + # Copying root files to image workdir. COPY /*.json /*.js ./ @@ -24,10 +29,5 @@ RUN npm run build api # Exposing application port EXPOSE ${PORT} -RUN mkdir /.npm - -RUN chgrp -R 0 /.npm && \ - chmod -R g-u /.npm - # Entry point CMD [ "npm", "run", "start:prod:api" ] \ No newline at end of file From bcb4fdcea7c2105a905b567ace3152bb97c78ac1 Mon Sep 17 00:00:00 2001 From: Guru-AOT Date: Mon, 11 Dec 2023 12:35:22 -0700 Subject: [PATCH 13/21] updated --- sources/packages/backend/apps/api/Dockerfile | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/sources/packages/backend/apps/api/Dockerfile b/sources/packages/backend/apps/api/Dockerfile index 2eb10122f0..f37ce91369 100644 --- a/sources/packages/backend/apps/api/Dockerfile +++ b/sources/packages/backend/apps/api/Dockerfile @@ -5,12 +5,12 @@ LABEL maintainer="BC GOV" # Application Port ENV PORT 3000 -WORKDIR /opt/app-root/src/apps +WORKDIR /opt/app-root/src -RUN mkdir /.npm - -RUN chgrp -R 0 /.npm && \ - chmod -R g-u /.npm +# Copying sources. +COPY ./apps/api ./apps/api +COPY ./libs ./libs +COPY ./apps/db-migrations ./apps/db-migrations # Copying root files to image workdir. COPY /*.json /*.js ./ @@ -18,16 +18,16 @@ COPY /*.json /*.js ./ # Installing dependencies RUN npm ci -# Copying sources. -COPY ./apps/api ./apps/api -COPY ./libs ./libs -COPY ./apps/db-migrations ./apps/db-migrations - # Building app RUN npm run build api # Exposing application port EXPOSE ${PORT} +RUN mkdir /.npm + +RUN chgrp -R 0 /.npm && \ + chmod -R g-u /.npm + # Entry point CMD [ "npm", "run", "start:prod:api" ] \ No newline at end of file From b8d28adef19c73ea03d0cc6fb856d7767016d73b Mon Sep 17 00:00:00 2001 From: Guru-AOT Date: Mon, 11 Dec 2023 12:47:27 -0700 Subject: [PATCH 14/21] updated --- sources/packages/backend/apps/api/Dockerfile | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/sources/packages/backend/apps/api/Dockerfile b/sources/packages/backend/apps/api/Dockerfile index f37ce91369..91fa2574a2 100644 --- a/sources/packages/backend/apps/api/Dockerfile +++ b/sources/packages/backend/apps/api/Dockerfile @@ -7,6 +7,10 @@ LABEL maintainer="BC GOV" ENV PORT 3000 WORKDIR /opt/app-root/src +RUN whoami + +RUN ls -la + # Copying sources. COPY ./apps/api ./apps/api COPY ./libs ./libs From 17d2ce4684a0a6d77ee46f72c375f86c74dc15f9 Mon Sep 17 00:00:00 2001 From: Guru-AOT Date: Mon, 11 Dec 2023 12:51:53 -0700 Subject: [PATCH 15/21] updated --- sources/packages/backend/apps/api/Dockerfile | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/sources/packages/backend/apps/api/Dockerfile b/sources/packages/backend/apps/api/Dockerfile index 91fa2574a2..4ac6e711a9 100644 --- a/sources/packages/backend/apps/api/Dockerfile +++ b/sources/packages/backend/apps/api/Dockerfile @@ -8,7 +8,7 @@ ENV PORT 3000 WORKDIR /opt/app-root/src RUN whoami - +RUN pwd RUN ls -la # Copying sources. @@ -18,7 +18,8 @@ COPY ./apps/db-migrations ./apps/db-migrations # Copying root files to image workdir. COPY /*.json /*.js ./ - +RUN pwd +RUN ls -la # Installing dependencies RUN npm ci From dc92dd9bb439299df90290fc781fd726a3c45b4e Mon Sep 17 00:00:00 2001 From: Guru-AOT Date: Mon, 11 Dec 2023 13:22:32 -0700 Subject: [PATCH 16/21] updated --- sources/packages/backend/apps/api/Dockerfile | 7 ------- 1 file changed, 7 deletions(-) diff --git a/sources/packages/backend/apps/api/Dockerfile b/sources/packages/backend/apps/api/Dockerfile index 4ac6e711a9..63f72da610 100644 --- a/sources/packages/backend/apps/api/Dockerfile +++ b/sources/packages/backend/apps/api/Dockerfile @@ -5,11 +5,6 @@ LABEL maintainer="BC GOV" # Application Port ENV PORT 3000 -WORKDIR /opt/app-root/src - -RUN whoami -RUN pwd -RUN ls -la # Copying sources. COPY ./apps/api ./apps/api @@ -29,8 +24,6 @@ RUN npm run build api # Exposing application port EXPOSE ${PORT} -RUN mkdir /.npm - RUN chgrp -R 0 /.npm && \ chmod -R g-u /.npm From 41ac5b5af22940f898df7ecb085b816dc01cc728 Mon Sep 17 00:00:00 2001 From: Guru-AOT Date: Mon, 11 Dec 2023 13:22:58 -0700 Subject: [PATCH 17/21] updated --- sources/packages/backend/apps/api/Dockerfile | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/sources/packages/backend/apps/api/Dockerfile b/sources/packages/backend/apps/api/Dockerfile index 63f72da610..c9ad54b066 100644 --- a/sources/packages/backend/apps/api/Dockerfile +++ b/sources/packages/backend/apps/api/Dockerfile @@ -24,8 +24,8 @@ RUN npm run build api # Exposing application port EXPOSE ${PORT} -RUN chgrp -R 0 /.npm && \ - chmod -R g-u /.npm +RUN chgrp -R 0 ./.npm && \ + chmod -R g-u ./.npm # Entry point CMD [ "npm", "run", "start:prod:api" ] \ No newline at end of file From 8da308bff227083eef8eb65cf2f460e7443fba08 Mon Sep 17 00:00:00 2001 From: Guru-AOT Date: Mon, 11 Dec 2023 13:29:19 -0700 Subject: [PATCH 18/21] updated --- sources/packages/backend/apps/api/Dockerfile | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) diff --git a/sources/packages/backend/apps/api/Dockerfile b/sources/packages/backend/apps/api/Dockerfile index c9ad54b066..ddacaebe16 100644 --- a/sources/packages/backend/apps/api/Dockerfile +++ b/sources/packages/backend/apps/api/Dockerfile @@ -6,24 +6,25 @@ LABEL maintainer="BC GOV" # Application Port ENV PORT 3000 -# Copying sources. -COPY ./apps/api ./apps/api -COPY ./libs ./libs -COPY ./apps/db-migrations ./apps/db-migrations - # Copying root files to image workdir. COPY /*.json /*.js ./ -RUN pwd -RUN ls -la + # Installing dependencies RUN npm ci +# Copying sources. +COPY ./apps/api ./apps/api +COPY ./libs ./libs +COPY ./apps/db-migrations ./apps/db-migrations + # Building app RUN npm run build api # Exposing application port EXPOSE ${PORT} +# Grant access to group 0 to allow npm v9 to work +# See: https://docs.openshift.com/container-platform/4.11/openshift_images/create-images.html#use-uid_create-images RUN chgrp -R 0 ./.npm && \ chmod -R g-u ./.npm From ae6ea9dbbf3b9a5b5be7d79a175be04d0bdbaa1e Mon Sep 17 00:00:00 2001 From: Guru-AOT Date: Mon, 11 Dec 2023 13:39:40 -0700 Subject: [PATCH 19/21] updated --- sources/packages/backend/apps/api/Dockerfile | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/sources/packages/backend/apps/api/Dockerfile b/sources/packages/backend/apps/api/Dockerfile index ddacaebe16..cc09551b38 100644 --- a/sources/packages/backend/apps/api/Dockerfile +++ b/sources/packages/backend/apps/api/Dockerfile @@ -23,8 +23,9 @@ RUN npm run build api # Exposing application port EXPOSE ${PORT} -# Grant access to group 0 to allow npm v9 to work +# rant access to group 0 to allow npm v9 to work # See: https://docs.openshift.com/container-platform/4.11/openshift_images/create-images.html#use-uid_create-images +RUN mkdir ./.npm RUN chgrp -R 0 ./.npm && \ chmod -R g-u ./.npm From e1678f3df2d5dbe5f913acc2739535072285ecc2 Mon Sep 17 00:00:00 2001 From: Guru-AOT Date: Mon, 11 Dec 2023 13:42:28 -0700 Subject: [PATCH 20/21] updated --- sources/packages/backend/apps/api/Dockerfile | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/sources/packages/backend/apps/api/Dockerfile b/sources/packages/backend/apps/api/Dockerfile index cc09551b38..e71d5bd71b 100644 --- a/sources/packages/backend/apps/api/Dockerfile +++ b/sources/packages/backend/apps/api/Dockerfile @@ -23,11 +23,10 @@ RUN npm run build api # Exposing application port EXPOSE ${PORT} -# rant access to group 0 to allow npm v9 to work +# Grant access to group 0 to allow npm v9 to work # See: https://docs.openshift.com/container-platform/4.11/openshift_images/create-images.html#use-uid_create-images -RUN mkdir ./.npm RUN chgrp -R 0 ./.npm && \ - chmod -R g-u ./.npm + chmod -R g=u ./.npm # Entry point CMD [ "npm", "run", "start:prod:api" ] \ No newline at end of file From 2307fc0d77672f506ffd4be132170a59431de385 Mon Sep 17 00:00:00 2001 From: Guru-AOT Date: Mon, 11 Dec 2023 14:31:04 -0700 Subject: [PATCH 21/21] updated --- sources/packages/backend/apps/db-migrations/Dockerfile | 5 +++++ sources/packages/backend/apps/load-test-gateway/Dockerfile | 5 +++++ sources/packages/backend/apps/queue-consumers/Dockerfile | 5 +++++ sources/packages/backend/apps/workers/Dockerfile | 5 +++++ 4 files changed, 20 insertions(+) diff --git a/sources/packages/backend/apps/db-migrations/Dockerfile b/sources/packages/backend/apps/db-migrations/Dockerfile index 84eeacf1db..f66fc6f289 100644 --- a/sources/packages/backend/apps/db-migrations/Dockerfile +++ b/sources/packages/backend/apps/db-migrations/Dockerfile @@ -15,5 +15,10 @@ COPY tsconfig.json ./ COPY tsconfig.build.json ./ COPY env-setup.js ./ +# Grant access to group 0 to allow npm v9 to work +# See: https://docs.openshift.com/container-platform/4.11/openshift_images/create-images.html#use-uid_create-images +RUN chgrp -R 0 ./.npm && \ + chmod -R g=u ./.npm + # Entry point CMD [ "npm", "run", "start:prod:db-migrations" ] diff --git a/sources/packages/backend/apps/load-test-gateway/Dockerfile b/sources/packages/backend/apps/load-test-gateway/Dockerfile index 9201941855..d8d4cc97fd 100644 --- a/sources/packages/backend/apps/load-test-gateway/Dockerfile +++ b/sources/packages/backend/apps/load-test-gateway/Dockerfile @@ -16,5 +16,10 @@ COPY ./libs ./libs # Building app RUN npm run build load-test-gateway +# Grant access to group 0 to allow npm v9 to work +# See: https://docs.openshift.com/container-platform/4.11/openshift_images/create-images.html#use-uid_create-images +RUN chgrp -R 0 ./.npm && \ + chmod -R g=u ./.npm + # Entry point CMD [ "npm", "run", "start:prod:load-test-gateway" ] \ No newline at end of file diff --git a/sources/packages/backend/apps/queue-consumers/Dockerfile b/sources/packages/backend/apps/queue-consumers/Dockerfile index 29fec01cd7..331ed9c856 100644 --- a/sources/packages/backend/apps/queue-consumers/Dockerfile +++ b/sources/packages/backend/apps/queue-consumers/Dockerfile @@ -16,5 +16,10 @@ COPY ./libs ./libs # Building app RUN npm run build queue-consumers +# Grant access to group 0 to allow npm v9 to work +# See: https://docs.openshift.com/container-platform/4.11/openshift_images/create-images.html#use-uid_create-images +RUN chgrp -R 0 ./.npm && \ + chmod -R g=u ./.npm + # Entry point CMD [ "npm", "run", "start:prod:queue-consumers" ] \ No newline at end of file diff --git a/sources/packages/backend/apps/workers/Dockerfile b/sources/packages/backend/apps/workers/Dockerfile index 4a4e64311e..d68ac1c0f3 100644 --- a/sources/packages/backend/apps/workers/Dockerfile +++ b/sources/packages/backend/apps/workers/Dockerfile @@ -16,5 +16,10 @@ COPY ./libs ./libs # Building app RUN npm run build workers +# Grant access to group 0 to allow npm v9 to work +# See: https://docs.openshift.com/container-platform/4.11/openshift_images/create-images.html#use-uid_create-images +RUN chgrp -R 0 ./.npm && \ + chmod -R g=u ./.npm + # Entry point CMD [ "npm", "run", "start:prod:workers" ] \ No newline at end of file