feat(build): reduce build time for ingestion image (#5225)

This commit is contained in:
Aseem Bansal 2022-06-29 15:26:12 +05:30 committed by GitHub
parent fdee7a787b
commit b73477f31e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 2 additions and 61 deletions

View File

@ -1,51 +0,0 @@
name: metadata ingestion slow integration tests
on:
push:
branches:
- master
paths-ignore:
- "docs/**"
- "**.md"
pull_request:
branches:
- master
paths:
- "**/nifi/**"
- "**/nifi.py"
- "**/hana/**"
- "**/hana.py"
release:
types: [published, edited]
jobs:
metadata-ingestion-slow-integration:
runs-on: ubuntu-latest
strategy:
matrix:
python-version: ["3.9"]
steps:
- uses: actions/checkout@v2
- uses: actions/setup-python@v2
with:
python-version: ${{ matrix.python-version }}
- name: Install dependencies
run: ./metadata-ingestion/scripts/install_deps.sh
- name: Run metadata-ingestion slow integration tests
run: ./gradlew :metadata-ingestion:testSlowIntegration
- uses: actions/upload-artifact@v2
if: always()
with:
name: Test Results (metadata ingestion slow integration tests)
path: |
**/build/reports/tests/test/**
**/build/test-results/test/**
**/junit.*.xml
event-file:
runs-on: ubuntu-latest
steps:
- name: Upload
uses: actions/upload-artifact@v2
with:
name: Event File
path: ${{ github.event_path }}

View File

@ -1,20 +1,11 @@
# Defining environment
ARG APP_ENV=prod
FROM python:3.8 as base
FROM acryldata/datahub-ingestion-base as base
# ENV DOCKERIZE_VERSION v0.6.1
# RUN apk --no-cache add curl tar \
# && curl https://repo1.maven.org/maven2/org/eclipse/jetty/jetty-runner/9.4.20.v20190813/jetty-runner-9.4.20.v20190813.jar --output jetty-runner.jar \
# && curl -L https://github.com/jwilder/dockerize/releases/download/$DOCKERIZE_VERSION/dockerize-linux-amd64-$DOCKERIZE_VERSION.tar.gz | tar -C /usr/local/bin -xzv
RUN apt-get update && apt-get install -y \
jq \
librdkafka-dev \
python3-ldap \
libldap2-dev \
libsasl2-dev \
libsasl2-modules \
ldap-utils \
&& python -m pip install --upgrade pip wheel setuptools==57.5.0
FROM openjdk:8 as prod-build
@ -29,6 +20,7 @@ RUN cd /datahub-src/metadata-ingestion && \
FROM base as prod-install
COPY --from=prod-codegen /datahub-src/metadata-ingestion /datahub-ingestion
COPY --from=prod-codegen /root/.cache/pip /root/.cache/pip
ARG RELEASE_VERSION
RUN cd /datahub-ingestion && \
sed -i.bak "s/__version__ = \"0.0.0.dev0\"/__version__ = \"$RELEASE_VERSION\"/" src/datahub/__init__.py && \