Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
{
"comment": "Modify this file in a trivial way to cause this test suite to run",
"modification": 4
"modification": 5
}
2 changes: 1 addition & 1 deletion .github/trigger_files/beam_PreCommit_Flink_Container.json
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
{
"comment": "Modify this file in a trivial way to cause this test suite to run",
"modification": 3
"modification": 4
}
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,7 @@ class BeamDockerPlugin implements Plugin<Project> {
boolean push = false
String builder = null
String target = null
String compression = 'zstd'

File resolvedDockerfile = null
File resolvedDockerComposeTemplate = null
Expand All @@ -72,6 +73,9 @@ class BeamDockerPlugin implements Plugin<Project> {
DockerExtension(Project project) {
this.project = project
this.copySpec = project.copySpec()
if (project.hasProperty('docker-compression')) {
this.compression = project.property('docker-compression')
}
}

void resolvePathsAndValidate() {
Expand Down Expand Up @@ -235,13 +239,23 @@ class BeamDockerPlugin implements Plugin<Project> {
if (!ext.platform.isEmpty()) {
buildCommandLine.addAll('--platform', String.join(',', ext.platform))
}
if (ext.load) {
buildCommandLine.add '--load'
if (ext.load && ext.push) {
throw new Exception("cannot combine 'push' and 'load' options")
}
if (ext.push) {
buildCommandLine.add '--push'
if (ext.compression != null && !ext.compression.isEmpty()) {
if (ext.push) {
buildCommandLine.add "--output=type=registry,compression=${ext.compression},force-compression=true,oci-mediatypes=true"
} else if (ext.load) {
buildCommandLine.add '--load'
} else {
buildCommandLine.add "--output=type=image,compression=${ext.compression},force-compression=true,oci-mediatypes=true"
}
} else {
if (ext.load) {
throw new Exception("cannot combine 'push' and 'load' options")
buildCommandLine.add '--load'
}
if (ext.push) {
buildCommandLine.add '--push'
}
}
if (ext.builder != null) {
Expand Down
Loading