Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix distDocker - revert gradle change to providers.exec #8340

Merged
merged 2 commits into from
Feb 21, 2025
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
22 changes: 11 additions & 11 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -826,7 +826,7 @@ task distDocker {
from file("${projectDir}/docker/Dockerfile")
into(dockerBuildDir)
}
providers.exec {
exec {
def image = "${dockerImageName}:${dockerBuildVersion}"
def dockerPlatform = ""
if (project.hasProperty('docker-platform')){
Expand All @@ -850,7 +850,7 @@ task testDocker {
}

doLast {
providers.exec {
exec {
def image = project.hasProperty('release.releaseVersion') ? "${dockerImageName}:" + project.property('release.releaseVersion') : "${dockerImageName}:${project.version}"
workingDir "${projectDir}/docker"
executable shell
Expand All @@ -874,7 +874,7 @@ task dockerUpload {
}

doLast {
providers.exec {
exec {
def archVariantImage = "${image}-${architecture}"
def cmd = "docker tag '${image}' '${archVariantImage}' && docker push '${archVariantImage}'"
println "Executing '${cmd}'"
Expand All @@ -891,28 +891,28 @@ task dockerUploadRelease {
doLast {
for (def architecture in archs) {

providers.exec {
exec {
def cmd = "docker pull '${image}-${architecture}' && docker tag '${image}-${architecture}' '${dockerImageName}:latest-${architecture}'"
println "Executing '${cmd}'"
executable shell
args "-c", cmd
}
providers.exec {
exec {
def cmd = "docker push '${dockerImageName}:latest-${architecture}'"
println "Executing '${cmd}'"
executable shell
args "-c", cmd
}


providers.exec {
exec {
def archImage = "${image}-${architecture}"
def cmd = "docker pull '${archImage}' && docker tag ${archImage} '${dockerImageName}:latest-${architecture}'"
println "Executing '${cmd}'"
executable shell
args "-c", cmd
}
providers.exec {
exec {
def cmd = "docker push '${dockerImageName}:latest-${architecture}'"
println "Executing '${cmd}'"
executable shell
Expand All @@ -928,15 +928,15 @@ task manifestDocker {
"arm64",
"amd64"] //TODO: this assumes dockerUpload task has already been run on 2 different archs!
doLast {
providers.exec {
exec {
def targets = ""
archs.forEach { arch -> targets += "'${image}-${arch}' " }
def cmd = "docker manifest create '${image}' ${targets}"
println "Executing '${cmd}'"
executable shell
args "-c", cmd
}
providers.exec {
exec {
def cmd = "docker manifest push '${image}'"
println "Executing '${cmd}'"
executable shell
Expand All @@ -951,15 +951,15 @@ task manifestDockerRelease {

doLast {

providers.exec {
exec {
def targets = ""
archs.forEach { arch -> targets += "'${baseTag}-${arch}' " }
def cmd = "docker manifest create '${baseTag}' ${targets} --amend"
println "Executing '${cmd}'"
executable shell
args "-c", cmd
}
providers.exec {
exec {
def cmd = "docker manifest push '${baseTag}'"
println "Executing '${cmd}'"
executable shell
Expand Down
2 changes: 1 addition & 1 deletion ethereum/referencetests/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -229,7 +229,7 @@ tasks.register('validateReferenceTestSubmodule') {
def expectedHash = '9201075490807f58811078e9bb5ec895b4ac01a5'
def submodulePath = java.nio.file.Path.of("${rootProject.projectDir}", "ethereum/referencetests/src/reference-test/external-resources").toAbsolutePath()
try {
providers.exec {
exec {
commandLine 'git', 'submodule', 'status', submodulePath
standardOutput = result
errorOutput = result
Expand Down