Skip to content

Commit

Permalink
chore: undo unsuccessfull CI changes
Browse files Browse the repository at this point in the history
- undid changes to bicep and workflow files that were made in an attempt to fix the custom domain automation issue
  • Loading branch information
Jone-Torgersen committed Feb 5, 2025
1 parent d0e22a3 commit 6d03f94
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 37 deletions.
19 changes: 1 addition & 18 deletions .github/workflows/build-and-deploy-frontend-to-prod.yml
Original file line number Diff line number Diff line change
Expand Up @@ -64,22 +64,6 @@ jobs:
docker push ${{ env.LOGIN_SERVER }}/frontend-image:${{ github.sha }}
echo "IMAGE_TAG=${{ github.sha }}" >> $GITHUB_ENV
- name: Retrieve Custom Domain Certificate ID
id: get_certificate_id
run: |
certificateId=$(az containerapp certificate show \
--name bds-prod-containerapp-frontend \
--resource-group ${{ secrets.AZURE_RG_PROD }} \
--query "id" -o tsv)
if [ -z "$certificateId" ]; then
echo "Certificate ID not found. Failing the pipeline."
exit 1
fi
echo "CERTIFICATE_ID=${certificateId}" >> $GITHUB_ENV
echo "Retrieved Certificate ID: $certificateId"
- name: Deploy to Container Apps
uses: azure/arm-deploy@v1
with:
Expand All @@ -92,9 +76,8 @@ jobs:
acrUsername=${{ env.LOGIN_NAME }}
acrPassword=${{ env.PASSWORD }}
containerImage=${{ env.LOGIN_SERVER }}/frontend-image:${{ github.sha }}
certificateId=${{ env.CERTIFICATE_ID }}
- name: Get Container App URL
run: |
fqdn=$(az containerapp show -n bds-prod-containerapp-frontend -g ${{ secrets.AZURE_RG_PROD }} --query properties.configuration.ingress.fqdn -o tsv)
echo "Container App is deployed at: https://$fqdn"
echo "Container App is deployed at: https://$fqdn"
4 changes: 0 additions & 4 deletions infra/container-frontend-prod.bicep
Original file line number Diff line number Diff line change
Expand Up @@ -23,9 +23,6 @@ param acrPassword string
@description('The name of the container image.')
param containerImage string

@description('The certificate ID for the custom domain')
param certificateId string

module containerEnv 'modules/containerEnv.bicep' = {
name: containerName
params: {
Expand All @@ -46,7 +43,6 @@ module containerApp 'modules/containerAppFrontend.bicep' = {
acrPassword: acrPassword
containerImage: containerImage
targetPort: 3000
certificateId: certificateId // Pass certificateId to module
}
}

Expand Down
17 changes: 2 additions & 15 deletions infra/modules/containerAppFrontend.bicep
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
@description('The location to deploy resource')
param location string

@description('The name of the Container App')
@description('The name of the Container App Environment')
param containerAppName string

@description('The ID of the Container App Environment')
Expand All @@ -23,13 +23,6 @@ param containerImage string
@description('The target port for the container app.')
param targetPort int

@description('The certificate ID for the custom domain')
param certificateId string

resource containerAppEnvironment 'Microsoft.App/managedEnvironments@2023-08-01-preview' existing = {
id: containerAppEnvironmentId
}

resource containerApp 'Microsoft.App/containerApps@2023-08-01-preview' = {
name: containerAppName
location: location
Expand All @@ -41,12 +34,6 @@ resource containerApp 'Microsoft.App/containerApps@2023-08-01-preview' = {
external: true
targetPort: targetPort
allowInsecure: false
customDomains: [
{
name: 'survey.bouvetapps.io'
certificateId: certificateId
}
]
}
secrets: [
{
Expand Down Expand Up @@ -81,4 +68,4 @@ resource containerApp 'Microsoft.App/containerApps@2023-08-01-preview' = {
}
}

output fqdn string = containerApp.properties.configuration.ingress.fqdn
output fqdn string = containerApp.properties.configuration.ingress.fqdn

0 comments on commit 6d03f94

Please sign in to comment.