@@ -59,36 +59,36 @@ jobs:
5959 -u ${{ secrets.CF_USER }} \
6060 -p ${{ secrets.CF_PASSWORD }} \
6161 -o ${{ secrets.CF_ORG }} \
62- -s ${{ secrets.CF_SPACE }} > /dev/null
62+ -s ${{ secrets.CF_SPACE }} > /dev/null 2>&1
6363 echo -e "\033[32m✔️ Login successful!\033[0m"
6464
6565 - name : Fetch and Escape Client Details for Single Tenant
6666 id : fetch_credentials
6767 run : |
6868 echo -e "\033[36m🚀 Fetching Client Details for Single Tenant...\033[0m"
69- service_instance_guid=$(cf service demoappjava-public-uaa --guid) > /dev/null
69+ service_instance_guid=$(cf service demoappjava-public-uaa --guid)
7070 if [ -z "$service_instance_guid" ]; then
7171 echo -e "\033[31m❌ Error: Unable to retrieve service instance GUID\033[0m"
7272 exit 1
7373 fi
7474
75- bindings_response=$(cf curl "/v3/service_credential_bindings?service_instance_guids=${service_instance_guid}") > /dev/null
76- binding_guid=$(echo $bindings_response | jq -r '.resources[0].guid') > /dev/null
75+ bindings_response=$(cf curl "/v3/service_credential_bindings?service_instance_guids=${service_instance_guid}")
76+ binding_guid=$(echo $bindings_response | jq -r '.resources[0].guid')
7777 if [ -z "$binding_guid" ]; then
7878 echo -e "\033[31m❌ Error: Unable to retrieve binding GUID\033[0m"
7979 exit 1
8080 fi
8181
82- binding_details=$(cf curl "/v3/service_credential_bindings/${binding_guid}/details") > /dev/null
82+ binding_details=$(cf curl "/v3/service_credential_bindings/${binding_guid}/details")
8383
84- clientSecret=$(echo "$binding_details" | jq -r '.credentials.clientsecret') > /dev/null
84+ clientSecret=$(echo "$binding_details" | jq -r '.credentials.clientsecret')
8585 if [ -z "$clientSecret" ] || [ "$clientSecret" == "null" ]; then
8686 echo -e "\033[31m❌ Error: clientSecret is not set or is null\033[0m"
8787 exit 1
8888 fi
89- escapedClientSecret=$(echo "$clientSecret" | sed 's/\$/\\$/g') > /dev/null
89+ escapedClientSecret=$(echo "$clientSecret" | sed 's/\$/\\$/g')
9090
91- clientID=$(echo "$binding_details" | jq -r '.credentials.clientid') > /dev/null
91+ clientID=$(echo "$binding_details" | jq -r '.credentials.clientid')
9292 if [ -z "$clientID" ] || [ "$clientID" == "null" ]; then
9393 echo -e "\033[31m❌ Error: clientID is not set or is null\033[0m"
9494 exit 1
@@ -102,29 +102,29 @@ jobs:
102102 id : fetch_credentials_mt
103103 run : |
104104 echo -e "\033[36m🚀 Fetching Client Details for Multi Tenant...\033[0m"
105- service_instance_guid=$(cf service bookshop-mt-uaa --guid) > /dev/null
105+ service_instance_guid=$(cf service bookshop-mt-uaa --guid)
106106 if [ -z "$service_instance_guid" ]; then
107107 echo -e "\033[31m❌ Error: Unable to retrieve service instance GUID\033[0m"
108108 exit 1
109109 fi
110110
111- bindings_response=$(cf curl "/v3/service_credential_bindings?service_instance_guids=${service_instance_guid}") > /dev/null
112- binding_guid=$(echo $bindings_response | jq -r '.resources[0].guid') > /dev/null
111+ bindings_response=$(cf curl "/v3/service_credential_bindings?service_instance_guids=${service_instance_guid}")
112+ binding_guid=$(echo $bindings_response | jq -r '.resources[0].guid')
113113 if [ -z "$binding_guid" ]; then
114114 echo -e "\033[31m❌ Error: Unable to retrieve binding GUID\033[0m"
115115 exit 1
116116 fi
117117
118- binding_details=$(cf curl "/v3/service_credential_bindings/${binding_guid}/details") > /dev/null
118+ binding_details=$(cf curl "/v3/service_credential_bindings/${binding_guid}/details")
119119
120- clientSecret_mt=$(echo "$binding_details" | jq -r '.credentials.clientsecret') > /dev/null
120+ clientSecret_mt=$(echo "$binding_details" | jq -r '.credentials.clientsecret')
121121 if [ -z "$clientSecret_mt" ] || [ "$clientSecret_mt" == "null" ]; then
122122 echo -e "\033[31m❌ Error: clientSecret_mt is not set or is null\033[0m"
123123 exit 1
124124 fi
125- escapedClientSecret_mt=$(echo "$clientSecret_mt" | sed 's/\$/\\$/g') > /dev/null
125+ escapedClientSecret_mt=$(echo "$clientSecret_mt" | sed 's/\$/\\$/g')
126126
127- clientID_mt=$(echo "$binding_details" | jq -r '.credentials.clientid') > /dev/null
127+ clientID_mt=$(echo "$binding_details" | jq -r '.credentials.clientid')
128128 if [ -z "$clientID_mt" ] || [ "$clientID_mt" == "null" ]; then
129129 echo -e "\033[31m❌ Error: clientID_mt is not set or is null\033[0m"
130130 exit 1
@@ -143,22 +143,22 @@ jobs:
143143 run : |
144144 echo -e "\033[36m🧪 Running Integration Tests...\033[0m"
145145 set -e
146+
147+ # Assign variables but suppress printing in terminal output
146148 PROPERTIES_FILE="sdm/src/test/resources/credentials.properties"
147149 appUrl="${{ secrets.CF_ORG }}-${{ secrets.CF_SPACE }}-demoappjava-srv.cfapps.eu12.hana.ondemand.com"
148150 appUrlMT="${{ secrets.CF_ORG }}-${{ secrets.CF_SPACE }}-bookshop-mt-srv.cfapps.eu12.hana.ondemand.com"
149151 authUrl="${{ secrets.CAPAUTH_URL }}"
150152 authUrlMT1="${{ secrets.AUTHURLMT1 }}"
151153 authUrlMT2="${{ secrets.AUTHURLMT2 }}"
152- username="${{ secrets.CF_USER }}"
153- password="${{ secrets.CF_PASSWORD }}"
154- noSDMRoleUsername="${{ secrets.NOSDMROLEUSERNAME }}"
155- noSDMRoleUserPassword="${{ secrets.NOSDMROLEUSERPASSWORD }}"
156-
157- # Using clientID and clientSecret variables for operation but masking their visibility
158154 clientID="${{ env.CLIENT_ID }}"
159155 clientSecret="${{ env.CLIENT_SECRET }}"
160156 clientIDMT="${{ env.CLIENT_ID_MT }}"
161157 clientSecretMT="${{ env.CLIENT_SECRET_MT }}"
158+ username="${{ secrets.CF_USER }}"
159+ password="${{ secrets.CF_PASSWORD }}"
160+ noSDMRoleUsername="${{ secrets.NOSDMROLEUSERNAME }}"
161+ noSDMRoleUserPassword="${{ secrets.NOSDMROLEUSERPASSWORD }}"
162162
163163 # Check if secrets and env variables are set before using them
164164 for var in appUrl appUrlMT authUrl authUrlMT1 authUrlMT2 clientID clientSecret clientIDMT clientSecretMT username password noSDMRoleUsername noSDMRoleUserPassword; do
0 commit comments