Skip to content

Commit

Permalink
434930 Test pipeline (#1)
Browse files Browse the repository at this point in the history
* add contributors

* bump version

* update helm folder name

* run rename.js

* add whitespace (based on review)
  • Loading branch information
rtasalem authored Sep 3, 2024
1 parent e855639 commit cc8bc2a
Show file tree
Hide file tree
Showing 18 changed files with 50 additions and 47 deletions.
2 changes: 1 addition & 1 deletion docker-compose.debug.yaml
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
services:
ffc-template-node:
fcp-fd-data:
command: npm run start:debug
6 changes: 3 additions & 3 deletions docker-compose.override.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,11 @@
# to provide dependencies and expose ports for local testing

services:
ffc-template-node:
fcp-fd-data:
build:
target: development
image: ffc-template-node-development
container_name: ffc-template-node-development
image: fcp-fd-data-development
container_name: fcp-fd-data-development
ports:
- "3000:3000"
- "9229:9229"
Expand Down
2 changes: 1 addition & 1 deletion docker-compose.test.debug.yaml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
services:
ffc-template-node:
fcp-fd-data:
command: npm run test:debug
ports:
- "9229:9229"
2 changes: 1 addition & 1 deletion docker-compose.test.watch.yaml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
services:
ffc-template-node:
fcp-fd-data:
command: >
sh -c "npm run test:watch"
volumes:
Expand Down
6 changes: 3 additions & 3 deletions docker-compose.test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,11 @@
# that test output is saved to the host

services:
ffc-template-node:
fcp-fd-data:
build:
target: development
image: ffc-template-node-development
container_name: ffc-template-node-test
image: fcp-fd-data-development
container_name: fcp-fd-data-test
command: npm run test
volumes:
- ./app:/home/node/app
Expand Down
8 changes: 4 additions & 4 deletions docker-compose.yaml
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
services:
ffc-template-node:
fcp-fd-data:
build:
context: .
target: production
image: ffc-template-node
container_name: ffc-template-node
image: fcp-fd-data
container_name: fcp-fd-data
environment:
APPINSIGHTS_CLOUDROLE: ffc-template-node-local
APPINSIGHTS_CLOUDROLE: fcp-fd-data-local
APPINSIGHTS_CONNECTIONSTRING: ${APPINSIGHTS_CONNECTIONSTRING}
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
apiVersion: v2
description: description-of-project-goes-here
name: ffc-template-node
description: Data integration layer for the Single Front Door
name: fcp-fd-data
# this version is automatically updated in the build pipeline
version: 1.0.0
dependencies:
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{{- define "ffc-template-node.container" -}}
livenessProbe: {{ include "ffc-helm-library.http-get-probe" (list . .Values.livenessProbe) | nindent 4}}
readinessProbe: {{ include "ffc-helm-library.http-get-probe" (list . .Values.readinessProbe) | nindent 4}}
{{- define "fcp-fd-data.container" -}}
livenessProbe: {{ include "ffc-helm-library.http-get-probe" (list . .Values.livenessProbe) | nindent 4 }}
readinessProbe: {{ include "ffc-helm-library.http-get-probe" (list . .Values.readinessProbe) | nindent 4 }}
ports:
- containerPort: {{ .Values.container.port }}
{{- end -}}
3 changes: 3 additions & 0 deletions helm/fcp-fd-data/templates/cluster-ip-service.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{{- include "ffc-helm-library.cluster-ip-service" (list . "fcp-fd-data.cluster-ip-service") -}}
{{- define "fcp-fd-data.cluster-ip-service" -}}
{{- end -}}
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{{- include "ffc-helm-library.container-config-map" (list . "ffc-template-node.config-map") -}}
{{- define "ffc-template-node.config-map" -}}
{{- include "ffc-helm-library.container-config-map" (list . "fcp-fd-data.config-map") -}}
{{- define "fcp-fd-data.config-map" -}}
data:
NODE_ENV: {{ quote .Values.environment }}
PORT: {{ quote .Values.container.port }}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{{- include "ffc-helm-library.container-secret" (list . "ffc-template-node.container-secret") -}}
{{- define "ffc-template-node.container-secret" -}}
{{- include "ffc-helm-library.container-secret" (list . "fcp-fd-data.container-secret") -}}
{{- define "fcp-fd-data.container-secret" -}}
stringData:
{{- if .Values.appInsights.connectionString }}
APPINSIGHTS_CONNECTIONSTRING: {{ quote .Values.appInsights.connectionString }}
Expand Down
8 changes: 8 additions & 0 deletions helm/fcp-fd-data/templates/deployment.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
{{- include "ffc-helm-library.deployment" (list . "fcp-fd-data.deployment") -}}
{{- define "fcp-fd-data.deployment" -}}
spec:
template:
spec:
containers:
- {{ include "ffc-helm-library.container" (list . "fcp-fd-data.container") }}
{{- end -}}
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
environment: production
environmentCode:
name: ffc-template-node
namespace: ffc-demo
workstream: ffc-demo
image: ffc-template-node
name: fcp-fd-data
namespace: fcp-fd
workstream: fcp-fd
image: fcp-fd-data

labels:
component: service
Expand All @@ -12,10 +12,10 @@ appInsights:
connectionString:

containerConfigMap:
name: ffc-template-node-config-map
name: fcp-fd-data-config-map

containerSecret:
name: ffc-template-node-container-secret
name: fcp-fd-data-container-secret
type: Opaque

deployment: {}
Expand Down
3 changes: 0 additions & 3 deletions helm/ffc-template-node/templates/cluster-ip-service.yaml

This file was deleted.

8 changes: 0 additions & 8 deletions helm/ffc-template-node/templates/deployment.yaml

This file was deleted.

4 changes: 2 additions & 2 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

13 changes: 8 additions & 5 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
{
"name": "ffc-template-node",
"version": "0.1.0",
"description": "description-of-project-goes-here",
"homepage": "https://github.com/DEFRA/ffc-template-node",
"name": "fcp-fd-data",
"version": "0.1.1",
"description": "Data integration layer for the Single Front Door",
"homepage": "https://github.com/DEFRA/fcp-fd-data",
"main": "app/index.js",
"type": "module",
"scripts": {
Expand All @@ -15,7 +15,10 @@
"start:debug": "nodemon --inspect-brk=0.0.0.0 --ext js --legacy-watch app/index.js"
},
"author": "Defra",
"contributors": [],
"contributors": [
"Abidemi Adio <[email protected]>",
"Simon Dunn <[email protected]>"
],
"license": "OGL-UK-3.0",
"dependencies": {
"@hapi/hapi": "21.3.2",
Expand Down
2 changes: 1 addition & 1 deletion scripts/test
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
set -e
projectRoot="$(a="/$0"; a=${a%/*}; a=${a:-.}; a=${a#/}/; cd "$a/.." || return; pwd)"

service="ffc-template-node"
service="fcp-fd-data"

show_help() {
echo "
Expand Down

0 comments on commit cc8bc2a

Please sign in to comment.