mirror of
https://github.com/datahub-project/datahub.git
synced 2025-07-23 01:22:00 +00:00

* fix(security): commons-text in frontend * refactor(restli): set threads based on cpu cores feat(mce-consumers): hit local restli endpoint * testing docker build * Add retry configuration options for entity client * Kafka debugging * fix(kafka-setup): parallelize topic creation * Adjust docker build * Docker build updates * WIP * fix(lint): metadata-ingestion lint * fix(gradle-docker): fix docker frontend dep * fix(elastic): fix race condition between gms and mae for index creation * Revert "fix(elastic): fix race condition between gms and mae for index creation" This reverts commit 9629d12c3bdb3c0dab87604d409ca4c642c9c6d3. * fix(test): fix datahub frontend test for clean/test cycle * fix(test): datahub-frontend missing assets in test * fix(security): set protobuf lib datahub-upgrade & mce/mae-consumer * gitingore update * fix(docker): remove platform on docker base image, set by buildx * refactor(kafka-producer): update kafka producer tracking/logging * updates per PR feedback * Add documentation around mce standalone consumer Kafka consumer concurrency to follow thread count for restli & sql connection pool Co-authored-by: leifker <dleifker@gmail.com> Co-authored-by: Pedro Silva <pedro@acryl.io>
41 lines
1.5 KiB
Groovy
41 lines
1.5 KiB
Groovy
|
|
ext.getDockerImages = {
|
|
docker_registry, docker_repo, docker_tag ->
|
|
def stdOut = new ByteArrayOutputStream()
|
|
exec {
|
|
commandLine "docker", "images", "-q", "${docker_registry}/${docker_repo}:${docker_tag}"
|
|
standardOutput = stdOut
|
|
}
|
|
return stdOut.toString().trim().split("\\R").findAll {!it.empty}.unique() as List
|
|
}
|
|
|
|
ext.getDockerContainers = {
|
|
docker_registry, docker_repo, docker_tag ->
|
|
def stdOut = new ByteArrayOutputStream()
|
|
exec {
|
|
commandLine "docker", "container", "ls", "-q", "--filter", "ancestor=${docker_registry}/${docker_repo}:${docker_tag}"
|
|
standardOutput = stdOut
|
|
}
|
|
return stdOut.toString().trim().split("\\R").findAll {!it.empty}.unique() as List
|
|
}
|
|
|
|
ext.cleanLocalDockerImages = {
|
|
String docker_registry, String docker_repo, String docker_tag ->
|
|
def containers = getDockerContainers(docker_registry, docker_repo, docker_tag)
|
|
if(!containers.isEmpty()) {
|
|
println "Stopping containers: $containers"
|
|
exec {
|
|
commandLine = ["docker", "container", "stop"] + containers
|
|
}
|
|
exec {
|
|
commandLine = ["docker", "container", "rm"] + containers
|
|
}
|
|
}
|
|
def images = getDockerImages(docker_registry, docker_repo, docker_tag)
|
|
if(!images.isEmpty()) {
|
|
println "Removing images: $images"
|
|
exec {
|
|
commandLine = ["docker", "rmi", "-f"] + images
|
|
}
|
|
}
|
|
} |