builder: set buildkit's exported product variable via PRODUCT
This introduces a PRODUCT environment variable that is used to set a constant at dockerversion.ProductName. That is then used to set BuildKit's ExportedProduct variable in order to show useful error messages to users when a certain version of the product doesn't support a BuildKit feature. Signed-off-by: Tibor Vass <tibor@docker.com> Upstream-commit: 195919d9d645aa4ab5680a2331c57ff33eb9e5d9 Component: engine
This commit is contained in:
@@ -365,7 +365,7 @@ Try {
|
||||
# Run autogen if building binaries or running unit tests.
|
||||
if ($Client -or $Daemon -or $TestUnit) {
|
||||
Write-Host "INFO: Invoking autogen..."
|
||||
Try { .\hack\make\.go-autogen.ps1 -CommitString $gitCommit -DockerVersion $dockerVersion -Platform "$env:PLATFORM" }
|
||||
Try { .\hack\make\.go-autogen.ps1 -CommitString $gitCommit -DockerVersion $dockerVersion -Platform "$env:PLATFORM" -Product "$env:PRODUCT" }
|
||||
Catch [Exception] { Throw $_ }
|
||||
}
|
||||
|
||||
|
||||
@@ -21,6 +21,7 @@ const (
|
||||
IAmStatic string = "${IAMSTATIC:-true}"
|
||||
ContainerdCommitID string = "${CONTAINERD_COMMIT}"
|
||||
PlatformName string = "${PLATFORM}"
|
||||
ProductName string = "${PRODUCT}"
|
||||
)
|
||||
|
||||
// AUTOGENERATED FILE; see /go/src/github.com/docker/docker/hack/make/.go-autogen
|
||||
|
||||
@@ -15,7 +15,8 @@
|
||||
param(
|
||||
[Parameter(Mandatory=$true)][string]$CommitString,
|
||||
[Parameter(Mandatory=$true)][string]$DockerVersion,
|
||||
[Parameter(Mandatory=$false)][string]$Platform
|
||||
[Parameter(Mandatory=$false)][string]$Platform,
|
||||
[Parameter(Mandatory=$false)][string]$Product
|
||||
)
|
||||
|
||||
$ErrorActionPreference = "Stop"
|
||||
@@ -45,6 +46,7 @@ const (
|
||||
Version string = "'+$DockerVersion+'"
|
||||
BuildTime string = "'+$buildDateTime+'"
|
||||
PlatformName string = "'+$Platform+'"
|
||||
ProductName string = "'+$Product+'"
|
||||
)
|
||||
|
||||
// AUTOGENERATED FILE; see hack\make\.go-autogen.ps1
|
||||
|
||||
Reference in New Issue
Block a user