Skip to content

Commit

Permalink
ci: remove restriction on triggers that prevented prod db update (#705)
Browse files Browse the repository at this point in the history
  • Loading branch information
jcpitre authored Oct 22, 2024
1 parent 8ffdbea commit 601b42f
Showing 1 changed file with 1 addition and 39 deletions.
40 changes: 1 addition & 39 deletions .github/workflows/db-update-prod.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,37 +6,8 @@ on:
repository_dispatch: # Update on mobility-database-catalog repo dispatch
types: [ catalog-sources-updated ]
jobs:
update-qa: # Update the QA database first
uses: ./.github/workflows/db-update.yml
with:
PROJECT_ID: ${{ vars.QA_MOBILITY_FEEDS_PROJECT_ID }}
REGION: ${{ vars.MOBILITY_FEEDS_REGION }}
DB_NAME: ${{ vars.QA_POSTGRE_SQL_DB_NAME }}
ENVIRONMENT: ${{ vars.QA_MOBILITY_FEEDS_ENVIRONMENT }}
DB_ENVIRONMENT: ${{ vars.QA_MOBILITY_FEEDS_ENVIRONMENT }}
secrets:
DB_USER_PASSWORD: ${{ secrets.QA_POSTGRE_USER_PASSWORD }}
DB_USER_NAME: ${{ secrets.QA_POSTGRE_USER_NAME }}
DB_INSTANCE_NAME: ${{ secrets.DB_INSTANCE_NAME }}
GCP_MOBILITY_FEEDS_SA_KEY: ${{ secrets.QA_GCP_MOBILITY_FEEDS_SA_KEY }}
DB_GCP_MOBILITY_FEEDS_SA_KEY: ${{ secrets.QA_GCP_MOBILITY_FEEDS_SA_KEY }}
OP_SERVICE_ACCOUNT_TOKEN: ${{ secrets.OP_SERVICE_ACCOUNT_TOKEN }}
OP_FEEDS_SERVICE_ACCOUNT_TOKEN: ${{ secrets.OP_FEEDS_SERVICE_ACCOUNT_TOKEN }}
POSTGRE_SQL_INSTANCE_NAME: ${{ secrets.DB_INSTANCE_NAME }}
integration-tests-qa: # Run integration tests on QA
if: github.event_name == 'repository_dispatch'
uses: ./.github/workflows/integration-tests.yml
needs:
- update-qa
with:
API_URL: 'https://api-qa.mobilitydatabase.org'
ENVIRONMENT: 'qa'
secrets:
REFRESH_TOKEN: ${{ secrets.QA_API_TEST_REFRESH_TOKEN }}
update:
uses: ./.github/workflows/db-update.yml
needs:
- integration-tests-qa
with:
PROJECT_ID: ${{ vars.PROD_MOBILITY_FEEDS_PROJECT_ID }}
REGION: ${{ vars.MOBILITY_FEEDS_REGION }}
Expand All @@ -51,13 +22,4 @@ jobs:
DB_GCP_MOBILITY_FEEDS_SA_KEY: ${{ secrets.PROD_GCP_MOBILITY_FEEDS_SA_KEY }}
OP_SERVICE_ACCOUNT_TOKEN: ${{ secrets.OP_SERVICE_ACCOUNT_TOKEN }}
OP_FEEDS_SERVICE_ACCOUNT_TOKEN: ${{ secrets.OP_FEEDS_SERVICE_ACCOUNT_TOKEN }}
POSTGRE_SQL_INSTANCE_NAME: ${{ secrets.DB_INSTANCE_NAME }}
integration-tests-prod:
if: github.event_name == 'repository_dispatch'
uses: ./.github/workflows/integration-tests.yml
needs: update
with:
API_URL: "https://api.mobilitydatabase.org"
ENVIRONMENT: 'prod'
secrets:
REFRESH_TOKEN: ${{ secrets.PROD_API_TEST_REFRESH_TOKEN }}
POSTGRE_SQL_INSTANCE_NAME: ${{ secrets.DB_INSTANCE_NAME }}

0 comments on commit 601b42f

Please sign in to comment.