Abacn commented on code in PR #33160:
URL: https://github.com/apache/beam/pull/33160#discussion_r1849384833
##########
sdks/python/test-suites/dataflow/common.gradle:
##########
@@ -380,6 +380,50 @@ task validatesContainer() {
}
}
+tasks.register('validatesDistrolessContainer', Task.class) {
+ dependsOn 'initializeForDataflowJob'
+ def repository = "us.gcr.io/apache-beam-testing/${System.getenv('USER')}"
+ def tag = java.time.Instant.now().getEpochSecond()
+ def imageURL =
"${repository}/beam_python${pythonVersion}_sdk_distroless:${tag}"
+ doLast {
+ exec {
+ executable 'docker'
+ workingDir rootDir
+ args = [
+ 'buildx',
+ 'build',
+ '-t',
+ imageURL,
+ '-f',
+ 'sdks/python/container/Dockerfile-distroless',
+
"--build-arg=BASE=gcr.io/apache-beam-testing/beam-sdk/beam_python${pythonVersion}_sdk",
+ "."
+ ]
+ }
+ exec {
+ executable 'docker'
+ args = ['push', imageURL]
+ }
+ exec {
+ def testTarget =
"apache_beam/examples/wordcount_it_test.py::WordCountIT::test_wordcount_it"
+ def argMap = [
+ "output" :
"gs://temp-storage-for-end-to-end-tests/py-it-cloud/output",
Review Comment:
ideally the temp location and project to run the test should be
configurable. However I checked in Java SDK's gradle files it is the case, but
not for python SDK's gradle files, so it is fine for now
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]