-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
b19b029
commit 3281f3f
Showing
126 changed files
with
309 additions
and
546 deletions.
There are no files selected for viewing
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -7,24 +7,26 @@ print( | |
""".strip() | ||
) | ||
|
||
allow_k8s_contexts("[email protected]") | ||
|
||
|
||
# SECTION: APP | ||
# --- | ||
docker_build( | ||
"marcolongo.cloud-app", | ||
"app", | ||
context=".", | ||
dockerfile="./apps/marcolongo.cloud/Dockerfile", | ||
dockerfile="./apps/app/Dockerfile", | ||
only=[ | ||
"./dist/apps/marcolongo.cloud/browser", | ||
"./dist/apps/app/browser/", | ||
"./apps/app/nginx.conf", | ||
], | ||
live_update=[ | ||
sync("./dist/apps/marcolongo.cloud/browser", "/usr/share/nginx/html/") | ||
sync("./dist/apps/app/browser", "/usr/share/nginx/html/"), | ||
sync("./apps/app/nginx.conf", "/etc/nginx/conf.d/default.conf"), | ||
], | ||
) | ||
|
||
local_resource( | ||
"serve:app:dev", | ||
serve_cmd="npm run serve:app:dev", | ||
serve_cmd="npx nx run app:serve:development", | ||
labels=["app"], | ||
trigger_mode=TRIGGER_MODE_AUTO, | ||
auto_init=False, | ||
|
@@ -33,45 +35,51 @@ local_resource( | |
|
||
local_resource( | ||
"build:app:dev", | ||
serve_cmd="npm run build:app:dev -- --watch", | ||
serve_cmd="npx nx run app:build:development -- --watch", | ||
labels=["app"], | ||
trigger_mode=TRIGGER_MODE_AUTO, | ||
auto_init=False, | ||
) | ||
|
||
|
||
# SECTION: API | ||
# --- | ||
docker_build( | ||
"marcolongo.cloud-api", | ||
"api", | ||
context=".", | ||
dockerfile="./apps/marcolongo.cloud-api/Dockerfile", | ||
dockerfile="./apps/api/Dockerfile", | ||
only=[ | ||
"./dist/apps/marcolongo.cloud-api", | ||
"./dist/apps/api", | ||
], | ||
live_update=[sync("./dist/apps/marcolongo.cloud-api", "/app")], | ||
target="dev", | ||
live_update=[sync("./dist/apps/api", "/app")], | ||
target="development", | ||
) | ||
|
||
local_resource( | ||
"build:api:dev", | ||
serve_cmd="npm run build:api:dev -- --watch", | ||
serve_cmd="npx nx run api:build:development -- --watch", | ||
labels=["api"], | ||
trigger_mode=TRIGGER_MODE_AUTO, | ||
auto_init=False, | ||
) | ||
|
||
local_resource( | ||
"serve:api:dev", | ||
serve_cmd="npm run serve:api:dev", | ||
serve_cmd="npx nx run api:serve:development", | ||
labels=["api"], | ||
trigger_mode=TRIGGER_MODE_AUTO, | ||
auto_init=False, | ||
links=[link("http://localhost:3000", "api")], | ||
) | ||
|
||
# SECTION: K8s | ||
# --- | ||
k8s_yaml(helm("./chart", "marcolongo-cloud", "marcolongo-cloud", "./chart/values.yaml")) | ||
|
||
k8s_resource( | ||
"marcolongo-cloud-app", | ||
port_forwards=[ | ||
port_forward(4200, name="web"), | ||
port_forward(80, name="web"), | ||
], | ||
labels=["app"], | ||
auto_init=False, | ||
|
@@ -86,9 +94,11 @@ k8s_resource( | |
auto_init=False, | ||
) | ||
|
||
# SECTION: Storybook | ||
# ------------------ | ||
local_resource( | ||
"marcolongo.cloud", | ||
serve_cmd="npm run storybook:app", | ||
"app", | ||
serve_cmd="npx nx run app:storybook", | ||
links=[link("http://localhost:4400", "storybook")], | ||
trigger_mode=TRIGGER_MODE_MANUAL, | ||
auto_init=False, | ||
|
@@ -97,7 +107,7 @@ local_resource( | |
|
||
local_resource( | ||
"common-ui", | ||
serve_cmd="npm run storybook:common-ui", | ||
serve_cmd="npx nx run common-ui:storybook", | ||
links=[link("http://localhost:4401", "storybook")], | ||
trigger_mode=TRIGGER_MODE_MANUAL, | ||
auto_init=False, | ||
|
@@ -106,7 +116,7 @@ local_resource( | |
|
||
local_resource( | ||
"core", | ||
serve_cmd="npm run storybook:core", | ||
serve_cmd="npx nx run core:storybook", | ||
links=[link("http://localhost:4402", "storybook")], | ||
trigger_mode=TRIGGER_MODE_MANUAL, | ||
auto_init=False, | ||
|
@@ -115,23 +125,28 @@ local_resource( | |
|
||
local_resource( | ||
"gradient-os", | ||
serve_cmd="npm run storybook:gradient-os", | ||
serve_cmd="npx nx run gradient-os:storybook", | ||
links=[link("http://localhost:4403", "storybook")], | ||
trigger_mode=TRIGGER_MODE_MANUAL, | ||
auto_init=False, | ||
labels=["storybook"], | ||
) | ||
|
||
# SECTION: Tests | ||
# -------------- | ||
local_resource( | ||
"test:unit", | ||
serve_cmd="npm run test:unit -- --watch --parallel 10", | ||
serve_cmd="npx nx run-many --target=test --parallel 10 --configuration ci -- --watch", | ||
trigger_mode=TRIGGER_MODE_MANUAL, | ||
labels=["tests"], | ||
) | ||
|
||
|
||
# SECTION: E2E | ||
# ------------ | ||
local_resource( | ||
"test:e2e", | ||
cmd="npm run test:e2e -- --parallel 10", | ||
cmd="npx nx run-many --target=e2e --parallel 10", | ||
trigger_mode=TRIGGER_MODE_MANUAL, | ||
auto_init=False, | ||
labels=["tests"], | ||
|
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
{ | ||
"name": "@marcolongo.cloud/api-e2e", | ||
"version": "0.0.0" | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
dependencies: | ||
- name: postgresql | ||
repository: https://charts.bitnami.com/bitnami | ||
version: 15.5.21 | ||
digest: sha256:818af7619e898e3cc8c98f0caea0df5719e391a343b641d01a74d08221d4fc46 | ||
generated: "2024-08-13T17:14:59.9970171-07:00" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
apiVersion: v2 | ||
name: api | ||
description: A Helm chart for Kubernetes | ||
type: application | ||
version: 0.1.0 | ||
appVersion: '1.16.0' | ||
|
||
dependencies: | ||
- name: postgresql | ||
condition: postgresql.enabled | ||
version: 15.5.21 | ||
repository: https://charts.bitnami.com/bitnami |
File renamed without changes.
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
apiVersion: v1 | ||
kind: Service | ||
metadata: | ||
name: {{ include "chart.fullname" . }} | ||
labels: | ||
{{- include "chart.labels" . | nindent 4 }} | ||
spec: | ||
type: {{ .Values.service.type }} | ||
ports: | ||
- port: {{ .Values.service.port }} | ||
targetPort: api | ||
protocol: TCP | ||
name: api | ||
selector: | ||
{{- include "chart.selectorLabels" . | nindent 4 }} |
File renamed without changes.
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
4 changes: 2 additions & 2 deletions
4
apps/marcolongo.cloud-api/jest.config.ts → apps/api/jest.config.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,10 +1,10 @@ | ||
export default { | ||
displayName: 'marcolongo.cloud-api', | ||
displayName: 'api', | ||
preset: '../../jest.preset.js', | ||
testEnvironment: 'node', | ||
transform: { | ||
'^.+\\.[tj]s$': ['ts-jest', { tsconfig: '<rootDir>/tsconfig.spec.json' }], | ||
}, | ||
moduleFileExtensions: ['ts', 'js', 'html'], | ||
coverageDirectory: '../../coverage/apps/marcolongo.cloud-api', | ||
coverageDirectory: '../../coverage/apps/api', | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.