Skip to content

Commit

Permalink
removed host suffix from repository
Browse files Browse the repository at this point in the history
Jira ticket: CAMS-417
  • Loading branch information
amorrow-flexion committed Dec 26, 2024
1 parent 99945dc commit eaac555
Show file tree
Hide file tree
Showing 7 changed files with 69 additions and 85 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/continuous-deployment.yml
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,7 @@ jobs:
secrets: inherit # pragma: allowlist secret
with:
nodeVersion: ${{ vars.NODE_VERSION }}
camsServerHostname: ${{ needs.setup.outputs.apiFunctionName }}.azurewebsites${{ vars.AZ_HOSTNAME_SUFFIX }}
camsServerHostname: ${{ needs.setup.outputs.apiFunctionName }}.azurewebsites.us
camsServerPort: ${{ vars.CAMS_SERVER_PORT }}
camsServerProtocol: ${{ vars.CAMS_SERVER_PROTOCOL }}
camsBasePath: ${{ vars.CAMS_BASE_PATH }}
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/reusable-e2e.yml
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ jobs:
fi
echo "Seeding E2E CosmosDB..."
curl -v -d '{"txIdOverride": '0'}' -H "Content-Type: application/json" https://${{ inputs.apiFunctionName }}.azurewebsites${{ vars.AZ_HOSTNAME_SUFFIX }}/api/orders-sync?x-ms-routing-name=${{ inputs.slotName }}
curl -v -d '{"txIdOverride": '0'}' -H "Content-Type: application/json" https://${{ inputs.apiFunctionName }}.azurewebsites.us/api/orders-sync?x-ms-routing-name=${{ inputs.slotName }}
- name: Install Node dependencies
working-directory: test/e2e
Expand All @@ -89,7 +89,7 @@ jobs:
run: |
echo "Running Playwright Tests..."
mkdir -p playwright/.auth
OKTA_USER_NAME=${{secrets.OKTA_USER_NAME}} OKTA_PASSWORD=${{secrets.OKTA_PASSWORD}} TARGET_HOST=https://${{ inputs.webappName }}.azurewebsites${{ vars.AZ_HOSTNAME_SUFFIX }} CAMS_LOGIN_PROVIDER=${{ vars.CAMS_LOGIN_PROVIDER }} npx playwright test --reporter=list,html
OKTA_USER_NAME=${{secrets.OKTA_USER_NAME}} OKTA_PASSWORD=${{secrets.OKTA_PASSWORD}} TARGET_HOST=https://${{ inputs.webappName }}.azurewebsites.us CAMS_LOGIN_PROVIDER=${{ vars.CAMS_LOGIN_PROVIDER }} npx playwright test --reporter=list,html
- name: Upload report
uses: actions/[email protected]
Expand Down
1 change: 0 additions & 1 deletion .github/workflows/reusable-endpoint-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,6 @@ jobs:
./ops/scripts/pipeline/endpoint-test.sh \
--apiFunctionName ${{ inputs.apiFunctionName }} \
--webappName ${{ inputs.webappName }} \
--hostSuffix ${{ vars.AZ_HOSTNAME_SUFFIX }} \
--gitSha ${{ github.sha }} \
--slotName ${{ inputs.slotName }}
Expand Down
117 changes: 58 additions & 59 deletions docs/operations/deployment.md

Large diffs are not rendered by default.

8 changes: 3 additions & 5 deletions ops/cloud-deployment/main.bicep
Original file line number Diff line number Diff line change
Expand Up @@ -70,8 +70,6 @@ param functionPlanName string = 'plan-${stackName}-functions'
@description('Name of deployment slot for frontend and backend')
param slotName string = 'staging'

param azHostSuffix string = '.us'

param sqlServerName string = ''

param sqlServerResourceGroupName string = ''
Expand Down Expand Up @@ -180,7 +178,7 @@ module ustpWebapp 'frontend-webapp-deploy.bicep' = {
createAlerts: createAlerts
actionGroupName: actionGroupName
actionGroupResourceGroupName: analyticsResourceGroupName
targetApiServerHost: '${apiFunctionName}.azurewebsites${azHostSuffix} ${apiFunctionName}-${slotName}.azurewebsites${azHostSuffix}' //adding both production and slot hostname to CSP
targetApiServerHost: '${apiFunctionName}.azurewebsites.us ${apiFunctionName}-${slotName}.azurewebsites.us' //adding both production and slot hostname to CSP
ustpIssueCollectorHash: ustpIssueCollectorHash
camsReactSelectHash: camsReactSelectHash
webappSubnetId: network.outputs.webappSubnetId
Expand Down Expand Up @@ -214,8 +212,8 @@ module ustpFunctions 'backend-api-deploy.bicep' = {
sqlServerResourceGroupName: sqlServerResourceGroupName
sqlServerIdentityName: sqlServerIdentityName
sqlServerIdentityResourceGroupName: sqlServerIdentityResourceGroupName
apiCorsAllowOrigins: ['https://${webappName}.azurewebsites${azHostSuffix}']
migrationCorsAllowOrigins: ['https://${webappName}.azurewebsites${azHostSuffix}','https://portal.azure.us']
apiCorsAllowOrigins: ['https://${webappName}.azurewebsites.us']
migrationCorsAllowOrigins: ['https://${webappName}.azurewebsites.us','https://portal.azure.us']
allowVeracodeScan: allowVeracodeScan
idKeyvaultAppConfiguration: idKeyvaultAppConfiguration
kvAppConfigResourceGroupName: kvAppConfigResourceGroupName
Expand Down
8 changes: 1 addition & 7 deletions ops/scripts/pipeline/azure-deploy.sh
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ requiredUSTPParams=("--mssqlRequestTimeout" "--isUstpDeployment" "--resource-gro
requiredFlexionParams=("--mssqlRequestTimeout" "--resource-group" "--file" "--stackName" "--networkResourceGroupName" "--kvAppConfigName" "--kvAppConfigResourceGroupName" "--virtualNetworkName" "--analyticsWorkspaceId" "--idKeyvaultAppConfiguration" "--cosmosDatabaseName" "--deployVnet" "--camsReactSelectHash" "--ustpIssueCollectorHash" "--createAlerts" "--deployAppInsights" "--functionPlanType" "--webappPlanType" "--loginProvider" "--loginProviderConfig" "--sqlServerName" "--sqlServerResourceGroupName" "--sqlServerIdentityName" "--actionGroupName" "--oktaUrl")

# shellcheck disable=SC2034 # REASON: to have a reference for all possible parameters
allParams=("--mssqlRequestTimeout" "--isUstpDeployment" "--resource-group" "--file" "--stackName" "--networkResourceGroupName" "--virtualNetworkName" "--analyticsWorkspaceId" "--idKeyvaultAppConfiguration" "--kvAppConfigName" "--cosmosDatabaseName" "--deployVnet" "--camsReactSelectHash" "--ustpIssueCollectorHash" "--createAlerts" "--deployAppInsights" "--functionPlanName" "--functionPlanType" "--webappPlanType" "--loginProvider" "--loginProviderConfig" "--sqlServerName" "--sqlServerResourceGroupName" "--sqlServerIdentityResourceGroupName" "--sqlServerIdentityName" "--actionGroupName" "--oktaUrl" "--location" "--webappSubnetName" "--apiFunctionSubnetName" "--privateEndpointSubnetName" "--webappSubnetAddressPrefix" "--apiFunctionSubnetAddressPrefix" "--migrationSubnetName" "--migrationSubnetAddressPrefix" "--vnetAddressPrefix" "--linkVnetIds" "--privateDnsZoneName" "--privateDnsZoneResourceGroup" "--privateDnsZoneSubscriptionId" "--analyticsResourceGroupName" "--kvAppConfigResourceGroupName" "--deployDns" "--azHostSuffix" "--allowVeracodeScan")
allParams=("--mssqlRequestTimeout" "--isUstpDeployment" "--resource-group" "--file" "--stackName" "--networkResourceGroupName" "--virtualNetworkName" "--analyticsWorkspaceId" "--idKeyvaultAppConfiguration" "--kvAppConfigName" "--cosmosDatabaseName" "--deployVnet" "--camsReactSelectHash" "--ustpIssueCollectorHash" "--createAlerts" "--deployAppInsights" "--functionPlanName" "--functionPlanType" "--webappPlanType" "--loginProvider" "--loginProviderConfig" "--sqlServerName" "--sqlServerResourceGroupName" "--sqlServerIdentityResourceGroupName" "--sqlServerIdentityName" "--actionGroupName" "--oktaUrl" "--location" "--webappSubnetName" "--apiFunctionSubnetName" "--privateEndpointSubnetName" "--webappSubnetAddressPrefix" "--apiFunctionSubnetAddressPrefix" "--migrationSubnetName" "--migrationSubnetAddressPrefix" "--vnetAddressPrefix" "--linkVnetIds" "--privateDnsZoneName" "--privateDnsZoneResourceGroup" "--privateDnsZoneSubscriptionId" "--analyticsResourceGroupName" "--kvAppConfigResourceGroupName" "--deployDns" "--allowVeracodeScan")


function az_vnet_exists_func() {
Expand Down Expand Up @@ -328,12 +328,6 @@ while [[ $# -gt 0 ]]; do
deployment_parameters="${deployment_parameters} ${login_provider_config_param}"
shift 2
;;
--azHostSuffix)
inputParams+=("${1}")
az_host_suffix_param="azHostSuffix=${2}"
deployment_parameters="${deployment_parameters} ${az_host_suffix_param}"
shift 2
;;
--allowVeracodeScan)
inputParams+=("${1}")
allow_veracode_scan_param="allowVeracodeScan=${2}"
Expand Down
14 changes: 4 additions & 10 deletions ops/scripts/pipeline/endpoint-test.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

# Title: endpoint-test.sh
# Description: Verify 200 response from frontend and backend
# Usage: ./endpoint-test.sh --webappName webappName --apiFunctionName apiFunctionName --slot slotName --hostSuffix hostSuffix
# Usage: ./endpoint-test.sh --webappName webappName --apiFunctionName apiFunctionName --slot slotName
#
# Exitcodes
# ==========
Expand All @@ -18,7 +18,7 @@ isLocalRun=''
while [[ $# -gt 0 ]]; do
case $1 in
-h | --help)
echo "./endpoint-test.sh --webappName webappName --apiFunctionName apiFunctionName --slot slotName --hostSuffix hostSuffix"
echo "./endpoint-test.sh --webappName webappName --apiFunctionName apiFunctionName --slot slotName"
exit 0
;;

Expand All @@ -32,11 +32,6 @@ while [[ $# -gt 0 ]]; do
shift 2
;;

--hostSuffix)
host_suffix="${2}"
shift 2
;;

--slotName)
slot_name="${2}"
shift 2
Expand All @@ -51,7 +46,6 @@ while [[ $# -gt 0 ]]; do
isLocalRun="true"
api_name=""
webapp_name=""
host_suffix=""
shift
;;
*)
Expand All @@ -62,8 +56,8 @@ done

webStatusCode=""
apiStatusCode=""
targetApiURL="https://${api_name}.azurewebsites${host_suffix}/api/healthcheck"
targetWebAppURL="https://${webapp_name}.azurewebsites${host_suffix}"
targetApiURL="https://${api_name}.azurewebsites.us/api/healthcheck"
targetWebAppURL="https://${webapp_name}.azurewebsites.us"

if [[ ${slot_name} == "staging" ]]; then
targetApiURL="${targetApiURL}?x-ms-routing-name=${slot_name}"
Expand Down

0 comments on commit eaac555

Please sign in to comment.