Skip to content

Commit 767c164

Browse files
committed
Remove prod from the cicd-main
Instead we will deploy using the tag using cicd-3
1 parent 9c8caf5 commit 767c164

8 files changed

Lines changed: 16 additions & 64 deletions

File tree

.github/workflows/cicd-2-main-branch.yaml

Lines changed: 0 additions & 47 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,6 @@ on:
1515
- dev
1616
- preprod
1717
- review
18-
- prod
1918

2019
concurrency: cicd-${{ github.ref }}
2120

@@ -77,7 +76,6 @@ jobs:
7776
deploy_dev: ${{ steps.envs.outputs.deploy_dev }}
7877
deploy_preprod: ${{ steps.envs.outputs.deploy_preprod }}
7978
deploy_review: ${{ steps.envs.outputs.deploy_review }}
80-
deploy_prod: ${{ steps.envs.outputs.deploy_prod }}
8179
env:
8280
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
8381
steps:
@@ -90,32 +88,22 @@ jobs:
9088
echo "deploy_dev=true" >> "$GITHUB_OUTPUT"
9189
echo "deploy_preprod=false" >> "$GITHUB_OUTPUT"
9290
echo "deploy_review=false" >> "$GITHUB_OUTPUT"
93-
echo "deploy_prod=false" >> "$GITHUB_OUTPUT"
9491
;;
9592
preprod)
9693
echo "deploy_dev=false" >> "$GITHUB_OUTPUT"
9794
echo "deploy_preprod=true" >> "$GITHUB_OUTPUT"
9895
echo "deploy_review=false" >> "$GITHUB_OUTPUT"
99-
echo "deploy_prod=false" >> "$GITHUB_OUTPUT"
10096
;;
10197
review)
10298
echo "deploy_dev=false" >> "$GITHUB_OUTPUT"
10399
echo "deploy_preprod=false" >> "$GITHUB_OUTPUT"
104100
echo "deploy_review=true" >> "$GITHUB_OUTPUT"
105-
echo "deploy_prod=false" >> "$GITHUB_OUTPUT"
106-
;;
107-
prod)
108-
echo "deploy_dev=false" >> "$GITHUB_OUTPUT"
109-
echo "deploy_preprod=false" >> "$GITHUB_OUTPUT"
110-
echo "deploy_review=false" >> "$GITHUB_OUTPUT"
111-
echo "deploy_prod=true" >> "$GITHUB_OUTPUT"
112101
;;
113102
*)
114103
# push-to-main (empty input): deploy to both dev and preprod
115104
echo "deploy_dev=true" >> "$GITHUB_OUTPUT"
116105
echo "deploy_preprod=true" >> "$GITHUB_OUTPUT"
117106
echo "deploy_review=false" >> "$GITHUB_OUTPUT"
118-
echo "deploy_prod=false" >> "$GITHUB_OUTPUT"
119107
;;
120108
esac
121109
@@ -198,41 +186,6 @@ jobs:
198186
branch_name: ${{ github.ref_name }}
199187
secrets: inherit
200188

201-
# ---- prod --------------------------------------------------------------
202-
deploy-infra-prod:
203-
name: Deploy infra (prod)
204-
needs: [resolve, deploy-app-dev]
205-
if: |
206-
always() &&
207-
needs.resolve.outputs.deploy_prod == 'true' &&
208-
(needs.deploy-app-dev.result == 'success' || needs.deploy-app-dev.result == 'skipped')
209-
permissions:
210-
id-token: write
211-
uses: ./.github/workflows/stage-4-deploy.yaml
212-
with:
213-
environments: '["prod"]'
214-
commit_sha: ${{ github.sha }}
215-
branch_name: ${{ github.ref_name }}
216-
secrets: inherit
217-
218-
deploy-app-prod:
219-
name: Deploy app (prod)
220-
needs: [resolve, deploy-infra-prod]
221-
if: |
222-
always() &&
223-
needs.resolve.outputs.deploy_prod == 'true' &&
224-
needs.deploy-infra-prod.result == 'success'
225-
permissions:
226-
id-token: write
227-
uses: ./.github/workflows/stage-4-deploy-app.yaml
228-
with:
229-
environments: '["prod"]'
230-
release_tag: ${{ needs.resolve.outputs.release_tag }}
231-
commit_sha: ${{ github.sha }}
232-
branch_name: ${{ github.ref_name }}
233-
secrets: inherit
234-
235-
236189
# ---- review (manual only) -------------------------------------------------
237190

238191
deploy-infra-review:
Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
1-
enable_gateway_test_vm = true
2-
screening_entra_group_id="f20d9f9a-b1ac-4875-a5e1-f9dfc0307c34"
1+
enable_gateway_test_vm = true
2+
screening_entra_group_id = "f20d9f9a-b1ac-4875-a5e1-f9dfc0307c34"
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
11
# All values use defaults: enable_gateway_test_vm = false, enable_arc_servers = true
2-
screening_entra_group_id="ab8fd001-2722-4118-9659-3d4425db7894"
2+
screening_entra_group_id = "ab8fd001-2722-4118-9659-3d4425db7894"
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
11
# All values use defaults: enable_gateway_test_vm = false, enable_arc_servers = true
2-
SCREENING_ENTRA_GROUP_ID="3b2b22b0-ac8e-4904-a94b-9010ff08698a"
2+
SCREENING_ENTRA_GROUP_ID = "3b2b22b0-ac8e-4904-a94b-9010ff08698a"
Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
1-
enable_gateway_test_vm = true
2-
screening_entra_group_id="14f915c3-ef0a-471b-b9bf-31187d18f8b6"
1+
enable_gateway_test_vm = true
2+
screening_entra_group_id = "14f915c3-ef0a-471b-b9bf-31187d18f8b6"

infrastructure/modules/arc-infra/arc.tf

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ data "azuread_service_principal" "arc_onboarding" {
1212
display_name = "spn-azure-arc-onboarding-screening-${var.env_config}"
1313
}
1414

15-
# Awaiting approval from Administrator team,
15+
# Awaiting approval from Administrator team, a bit of push back with regards to giving Group.Read.All permission to the service principal, so for now we will use the group ID from the environment variable instead of looking it up by name.
1616
# Look up the Entra ID group that manages this environment
1717
# data "azuread_group" "screening" {
1818
# count = var.enable_arc_servers ? 1 : 0
@@ -38,9 +38,8 @@ module "arc_wac_admin_login_role" {
3838

3939
scope = data.azurerm_resource_group.arc_enabled_servers[0].id
4040
role_definition_name = "Windows Admin Center Administrator Login"
41-
# Waiting for approval to be provided by the Administrator team,
42-
# This is a temporary fix till approval has been provided.
41+
# Awaiting approval from Administrator team, a bit of push back with regards to giving Group.Read.All permission to the service principal, so for now we will use the group ID from the environment variable instead of looking it up by name.
4342
# principal_id = data.azuread_group.screening[0].object_id
44-
principal_id = var.screening_entra_group_id
43+
principal_id = var.screening_entra_group_id
4544

4645
}

infrastructure/modules/gateway-test-vm/vm.tf

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -39,8 +39,8 @@ module "gateway_test_vm" {
3939

4040
account_credentials = {
4141
admin_credentials = {
42-
username = "arcadmin"
43-
password = data.azurerm_key_vault_secret.vm_admin_password.value
42+
username = "arcadmin"
43+
password = data.azurerm_key_vault_secret.vm_admin_password.value
4444
generate_admin_password_or_ssh_key = false
4545
}
4646
}

infrastructure/terraform/main.tf

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -6,11 +6,11 @@ module "arc_infra" {
66
azuread = azuread
77
}
88

9-
region = local.region
10-
app_short_name = var.app_short_name
11-
env_config = var.env_config
12-
resource_group_name = local.resource_group_name
13-
enable_arc_servers = var.enable_arc_servers
9+
region = local.region
10+
app_short_name = var.app_short_name
11+
env_config = var.env_config
12+
resource_group_name = local.resource_group_name
13+
enable_arc_servers = var.enable_arc_servers
1414
screening_entra_group_id = var.screening_entra_group_id
1515

1616
# Create the HC for the test VM in the same run as VM creation.

0 commit comments

Comments
 (0)