Skip to content

Commit c6ebc8b

Browse files
fix: prod vars, debug lines to test
1 parent 943806f commit c6ebc8b

File tree

2 files changed

+29
-21
lines changed

2 files changed

+29
-21
lines changed

build/azDevOps/azure/azure-pipelines-javaspring-k8s.yml

Lines changed: 28 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -270,7 +270,6 @@ stages:
270270
pullrequest_number: "$(pullrequest_number)"
271271
# Sonar
272272
sonar_enable: true
273-
# Set to false to speed up validation of deploy stage, revert once done
274273
sonar_container: "sonar_scanner"
275274
sonar_host_url: "https://sonarcloud.io"
276275
sonar_project_name: "$(SONAR_PROJECT_NAME)"
@@ -330,7 +329,8 @@ stages:
330329

331330
- stage: Dev
332331
dependsOn: Build
333-
condition: and(succeeded(), ne(variables['Build.SourceBranch'], 'refs/heads/master'))
332+
# TODO: Change back to ne master
333+
condition: and(succeeded(), eq(variables['Build.SourceBranch'], 'refs/heads/master'))
334334
variables:
335335
- group: azure-sp-creds
336336
- group: stacks-acr-creds
@@ -561,7 +561,8 @@ stages:
561561

562562
- stage: Prod
563563
dependsOn: Build
564-
condition: and(succeeded(), eq(variables['Build.SourceBranch'], 'refs/heads/master'))
564+
# TODO: Change back to eq master
565+
condition: and(succeeded(), ne(variables['Build.SourceBranch'], 'refs/heads/master'))
565566
variables:
566567
- group: azure-sp-creds
567568
- group: stacks-acr-creds
@@ -613,6 +614,8 @@ stages:
613614
runOnce:
614615
deploy:
615616
steps:
617+
- download: none
618+
616619
- checkout: self
617620

618621
- checkout: templates
@@ -622,19 +625,19 @@ stages:
622625
pipeline_scripts_directory: "${{ variables.self_pipeline_scripts_dir }}"
623626
docker_terraform_container: "terraform_custom"
624627
# Azure Credenitals (For Deploying)
625-
azure_client_id: "$(prod-azure-client-id)"
626-
azure_client_secret: "$(prod-azure-client-secret)"
627-
azure_tenant_id: "$(prod-azure-tenant-id)"
628-
azure_subscription_id: "$(prod-azure-subscription-id)"
628+
azure_client_id: "$(ARM_CLIENT_ID)"
629+
azure_client_secret: "$(ARM_CLIENT_SECRET)"
630+
azure_tenant_id: "$(ARM_TENANT_ID)"
631+
azure_subscription_id: "$(ARM_SUBSCRIPTION_ID)"
629632
# Terraform
630633
terraform_directory: '$(self_repo_tf_dir)'
631634
# Backend Azure State Storage Credentials
632635
# Change these if your state storage is in a different
633636
# location to your deployment
634-
terraform_backend_azure_client_id: "$(prod-azure-client-id)"
635-
terraform_backend_azure_client_secret: "$(prod-azure-client-secret)"
636-
terraform_backend_azure_tenant_id: "$(prod-azure-tenant-id)"
637-
terraform_backend_azure_subscription_id: "$(prod-azure-subscription-id)"
637+
terraform_backend_azure_client_id: "$(ARM_CLIENT_ID)"
638+
terraform_backend_azure_client_secret: "$(ARM_CLIENT_SECRET)"
639+
terraform_backend_azure_tenant_id: "$(ARM_TENANT_ID)"
640+
terraform_backend_azure_subscription_id: "$(ARM_SUBSCRIPTION_ID)"
638641
terraform_state_rg: ${{ variables.tf_state_rg }}
639642
terraform_state_storage: ${{ variables.tf_state_storage }}
640643
terraform_state_container: ${{ variables.tf_state_container }}
@@ -688,6 +691,8 @@ stages:
688691
runOnce:
689692
deploy:
690693
steps:
694+
- download: none
695+
691696
- checkout: self
692697

693698
- checkout: templates
@@ -703,10 +708,10 @@ stages:
703708
-e "$(ARM_CLIENT_SECRET)"
704709
-f "$(ARM_TENANT_ID)"
705710
-g "$(k8s_docker_registry_prod)"
706-
-h "$(prod-azure-subscription-id)"
707-
-i "$(prod-azure-client-id)"
708-
-j "$(prod-azure-client-secret)"
709-
-k "$(prod-azure-tenant-id)"
711+
-h "$(ARM_SUBSCRIPTION_ID)"
712+
-i "$(ARM_CLIENT_ID)"
713+
-j "$(ARM_CLIENT_SECRET)"
714+
-k "$(ARM_TENANT_ID)"
710715
-Z "false"
711716
displayName: Promote Docker Image to Production ACR
712717

@@ -747,6 +752,8 @@ stages:
747752
runOnce:
748753
deploy:
749754
steps:
755+
- download: none
756+
750757
- checkout: self
751758

752759
- checkout: templates
@@ -787,10 +794,10 @@ stages:
787794
additional_args: "-no-empty",
788795
},
789796
]
790-
azure_client_id: "$(prod-azure-client-id)"
791-
azure_client_secret: "$(prod-azure-client-secret)"
792-
azure_tenant_id: "$(prod-azure-tenant-id)"
793-
azure_subscription_id: "$(prod-azure-subscription-id)"
797+
azure_client_id: "$(ARM_CLIENT_ID)"
798+
azure_client_secret: "$(ARM_CLIENT_SECRET)"
799+
azure_tenant_id: "$(ARM_TENANT_ID)"
800+
azure_subscription_id: "$(ARM_SUBSCRIPTION_ID)"
794801
aks_cluster_resourcegroup: "${{ variables.aks_cluster_resourcegroup }}"
795802
aks_cluster_name: "${{ variables.aks_cluster_name }}"
796803
# Used to do a `kubectl rollout status`
@@ -828,7 +835,8 @@ stages:
828835
dependsOn:
829836
- Build
830837
- Prod
831-
condition: and(succeeded(), eq(variables['Build.SourceBranch'], 'refs/heads/master'), eq(variables['create_release'], 'true'))
838+
# TODO: Change back to eq master
839+
condition: and(succeeded(), ne(variables['Build.SourceBranch'], 'refs/heads/master'), eq(variables['create_release'], 'true'))
832840
variables:
833841
- group: stacks-infra-credentials-nonprod
834842
jobs:

build/azDevOps/azure/azuredevops-vars.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@ variables:
6262
- name: docker_container_registry_name_nonprod
6363
value: ensonostackseuweirdfmu
6464
- name: docker_container_registry_name_prod
65-
value: amidostacksprodeuwcore
65+
value: ensonostackseuweirdfmu
6666

6767
# Domain names
6868
- name: base_domain_nonprod

0 commit comments

Comments
 (0)