Skip to content

Commit

Permalink
Merge pull request #22 from jaceksan/jacek/gitlab2github
Browse files Browse the repository at this point in the history
GHA: scheduled jobs
  • Loading branch information
jaceksan authored Jan 8, 2024
2 parents 2903316 + 79f4614 commit aad51a3
Show file tree
Hide file tree
Showing 5 changed files with 42 additions and 3 deletions.
2 changes: 2 additions & 0 deletions .github/workflows/elta_dev.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,8 @@ on:
- data_pipeline/meltano-plugins.yml
- data_pipeline/plugins/**/*.lock
- Dockerfile_meltano
- Dockerfile_dbt
- Dockerfile_gooddata
# Extract load
- data_pipeline/meltano.yml
- data_pipeline/meltano_conf/**/*
Expand Down
15 changes: 15 additions & 0 deletions .github/workflows/elta_schedule_prod.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
name: Extract, Load, Transform, and Analytics (Prod Schedule)

on:
schedule:
- cron: "0 5 * * *"

jobs:
elta:
name: ELTA (staging)
uses: ./.github/workflows/reusable_elta.yml
with:
ENVIRONMENT: "prod"
BRANCH_NAME: "prod"
RUN_ANALYTICS: "false"
secrets: inherit
15 changes: 15 additions & 0 deletions .github/workflows/elta_schedule_staging.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
name: Extract, Load, Transform, and Analytics (Staging Schedule)

on:
schedule:
- cron: "50 15 * * *"

jobs:
elta:
name: ELTA (staging)
uses: ./.github/workflows/reusable_elta.yml
with:
ENVIRONMENT: "staging"
BRANCH_NAME: "main"
RUN_ANALYTICS: "false"
secrets: inherit
3 changes: 0 additions & 3 deletions .github/workflows/elta_staging_prod.yml
Original file line number Diff line number Diff line change
@@ -1,9 +1,6 @@
name: Extract, Load, Transform, and Analytics (Staging/Production)

on:
# TODO - schedules
# schedule:
# - cron: "0 4 * * *"
push:
branches:
- main
Expand Down
10 changes: 10 additions & 0 deletions .github/workflows/reusable_elta.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,12 @@ on:
ENVIRONMENT:
required: true
type: string
BRANCH_NAME:
type: string
RUN_ANALYTICS:
required: false
type: string
default: "true"

jobs:
####################################
Expand All @@ -16,6 +22,7 @@ jobs:
ENVIRONMENT: "${{ inputs.ENVIRONMENT }}"
FULL_REFRESH: "false" # TODO: define workflow_dispatch with this parameter and set it here
MELTANO_CUSTOM_IMAGE: "ghcr.io/${{ github.repository }}/${{ vars.MELTANO_CUSTOM_IMAGE_BASE }}:${{ vars.MELTANO_VERSION }}"
BRANCH_NAME: "${{ inputs.BRANCH_NAME }}"
secrets: inherit
####################################
# Transform
Expand All @@ -27,14 +34,17 @@ jobs:
ENVIRONMENT: "${{ inputs.ENVIRONMENT }}"
FULL_REFRESH: "false" # TODO: define workflow_dispatch with this parameter and set it here
DBT_CUSTOM_IMAGE: "ghcr.io/${{ github.repository }}/${{ vars.DBT_CUSTOM_IMAGE_BASE }}:${{ vars.DBT_VERSION }}"
BRANCH_NAME: "${{ inputs.BRANCH_NAME }}"
secrets: inherit
####################################
# Analytics
analytics:
if: ${{ inputs.RUN_ANALYTICS == 'true' }}
needs:
- transform
uses: ./.github/workflows/reusable_analytics.yml
with:
ENVIRONMENT: "${{ inputs.ENVIRONMENT }}"
GOODDATA_CUSTOM_IMAGE: "ghcr.io/${{ github.repository }}/${{ vars.GOODDATA_IMAGE_BASE }}:${{ vars.GOODDATA_VERSION }}"
BRANCH_NAME: "${{ inputs.BRANCH_NAME }}"
secrets: inherit

0 comments on commit aad51a3

Please sign in to comment.