Skip to content

Commit b1517e2

Browse files
chore: Add env to publish workflow for federated resources
1 parent f7b0877 commit b1517e2

1 file changed

Lines changed: 4 additions & 3 deletions

File tree

.github/workflows/publish.yaml

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -27,9 +27,9 @@ jobs:
2727
MONGODB_ATLAS_BASE_URL: ${{ github.event.inputs.resourceName=='resource-policy' && 'https://cloud-qa.mongodb.com/' || 'https://cloud.mongodb.com/' }}
2828
MONGODB_ATLAS_OUTPUT: 'json'
2929
# some resources need specific Atlas credentials and orgs
30-
MONGODB_ATLAS_ORG_ID: ${{ github.event.inputs.resourceName=='organization' && secrets.ATLAS_ORG_ID || github.event.inputs.resourceName=='resource-policy' && vars.MONGODB_ATLAS_RP_ORG_ID_QA || github.event.inputs.resourceName=='federated-settings-org-role-mapping' && secrets.ATLAS_ORG_ID_FOR_FEDERATION || secrets.ATLAS_ORG_ID_PUBLISHING }}
31-
MONGODB_ATLAS_PUBLIC_KEY: ${{ github.event.inputs.resourceName=='organization' && secrets.ATLAS_PUBLIC_KEY || github.event.inputs.resourceName=='resource-policy' && secrets.MONGODB_ATLAS_RP_PUBLIC_KEY_QA || github.event.inputs.resourceName=='federated-settings-org-role-mapping' && secrets.ATLAS_PUBLIC_KEY_FOR_FEDERATION || secrets.ATLAS_PUBLIC_KEY_PUBLISHING }}
32-
MONGODB_ATLAS_PRIVATE_KEY: ${{ github.event.inputs.resourceName=='organization' && secrets.ATLAS_PRIVATE_KEY || github.event.inputs.resourceName=='resource-policy' && secrets.MONGODB_ATLAS_RP_PRIVATE_KEY_QA || github.event.inputs.resourceName=='federated-settings-org-role-mapping' && secrets.ATLAS_PRIVATE_KEY_FOR_FEDERATION || secrets.ATLAS_PRIVATE_KEY_PUBLISHING }}
30+
MONGODB_ATLAS_ORG_ID: ${{ github.event.inputs.resourceName=='organization' && secrets.ATLAS_ORG_ID || github.event.inputs.resourceName=='resource-policy' && vars.MONGODB_ATLAS_RP_ORG_ID_QA || (github.event.inputs.resourceName=='federated-settings-org-role-mapping' || github.event.inputs.resourceName=='federated-settings-identity-provider') && secrets.ATLAS_ORG_ID_FOR_FEDERATION || secrets.ATLAS_ORG_ID_PUBLISHING }}
31+
MONGODB_ATLAS_PUBLIC_KEY: ${{ github.event.inputs.resourceName=='organization' && secrets.ATLAS_PUBLIC_KEY || github.event.inputs.resourceName=='resource-policy' && secrets.MONGODB_ATLAS_RP_PUBLIC_KEY_QA || (github.event.inputs.resourceName=='federated-settings-org-role-mapping' || github.event.inputs.resourceName=='federated-settings-identity-provider') && secrets.ATLAS_PUBLIC_KEY_FOR_FEDERATION || secrets.ATLAS_PUBLIC_KEY_PUBLISHING }}
32+
MONGODB_ATLAS_PRIVATE_KEY: ${{ github.event.inputs.resourceName=='organization' && secrets.ATLAS_PRIVATE_KEY || github.event.inputs.resourceName=='resource-policy' && secrets.MONGODB_ATLAS_RP_PRIVATE_KEY_QA || (github.event.inputs.resourceName=='federated-settings-org-role-mapping' || github.event.inputs.resourceName=='federated-settings-identity-provider') && secrets.ATLAS_PRIVATE_KEY_FOR_FEDERATION || secrets.ATLAS_PRIVATE_KEY_PUBLISHING }}
3333
MONGODB_ATLAS_PROFILE: ${{ github.event.inputs.resourceName=='organization' && 'cfn-publish-organization-profile' || github.event.inputs.resourceName=='resource-policy' && 'qa-resource-policy-cloud-profile' || 'default' }}
3434
strategy:
3535
fail-fast: false
@@ -79,6 +79,7 @@ jobs:
7979
AWS_ACCOUNT_ID: ${{ secrets.AWS_ACCOUNT_ID_PUBLISHING}}
8080
MONGODB_ATLAS_ORG_OWNER_ID: ${{ github.event.inputs.resourceName=='organization' && secrets.ATLAS_ORG_OWNER_ID || secrets.ATLAS_ORG_OWNER_ID_PUBLISHING }}
8181
ATLAS_FEDERATED_SETTINGS_ID: ${{ secrets.ATLAS_FEDERATED_SETTINGS_ID_PUBLISHING }}
82+
MONGODB_ATLAS_FEDERATION_SETTINGS_ID: ${{ secrets.ATLAS_FEDERATED_SETTINGS_ID_PUBLISHING }}
8283
MONGODB_ATLAS_PROFILE: ${{ env.MONGODB_ATLAS_PROFILE }}
8384

8485
# LDAP config

0 commit comments

Comments
 (0)