Skip to content

Commit

Permalink
changes
Browse files Browse the repository at this point in the history
  • Loading branch information
xiphl committed Jan 29, 2024
1 parent ef1a6e3 commit 78acb6b
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 5 deletions.
10 changes: 6 additions & 4 deletions .github/workflows/docker-unified.yml
Original file line number Diff line number Diff line change
Expand Up @@ -883,7 +883,7 @@ jobs:
channel: github-activities
ingestapi_build2:
# this is based on datahub_ingestion_slim_build build step. like slim, I need codegen to run successfully first. (to get the datahub.metadata classes)
name: Build and Push DataHub Ingestion Docker Images
name: Build Ingest API
runs-on: ubuntu-latest
outputs:
tag: ${{ steps.tag.outputs.tag }}
Expand All @@ -902,6 +902,8 @@ jobs:
- 'docker/datahub-ingestion-base/**'
datahub-ingestion:
- 'docker/datahub-ingestion/**'
ingest-api:
- 'docker/ingest-api/**'
- name: Build codegen
if: ${{ steps.filter.outputs.datahub-ingestion-base == 'true' || steps.filter.outputs.datahub-ingestion == 'true' || needs.setup.outputs.publish }}
run: ./gradlew :metadata-ingestion:codegen
Expand All @@ -911,12 +913,12 @@ jobs:
with:
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 IngestAPI image
if: ${{ steps.filter.outputs.datahub-ingestion-base == 'true' || steps.filter.outputs.datahub-ingestion == 'true' || needs.setup.outputs.publish }}
if: ${{ steps.filter.outputs.datahub-ingestion-base == 'true' || steps.filter.outputs.datahub-ingestion == 'true' || steps.filter.outputs.ingest-api == 'true' ||needs.setup.outputs.publish }}
uses: ./.github/actions/docker-custom-build-and-push
with:
target: final
target: final #publish the image labelled as final in dockerfile
images: |
${{ env.DATAHUB_INGESTION_IMAGE }}
${{ env.INGEST_API_IMAGE }}
build-args: |
BASE_IMAGE=${{ env.INGEST_API_IMAGE }}
DOCKER_VERSION=${{ steps.filter.outputs.datahub-ingestion-base == 'true' && needs.setup.outputs.unique_slim_tag || 'head-slim' }}
Expand Down
3 changes: 2 additions & 1 deletion docker/ingest-api/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -27,11 +27,12 @@ ARG DOCKER_VERSION=head

FROM $BASE_IMAGE:$DOCKER_VERSION as base
USER 0
ENV PROMETHEUS_MULTIPROC_DIR=/gunicorn/
COPY ./metadata-ingestion /datahub-ingestion
WORKDIR /datahub-ingestion
RUN pip install --no-cache --user ".[base]"

FROM base as final
ENV PROMETHEUS_MULTIPROC_DIR=/gunicorn/
COPY ./ingest-api/ /ingest-api/
WORKDIR /ingest-api/ingest_api
RUN pip install -r ../requirements.txt && pip install ../ && mkdir /gunicorn/
Expand Down

0 comments on commit 78acb6b

Please sign in to comment.