Skip to content

Refactor env and executions #107

Refactor env and executions

Refactor env and executions #107

Workflow file for this run

name: Extract, Load, Transform, and Analytics (Dev)
on:
pull_request:
branches:
- main
paths:
# TODO - some jobs can be triggered even if no related paths were changed
# There is a workaround solution applied in:
# https://github.com/gooddata/gdc-nas/blob/master/.github/workflows/pre-merge-pipeline.yml
# Shared
- .github/workflows/elta_dev.yml
- .github/workflows/reusable_elta.yml
- .env*
- Makefile
# Build custom Meltano image
- data_pipeline/requirements-meltano.txt
- 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/**/*
- data_pipeline/requirements-meltano.txt
- .github/workflows/reusable_extract_load.yml
# Transform
- data_pipeline/macros/**/*
- data_pipeline/models/**/*
- data_pipeline/profile/**/*
- data_pipeline/dbt_project.yml
- data_pipeline/packages.yml
- data_pipeline/requirements-dbt.txt
- data_pipeline/requirements-gooddata.txt
- .github/workflows/reusable_transform.yml
# Analytics
- data_pipeline/gooddata_layouts/**/*
- data_pipeline/requirements-gooddata.txt
- .github/workflows/reusable_analytics.yml
jobs:
read-env:
runs-on: ubuntu-latest
# Map a step output to a job output
outputs:
DBT_CUSTOM_IMAGE_BASE: ${{ steps.step1.outputs.DBT_CUSTOM_IMAGE_BASE }}
MELTANO_CUSTOM_IMAGE_BASE: ${{ steps.step1.outputs.MELTANO_CUSTOM_IMAGE_BASE }}
GOODDATA_CLIENT_CUSTOM_IMAGE_BASE: ${{ steps.step1.outputs.GOODDATA_CLIENT_CUSTOM_IMAGE_BASE }}
MELTANO_VERSION: ${{ steps.step1.outputs.MELTANO_VERSION }}
GOODDATA_VERSION: ${{ steps.step1.outputs.GOODDATA_VERSION }}
PYTHON_IMAGE: ${{ steps.step1.outputs.PYTHON_IMAGE }}
IMAGES_WORKDIR: ${{ steps.step1.outputs.IMAGES_WORKDIR }}
steps:
- id: step1
shell: bash
run: |
source .env.dev
echo "DBT_CUSTOM_IMAGE_BASE=$DBT_CUSTOM_IMAGE_BASE" >> "$GITHUB_OUTPUT"
echo "MELTANO_CUSTOM_IMAGE_BASE=$MELTANO_CUSTOM_IMAGE_BASE" >> "$GITHUB_OUTPUT"
echo "GOODDATA_CLIENT_CUSTOM_IMAGE_BASE=$GOODDATA_CLIENT_CUSTOM_IMAGE_BASE" >> "$GITHUB_OUTPUT"
echo "MELTANO_VERSION=$MELTANO_VERSION" >> "$GITHUB_OUTPUT"
echo "GOODDATA_VERSION=$GOODDATA_VERSION" >> "$GITHUB_OUTPUT"
echo "PYTHON_IMAGE=$PYTHON_IMAGE" >> "$GITHUB_OUTPUT"
echo "IMAGES_WORKDIR=$IMAGES_WORKDIR" >> "$GITHUB_OUTPUT"
echo "MELTANO_CUSTOM_IMAGE=ghcr.io/${{ github.repository }}/$MELTANO_CUSTOM_IMAGE_BASE:$MELTANO_VERSION" >> "$GITHUB_OUTPUT"
echo "DBT_CUSTOM_IMAGE=ghcr.io/${{ github.repository }}/$DBT_CUSTOM_IMAGE_BASE:$DBT_VERSION" >> "$GITHUB_OUTPUT"
echo "GOODDATA_CUSTOM_IMAGE=ghcr.io/${{ github.repository }}/$GOODDATA_CLIENT_CUSTOM_IMAGE_BASE:$GOODDATA_VERSION" >> "$GITHUB_OUTPUT"
build-images:
needs:
- read-env
uses: ./.github/workflows/reusable_builds.yml

Check failure on line 73 in .github/workflows/elta_dev.yml

View workflow run for this annotation

GitHub Actions / Extract, Load, Transform, and Analytics (Dev)

Invalid workflow file

The workflow is not valid. .github/workflows/elta_dev.yml (Line: 73, Col: 11): Input IMAGES_WORKDIR is required, but not provided while calling.
with:
DBT_CUSTOM_IMAGE_BASE: ${{ needs.read-env.outputs.DBT_CUSTOM_IMAGE_BASE }}
MELTANO_CUSTOM_IMAGE_BASE: ${{ needs.read-env.outputs.MELTANO_CUSTOM_IMAGE_BASE }}
GOODDATA_CLIENT_CUSTOM_IMAGE_BASE: ${{ needs.read-env.outputs.GOODDATA_CLIENT_CUSTOM_IMAGE_BASE }}
MELTANO_VERSION: ${{ needs.read-env.outputs.MELTANO_VERSION }}
GOODDATA_VERSION: ${{ needs.read-env.outputs.GOODDATA_VERSION }}
PYTHON_IMAGE: ${{ needs.read-env.outputs.PYTHON_IMAGE }}
secrets: inherit
elta:
needs:
- build-images
uses: ./.github/workflows/reusable_elta.yml
with:
ENVIRONMENT: "dev"
MELTANO_CUSTOM_IMAGE: "${{ needs.read-env.outputs.MELTANO_CUSTOM_IMAGE }}"
DBT_CUSTOM_IMAGE: "${{ needs.read-env.outputs.DBT_CUSTOM_IMAGE }}"
GOODDATA_CUSTOM_IMAGE: "${{ needs.read-env.outputs.GOODDATA_CUSTOM_IMAGE }}"
secrets: inherit
elta-cloud:
needs:
- build-images
uses: ./.github/workflows/reusable_elta.yml
with:
ENVIRONMENT: "dev_cloud"
MELTANO_CUSTOM_IMAGE: "${{ needs.read-env.outputs.MELTANO_CUSTOM_IMAGE }}"
DBT_CUSTOM_IMAGE: "${{ needs.read-env.outputs.DBT_CUSTOM_IMAGE }}"
GOODDATA_CUSTOM_IMAGE: "${{ needs.read-env.outputs.GOODDATA_CUSTOM_IMAGE }}"
DBT_CLOUD: "true"
secrets: inherit
# Branch for MotherDuck DB.
# GoodData now supports MotherDuck only in Labs environment
# because the issue with extensions downloaded in runtime.
elta-labs-motherduck:
needs:
- build-images
uses: ./.github/workflows/reusable_elta.yml
with:
ENVIRONMENT: "dev"
MELTANO_CUSTOM_IMAGE: "${{ needs.read-env.outputs.MELTANO_CUSTOM_IMAGE }}"
DBT_CUSTOM_IMAGE: "${{ needs.read-env.outputs.DBT_CUSTOM_IMAGE }}"
GOODDATA_CUSTOM_IMAGE: "${{ needs.read-env.outputs.GOODDATA_CUSTOM_IMAGE }}"
DB_OVERRIDE: "motherduck"
secrets: inherit