Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
20 commits
Select commit Hold shift + click to select a range
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
22 changes: 22 additions & 0 deletions .github/workflows/cfdeploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,10 @@ on:
repository_id:
description: 'Specify the Repository ID (leave blank if deploying to developcap)'
required: false
cds_services_version:
description: 'Optional override for <cds.services.version> (e.g. 4.3.1). Leave blank to use existing value.'
required: false
default: ''

permissions:
pull-requests: read
Expand Down Expand Up @@ -150,6 +154,24 @@ jobs:
exit 1
fi

- name: Override cds.services.version (runtime only)
if: ${{ github.event.inputs.cds_services_version != '' }}
env:
TARGET_CDS_SERVICES_VERSION: ${{ github.event.inputs.cds_services_version }}
run: |
echo "Override requested: cds.services.version -> ${TARGET_CDS_SERVICES_VERSION}"
FILES=$(grep -Rl "<cds.services.version>" . | grep pom.xml || true)
if [ -z "$FILES" ]; then
echo "No pom.xml files with <cds.services.version> found" >&2; exit 1;
fi
echo "Updating files:"; echo "$FILES" | sed 's/^/ - /'
for f in $FILES; do
sed -i "s|<cds.services.version>[^<]*</cds.services.version>|<cds.services.version>${TARGET_CDS_SERVICES_VERSION}</cds.services.version>|" "$f"
done
echo "Post-update values:"; grep -R "<cds.services.version>" $FILES || true
echo "(Not committing these changes)"
shell: bash

- name: Deleting the sdm directory for fresh build ⚙️
run: |
echo "🔄 Deleting 'sdm' directory for fresh build..."
Expand Down
9 changes: 4 additions & 5 deletions .github/workflows/multi tenancy_Integration.yml
Original file line number Diff line number Diff line change
Expand Up @@ -56,8 +56,7 @@ jobs:
-u ${{ secrets.CF_USER }} \
-p ${{ secrets.CF_PASSWORD }} \
-o ${{ secrets.CF_ORG }} \
-s ${{ secrets.CF_SPACE }}
# -s ${{ steps.determine_space.outputs.space }}
-s ${{ steps.determine_space.outputs.space }}

- name: Fetch and Escape Client Details for single tenant 🔍
id: fetch_credentials
Expand Down Expand Up @@ -137,8 +136,8 @@ jobs:
echo "🚀 Starting integration tests..."
set -e
PROPERTIES_FILE="sdm/src/test/resources/credentials.properties"
appUrl="${{ secrets.CF_ORG }}-${{ secrets.CF_SPACE }}-demoappjava-srv.cfapps.eu12.hana.ondemand.com"
appUrlMT="${{ secrets.CF_ORG }}-${{ secrets.CF_SPACE }}-bookshop-mt-srv.cfapps.eu12.hana.ondemand.com"
appUrl="${{ secrets.CF_ORG }}-${{ steps.determine_space.outputs.space }}-demoappjava-srv.cfapps.eu12.hana.ondemand.com"
appUrlMT="${{ secrets.CF_ORG }}-${{ steps.determine_space.outputs.space }}-bookshop-mt-srv.cfapps.eu12.hana.ondemand.com"
authUrl="${{ secrets.CAPAUTH_URL }}"
authUrlMT1="${{ secrets.AUTHURLMT1 }}"
authUrlMT2="${{ secrets.AUTHURLMT2 }}"
Expand Down Expand Up @@ -195,4 +194,4 @@ jobs:
mvn clean verify -P integration-tests -DtokenFlow=technicalUser -DtenancyModel=multi -Dtenant=TENANT1 -DskipUnitTests
mvn clean verify -P integration-tests -DtokenFlow=namedUser -DtenancyModel=multi -Dtenant=TENANT2 -DskipUnitTests
mvn clean verify -P integration-tests -DtokenFlow=technicalUser -DtenancyModel=multi -Dtenant=TENANT2 -DskipUnitTests
echo "✅ Integration tests completed!"
echo "✅ Integration tests completed!"
11 changes: 9 additions & 2 deletions .github/workflows/multiTenancyDeployLocal.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,10 @@ on:
required: true
default: 'developcap'

deploy_branch:
description: 'Specify the branch to deploy'
required: false

permissions:
pull-requests: read
packages: read # Added permission to read packages
Expand All @@ -20,6 +24,9 @@ jobs:

- name: Checkout this repository 📁
uses: actions/checkout@v2
with:
ref: ${{ github.event.inputs.deploy_branch }}


- name: Set up JDK 21 ☕
uses: actions/setup-java@v3
Expand Down Expand Up @@ -82,7 +89,7 @@ jobs:

# Login to Cloud Foundry again to ensure session is active
echo "🔑 Logging in to Cloud Foundry..."
cf login -a ${ secrets.CF_API } -u ${ secrets.CF_USER } -p ${ secrets.CF_PASSWORD } -o ${ secrets.CF_ORG } -s -s ${{ steps.determine_space.outputs.space }}
cf login -a ${{ secrets.CF_API }} -u ${{ secrets.CF_USER }} -p ${{ secrets.CF_PASSWORD }} -o ${{ secrets.CF_ORG }} -s ${{ github.event.inputs.cf_space }}
echo "✅ Logged in successfully!"

# Deploy the application
Expand All @@ -91,4 +98,4 @@ jobs:
ls -lrth
echo "▶️ Running cf deploy..."
cf deploy mta_archives/bookshop-mt_1.0.0.mtar -f
echo "✅ Deployment complete!"
echo "✅ Deployment complete!"
Loading
Loading