From 8ce3250b2fabd024ced8d8098408df00d53e8ae0 Mon Sep 17 00:00:00 2001 From: Jean-Louis Lamezec Date: Tue, 3 Dec 2024 16:42:27 +0100 Subject: [PATCH] HOTFIX on production --- ...n.yml => angers_models_run_production.yml} | 6 +-- ...run.yml => casa_models_run_production.yml} | 4 +- ..._run.yml => cdc_models_run_production.yml} | 6 +-- ..._run.yml => cea_models_run_production.yml} | 6 +-- ...run.yml => cese_models_run_production.yml} | 6 +-- ...yml => colombes_models_run_production.yml} | 4 +- ... => grand_nancy_models_run_production.yml} | 6 +-- ...run.yml => lyon_models_run_production.yml} | 6 +-- ...ml => marseille_models_run_production.yml} | 6 +-- ....yml => meyzieu_models_run_production.yml} | 6 +-- ... => montpellier_models_run_production.yml} | 4 +- .../real_deal_models_run_production.yml | 46 +++++++++++++++++++ ...n.yml => sytral_models_run_production.yml} | 6 +-- ...l => thionville_models_run_production.yml} | 6 +-- ...yml => toulouse_models_run_production.yml} | 6 +-- ...un.yml => tours_models_run_production.yml} | 6 +-- ...yml => valbonne_models_run_production.yml} | 6 +-- 17 files changed, 78 insertions(+), 58 deletions(-) rename .github/workflows/{angers_models_run.yml => angers_models_run_production.yml} (91%) rename .github/workflows/{casa_models_run.yml => casa_models_run_production.yml} (93%) rename .github/workflows/{cdc_models_run.yml => cdc_models_run_production.yml} (90%) rename .github/workflows/{cea_models_run.yml => cea_models_run_production.yml} (92%) rename .github/workflows/{cese_models_run.yml => cese_models_run_production.yml} (91%) rename .github/workflows/{colombes_models_run.yml => colombes_models_run_production.yml} (92%) rename .github/workflows/{grand_nancy_models_run.yml => grand_nancy_models_run_production.yml} (90%) rename .github/workflows/{lyon_models_run.yml => lyon_models_run_production.yml} (91%) rename .github/workflows/{marseille_models_run.yml => marseille_models_run_production.yml} (91%) rename .github/workflows/{meyzieu_models_run.yml => meyzieu_models_run_production.yml} (91%) rename .github/workflows/{montpellier_models_run.yml => montpellier_models_run_production.yml} (92%) create mode 100644 .github/workflows/real_deal_models_run_production.yml rename .github/workflows/{sytral_models_run.yml => sytral_models_run_production.yml} (91%) rename .github/workflows/{thionville_models_run.yml => thionville_models_run_production.yml} (91%) rename .github/workflows/{toulouse_models_run.yml => toulouse_models_run_production.yml} (91%) rename .github/workflows/{tours_models_run.yml => tours_models_run_production.yml} (91%) rename .github/workflows/{valbonne_models_run.yml => valbonne_models_run_production.yml} (91%) diff --git a/.github/workflows/angers_models_run.yml b/.github/workflows/angers_models_run_production.yml similarity index 91% rename from .github/workflows/angers_models_run.yml rename to .github/workflows/angers_models_run_production.yml index a649b5aa..7b6ca21f 100644 --- a/.github/workflows/angers_models_run.yml +++ b/.github/workflows/angers_models_run_production.yml @@ -1,9 +1,7 @@ -name: angers_models_run +name: angers_models_run_production on: workflow_dispatch: - schedule: - - cron: '0 5 * * *' env: DBNAME: ${{ secrets.ANGERS_DBNAME_PROD }} @@ -18,7 +16,7 @@ env: jobs: angers_models_run: - name: angers_models_run + name: angers_models_run_production runs-on: ubuntu-latest defaults: run: diff --git a/.github/workflows/casa_models_run.yml b/.github/workflows/casa_models_run_production.yml similarity index 93% rename from .github/workflows/casa_models_run.yml rename to .github/workflows/casa_models_run_production.yml index 77ba9b3d..b92c7678 100644 --- a/.github/workflows/casa_models_run.yml +++ b/.github/workflows/casa_models_run_production.yml @@ -1,4 +1,4 @@ -name: casa_models_run +name: casa_models_run_production on: workflow_dispatch: @@ -16,7 +16,7 @@ env: jobs: casa_models_run: - name: casa_models_run + name: casa_models_run_production runs-on: ubuntu-latest defaults: run: diff --git a/.github/workflows/cdc_models_run.yml b/.github/workflows/cdc_models_run_production.yml similarity index 90% rename from .github/workflows/cdc_models_run.yml rename to .github/workflows/cdc_models_run_production.yml index 76e6b9d2..89a1b2f8 100644 --- a/.github/workflows/cdc_models_run.yml +++ b/.github/workflows/cdc_models_run_production.yml @@ -1,9 +1,7 @@ -name: cour_des_comptes_models_run +name: cour_des_comptes_models_run_production on: workflow_dispatch: - schedule: - - cron: '0 8 * * *' env: DBNAME: ${{ secrets.COUR_DES_COMPTES_DBNAME_PROD }} @@ -18,7 +16,7 @@ env: jobs: cour_des_comptes_models_run: - name: cour_des_comptes_models_run + name: cour_des_comptes_models_run_production runs-on: ubuntu-latest defaults: run: diff --git a/.github/workflows/cea_models_run.yml b/.github/workflows/cea_models_run_production.yml similarity index 92% rename from .github/workflows/cea_models_run.yml rename to .github/workflows/cea_models_run_production.yml index 24518b72..3704fcc8 100644 --- a/.github/workflows/cea_models_run.yml +++ b/.github/workflows/cea_models_run_production.yml @@ -1,9 +1,7 @@ -name: cea_models_run +name: cea_models_run_production on: workflow_dispatch: - schedule: - - cron: '30 5 * * *' env: DBNAME: ${{ secrets.CEA_DBNAME_PROD }} @@ -18,7 +16,7 @@ env: jobs: cea_models_run: - name: cea_models_run + name: cea_models_run_production runs-on: ubuntu-latest defaults: run: diff --git a/.github/workflows/cese_models_run.yml b/.github/workflows/cese_models_run_production.yml similarity index 91% rename from .github/workflows/cese_models_run.yml rename to .github/workflows/cese_models_run_production.yml index 9ed00872..dbea5282 100644 --- a/.github/workflows/cese_models_run.yml +++ b/.github/workflows/cese_models_run_production.yml @@ -1,9 +1,7 @@ -name: cese_models_run +name: cese_models_run_production on: workflow_dispatch: - schedule: - - cron: '0 8 * * *' env: DBNAME: ${{ secrets.CESE_DBNAME_PROD }} @@ -18,7 +16,7 @@ env: jobs: cese_models_run: - name: cese_models_run + name: cese_models_run_production runs-on: ubuntu-latest defaults: run: diff --git a/.github/workflows/colombes_models_run.yml b/.github/workflows/colombes_models_run_production.yml similarity index 92% rename from .github/workflows/colombes_models_run.yml rename to .github/workflows/colombes_models_run_production.yml index 890241a6..028b265d 100644 --- a/.github/workflows/colombes_models_run.yml +++ b/.github/workflows/colombes_models_run_production.yml @@ -1,4 +1,4 @@ -name: colombes_models_run +name: colombes_models_run_production on: workflow_dispatch: @@ -16,7 +16,7 @@ env: jobs: colombes_models_run: - name: colombes_models_run + name: colombes_models_run_production runs-on: ubuntu-latest defaults: run: diff --git a/.github/workflows/grand_nancy_models_run.yml b/.github/workflows/grand_nancy_models_run_production.yml similarity index 90% rename from .github/workflows/grand_nancy_models_run.yml rename to .github/workflows/grand_nancy_models_run_production.yml index dbb0c0ad..d45b972a 100644 --- a/.github/workflows/grand_nancy_models_run.yml +++ b/.github/workflows/grand_nancy_models_run_production.yml @@ -1,9 +1,7 @@ -name: grand_nancy_models_run +name: grand_nancy_models_run_production on: workflow_dispatch: - schedule: - - cron: '30 6 * * *' env: DBNAME: ${{ secrets.GRAND_NANCY_DBNAME_PROD }} @@ -18,7 +16,7 @@ env: jobs: grand_nancy_models_run: - name: grand_nancy_models_run + name: grand_nancy_models_run_production runs-on: ubuntu-latest defaults: run: diff --git a/.github/workflows/lyon_models_run.yml b/.github/workflows/lyon_models_run_production.yml similarity index 91% rename from .github/workflows/lyon_models_run.yml rename to .github/workflows/lyon_models_run_production.yml index a0ac94d6..51d581a9 100644 --- a/.github/workflows/lyon_models_run.yml +++ b/.github/workflows/lyon_models_run_production.yml @@ -1,9 +1,7 @@ -name: lyon_models_run +name: lyon_models_run_production on: workflow_dispatch: - schedule: - - cron: '0 9 * * *' env: DBNAME: ${{ secrets.LYON_DBNAME_PROD }} @@ -18,7 +16,7 @@ env: jobs: lyon_models_run: - name: lyon_models_run + name: lyon_models_run_production runs-on: ubuntu-latest defaults: run: diff --git a/.github/workflows/marseille_models_run.yml b/.github/workflows/marseille_models_run_production.yml similarity index 91% rename from .github/workflows/marseille_models_run.yml rename to .github/workflows/marseille_models_run_production.yml index 36ac682b..4cbc3629 100644 --- a/.github/workflows/marseille_models_run.yml +++ b/.github/workflows/marseille_models_run_production.yml @@ -1,9 +1,7 @@ -name: marseille_models_run +name: marseille_models_run_production on: workflow_dispatch: - schedule: - - cron: '30 7 * * *' env: DBNAME: ${{ secrets.MARSEILLE_DBNAME_PROD }} @@ -18,7 +16,7 @@ env: jobs: marseille_models_run: - name: marseille_models_run + name: marseille_models_run_production runs-on: ubuntu-latest defaults: run: diff --git a/.github/workflows/meyzieu_models_run.yml b/.github/workflows/meyzieu_models_run_production.yml similarity index 91% rename from .github/workflows/meyzieu_models_run.yml rename to .github/workflows/meyzieu_models_run_production.yml index f8b71779..22f975c7 100644 --- a/.github/workflows/meyzieu_models_run.yml +++ b/.github/workflows/meyzieu_models_run_production.yml @@ -1,9 +1,7 @@ -name: meyzieu_models_run +name: meyzieu_models_run_production on: workflow_dispatch: - schedule: - - cron: '0 5 * * *' env: DBNAME: ${{ secrets.MEYZIEU_DBNAME_PROD }} @@ -18,7 +16,7 @@ env: jobs: meyzieu_models_run: - name: meyzieu_models_run + name: meyzieu_models_run_production runs-on: ubuntu-latest defaults: run: diff --git a/.github/workflows/montpellier_models_run.yml b/.github/workflows/montpellier_models_run_production.yml similarity index 92% rename from .github/workflows/montpellier_models_run.yml rename to .github/workflows/montpellier_models_run_production.yml index d5106592..3133ecfb 100644 --- a/.github/workflows/montpellier_models_run.yml +++ b/.github/workflows/montpellier_models_run_production.yml @@ -1,4 +1,4 @@ -name: montpellier_models_run +name: montpellier_models_run_production on: workflow_dispatch: @@ -16,7 +16,7 @@ env: jobs: montpellier_models_run: - name: montpellier_models_run + name: montpellier_models_run_production runs-on: ubuntu-latest defaults: run: diff --git a/.github/workflows/real_deal_models_run_production.yml b/.github/workflows/real_deal_models_run_production.yml new file mode 100644 index 00000000..c2e5b6be --- /dev/null +++ b/.github/workflows/real_deal_models_run_production.yml @@ -0,0 +1,46 @@ +name: real_deal_models_run_production + +on: + workflow_dispatch: + +env: + DBNAME: ${{ secrets.REAL_DEAL_DBNAME_PROD }} + HOST: ${{ secrets.HOST }} + PASSWORD: ${{ secrets.PASSWORD }} + PORT: ${{ secrets.PORT }} + TARGET_SCHEMA: ${{ secrets.SCHEMA_PROD }} + USER: ${{ secrets.USER }} + PARTICIPATION_HOST_NAME: ${{ secrets.REAL_DEAL_PARTICIPATION_HOST_NAME }} + WORKING_DIRECTORY: ./projects/real_deal + + +jobs: + real_deal_models_run: + name: real_deal_models_run_production + runs-on: ubuntu-latest + defaults: + run: + working-directory: ${{ env.WORKING_DIRECTORY }} + + steps: + - name: Check out + uses: actions/checkout@master + + - name: Setup Python + uses: actions/setup-python@v5 + with: + python-version: "3.12.x" + cache: 'pip' + + - name: Install dependencies + run: | + pip install -r requirements.txt + dbt deps --target prod + + - name: Run dbt models + run: dbt run --target prod + + - name: Test dbt models + run: dbt test --target prod + + diff --git a/.github/workflows/sytral_models_run.yml b/.github/workflows/sytral_models_run_production.yml similarity index 91% rename from .github/workflows/sytral_models_run.yml rename to .github/workflows/sytral_models_run_production.yml index 914b89dd..6c1163a7 100644 --- a/.github/workflows/sytral_models_run.yml +++ b/.github/workflows/sytral_models_run_production.yml @@ -1,9 +1,7 @@ -name: sytral_models_run +name: sytral_models_run_production on: workflow_dispatch: - schedule: - - cron: '30 7 * * *' env: DBNAME: ${{ secrets.SYTRAL_DBNAME_PROD }} @@ -18,7 +16,7 @@ env: jobs: sytral_models_run: - name: sytral_models_run + name: sytral_models_run_production runs-on: ubuntu-latest defaults: run: diff --git a/.github/workflows/thionville_models_run.yml b/.github/workflows/thionville_models_run_production.yml similarity index 91% rename from .github/workflows/thionville_models_run.yml rename to .github/workflows/thionville_models_run_production.yml index 7167c47b..b7cfda35 100644 --- a/.github/workflows/thionville_models_run.yml +++ b/.github/workflows/thionville_models_run_production.yml @@ -1,9 +1,7 @@ -name: thionville_models_run +name: thionville_models_run_production on: workflow_dispatch: - schedule: - - cron: '30 7 * * *' env: DBNAME: ${{ secrets.THIONVILLE_DBNAME_PROD }} @@ -18,7 +16,7 @@ env: jobs: thionville_models_run: - name: thionville_models_run + name: thionville_models_run_production runs-on: ubuntu-latest defaults: run: diff --git a/.github/workflows/toulouse_models_run.yml b/.github/workflows/toulouse_models_run_production.yml similarity index 91% rename from .github/workflows/toulouse_models_run.yml rename to .github/workflows/toulouse_models_run_production.yml index 67540b15..40899e33 100644 --- a/.github/workflows/toulouse_models_run.yml +++ b/.github/workflows/toulouse_models_run_production.yml @@ -1,9 +1,7 @@ -name: toulouse_models_run +name: toulouse_models_run_production on: workflow_dispatch: - schedule: - - cron: '0 5 * * *' env: DBNAME: ${{ secrets.TOULOUSE_DBNAME_PROD }} @@ -18,7 +16,7 @@ env: jobs: toulouse_models_run: - name: toulouse_models_run + name: toulouse_models_run_production runs-on: ubuntu-latest defaults: run: diff --git a/.github/workflows/tours_models_run.yml b/.github/workflows/tours_models_run_production.yml similarity index 91% rename from .github/workflows/tours_models_run.yml rename to .github/workflows/tours_models_run_production.yml index 5d14adfe..9e4e60e3 100644 --- a/.github/workflows/tours_models_run.yml +++ b/.github/workflows/tours_models_run_production.yml @@ -1,9 +1,7 @@ -name: tours_models_run +name: tours_models_run_production on: workflow_dispatch: - schedule: - - cron: '0 8 * * *' env: DBNAME: ${{ secrets.TOURS_DBNAME_PROD }} @@ -18,7 +16,7 @@ env: jobs: tours_models_run: - name: tours_models_run + name: tours_models_run_production runs-on: ubuntu-latest defaults: run: diff --git a/.github/workflows/valbonne_models_run.yml b/.github/workflows/valbonne_models_run_production.yml similarity index 91% rename from .github/workflows/valbonne_models_run.yml rename to .github/workflows/valbonne_models_run_production.yml index 57de666a..e19f0325 100644 --- a/.github/workflows/valbonne_models_run.yml +++ b/.github/workflows/valbonne_models_run_production.yml @@ -1,9 +1,7 @@ -name: valbonne_models_run +name: valbonne_models_run_production on: workflow_dispatch: - schedule: - - cron: '0 5 * * *' env: DBNAME: ${{ secrets.valbonne_DBNAME_PROD }} @@ -18,7 +16,7 @@ env: jobs: valbonne_models_run: - name: valbonne_models_run + name: valbonne_models_run_production runs-on: ubuntu-latest defaults: run: