Skip to content
/ besu Public
forked from hyperledger/besu

Commit

Permalink
fix(build): docker git ref (hyperledger#6744)
Browse files Browse the repository at this point in the history
Signed-off-by: Andrew Davis <1709934+Savid@users.noreply.github.com>
Co-authored-by: Sally MacFarlane <macfarla.github@gmail.com>
Signed-off-by: amsmota <antonio.mota@citi.com>
  • Loading branch information
2 people authored and amsmota committed Apr 16, 2024
1 parent 4f06c7a commit 4b78c01
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
3 changes: 2 additions & 1 deletion build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -759,9 +759,10 @@ task distDocker {
dockerPlatform = "--platform ${project.getProperty('docker-platform')}"
println "Building for platform ${project.getProperty('docker-platform')}"
}
def gitDetails = getGitCommitDetails(10)
executable "sh"
workingDir dockerBuildDir
args "-c", "docker build ${dockerPlatform} --build-arg BUILD_DATE=${buildTime()} --build-arg VERSION=${dockerBuildVersion} --build-arg VCS_REF=${getCheckedOutGitCommitHash()} -t ${image} ."
args "-c", "docker build ${dockerPlatform} --build-arg BUILD_DATE=${buildTime()} --build-arg VERSION=${dockerBuildVersion} --build-arg VCS_REF=${gitDetails.hash} -t ${image} ."
}
}

Expand Down
3 changes: 2 additions & 1 deletion ethereum/evmtool/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -120,8 +120,9 @@ tasks.register('distDocker', Exec) {
}
}

def gitDetails = getGitCommitDetails(10)
executable "sh"
args "-c", "docker build --build-arg BUILD_DATE=${buildTime()} --build-arg VERSION=${dockerBuildVersion} --build-arg VCS_REF=${getCheckedOutGitCommitHash()} -t ${image} ."
args "-c", "docker build --build-arg BUILD_DATE=${buildTime()} --build-arg VERSION=${dockerBuildVersion} --build-arg VCS_REF=${gitDetails.hash} -t ${image} ."
}

tasks.register('dockerUpload', Exec) {
Expand Down

0 comments on commit 4b78c01

Please sign in to comment.