Skip to content

Commit

Permalink
Merge c6ebc8b into 943806f
Browse files Browse the repository at this point in the history
  • Loading branch information
ElvenSpellmaker authored Jul 22, 2024
2 parents 943806f + c6ebc8b commit b50c2f7
Show file tree
Hide file tree
Showing 2 changed files with 29 additions and 21 deletions.
48 changes: 28 additions & 20 deletions build/azDevOps/azure/azure-pipelines-javaspring-k8s.yml
Original file line number Diff line number Diff line change
Expand Up @@ -270,7 +270,6 @@ stages:
pullrequest_number: "$(pullrequest_number)"
# Sonar
sonar_enable: true
# Set to false to speed up validation of deploy stage, revert once done
sonar_container: "sonar_scanner"
sonar_host_url: "https://sonarcloud.io"
sonar_project_name: "$(SONAR_PROJECT_NAME)"
Expand Down Expand Up @@ -330,7 +329,8 @@ stages:

- stage: Dev
dependsOn: Build
condition: and(succeeded(), ne(variables['Build.SourceBranch'], 'refs/heads/master'))
# TODO: Change back to ne master
condition: and(succeeded(), eq(variables['Build.SourceBranch'], 'refs/heads/master'))
variables:
- group: azure-sp-creds
- group: stacks-acr-creds
Expand Down Expand Up @@ -561,7 +561,8 @@ stages:

- stage: Prod
dependsOn: Build
condition: and(succeeded(), eq(variables['Build.SourceBranch'], 'refs/heads/master'))
# TODO: Change back to eq master
condition: and(succeeded(), ne(variables['Build.SourceBranch'], 'refs/heads/master'))
variables:
- group: azure-sp-creds
- group: stacks-acr-creds
Expand Down Expand Up @@ -613,6 +614,8 @@ stages:
runOnce:
deploy:
steps:
- download: none

- checkout: self

- checkout: templates
Expand All @@ -622,19 +625,19 @@ stages:
pipeline_scripts_directory: "${{ variables.self_pipeline_scripts_dir }}"
docker_terraform_container: "terraform_custom"
# Azure Credenitals (For Deploying)
azure_client_id: "$(prod-azure-client-id)"
azure_client_secret: "$(prod-azure-client-secret)"
azure_tenant_id: "$(prod-azure-tenant-id)"
azure_subscription_id: "$(prod-azure-subscription-id)"
azure_client_id: "$(ARM_CLIENT_ID)"
azure_client_secret: "$(ARM_CLIENT_SECRET)"
azure_tenant_id: "$(ARM_TENANT_ID)"
azure_subscription_id: "$(ARM_SUBSCRIPTION_ID)"
# Terraform
terraform_directory: '$(self_repo_tf_dir)'
# Backend Azure State Storage Credentials
# Change these if your state storage is in a different
# location to your deployment
terraform_backend_azure_client_id: "$(prod-azure-client-id)"
terraform_backend_azure_client_secret: "$(prod-azure-client-secret)"
terraform_backend_azure_tenant_id: "$(prod-azure-tenant-id)"
terraform_backend_azure_subscription_id: "$(prod-azure-subscription-id)"
terraform_backend_azure_client_id: "$(ARM_CLIENT_ID)"
terraform_backend_azure_client_secret: "$(ARM_CLIENT_SECRET)"
terraform_backend_azure_tenant_id: "$(ARM_TENANT_ID)"
terraform_backend_azure_subscription_id: "$(ARM_SUBSCRIPTION_ID)"
terraform_state_rg: ${{ variables.tf_state_rg }}
terraform_state_storage: ${{ variables.tf_state_storage }}
terraform_state_container: ${{ variables.tf_state_container }}
Expand Down Expand Up @@ -688,6 +691,8 @@ stages:
runOnce:
deploy:
steps:
- download: none

- checkout: self

- checkout: templates
Expand All @@ -703,10 +708,10 @@ stages:
-e "$(ARM_CLIENT_SECRET)"
-f "$(ARM_TENANT_ID)"
-g "$(k8s_docker_registry_prod)"
-h "$(prod-azure-subscription-id)"
-i "$(prod-azure-client-id)"
-j "$(prod-azure-client-secret)"
-k "$(prod-azure-tenant-id)"
-h "$(ARM_SUBSCRIPTION_ID)"
-i "$(ARM_CLIENT_ID)"
-j "$(ARM_CLIENT_SECRET)"
-k "$(ARM_TENANT_ID)"
-Z "false"
displayName: Promote Docker Image to Production ACR

Expand Down Expand Up @@ -747,6 +752,8 @@ stages:
runOnce:
deploy:
steps:
- download: none

- checkout: self

- checkout: templates
Expand Down Expand Up @@ -787,10 +794,10 @@ stages:
additional_args: "-no-empty",
},
]
azure_client_id: "$(prod-azure-client-id)"
azure_client_secret: "$(prod-azure-client-secret)"
azure_tenant_id: "$(prod-azure-tenant-id)"
azure_subscription_id: "$(prod-azure-subscription-id)"
azure_client_id: "$(ARM_CLIENT_ID)"
azure_client_secret: "$(ARM_CLIENT_SECRET)"
azure_tenant_id: "$(ARM_TENANT_ID)"
azure_subscription_id: "$(ARM_SUBSCRIPTION_ID)"
aks_cluster_resourcegroup: "${{ variables.aks_cluster_resourcegroup }}"
aks_cluster_name: "${{ variables.aks_cluster_name }}"
# Used to do a `kubectl rollout status`
Expand Down Expand Up @@ -828,7 +835,8 @@ stages:
dependsOn:
- Build
- Prod
condition: and(succeeded(), eq(variables['Build.SourceBranch'], 'refs/heads/master'), eq(variables['create_release'], 'true'))
# TODO: Change back to eq master
condition: and(succeeded(), ne(variables['Build.SourceBranch'], 'refs/heads/master'), eq(variables['create_release'], 'true'))
variables:
- group: stacks-infra-credentials-nonprod
jobs:
Expand Down
2 changes: 1 addition & 1 deletion build/azDevOps/azure/azuredevops-vars.yml
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ variables:
- name: docker_container_registry_name_nonprod
value: ensonostackseuweirdfmu
- name: docker_container_registry_name_prod
value: amidostacksprodeuwcore
value: ensonostackseuweirdfmu

# Domain names
- name: base_domain_nonprod
Expand Down

0 comments on commit b50c2f7

Please sign in to comment.