-
Notifications
You must be signed in to change notification settings - Fork 178
117 lines (114 loc) · 8.09 KB
/
acceptance-tests.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
name: 'Acceptance Tests'
run-name: 'Acceptance Tests ${{ inputs.atlas_cloud_env }} ${{ inputs.test_group }}'
# Used for running acceptance tests, either triggered manually or called by other workflows.
on:
workflow_dispatch:
inputs:
terraform_version:
description: 'Terraform version to use, e.g. 1.6.x, empty for latest'
type: string
required: false
provider_version:
description: 'Previous MongoDB Atlas Provider version to use in Migration tests, e.g. 1.14.0, empty for latest'
type: string
required: false
atlas_cloud_env:
description: 'Atlas cloud environment used, can be either `dev` or `qa`, empty for `dev`'
type: string
required: false
test_group:
description: 'Test group to run, e.g. advanced_cluster, empty for all'
type: string
required: false
test_name:
description: 'Name of the test to run, e.g. TestAccNetworkRSNetworkPeering_basicAzure, empty for all (requires Test group to be specified as well)'
type: string
required: false
ref:
description: 'The branch, tag or SHA where tests will run, e.g. v1.14.0, empty for default branch'
type: string
required: false
workflow_call: # workflow runs after Test Suite or code-health
inputs:
terraform_version:
description: 'Terraform version to use, e.g. 1.6.x, empty for latest'
type: string
required: false
provider_version:
description: 'Previous MongoDB Atlas Provider version to use in Migration tests, e.g. 1.14.0, empty for latest'
type: string
required: false
atlas_cloud_env:
description: 'Atlas cloud environment used, can be either `dev` or `qa`, empty for `dev`'
type: string
required: false
ref:
description: 'The branch, tag or SHA where tests will run, e.g. v1.14.0, empty for default branch'
type: string
required: false
jobs:
tests:
name: tests-${{ inputs.terraform_version || 'latest' }}-${{ inputs.provider_version || 'latest' }}-${{ inputs.atlas_cloud_env || 'dev' }}
uses: ./.github/workflows/acceptance-tests-runner.yml
secrets:
mongodb_atlas_public_key: ${{ inputs.atlas_cloud_env == 'qa' && secrets.MONGODB_ATLAS_PUBLIC_KEY_CLOUD_QA || secrets.MONGODB_ATLAS_PUBLIC_KEY_CLOUD_DEV }}
mongodb_atlas_private_key: ${{ inputs.atlas_cloud_env == 'qa' && secrets.MONGODB_ATLAS_PRIVATE_KEY_CLOUD_QA || secrets.MONGODB_ATLAS_PRIVATE_KEY_CLOUD_DEV }}
mongodb_atlas_gov_public_key: ${{ inputs.atlas_cloud_env == 'qa' && secrets.MONGODB_ATLAS_GOV_PUBLIC_KEY_QA || secrets.MONGODB_ATLAS_GOV_PUBLIC_KEY_DEV }}
mongodb_atlas_gov_private_key: ${{ inputs.atlas_cloud_env == 'qa' && secrets.MONGODB_ATLAS_GOV_PRIVATE_KEY_QA || secrets.MONGODB_ATLAS_GOV_PRIVATE_KEY_DEV }}
mongodb_atlas_rp_public_key: ${{ inputs.atlas_cloud_env == 'qa' && secrets.MONGODB_ATLAS_RP_PUBLIC_KEY_QA || secrets.MONGODB_ATLAS_RP_PUBLIC_KEY_DEV }}
mongodb_atlas_rp_private_key: ${{ inputs.atlas_cloud_env == 'qa' && secrets.MONGODB_ATLAS_RP_PRIVATE_KEY_QA || secrets.MONGODB_ATLAS_RP_PRIVATE_KEY_DEV }}
ca_cert: ${{ secrets.CA_CERT }}
aws_account_id: ${{ secrets.AWS_ACCOUNT_ID }}
aws_access_key_id: ${{ secrets.AWS_ACCESS_KEY_ID }}
aws_secret_access_key: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
aws_s3_bucket_federation: ${{ secrets.AWS_S3_BUCKET_FEDERATION }}
aws_s3_bucket_backup: ${{ secrets.AWS_S3_BUCKET_BACKUP }}
azure_service_url_backup: ${{ secrets.AZURE_SERVICE_URL_BACKUP }}
azure_blob_storage_container_backup: ${{ secrets.AZURE_BLOB_STORAGE_CONTAINER_BACKUP }}
mongodb_atlas_ldap_hostname: ${{ secrets.MONGODB_ATLAS_LDAP_HOSTNAME }}
mongodb_atlas_ldap_username: ${{ secrets.MONGODB_ATLAS_LDAP_USERNAME }}
mongodb_atlas_ldap_password: ${{ secrets.MONGODB_ATLAS_LDAP_PASSWORD }}
mongodb_atlas_ldap_port: ${{ secrets.MONGODB_ATLAS_LDAP_PORT }}
mongodb_atlas_ldap_ca_certificate: ${{ secrets.MONGODB_ATLAS_LDAP_CA_CERTIFICATE }}
mongodb_atlas_private_endpoint_id: ${{ secrets.MONGODB_ATLAS_PRIVATE_ENDPOINT_ID }}
mongodb_atlas_private_endpoint_dns_name: ${{ secrets.MONGODB_ATLAS_PRIVATE_ENDPOINT_DNS_NAME }}
azure_directory_id: ${{ secrets.AZURE_DIRECTORY_ID }}
azure_resource_group_name: ${{ secrets.AZURE_RESOURCE_GROUP_NAME }}
azure_subscription_id: ${{ secrets.AZURE_SUBSCRIPTION_ID }}
azure_vnet_name: ${{ secrets.AZURE_VNET_NAME }}
azure_vnet_name_updated: ${{ secrets.AZURE_VNET_NAME_UPDATED }}
azure_client_id: ${{ secrets.AZURE_CLIENT_ID }}
azure_key_vault_name: ${{ secrets.AZURE_KEY_VAULT_NAME }}
azure_key_identifier: ${{ secrets.AZURE_KEY_IDENTIFIER }}
azure_key_vault_name_updated: ${{ secrets.AZURE_KEY_VAULT_NAME_UPDATED }}
azure_key_identifier_updated: ${{ secrets.AZURE_KEY_IDENTIFIER_UPDATED }}
azure_app_secret: ${{ secrets.AZURE_APP_SECRET }}
with:
terraform_version: ${{ inputs.terraform_version || vars.TF_VERSION_LATEST }}
provider_version: ${{ inputs.provider_version }}
ref: ${{ inputs.ref }}
test_group: ${{ inputs.test_group }}
test_name: ${{ inputs.test_name }}
aws_region_federation: ${{ vars.AWS_REGION_FEDERATION }}
mongodb_atlas_org_id: ${{ inputs.atlas_cloud_env == 'qa' && vars.MONGODB_ATLAS_ORG_ID_CLOUD_QA || vars.MONGODB_ATLAS_ORG_ID_CLOUD_DEV }}
mongodb_atlas_base_url: ${{ inputs.atlas_cloud_env == 'qa' && vars.MONGODB_ATLAS_BASE_URL_QA || vars.MONGODB_ATLAS_BASE_URL }}
mongodb_atlas_project_owner_id: ${{ inputs.atlas_cloud_env == 'qa' && vars.MONGODB_ATLAS_PROJECT_OWNER_ID_QA || vars.MONGODB_ATLAS_PROJECT_OWNER_ID }}
mongodb_atlas_teams_ids: ${{ inputs.atlas_cloud_env == 'qa' && vars.MONGODB_ATLAS_TEAMS_IDS_QA || vars.MONGODB_ATLAS_TEAMS_IDS }}
azure_atlas_app_id: ${{ inputs.atlas_cloud_env == 'qa' && vars.AZURE_ATLAS_APP_ID_QA || vars.AZURE_ATLAS_APP_ID }}
azure_service_principal_id: ${{ inputs.atlas_cloud_env == 'qa' && vars.AZURE_SERVICE_PRINCIPAL_ID_APP_QA || vars.AZURE_SERVICE_PRINCIPAL_ID }}
azure_tenant_id: ${{ vars.AZURE_TENANT_ID }}
aws_secret_name: ${{ inputs.atlas_cloud_env == 'qa' && vars.AWS_SECRET_NAME_QA || vars.AWS_SECRET_NAME }}
mongodb_atlas_federation_settings_id: ${{ inputs.atlas_cloud_env == 'qa' && vars.MONGODB_ATLAS_FEDERATION_SETTINGS_ID_QA || vars.MONGODB_ATLAS_FEDERATION_SETTINGS_ID }}
mongodb_atlas_federated_okta_idp_id: ${{ inputs.atlas_cloud_env == 'qa' && vars.MONGODB_ATLAS_FEDERATED_OKTA_IDP_ID_QA || vars.MONGODB_ATLAS_FEDERATED_OKTA_IDP_ID }}
mongodb_atlas_federated_idp_id: ${{ inputs.atlas_cloud_env == 'qa' && vars.MONGODB_ATLAS_FEDERATED_IDP_ID_QA || vars.MONGODB_ATLAS_FEDERATED_IDP_ID }}
mongodb_atlas_federated_sso_url: ${{ vars.MONGODB_ATLAS_FEDERATED_SSO_URL }}
mongodb_atlas_federated_issuer_uri: ${{ vars.MONGODB_ATLAS_FEDERATED_ISSUER_URI }}
mongodb_atlas_federated_org_id: ${{ inputs.atlas_cloud_env == 'qa' && vars.MONGODB_ATLAS_FEDERATED_ORG_ID_QA || vars.MONGODB_ATLAS_FEDERATED_ORG_ID }}
mongodb_atlas_gov_base_url: ${{ inputs.atlas_cloud_env == 'qa' && vars.MONGODB_ATLAS_GOV_BASE_URL_QA || vars.MONGODB_ATLAS_GOV_BASE_URL_DEV }}
mongodb_atlas_gov_org_id: ${{ inputs.atlas_cloud_env == 'qa' && vars.MONGODB_ATLAS_GOV_ORG_ID_QA || vars.MONGODB_ATLAS_GOV_ORG_ID_DEV }}
mongodb_atlas_gov_project_owner_id: ${{ inputs.atlas_cloud_env == 'qa' && vars.MONGODB_ATLAS_GOV_PROJECT_OWNER_ID_QA || vars.MONGODB_ATLAS_GOV_PROJECT_OWNER_ID_DEV }}
mongodb_atlas_federated_settings_associated_domain: ${{ vars.MONGODB_ATLAS_FEDERATED_SETTINGS_ASSOCIATED_DOMAIN }}
mongodb_atlas_project_ear_pe_id: ${{ inputs.atlas_cloud_env == 'qa' && vars.MONGODB_ATLAS_PROJECT_EAR_PE_ID_QA || vars.MONGODB_ATLAS_PROJECT_EAR_PE_ID_DEV }}
mongodb_atlas_enable_preview: ${{ vars.MONGODB_ATLAS_ENABLE_PREVIEW }}
azure_private_endpoint_region: ${{ vars.AZURE_PRIVATE_ENDPOINT_REGION }}
mongodb_atlas_rp_org_id: ${{ inputs.atlas_cloud_env == 'qa' && vars.MONGODB_ATLAS_RP_ORG_ID_QA || vars.MONGODB_ATLAS_RP_ORG_ID_DEV }}