2023-03-20 18:06:35 -05:00
|
|
|
plugins {
|
|
|
|
id 'java' // required for versioning
|
|
|
|
}
|
|
|
|
|
|
|
|
apply from: "../../gradle/versioning/versioning.gradle"
|
2025-04-02 11:51:10 +05:30
|
|
|
apply from: "../../gradle/docker/docker.gradle"
|
2023-03-20 18:06:35 -05:00
|
|
|
|
|
|
|
ext {
|
|
|
|
docker_registry = rootProject.ext.docker_registry == 'linkedin' ? 'acryldata' : docker_registry
|
|
|
|
docker_repo = 'datahub-ingestion'
|
|
|
|
docker_dir = 'datahub-ingestion'
|
2023-11-13 16:26:53 -06:00
|
|
|
docker_target = project.getProperties().getOrDefault("dockerTarget", "slim")
|
2025-04-24 23:00:03 +05:30
|
|
|
docker_version = "${versionTag}" // Variants will add suffix to this tag
|
2025-04-15 21:14:09 +05:30
|
|
|
python_docker_version = project.getProperties().getOrDefault("pythonDockerVersion", "1!0.0.0+docker.${version}")
|
2023-09-28 21:21:04 -05:00
|
|
|
|
2025-04-04 18:30:26 -05:00
|
|
|
revision = 12 // increment to trigger rebuild
|
2023-03-20 18:06:35 -05:00
|
|
|
}
|
|
|
|
|
2023-08-17 00:10:17 -05:00
|
|
|
dependencies {
|
|
|
|
project(':metadata-ingestion')
|
|
|
|
}
|
|
|
|
|
2023-03-20 18:06:35 -05:00
|
|
|
docker {
|
2025-04-09 11:53:34 -07:00
|
|
|
dependsOn 'build', ':metadata-ingestion:codegen'
|
2025-04-07 10:13:07 +05:30
|
|
|
name "${docker_registry}/${docker_repo}:${docker_version}"
|
2025-04-09 11:53:34 -07:00
|
|
|
dockerfile file("${rootProject.projectDir}/docker/${docker_dir}/Dockerfile")
|
2023-03-20 18:06:35 -05:00
|
|
|
files fileTree(rootProject.projectDir) {
|
2023-11-13 16:26:53 -06:00
|
|
|
include '.dockerignore'
|
2023-03-20 18:06:35 -05:00
|
|
|
include "docker/${docker_dir}/*"
|
2025-04-16 23:51:46 -07:00
|
|
|
include "docker/snippets/*"
|
2023-03-20 18:06:35 -05:00
|
|
|
include "metadata-ingestion/**"
|
2023-09-07 20:17:50 -05:00
|
|
|
include "metadata-ingestion-modules/**"
|
2025-04-12 15:34:17 -05:00
|
|
|
include "python-build/**"
|
2023-08-17 00:10:17 -05:00
|
|
|
}.exclude {
|
2023-11-13 16:26:53 -06:00
|
|
|
i -> (!i.file.name.endsWith(".dockerignore") && i.file.isHidden())
|
2023-03-20 18:06:35 -05:00
|
|
|
}
|
2025-04-02 11:51:10 +05:30
|
|
|
|
2025-04-12 15:34:17 -05:00
|
|
|
version "${docker_version}"
|
2025-04-24 23:00:03 +05:30
|
|
|
|
|
|
|
defaultVariant = "slim"
|
|
|
|
|
|
|
|
variants = [
|
|
|
|
"slim": [suffix: "", args: [RELEASE_VERSION: python_docker_version, APP_ENV: "slim"]],
|
|
|
|
"full": [suffix: "full", args: [RELEASE_VERSION: python_docker_version, APP_ENV: "full"]]
|
|
|
|
]
|
2025-04-12 15:34:17 -05:00
|
|
|
// This task is intended to build the slim image
|
2025-04-24 23:00:03 +05:30
|
|
|
//target 'ingestion-base-slim' //Review if this needs to be handled by bake
|
|
|
|
def dockerBuildArgs = [RELEASE_VERSION: python_docker_version]
|
2023-11-28 21:52:11 +01:00
|
|
|
|
|
|
|
// Add build args if they are defined (needed for some CI or enterprise environments)
|
|
|
|
if (project.hasProperty('pipMirrorUrl')) {
|
|
|
|
dockerBuildArgs.PIP_MIRROR_URL = project.getProperty('pipMirrorUrl')
|
|
|
|
}
|
|
|
|
if (project.hasProperty('debianAptRepositoryUrl')) {
|
|
|
|
dockerBuildArgs.DEBIAN_REPO_URL = project.getProperty('debianAptRepositoryUrl')
|
|
|
|
}
|
|
|
|
|
|
|
|
buildArgs(dockerBuildArgs)
|
2023-03-20 18:06:35 -05:00
|
|
|
}
|