datahub/datahub-frontend/build.gradle
david-leifker ecc01b9a46
refactor(restli-mce-consumer) (#6744)
* 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>
2022-12-26 16:09:08 +00:00

105 lines
2.6 KiB
Groovy

plugins {
id "io.github.kobylynskyi.graphql.codegen" version "4.1.1"
id 'com.palantir.docker'
id 'scala'
}
apply from: "../gradle/versioning/versioning.gradle"
apply from: './play.gradle'
ext {
docker_registry = 'linkedin'
docker_repo = 'datahub-frontend-react'
docker_dir = 'datahub-frontend'
}
model {
// Must specify the dependency here as "stage" is added by rule based model.
tasks.myTar {
dependsOn stage
}
}
task myTar(type: Tar) {
extension = "tgz"
compression = Compression.GZIP
from("${buildDir}/stage")
into("bin") {
from("bin")
}
into("conf") {
from("conf")
fileMode = 0600
}
}
artifacts {
archives myTar
}
graphqlCodegen {
// For options: https://github.com/kobylynskyi/graphql-java-codegen/blob/master/docs/codegen-options.md
graphqlSchemaPaths = ["$projectDir/conf/datahub-frontend.graphql".toString()]
outputDir = new File("$projectDir/app/graphql")
packageName = "generated"
generateApis = true
modelValidationAnnotation = ""
customTypesMapping = [
Long: "Long",
]
}
tasks.withType(Checkstyle) {
exclude "**/generated/**"
}
checkstyleMain.source = "app/"
/*
PLAY UPGRADE NOTE
Generates the distribution jars under the expected names. The playFramework plugin only accepts certain name values
for the resulting folders and files, so some changes were made to accommodate. Default distribution is main if these are excluded
*/
distributions {
create("datahub-frontend") {
distributionBaseName = project.ext.playBinaryBaseName
}
playBinary {
distributionBaseName = project.ext.playBinaryBaseName
}
}
docker {
name "${docker_registry}/${docker_repo}:${version}"
dockerfile file("${rootProject.projectDir}/docker/${docker_dir}/Dockerfile")
files fileTree(rootProject.projectDir) {
include 'docker/monitoring/*'
include "docker/${docker_dir}/*"
}
tag("-${version}", "${docker_registry}/${docker_repo}:v${version}")
tag("-version", "${docker_registry}/${docker_repo}:v${version}")
// platform('linux/arm64', 'linux/amd64')
buildx(true)
load(true)
push(false)
}
task unversionZip(type: Copy, dependsOn: [':datahub-web-react:build', dist]) {
from ("${buildDir}/distributions")
include "datahub-frontend-${version}.zip"
into "${buildDir}/docker/"
rename "datahub-frontend-${version}.zip", "datahub-frontend.zip"
}
tasks.getByName("docker").dependsOn(unversionZip)
task cleanLocalDockerImages {
doLast {
rootProject.ext.cleanLocalDockerImages(docker_registry, docker_repo, "v${version}".toString())
}
}
dockerClean.finalizedBy(cleanLocalDockerImages)