Skip to content

Commit

Permalink
istio-interop-testing: create a separate project and add istio echo s…
Browse files Browse the repository at this point in the history
…erver code (#9321)

* istio-interop-testing: create a separate project and add istio echo server code
after removing from the grpc-interop-testing project

* add jib support

* use imported echo.proto from istio repo

* use context to propagate values from interceptor so the service's echo method has all values required to compose EchoResponse
  • Loading branch information
sanjaypujare committed Jun 29, 2022
1 parent 377e3ce commit 6271bab
Show file tree
Hide file tree
Showing 9 changed files with 1,340 additions and 0 deletions.
1 change: 1 addition & 0 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ plugins {
id "com.google.osdetector" apply false
id "me.champeau.gradle.japicmp" apply false
id "net.ltgt.errorprone" apply false
id 'com.google.cloud.tools.jib' apply false
}

import net.ltgt.gradle.errorprone.CheckSeverity
Expand Down
68 changes: 68 additions & 0 deletions istio-interop-testing/build.gradle
Original file line number Diff line number Diff line change
@@ -0,0 +1,68 @@
plugins {
id "application"
id "java"

id "com.google.protobuf"
id 'com.google.cloud.tools.jib'
}

description = "gRPC: Istio Interop testing"

configurations {
alpnagent
}

evaluationDependsOn(project(':grpc-context').path)

dependencies {
implementation project(':grpc-core'),
project(':grpc-netty'),
project(':grpc-protobuf'),
project(':grpc-services'),
project(':grpc-stub'),
project(':grpc-testing')

compileOnly libraries.javax.annotation

runtimeOnly libraries.netty.tcnative,
libraries.netty.tcnative.classes
testImplementation project(':grpc-context').sourceSets.test.output,
project(':grpc-api').sourceSets.test.output,
project(':grpc-core').sourceSets.test.output,
libraries.mockito.core,
libraries.junit,
libraries.truth
alpnagent libraries.jetty.alpn.agent
}

sourceSets {
main {
proto {
srcDir 'third_party/istio/src/main/proto'
}
}
}

configureProtoCompilation()

import net.ltgt.gradle.errorprone.CheckSeverity

compileJava {
// This isn't a library; it can use beta APIs
options.errorprone.check("BetaApi", CheckSeverity.OFF)
}


// For releasing to Docker Hub
jib {
from.image = "gcr.io/distroless/java:8"
container {
ports = ['50051']
mainClass="io.grpc.testing.istio.EchoTestServer"
}
outputPaths {
tar = 'build/istio-echo-server.tar'
digest = 'build/istio-echo-server.digest'
imageId = 'build/istio-echo-server.id'
}
}

0 comments on commit 6271bab

Please sign in to comment.