fix(ci): correct server-ci webSourcePath and build frontend before mock deploy
The server-ci target streams the Angular frontend (CONTRIBUTING.md documents http://localhost:5000/AppStream/clickme/), but webSourcePath was "`../../../../client/dist". The leading backtick makes the first path segment literal, so it happened to resolve to <repo>/client/dist by accident; the correct value relative to the sasjs project root (sas/mocks) is ../../client/dist. The real problem was that CI job 2 never built the client, so client/dist did not exist when the mock services were deployed: the deploy logged "webSourcePath: <repo>/client/dist present in 'streamConfig' doesn't exist" and streamed no frontend, while the job still passed. Build the production frontend before deploying the mocks so the streamed app is actually produced.
This commit is contained in:
1 parent
f1734a2de0
commit
a4ad4cba28
2 files changed
+10
-1
No files matched your search
@@ -107,6 +107,15 @@ jobs:
|
||||
echo ${{ secrets.SHEET_PWD }} | gpg --batch --yes --passphrase-fd 0 ./libraries/sheet-crypto.tgz.gpg
|
||||
npm ci
|
||||
|
||||
- name: Build frontend for web streaming
|
||||
# The server-ci target streams client/dist as the 'clickme' web app (see
|
||||
# CONTRIBUTING.md), so the production build has to exist before the mock
|
||||
# services are deployed. Without it the deploy logs
|
||||
# "webSourcePath: .../client/dist ... doesn't exist" and streams no frontend.
|
||||
run: |
|
||||
cd client
|
||||
npm run build
|
||||
|
||||
- name: Setup and start SASjs server
|
||||
run: |
|
||||
npm i -g pm2
|
||||
|
||||
@@ -14,7 +14,7 @@
|
||||
"streamConfig": {
|
||||
"streamWeb": true,
|
||||
"streamWebFolder": "web9",
|
||||
"webSourcePath": "`../../../../client/dist",
|
||||
"webSourcePath": "../../client/dist",
|
||||
"assetPaths": [],
|
||||
"streamServiceName": "clickme"
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user