Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
57 changes: 57 additions & 0 deletions .github/workflows/cf.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,57 @@
name: Cloud Foundry

on:
workflow_call:
inputs:
environment:
default: Staging
type: string
workflow_dispatch:
push:
branches:
- main

permissions:
contents: read
deployments: write

concurrency:
group: cf-${{ github.workflow }}-${{ github.head_ref || github.run_id }}
cancel-in-progress: true

env:
APP_NAME: techtransition_mgt
jobs:
deploy:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v5
- uses: actions/setup-node@v5
with:
node-version: 22
- uses: cap-js/cf-setup@v1
with:
cf-api: ${{ vars.CF_API }}
cf-org: ${{ vars.CF_ORG }}
cf-space: ${{ vars.CF_SPACE }}
cf-username: ${{ vars.CF_USERNAME }}
cf-password: ${{ secrets.CF_PASSWORD }}
- run: npm install
- run: npx cds up

- run: cf logs "${{ env.APP_NAME }}" --recent
if: always()
- run: cf logs "${{ env.APP_NAME }}-srv" --recent
if: always()
- run: cf logs "${{ env.APP_NAME }}-db-deployer" --recent
if: always()

- name: Get application URL
id: route
shell: bash
run: |
host=$(cf app "${APP_NAME}" | awk '/routes:/ {print $2}' | sed -E 's#^https?://##; s/,.*$//')
echo "url=https://$host" >> "$GITHUB_OUTPUT"
environment:
name: ${{ inputs.environment || 'Staging' }}
url: ${{ steps.route.outputs.url }}
21 changes: 21 additions & 0 deletions .github/workflows/release.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
name: Release

on:
workflow_dispatch:
release:
types: [published]

permissions:
contents: read
deployments: write

jobs:
tests:
uses: git@github.com:gavdilabs/solutioncentral/.github/workflows/test.yaml@main
secrets: inherit
deploy-cf:
needs: [tests]
uses: git@github.com:gavdilabs/solutioncentral/.github/workflows/cf.yaml@main
secrets: inherit
with:
environment: Production
23 changes: 23 additions & 0 deletions .github/workflows/test.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
name: Tests

on:
workflow_call:
workflow_dispatch:
pull_request:
merge_group:
push:
branches:
- main

permissions:
contents: read

jobs:
tests:
runs-on: ubuntu-latest
steps:
- uses: actions/setup-node@v5
with:
node-version: 22
- uses: actions/checkout@v5
- run: npm install
5 changes: 5 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -52,3 +52,8 @@ Thumbs.db
@dispatcher
.npmrc
@cds-models/
*-env.json
.env
gen/
mta_archives/
*.zip
3 changes: 3 additions & 0 deletions .prettierignore
Original file line number Diff line number Diff line change
@@ -1,2 +1,5 @@
app
@cds-models
xs-security.json
autoscaler.json
tsconfig.json
1 change: 1 addition & 0 deletions app/config/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@
"typescript-eslint": "^8.8.1",
"ui5-middleware-livereload": "3.1.1",
"ui5-middleware-simpleproxy": "3.3.1",
"ui5-task-zipper": "^3.5.1",
"ui5-test-runner": "^5.4.3",
"ui5-tooling-transpile": "^3.5.0",
"wdio-ui5-service": "^3.0.8"
Expand Down
10 changes: 8 additions & 2 deletions app/config/ui5.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ framework:
version: "1.136.1"
libraries:
- name: sap.m
- name: sap.f
- name: sap.f
- name: sap.ui.core
- name: themelib_sap_horizon
builder:
Expand All @@ -17,13 +17,19 @@ builder:
customTasks:
- name: ui5-tooling-transpile-task
afterTask: replaceVersion
- name: ui5-task-zipper
afterTask: generateVersionInfo
configuration:
archiveName: "config"
additionalFiles:
- xs-app.json
server:
customMiddleware:
- name: ui5-tooling-transpile-middleware
afterMiddleware: compression
- name: ui5-middleware-livereload
afterMiddleware: compression
configuration:
configuration:
watchPath: "webapp"
- name: ui5-middleware-simpleproxy
afterMiddleware: compression
Expand Down
24 changes: 24 additions & 0 deletions app/config/xs-app.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
{
"authenticationMethod": "route",
"routes": [
{
"source": "^/resources/(.*)$",
"target": "/resources/$1",
"destination": "UI5",
"authenticationType": "none"
},
{
"source": "^/RadarService/(.*)$",
"target": "/odata/v4/radar/$1",
"destination": "srv-api",
"csrfProtection": true,
"authenticationType": "xsuaa"
},
{
"source": "^(.*)$",
"target": "$1",
"service": "html5-apps-repo-rt",
"authenticationType": "xsuaa"
}
]
}
9 changes: 9 additions & 0 deletions app/router/package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
{
"name": "approuter",
"dependencies": {
"@sap/approuter": "^20.7.0"
},
"scripts": {
"start": "node node_modules/@sap/approuter/approuter.js"
}
}
75 changes: 75 additions & 0 deletions app/router/xs-app.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,75 @@
{
"authenticationMethod": "route",
"routes": [
{
"source": "^/resources/(.*)$",
"target": "/resources/$1",
"destination": "UI5",
"authenticationType": "none"
},
{
"source": "^/solutioncentral/resources/(.*)$",
"target": "/resources/$1",
"destination": "UI5",
"authenticationType": "none"
},
{
"source": "^/solutioncentral/RadarService/(.*)$",
"target": "/odata/v4/radar/$1",
"destination": "srv-api",
"csrfProtection": true,
"authenticationType": "xsuaa"
},
{
"source": "^/solutioncentral/(.*)$",
"target": "/comgavdilabstechtransmgtsolutioncentral/$1",
"service": "html5-apps-repo-rt",
"authenticationType": "xsuaa"
},
{
"source": "^/techradar/resources/(.*)$",
"target": "/resources/$1",
"destination": "UI5",
"authenticationType": "none"
},
{
"source": "^/techradar/RadarService/(.*)$",
"target": "/odata/v4/radar/$1",
"destination": "srv-api",
"csrfProtection": true,
"authenticationType": "xsuaa"
},
{
"source": "^/techradar/(.*)$",
"target": "/comgavdilabstechradar/$1",
"service": "html5-apps-repo-rt",
"authenticationType": "xsuaa"
},
{
"source": "^/config/resources/(.*)$",
"target": "/resources/$1",
"destination": "UI5",
"authenticationType": "none"
},
{
"source": "^/config/RadarService/(.*)$",
"target": "/odata/v4/radar/$1",
"destination": "srv-api",
"csrfProtection": true,
"authenticationType": "xsuaa"
},
{
"source": "^/config/(.*)$",
"target": "/comgavdilabsconfig/$1",
"service": "html5-apps-repo-rt",
"authenticationType": "xsuaa"
},
{
"source": "^/(.*)$",
"target": "$1",
"destination": "srv-api",
"csrfProtection": true,
"authenticationType": "xsuaa"
}
]
}
1 change: 1 addition & 0 deletions app/solutioncentral/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@
"typescript-eslint": "^8.8.1",
"ui5-middleware-livereload": "^3.1.0",
"ui5-middleware-simpleproxy": "^3.4.1",
"ui5-task-zipper": "^3.5.1",
"ui5-test-runner": "^5.4.3",
"ui5-tooling-transpile": "^3.5.0"
},
Expand Down
6 changes: 6 additions & 0 deletions app/solutioncentral/ui5.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,12 @@ builder:
customTasks:
- name: ui5-tooling-transpile-task
afterTask: replaceVersion
- name: ui5-task-zipper
afterTask: generateVersionInfo
configuration:
archiveName: "solutioncentral"
additionalFiles:
- xs-app.json
server:
customMiddleware:
- name: ui5-tooling-transpile-middleware
Expand Down
24 changes: 24 additions & 0 deletions app/solutioncentral/xs-app.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
{
"authenticationMethod": "route",
"routes": [
{
"source": "^/resources/(.*)$",
"target": "/resources/$1",
"destination": "UI5",
"authenticationType": "none"
},
{
"source": "^/RadarService/(.*)$",
"target": "/odata/v4/radar/$1",
"destination": "srv-api",
"csrfProtection": true,
"authenticationType": "xsuaa"
},
{
"source": "^(.*)$",
"target": "$1",
"service": "html5-apps-repo-rt",
"authenticationType": "xsuaa"
}
]
}
1 change: 1 addition & 0 deletions app/techradar/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,7 @@
"typescript-eslint": "^8.8.1",
"ui5-middleware-livereload": "^3.1.0",
"ui5-middleware-simpleproxy": "3.3.1",
"ui5-task-zipper": "^3.5.1",
"ui5-tooling-transpile": "^3.5.0",
"wdio-ui5-service": "^3.0.8"
}
Expand Down
8 changes: 7 additions & 1 deletion app/techradar/ui5.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ framework:
libraries:
- name: sap.m
- name: sap.ui.core
- name: sap.f
- name: sap.f
- name: sap.ui.comp
- name: sap.tnt
- name: themelib_sap_horizon
Expand All @@ -19,6 +19,12 @@ builder:
customTasks:
- name: ui5-tooling-transpile-task
afterTask: replaceVersion
- name: ui5-task-zipper
afterTask: generateVersionInfo
configuration:
archiveName: "techradar"
additionalFiles:
- xs-app.json
server:
customMiddleware:
- name: ui5-tooling-transpile-middleware
Expand Down
24 changes: 24 additions & 0 deletions app/techradar/xs-app.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
{
"authenticationMethod": "route",
"routes": [
{
"source": "^/resources/(.*)$",
"target": "/resources/$1",
"destination": "UI5",
"authenticationType": "none"
},
{
"source": "^/RadarService/(.*)$",
"target": "/odata/v4/radar/$1",
"destination": "srv-api",
"csrfProtection": true,
"authenticationType": "xsuaa"
},
{
"source": "^(.*)$",
"target": "$1",
"service": "html5-apps-repo-rt",
"authenticationType": "xsuaa"
}
]
}
18 changes: 0 additions & 18 deletions config/autoscaler.json

This file was deleted.

Empty file removed config/xs-security.json
Empty file.
Loading
Loading