@@ -32,6 +32,7 @@ permissions:
3232
3333jobs :
3434 Deploy :
35+ environment : dev
3536 runs-on : ubuntu-latest
3637 if : ${{ github.event.inputs.workflow_choice == 'Deploy' }}
3738
5354 mvn clean install -P unit-tests -DskipIntegrationTests
5455 echo "✅ Build and packaging completed successfully!"
5556
56- - name : Verify and Checkout Deploy Branch 🔄
57- run : |
58- git fetch origin
59- echo "📂 Verifying 'local_deploy' branch..."
60- if git rev-parse --verify origin/local_deploy; then
61- git checkout local_deploy
62- echo "✅ Branch checked out successfully!"
63- else
64- echo "❌ Branch 'local_deploy' not found. Please verify the branch name."
65- exit 1
66- fi
67-
6857 - name : Set REPOSITORY_ID 🔍
6958 id : set_repository_id
7059 run : |
@@ -84,11 +73,15 @@ jobs:
8473
8574 - name : Prepare and Deploy to Cloud Foundry ☁️
8675 run : |
76+ set +x
77+ echo "::add-mask::$CF_API"
78+ echo "::add-mask::$CF_USER"
79+ echo "::add-mask::$CF_PASSWORD"
80+ echo "::add-mask::$CF_ORG"
8781 echo "🔄 Preparing to deploy..."
8882 echo "Current Branch: 📂"
89- git branch
9083 pwd
91- cd /home/runner/work/sdm/sdm/cap-notebook /demoapp/app
84+ cd /home/runner/work/sdm/sdm/app/single-tenant/personal-space /demoapp/app
9285 echo "Changed to app directory 📂"
9386 pwd
9487
@@ -120,14 +113,20 @@ jobs:
120113 cf install-plugin multiapps -f
121114
122115 echo "🔑 Logging into Cloud Foundry..."
123- cf login -a ${{ secrets. CF_API }} -u ${{ secrets. CF_USER }} -p ${{ secrets. CF_PASSWORD }} -o ${{ secrets. CF_ORG }} -s ${{ github.event.inputs.cf_space }}
116+ cf login -a "$ CF_API" -u "$ CF_USER" -p "$ CF_PASSWORD" -o "$ CF_ORG" -s ${{ github.event.inputs.cf_space }} > /dev/null
124117 echo "✅ Logged in successfully!"
125118
126119 echo "🚀 Running cf deploy..."
127120 cf deploy mta_archives/demoappjava_1.0.0.mtar -f
128121 echo "✅ Deployment complete!"
122+ env :
123+ CF_API : ${{ secrets.CF_API }}
124+ CF_USER : ${{ secrets.CF_USER }}
125+ CF_PASSWORD : ${{ secrets.CF_PASSWORD }}
126+ CF_ORG : ${{ secrets.CF_ORG }}
129127
130128 SnapshotDeploy :
129+ environment : dev
131130 runs-on : ubuntu-latest
132131 if : ${{ github.event.inputs.workflow_choice == 'Snapshot Deploy' }}
133132
@@ -143,25 +142,13 @@ jobs:
143142 java-version : 21
144143 distribution : ' temurin'
145144
146- - name : Verify and Checkout Deploy Branch 🔄
147- run : |
148- git fetch origin
149- echo "📂 Verifying 'develop_deploy' branch..."
150- if git rev-parse --verify origin/develop_deploy; then
151- git checkout develop_deploy
152- echo "✅ Branch checked out successfully!"
153- else
154- echo "❌ Branch 'develop_deploy' not found. Please verify the branch name."
155- exit 1
156- fi
157-
158145 - name : Override cds.services.version (runtime only)
159146 if : ${{ github.event.inputs.cds_services_version != '' }}
160147 env :
161148 TARGET_CDS_SERVICES_VERSION : ${{ github.event.inputs.cds_services_version }}
162149 run : |
163150 echo "Override requested: cds.services.version -> ${TARGET_CDS_SERVICES_VERSION}"
164- FILES=$(grep -Rl "<cds.services.version>" . | grep pom.xml || true)
151+ FILES=$(grep -Rl "<cds.services.version>" app/single-tenant/central-space/demoapp | grep pom.xml || true)
165152 if [ -z "$FILES" ]; then
166153 echo "No pom.xml files with <cds.services.version> found" >&2; exit 1;
167154 fi
@@ -219,11 +206,15 @@ jobs:
219206
220207 - name : Prepare and Deploy to Cloud Foundry ☁️
221208 run : |
209+ set +x
210+ echo "::add-mask::$CF_API"
211+ echo "::add-mask::$CF_USER"
212+ echo "::add-mask::$CF_PASSWORD"
213+ echo "::add-mask::$CF_ORG"
222214 echo "🔄 Preparing to deploy..."
223215 echo "Current Branch: 📂"
224- git branch
225216 pwd
226- cd /home/runner/work/sdm/sdm/cap-notebook /demoapp
217+ cd /home/runner/work/sdm/sdm/app/single-tenant/central-space /demoapp
227218
228219 cd app
229220 echo "🔄 Removing node_modules for fresh install..."
@@ -255,9 +246,14 @@ jobs:
255246 cf install-plugin multiapps -f
256247
257248 echo "🔑 Logging into Cloud Foundry..."
258- cf login -a ${{ secrets. CF_API }} -u ${{ secrets. CF_USER }} -p ${{ secrets. CF_PASSWORD }} -o ${{ secrets. CF_ORG }} -s ${{ github.event.inputs.cf_space }}
249+ cf login -a "$ CF_API" -u "$ CF_USER" -p "$ CF_PASSWORD" -o "$ CF_ORG" -s ${{ github.event.inputs.cf_space }} > /dev/null
259250 echo "✅ Logged in successfully!"
260251
261252 echo "🚀 Running cf deploy..."
262253 cf deploy mta_archives/demoappjava_1.0.0.mtar -f
263254 echo "✅ Deployment complete!"
255+ env :
256+ CF_API : ${{ secrets.CF_API }}
257+ CF_USER : ${{ secrets.CF_USER }}
258+ CF_PASSWORD : ${{ secrets.CF_PASSWORD }}
259+ CF_ORG : ${{ secrets.CF_ORG }}
0 commit comments