Skip to content

Commit

Permalink
Merge pull request #2209 from sunu/disable-staging-deployments
Browse files Browse the repository at this point in the history
Disable deployments to staging environment
  • Loading branch information
batpad authored Jul 10, 2024
2 parents 492feeb + 34d08d7 commit b46e3cd
Showing 1 changed file with 80 additions and 80 deletions.
160 changes: 80 additions & 80 deletions azure-pipelines.yml
Original file line number Diff line number Diff line change
Expand Up @@ -42,86 +42,86 @@ jobs:
- bash: $(Pipeline.Workspace)/go-api/deploy/scripts/cipublish
displayName: "Build and Push"

- bash: $(Pipeline.Workspace)/go-api/deploy/scripts/cideploy --staging
condition: eq(variables['Build.SourceBranch'], 'refs/heads/develop')
displayName: "Deploy Staging"
env:
environment: staging
TF_VAR_username: github
TF_VAR_subscriptionId: $(TERRAFORM_SUBSCRIPTION_ID)
tenantId: $(TERRAFORM_TENANT_ID)
servicePrincipalId: $(TERRAFORM_SERVICE_PRINCIPAL_ID)
servicePrincipalKey: $(TERRAFORM_SERVICE_PRINCIPAL_KEY)
storageAccessKey: $(TERRAFORM_STORAGE_KEY)
subscriptionId: $(TERRAFORM_SUBSCRIPTION_ID)
API_FQDN: $(STAGING_ADMIN_URL)
API_ADDITIONAL_FQDN: ''
DJANGO_SECRET_KEY: $(STAGING_DJANGO_SECRET_KEY)
DJANGO_DB_NAME: $(STAGING_DJANGO_DB_NAME)
DJANGO_DB_USER: $(STAGING_DJANGO_DB_USER)
DJANGO_DB_PASS: $(STAGING_DJANGO_DB_PASS)
DJANGO_DB_HOST: $(STAGING_DJANGO_DB_HOST)
DJANGO_DB_PORT: $(STAGING_DJANGO_DB_PORT)
AZURE_STORAGE_KEY: $(STAGING_AZURE_STORAGE_KEY)
AZURE_STORAGE_ACCOUNT: $(STAGING_AZURE_STORAGE_ACCOUNT)
EMAIL_API_ENDPOINT: $(STAGING_EMAIL_API_ENDPOINT)
EMAIL_HOST: $(STAGING_EMAIL_HOST)
EMAIL_PORT: $(STAGING_EMAIL_PORT)
EMAIL_USER: $(STAGING_EMAIL_USER)
EMAIL_PASS: $(STAGING_EMAIL_PASS)
TEST_EMAILS: $(STAGING_TEST_EMAILS)
AWS_TRANSLATE_ACCESS_KEY: $(STAGING_AWS_TRANSLATE_ACCESS_KEY)
AWS_TRANSLATE_SECRET_KEY: $(STAGING_AWS_TRANSLATE_SECRET_KEY)
AWS_TRANSLATE_REGION: $(STAGING_AWS_TRANSLATE_REGION)
CELERY_REDIS_URL: $(STAGING_CELERY_REDIS_URL)
CACHE_MIDDLEWARE_SECONDS: $(STAGING_CACHE_MIDDLEWARE_SECONDS)
MOLNIX_API_BASE: $(STAGING_MOLNIX_API_BASE)
MOLNIX_USERNAME: $(STAGING_MOLNIX_USERNAME)
MOLNIX_PASSWORD: $(STAGING_MOLNIX_PASSWORD)
ERP_API_ENDPOINT: $(STAGING_ERP_API_ENDPOINT)
ERP_API_SUBSCRIPTION_KEY: $(STAGING_ERP_API_SUBSCRIPTION_KEY)
FDRS_APIKEY: $(STAGING_FDRS_APIKEY)
FDRS_CREDENTIAL: $(STAGING_FDRS_CREDENTIAL)
HPC_CREDENTIAL: $(STAGING_HPC_CREDENTIAL)
APPLICATION_INSIGHTS_INSTRUMENTATION_KEY: $(STAGING_APPLICATION_INSIGHTS_INSTRUMENTATION_KEY)
ELASTIC_SEARCH_HOST: $(STAGING_ELASTIC_SEARCH_HOST)
GO_FTPHOST: $(STAGING_GO_FTPHOST)
GO_FTPUSER: $(STAGING_GO_FTPUSER)
GO_FTPPASS: $(STAGING_GO_FTPPASS)
GO_DBPASS: $(STAGING_GO_DBPASS)
APPEALS_USER: $(STAGING_APPEALS_USER)
APPEALS_PASS: $(STAGING_APPEALS_PASS)
FRONTEND_URL: $(STAGING_FRONTEND_URL)
RESOURCES_DB_NAME: $(STAGING_RESOURCES_DB_NAME)
RESOURCES_DB_SERVER: $(STAGING_RESOURCES_DB_SERVER)
REGION: $(STAGING_REGION)
SENTRY_DSN: $(STAGING_SENTRY_DSN)
SENTRY_SAMPLE_RATE: $(STAGING_SENTRY_SAMPLE_RATE)
DJANGO_READ_ONLY: $(STAGING_DJANGO_READ_ONLY)
AUTO_TRANSLATION_TRANSLATOR: $(STAGING_AUTO_TRANSLATION_TRANSLATOR)
IFRC_TRANSLATION_DOMAIN: $(STAGING_IFRC_TRANSLATION_DOMAIN)
IFRC_TRANSLATION_GET_API_KEY: $(STAGING_IFRC_TRANSLATION_GET_API_KEY)
IFRC_TRANSLATION_HEADER_API_KEY: $(STAGING_IFRC_TRANSLATION_HEADER_API_KEY)
DEBUG_EMAIL: ''
DOCKER_HOST_IP: ''
DJANGO_DEBUG: ''
DJANGO_ADDITIONAL_ALLOWED_HOSTS: ''
# TLS cert and key should be base64 encoded
API_TLS_CRT: $(STAGING_API_TLS_CRT)
API_TLS_KEY: $(STAGING_API_TLS_KEY)
API_ADDITIONAL_DOMAIN_TLS_CRT: ''
API_ADDITIONAL_DOMAIN_TLS_KEY: ''
# Country page
NS_CONTACT_USERNAME: $(STAGING_NS_CONTACT_USERNAME)
NS_CONTACT_PASSWORD: $(STAGING_NS_CONTACT_PASSWORD)
ACAPS_API_TOKEN: $(STAGING_ACAPS_API_TOKEN)
NS_DOCUMENT_API_KEY: $(STAGING_NS_DOCUMENT_API_KEY)
NS_INITIATIVES_API_KEY: $(STAGING_NS_INITIATIVES_API_KEY)
NS_INITIATIVES_API_TOKEN: $(STAGING_NS_INITIATIVES_API_TOKEN)
# JWT
JWT_PRIVATE_KEY_BASE64_ENCODED: $(STAGING_JWT_PRIVATE_KEY_BASE64_ENCODED)
JWT_PUBLIC_KEY_BASE64_ENCODED: $(STAGING_JWT_PUBLIC_KEY_BASE64_ENCODED)
JWT_EXPIRE_TIMESTAMP_DAYS: $(STAGING_JWT_EXPIRE_TIMESTAMP_DAYS)
# - bash: $(Pipeline.Workspace)/go-api/deploy/scripts/cideploy --staging
# condition: eq(variables['Build.SourceBranch'], 'refs/heads/develop')
# displayName: "Deploy Staging"
# env:
# environment: staging
# TF_VAR_username: github
# TF_VAR_subscriptionId: $(TERRAFORM_SUBSCRIPTION_ID)
# tenantId: $(TERRAFORM_TENANT_ID)
# servicePrincipalId: $(TERRAFORM_SERVICE_PRINCIPAL_ID)
# servicePrincipalKey: $(TERRAFORM_SERVICE_PRINCIPAL_KEY)
# storageAccessKey: $(TERRAFORM_STORAGE_KEY)
# subscriptionId: $(TERRAFORM_SUBSCRIPTION_ID)
# API_FQDN: $(STAGING_ADMIN_URL)
# API_ADDITIONAL_FQDN: ''
# DJANGO_SECRET_KEY: $(STAGING_DJANGO_SECRET_KEY)
# DJANGO_DB_NAME: $(STAGING_DJANGO_DB_NAME)
# DJANGO_DB_USER: $(STAGING_DJANGO_DB_USER)
# DJANGO_DB_PASS: $(STAGING_DJANGO_DB_PASS)
# DJANGO_DB_HOST: $(STAGING_DJANGO_DB_HOST)
# DJANGO_DB_PORT: $(STAGING_DJANGO_DB_PORT)
# AZURE_STORAGE_KEY: $(STAGING_AZURE_STORAGE_KEY)
# AZURE_STORAGE_ACCOUNT: $(STAGING_AZURE_STORAGE_ACCOUNT)
# EMAIL_API_ENDPOINT: $(STAGING_EMAIL_API_ENDPOINT)
# EMAIL_HOST: $(STAGING_EMAIL_HOST)
# EMAIL_PORT: $(STAGING_EMAIL_PORT)
# EMAIL_USER: $(STAGING_EMAIL_USER)
# EMAIL_PASS: $(STAGING_EMAIL_PASS)
# TEST_EMAILS: $(STAGING_TEST_EMAILS)
# AWS_TRANSLATE_ACCESS_KEY: $(STAGING_AWS_TRANSLATE_ACCESS_KEY)
# AWS_TRANSLATE_SECRET_KEY: $(STAGING_AWS_TRANSLATE_SECRET_KEY)
# AWS_TRANSLATE_REGION: $(STAGING_AWS_TRANSLATE_REGION)
# CELERY_REDIS_URL: $(STAGING_CELERY_REDIS_URL)
# CACHE_MIDDLEWARE_SECONDS: $(STAGING_CACHE_MIDDLEWARE_SECONDS)
# MOLNIX_API_BASE: $(STAGING_MOLNIX_API_BASE)
# MOLNIX_USERNAME: $(STAGING_MOLNIX_USERNAME)
# MOLNIX_PASSWORD: $(STAGING_MOLNIX_PASSWORD)
# ERP_API_ENDPOINT: $(STAGING_ERP_API_ENDPOINT)
# ERP_API_SUBSCRIPTION_KEY: $(STAGING_ERP_API_SUBSCRIPTION_KEY)
# FDRS_APIKEY: $(STAGING_FDRS_APIKEY)
# FDRS_CREDENTIAL: $(STAGING_FDRS_CREDENTIAL)
# HPC_CREDENTIAL: $(STAGING_HPC_CREDENTIAL)
# APPLICATION_INSIGHTS_INSTRUMENTATION_KEY: $(STAGING_APPLICATION_INSIGHTS_INSTRUMENTATION_KEY)
# ELASTIC_SEARCH_HOST: $(STAGING_ELASTIC_SEARCH_HOST)
# GO_FTPHOST: $(STAGING_GO_FTPHOST)
# GO_FTPUSER: $(STAGING_GO_FTPUSER)
# GO_FTPPASS: $(STAGING_GO_FTPPASS)
# GO_DBPASS: $(STAGING_GO_DBPASS)
# APPEALS_USER: $(STAGING_APPEALS_USER)
# APPEALS_PASS: $(STAGING_APPEALS_PASS)
# FRONTEND_URL: $(STAGING_FRONTEND_URL)
# RESOURCES_DB_NAME: $(STAGING_RESOURCES_DB_NAME)
# RESOURCES_DB_SERVER: $(STAGING_RESOURCES_DB_SERVER)
# REGION: $(STAGING_REGION)
# SENTRY_DSN: $(STAGING_SENTRY_DSN)
# SENTRY_SAMPLE_RATE: $(STAGING_SENTRY_SAMPLE_RATE)
# DJANGO_READ_ONLY: $(STAGING_DJANGO_READ_ONLY)
# AUTO_TRANSLATION_TRANSLATOR: $(STAGING_AUTO_TRANSLATION_TRANSLATOR)
# IFRC_TRANSLATION_DOMAIN: $(STAGING_IFRC_TRANSLATION_DOMAIN)
# IFRC_TRANSLATION_GET_API_KEY: $(STAGING_IFRC_TRANSLATION_GET_API_KEY)
# IFRC_TRANSLATION_HEADER_API_KEY: $(STAGING_IFRC_TRANSLATION_HEADER_API_KEY)
# DEBUG_EMAIL: ''
# DOCKER_HOST_IP: ''
# DJANGO_DEBUG: ''
# DJANGO_ADDITIONAL_ALLOWED_HOSTS: ''
# # TLS cert and key should be base64 encoded
# API_TLS_CRT: $(STAGING_API_TLS_CRT)
# API_TLS_KEY: $(STAGING_API_TLS_KEY)
# API_ADDITIONAL_DOMAIN_TLS_CRT: ''
# API_ADDITIONAL_DOMAIN_TLS_KEY: ''
# # Country page
# NS_CONTACT_USERNAME: $(STAGING_NS_CONTACT_USERNAME)
# NS_CONTACT_PASSWORD: $(STAGING_NS_CONTACT_PASSWORD)
# ACAPS_API_TOKEN: $(STAGING_ACAPS_API_TOKEN)
# NS_DOCUMENT_API_KEY: $(STAGING_NS_DOCUMENT_API_KEY)
# NS_INITIATIVES_API_KEY: $(STAGING_NS_INITIATIVES_API_KEY)
# NS_INITIATIVES_API_TOKEN: $(STAGING_NS_INITIATIVES_API_TOKEN)
# # JWT
# JWT_PRIVATE_KEY_BASE64_ENCODED: $(STAGING_JWT_PRIVATE_KEY_BASE64_ENCODED)
# JWT_PUBLIC_KEY_BASE64_ENCODED: $(STAGING_JWT_PUBLIC_KEY_BASE64_ENCODED)
# JWT_EXPIRE_TIMESTAMP_DAYS: $(STAGING_JWT_EXPIRE_TIMESTAMP_DAYS)

- bash: $(Pipeline.Workspace)/go-api/deploy/scripts/cideploy --production
condition: eq(variables['Build.SourceBranch'], 'refs/heads/master')
Expand Down

0 comments on commit b46e3cd

Please sign in to comment.