diff --git a/app/multi-tenant/central-space/cap-js-incidents-app/..github/workflows/checkout b/app/multi-tenant/central-space/cap-js-incidents-app/..github/workflows/checkout deleted file mode 100755 index a591b780..00000000 --- a/app/multi-tenant/central-space/cap-js-incidents-app/..github/workflows/checkout +++ /dev/null @@ -1,81 +0,0 @@ -#!/usr/bin/env node -/* eslint-disable no-console */ - -const [,,$1] = process.argv -const { exec } = require('child_process') -const path = require('path') -const { readFile, writeFile } = require("fs").promises; -const { join } = require("path"); - -async function remoteService () { - const TARGET_DIR = "xmpls/remote-service" - const levelUP = "../../" - const INCLUDES = ["srv", "test"] - const paths = INCLUDES.map(pattern => join(__dirname, levelUP, TARGET_DIR, pattern)) - const cmd = `cp -r ${paths.join(' ')} ${join(__dirname, levelUP)}` - await run(cmd); - - const packageJson = JSON.parse(await readFile(join(__dirname, levelUP ,"package.json"), "utf-8")); - const delta = JSON.parse(await readFile(join(__dirname, levelUP, TARGET_DIR, "package.json"), "utf-8")); - packageJson.cds.requires["API_BUSINESS_PARTNER"] = delta.cds.requires["API_BUSINESS_PARTNER"] - await writeFile(join(__dirname, levelUP, "package.json"), JSON.stringify(packageJson, null, 2), "utf-8"); - - // dependencies - const deps = [ - "@sap-cloud-sdk/connectivity", - "@sap-cloud-sdk/http-client", - "@sap-cloud-sdk/resilience", - "@sap-cloud-sdk/util" - ] - return await run(`npm add ${deps.join(" ")}`) -} - -async function messaging () { - const TARGET_DIR = "xmpls/messaging" - const levelUP = "../../" - const INCLUDES = ["app", "srv", "test"] - const paths = INCLUDES.map(pattern => join(__dirname, levelUP, TARGET_DIR, pattern)) - const cmd = `cp -r ${paths.join(' ')} ${join(__dirname, levelUP)}` - await run(cmd); - - const packageJson = JSON.parse(await readFile(join(__dirname, levelUP, "package.json"), "utf-8")); - const delta = JSON.parse(await readFile(join(__dirname, levelUP, TARGET_DIR, "package.json"), "utf-8")); - packageJson.cds.requires["API_BUSINESS_PARTNER"] = delta.cds.requires["API_BUSINESS_PARTNER"] - packageJson.cds.requires["messaging"] = delta.cds.requires["messaging"] - await writeFile(join(__dirname, levelUP, "package.json"), JSON.stringify(packageJson, null, 2), "utf-8"); - - // dependencies - const deps = [ - "@sap-cloud-sdk/connectivity", - "@sap-cloud-sdk/http-client", - "@sap-cloud-sdk/resilience", - "@sap-cloud-sdk/util", - "@sap/xb-msg-amqp-v100" - ] - return await run(`npm add ${deps.join(" ")}`) -} - -function run (cmd, silent) { - if (cmd.raw) return run (String.raw(...arguments)) - if (cmd.endsWith('--silent')) silent = cmd = cmd.slice(0,-9) - if (typeof cmd === 'string') cmd = new Promise ((done,failed) => { - const cp = exec (cmd, (e,stdout) => e ? failed(e) : done(stdout)) - if (!silent) { - cp.stdout.on ('data', d => process.stdout.write(d)) - cp.stderr.on ('data', d => process.stderr.write(d)) - } - }) - return cmd -} - -switch ($1) { - - case 'remote-service': - remoteService(); - break; - case 'messaging': - messaging(); - break; - default: - console.log('Usage: ./checkout '); -} \ No newline at end of file diff --git a/app/multi-tenant/central-space/cap-js-incidents-app/..github/workflows/create-test-branch.yml b/app/multi-tenant/central-space/cap-js-incidents-app/..github/workflows/create-test-branch.yml deleted file mode 100644 index fce146ac..00000000 --- a/app/multi-tenant/central-space/cap-js-incidents-app/..github/workflows/create-test-branch.yml +++ /dev/null @@ -1,41 +0,0 @@ -name: Create CDS Test branch - -on: - workflow_call: - -jobs: - build: - runs-on: ubuntu-latest - name: Build and Push - steps: - - uses: actions/checkout@v4 - with: - fetch-depth: 0 - token: ${{ secrets.TECH_USER_TOKEN }} - - - name: Copy xmpls - run: | - npm run add-all-xmpls - rm -rf xmpls - - - name: Test - run: | - npm i - npm test - - - name: Extract last commit author email and name - id: extract_commit_info - run: | - LAST_COMMIT_EMAIL=$(git log -1 --pretty=format:'%ae') - LAST_COMMIT_NAME=$(git log -1 --pretty=format:'%an') - echo "AUTHOR_EMAIL=$LAST_COMMIT_EMAIL" >> $GITHUB_ENV - echo "AUTHOR_NAME=$LAST_COMMIT_NAME" >> $GITHUB_ENV - - - name: Push - run: | - git config --global user.email "${{ env.AUTHOR_EMAIL }}" - git config --global user.name "${{ env.AUTHOR_NAME }}" - # Add and commit changes locally - git add . - git commit -m "${{ github.event.head_commit.message }}" - git push --force-with-lease origin HEAD:cds-test-integrate diff --git a/app/multi-tenant/central-space/cap-js-incidents-app/..github/workflows/node.js.yml b/app/multi-tenant/central-space/cap-js-incidents-app/..github/workflows/node.js.yml deleted file mode 100644 index 3393473b..00000000 --- a/app/multi-tenant/central-space/cap-js-incidents-app/..github/workflows/node.js.yml +++ /dev/null @@ -1,35 +0,0 @@ -# This workflow will do a clean installation of node dependencies, cache/restore them, build the source code and run tests across different versions of node -# For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-nodejs - -name: Node.js CI - -on: - push: - branches: [ "main" ] - pull_request: - branches: [ "main" ] - -jobs: - build: - - runs-on: ubuntu-latest - - strategy: - matrix: - node-version: [18.x, 20.x] - # See supported Node.js release schedule at https://nodejs.org/en/about/releases/ - - steps: - - uses: actions/checkout@v4 - - name: Use Node.js ${{ matrix.node-version }} - uses: actions/setup-node@v4 - with: - node-version: ${{ matrix.node-version }} - - run: npm i - - run: npm test - - push: - name: Push to CDS Test branch - uses: ./.github/workflows/create-test-branch.yml - secrets: inherit - if: github.event_name == 'push' diff --git a/app/multi-tenant/personal-space/cap-js-incidents-app/..github/workflows/checkout b/app/multi-tenant/personal-space/cap-js-incidents-app/..github/workflows/checkout deleted file mode 100755 index a591b780..00000000 --- a/app/multi-tenant/personal-space/cap-js-incidents-app/..github/workflows/checkout +++ /dev/null @@ -1,81 +0,0 @@ -#!/usr/bin/env node -/* eslint-disable no-console */ - -const [,,$1] = process.argv -const { exec } = require('child_process') -const path = require('path') -const { readFile, writeFile } = require("fs").promises; -const { join } = require("path"); - -async function remoteService () { - const TARGET_DIR = "xmpls/remote-service" - const levelUP = "../../" - const INCLUDES = ["srv", "test"] - const paths = INCLUDES.map(pattern => join(__dirname, levelUP, TARGET_DIR, pattern)) - const cmd = `cp -r ${paths.join(' ')} ${join(__dirname, levelUP)}` - await run(cmd); - - const packageJson = JSON.parse(await readFile(join(__dirname, levelUP ,"package.json"), "utf-8")); - const delta = JSON.parse(await readFile(join(__dirname, levelUP, TARGET_DIR, "package.json"), "utf-8")); - packageJson.cds.requires["API_BUSINESS_PARTNER"] = delta.cds.requires["API_BUSINESS_PARTNER"] - await writeFile(join(__dirname, levelUP, "package.json"), JSON.stringify(packageJson, null, 2), "utf-8"); - - // dependencies - const deps = [ - "@sap-cloud-sdk/connectivity", - "@sap-cloud-sdk/http-client", - "@sap-cloud-sdk/resilience", - "@sap-cloud-sdk/util" - ] - return await run(`npm add ${deps.join(" ")}`) -} - -async function messaging () { - const TARGET_DIR = "xmpls/messaging" - const levelUP = "../../" - const INCLUDES = ["app", "srv", "test"] - const paths = INCLUDES.map(pattern => join(__dirname, levelUP, TARGET_DIR, pattern)) - const cmd = `cp -r ${paths.join(' ')} ${join(__dirname, levelUP)}` - await run(cmd); - - const packageJson = JSON.parse(await readFile(join(__dirname, levelUP, "package.json"), "utf-8")); - const delta = JSON.parse(await readFile(join(__dirname, levelUP, TARGET_DIR, "package.json"), "utf-8")); - packageJson.cds.requires["API_BUSINESS_PARTNER"] = delta.cds.requires["API_BUSINESS_PARTNER"] - packageJson.cds.requires["messaging"] = delta.cds.requires["messaging"] - await writeFile(join(__dirname, levelUP, "package.json"), JSON.stringify(packageJson, null, 2), "utf-8"); - - // dependencies - const deps = [ - "@sap-cloud-sdk/connectivity", - "@sap-cloud-sdk/http-client", - "@sap-cloud-sdk/resilience", - "@sap-cloud-sdk/util", - "@sap/xb-msg-amqp-v100" - ] - return await run(`npm add ${deps.join(" ")}`) -} - -function run (cmd, silent) { - if (cmd.raw) return run (String.raw(...arguments)) - if (cmd.endsWith('--silent')) silent = cmd = cmd.slice(0,-9) - if (typeof cmd === 'string') cmd = new Promise ((done,failed) => { - const cp = exec (cmd, (e,stdout) => e ? failed(e) : done(stdout)) - if (!silent) { - cp.stdout.on ('data', d => process.stdout.write(d)) - cp.stderr.on ('data', d => process.stderr.write(d)) - } - }) - return cmd -} - -switch ($1) { - - case 'remote-service': - remoteService(); - break; - case 'messaging': - messaging(); - break; - default: - console.log('Usage: ./checkout '); -} \ No newline at end of file diff --git a/app/multi-tenant/personal-space/cap-js-incidents-app/..github/workflows/create-test-branch.yml b/app/multi-tenant/personal-space/cap-js-incidents-app/..github/workflows/create-test-branch.yml deleted file mode 100644 index fce146ac..00000000 --- a/app/multi-tenant/personal-space/cap-js-incidents-app/..github/workflows/create-test-branch.yml +++ /dev/null @@ -1,41 +0,0 @@ -name: Create CDS Test branch - -on: - workflow_call: - -jobs: - build: - runs-on: ubuntu-latest - name: Build and Push - steps: - - uses: actions/checkout@v4 - with: - fetch-depth: 0 - token: ${{ secrets.TECH_USER_TOKEN }} - - - name: Copy xmpls - run: | - npm run add-all-xmpls - rm -rf xmpls - - - name: Test - run: | - npm i - npm test - - - name: Extract last commit author email and name - id: extract_commit_info - run: | - LAST_COMMIT_EMAIL=$(git log -1 --pretty=format:'%ae') - LAST_COMMIT_NAME=$(git log -1 --pretty=format:'%an') - echo "AUTHOR_EMAIL=$LAST_COMMIT_EMAIL" >> $GITHUB_ENV - echo "AUTHOR_NAME=$LAST_COMMIT_NAME" >> $GITHUB_ENV - - - name: Push - run: | - git config --global user.email "${{ env.AUTHOR_EMAIL }}" - git config --global user.name "${{ env.AUTHOR_NAME }}" - # Add and commit changes locally - git add . - git commit -m "${{ github.event.head_commit.message }}" - git push --force-with-lease origin HEAD:cds-test-integrate diff --git a/app/multi-tenant/personal-space/cap-js-incidents-app/..github/workflows/node.js.yml b/app/multi-tenant/personal-space/cap-js-incidents-app/..github/workflows/node.js.yml deleted file mode 100644 index 3393473b..00000000 --- a/app/multi-tenant/personal-space/cap-js-incidents-app/..github/workflows/node.js.yml +++ /dev/null @@ -1,35 +0,0 @@ -# This workflow will do a clean installation of node dependencies, cache/restore them, build the source code and run tests across different versions of node -# For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-nodejs - -name: Node.js CI - -on: - push: - branches: [ "main" ] - pull_request: - branches: [ "main" ] - -jobs: - build: - - runs-on: ubuntu-latest - - strategy: - matrix: - node-version: [18.x, 20.x] - # See supported Node.js release schedule at https://nodejs.org/en/about/releases/ - - steps: - - uses: actions/checkout@v4 - - name: Use Node.js ${{ matrix.node-version }} - uses: actions/setup-node@v4 - with: - node-version: ${{ matrix.node-version }} - - run: npm i - - run: npm test - - push: - name: Push to CDS Test branch - uses: ./.github/workflows/create-test-branch.yml - secrets: inherit - if: github.event_name == 'push' diff --git a/app/single-tenant/central-space/incidents-app/.github/workflows/create-test-branch.yml b/app/single-tenant/central-space/incidents-app/.github/workflows/create-test-branch.yml deleted file mode 100644 index fce146ac..00000000 --- a/app/single-tenant/central-space/incidents-app/.github/workflows/create-test-branch.yml +++ /dev/null @@ -1,41 +0,0 @@ -name: Create CDS Test branch - -on: - workflow_call: - -jobs: - build: - runs-on: ubuntu-latest - name: Build and Push - steps: - - uses: actions/checkout@v4 - with: - fetch-depth: 0 - token: ${{ secrets.TECH_USER_TOKEN }} - - - name: Copy xmpls - run: | - npm run add-all-xmpls - rm -rf xmpls - - - name: Test - run: | - npm i - npm test - - - name: Extract last commit author email and name - id: extract_commit_info - run: | - LAST_COMMIT_EMAIL=$(git log -1 --pretty=format:'%ae') - LAST_COMMIT_NAME=$(git log -1 --pretty=format:'%an') - echo "AUTHOR_EMAIL=$LAST_COMMIT_EMAIL" >> $GITHUB_ENV - echo "AUTHOR_NAME=$LAST_COMMIT_NAME" >> $GITHUB_ENV - - - name: Push - run: | - git config --global user.email "${{ env.AUTHOR_EMAIL }}" - git config --global user.name "${{ env.AUTHOR_NAME }}" - # Add and commit changes locally - git add . - git commit -m "${{ github.event.head_commit.message }}" - git push --force-with-lease origin HEAD:cds-test-integrate diff --git a/app/single-tenant/central-space/incidents-app/.github/workflows/node.js.yml b/app/single-tenant/central-space/incidents-app/.github/workflows/node.js.yml deleted file mode 100644 index 3393473b..00000000 --- a/app/single-tenant/central-space/incidents-app/.github/workflows/node.js.yml +++ /dev/null @@ -1,35 +0,0 @@ -# This workflow will do a clean installation of node dependencies, cache/restore them, build the source code and run tests across different versions of node -# For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-nodejs - -name: Node.js CI - -on: - push: - branches: [ "main" ] - pull_request: - branches: [ "main" ] - -jobs: - build: - - runs-on: ubuntu-latest - - strategy: - matrix: - node-version: [18.x, 20.x] - # See supported Node.js release schedule at https://nodejs.org/en/about/releases/ - - steps: - - uses: actions/checkout@v4 - - name: Use Node.js ${{ matrix.node-version }} - uses: actions/setup-node@v4 - with: - node-version: ${{ matrix.node-version }} - - run: npm i - - run: npm test - - push: - name: Push to CDS Test branch - uses: ./.github/workflows/create-test-branch.yml - secrets: inherit - if: github.event_name == 'push' diff --git a/app/single-tenant/personal-space/incidents-app/.github/workflows/create-test-branch.yml b/app/single-tenant/personal-space/incidents-app/.github/workflows/create-test-branch.yml deleted file mode 100644 index fce146ac..00000000 --- a/app/single-tenant/personal-space/incidents-app/.github/workflows/create-test-branch.yml +++ /dev/null @@ -1,41 +0,0 @@ -name: Create CDS Test branch - -on: - workflow_call: - -jobs: - build: - runs-on: ubuntu-latest - name: Build and Push - steps: - - uses: actions/checkout@v4 - with: - fetch-depth: 0 - token: ${{ secrets.TECH_USER_TOKEN }} - - - name: Copy xmpls - run: | - npm run add-all-xmpls - rm -rf xmpls - - - name: Test - run: | - npm i - npm test - - - name: Extract last commit author email and name - id: extract_commit_info - run: | - LAST_COMMIT_EMAIL=$(git log -1 --pretty=format:'%ae') - LAST_COMMIT_NAME=$(git log -1 --pretty=format:'%an') - echo "AUTHOR_EMAIL=$LAST_COMMIT_EMAIL" >> $GITHUB_ENV - echo "AUTHOR_NAME=$LAST_COMMIT_NAME" >> $GITHUB_ENV - - - name: Push - run: | - git config --global user.email "${{ env.AUTHOR_EMAIL }}" - git config --global user.name "${{ env.AUTHOR_NAME }}" - # Add and commit changes locally - git add . - git commit -m "${{ github.event.head_commit.message }}" - git push --force-with-lease origin HEAD:cds-test-integrate diff --git a/app/single-tenant/personal-space/incidents-app/.github/workflows/node.js.yml b/app/single-tenant/personal-space/incidents-app/.github/workflows/node.js.yml deleted file mode 100644 index 3393473b..00000000 --- a/app/single-tenant/personal-space/incidents-app/.github/workflows/node.js.yml +++ /dev/null @@ -1,35 +0,0 @@ -# This workflow will do a clean installation of node dependencies, cache/restore them, build the source code and run tests across different versions of node -# For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-nodejs - -name: Node.js CI - -on: - push: - branches: [ "main" ] - pull_request: - branches: [ "main" ] - -jobs: - build: - - runs-on: ubuntu-latest - - strategy: - matrix: - node-version: [18.x, 20.x] - # See supported Node.js release schedule at https://nodejs.org/en/about/releases/ - - steps: - - uses: actions/checkout@v4 - - name: Use Node.js ${{ matrix.node-version }} - uses: actions/setup-node@v4 - with: - node-version: ${{ matrix.node-version }} - - run: npm i - - run: npm test - - push: - name: Push to CDS Test branch - uses: ./.github/workflows/create-test-branch.yml - secrets: inherit - if: github.event_name == 'push'