mirror of
https://github.com/datahub-project/datahub.git
synced 2025-08-17 21:56:56 +00:00
fix(build): run codegen when building datahub-ingestion image (#8869)
This commit is contained in:
parent
53eaac5963
commit
ed1d35c79b
14
.github/workflows/docker-unified.yml
vendored
14
.github/workflows/docker-unified.yml
vendored
@ -58,7 +58,7 @@ jobs:
|
||||
echo "full_tag=$(get_tag)-full" >> $GITHUB_OUTPUT
|
||||
echo "unique_tag=$(get_unique_tag)" >> $GITHUB_OUTPUT
|
||||
echo "unique_slim_tag=$(get_unique_tag)-slim" >> $GITHUB_OUTPUT
|
||||
echo "unique_full_tag=$(get_unique_tag)-full" >> $GITHUB_OUTPUT
|
||||
echo "unique_full_tag=$(get_unique_tag)" >> $GITHUB_OUTPUT
|
||||
echo "python_release_version=$(get_python_docker_release_v)" >> $GITHUB_OUTPUT
|
||||
- name: Check whether publishing enabled
|
||||
id: publish
|
||||
@ -501,7 +501,7 @@ jobs:
|
||||
platforms: linux/amd64,linux/arm64/v8
|
||||
- name: Compute DataHub Ingestion (Base-Slim) Tag
|
||||
id: tag
|
||||
run: echo "tag=${{ steps.filter.outputs.datahub-ingestion-base == 'true' && needs.setup.outputs.unique_slim_tag || 'head' }}" >> $GITHUB_OUTPUT
|
||||
run: echo "tag=${{ steps.filter.outputs.datahub-ingestion-base == 'true' && needs.setup.outputs.unique_slim_tag || 'head-slim' }}" >> $GITHUB_OUTPUT
|
||||
datahub_ingestion_base_full_build:
|
||||
name: Build and Push DataHub Ingestion (Base-Full) Docker Image
|
||||
runs-on: ubuntu-latest
|
||||
@ -567,13 +567,13 @@ jobs:
|
||||
datahub-ingestion:
|
||||
- 'docker/datahub-ingestion/**'
|
||||
- name: Build codegen
|
||||
if: ${{ steps.filter.outputs.datahub-ingestion-base == 'true' || steps.filter.outputs.datahub-ingestion == 'true' }}
|
||||
if: ${{ steps.filter.outputs.datahub-ingestion-base == 'true' || steps.filter.outputs.datahub-ingestion == 'true' || needs.setup.outputs.publish }}
|
||||
run: ./gradlew :metadata-ingestion:codegen
|
||||
- name: Download Base Image
|
||||
uses: ishworkh/docker-image-artifact-download@v1
|
||||
if: ${{ needs.setup.outputs.publish != 'true' && steps.filter.outputs.datahub-ingestion-base == 'true' }}
|
||||
with:
|
||||
image: ${{ env.DATAHUB_INGESTION_BASE_IMAGE }}:${{ steps.filter.outputs.datahub-ingestion-base == 'true' && needs.setup.outputs.unique_slim_tag || 'head' }}
|
||||
image: ${{ env.DATAHUB_INGESTION_BASE_IMAGE }}:${{ steps.filter.outputs.datahub-ingestion-base == 'true' && needs.setup.outputs.unique_slim_tag || 'head-slim' }}
|
||||
- name: Build and push Slim Image
|
||||
if: ${{ steps.filter.outputs.datahub-ingestion-base == 'true' || steps.filter.outputs.datahub-ingestion == 'true' || needs.setup.outputs.publish }}
|
||||
uses: ./.github/actions/docker-custom-build-and-push
|
||||
@ -583,7 +583,7 @@ jobs:
|
||||
${{ env.DATAHUB_INGESTION_IMAGE }}
|
||||
build-args: |
|
||||
BASE_IMAGE=${{ env.DATAHUB_INGESTION_BASE_IMAGE }}
|
||||
DOCKER_VERSION=${{ steps.filter.outputs.datahub-ingestion-base == 'true' && needs.setup.outputs.unique_slim_tag || 'head' }}
|
||||
DOCKER_VERSION=${{ steps.filter.outputs.datahub-ingestion-base == 'true' && needs.setup.outputs.unique_slim_tag || 'head-slim' }}
|
||||
RELEASE_VERSION=${{ needs.setup.outputs.python_release_version }}
|
||||
APP_ENV=slim
|
||||
tags: ${{ needs.setup.outputs.slim_tag }}
|
||||
@ -595,7 +595,7 @@ jobs:
|
||||
platforms: linux/amd64,linux/arm64/v8
|
||||
- name: Compute Tag
|
||||
id: tag
|
||||
run: echo "tag=${{ (steps.filter.outputs.datahub-ingestion-base == 'true' || steps.filter.outputs.datahub-ingestion == 'true') && needs.setup.outputs.unique_slim_tag || 'head' }}" >> $GITHUB_OUTPUT
|
||||
run: echo "tag=${{ (steps.filter.outputs.datahub-ingestion-base == 'true' || steps.filter.outputs.datahub-ingestion == 'true') && needs.setup.outputs.unique_slim_tag || 'head-slim' }}" >> $GITHUB_OUTPUT
|
||||
datahub_ingestion_slim_scan:
|
||||
permissions:
|
||||
contents: read # for actions/checkout to fetch code
|
||||
@ -650,7 +650,7 @@ jobs:
|
||||
datahub-ingestion:
|
||||
- 'docker/datahub-ingestion/**'
|
||||
- name: Build codegen
|
||||
if: ${{ steps.filter.outputs.datahub-ingestion-base == 'true' || steps.filter.outputs.datahub-ingestion == 'true' }}
|
||||
if: ${{ steps.filter.outputs.datahub-ingestion-base == 'true' || steps.filter.outputs.datahub-ingestion == 'true' || needs.setup.outputs.publish }}
|
||||
run: ./gradlew :metadata-ingestion:codegen
|
||||
- name: Download Base Image
|
||||
uses: ishworkh/docker-image-artifact-download@v1
|
||||
|
@ -1,7 +1,7 @@
|
||||
ARG APP_ENV=full
|
||||
ARG BASE_IMAGE=base
|
||||
|
||||
FROM golang:1-alpine3.17 AS binary
|
||||
FROM golang:1-alpine3.17 AS dockerize-binary
|
||||
|
||||
ENV DOCKERIZE_VERSION v0.6.1
|
||||
WORKDIR /go/src/github.com/jwilder
|
||||
@ -41,7 +41,7 @@ RUN apt-get update && apt-get install -y -qq \
|
||||
&& rm -rf /var/lib/apt/lists/* /var/cache/apk/*
|
||||
|
||||
# compiled against newer golang for security fixes
|
||||
COPY --from=binary /go/bin/dockerize /usr/local/bin
|
||||
COPY --from=dockerize-binary /go/bin/dockerize /usr/local/bin
|
||||
|
||||
COPY ./docker/datahub-ingestion-base/base-requirements.txt requirements.txt
|
||||
COPY ./docker/datahub-ingestion-base/entrypoint.sh /entrypoint.sh
|
||||
|
@ -1,7 +1,7 @@
|
||||
# Defining environment
|
||||
ARG APP_ENV=full
|
||||
ARG BASE_IMAGE=acryldata/datahub-ingestion-base
|
||||
ARG DOCKER_VERSION=latest
|
||||
ARG DOCKER_VERSION=head
|
||||
|
||||
FROM $BASE_IMAGE:$DOCKER_VERSION as base
|
||||
USER 0
|
||||
|
@ -1,6 +1,6 @@
|
||||
# Defining environment
|
||||
ARG BASE_IMAGE=acryldata/datahub-ingestion-base
|
||||
ARG DOCKER_VERSION=latest
|
||||
ARG DOCKER_VERSION=head-slim
|
||||
|
||||
FROM $BASE_IMAGE:$DOCKER_VERSION as base
|
||||
USER 0
|
||||
|
Loading…
x
Reference in New Issue
Block a user