|
@@ -22,6 +22,7 @@ import (
|
|
type Execution struct {
|
|
type Execution struct {
|
|
client client.APIClient
|
|
client client.APIClient
|
|
DaemonInfo system.Info
|
|
DaemonInfo system.Info
|
|
|
|
+ DaemonVersion types.Version
|
|
PlatformDefaults PlatformDefaults
|
|
PlatformDefaults PlatformDefaults
|
|
protectedElements protectedElements
|
|
protectedElements protectedElements
|
|
}
|
|
}
|
|
@@ -49,10 +50,15 @@ func FromClient(c *client.Client) (*Execution, error) {
|
|
if err != nil {
|
|
if err != nil {
|
|
return nil, errors.Wrapf(err, "failed to get info from daemon")
|
|
return nil, errors.Wrapf(err, "failed to get info from daemon")
|
|
}
|
|
}
|
|
|
|
+ v, err := c.ServerVersion(context.Background())
|
|
|
|
+ if err != nil {
|
|
|
|
+ return nil, errors.Wrapf(err, "failed to get version info from daemon")
|
|
|
|
+ }
|
|
|
|
|
|
return &Execution{
|
|
return &Execution{
|
|
client: c,
|
|
client: c,
|
|
DaemonInfo: info,
|
|
DaemonInfo: info,
|
|
|
|
+ DaemonVersion: v,
|
|
PlatformDefaults: getPlatformDefaults(info),
|
|
PlatformDefaults: getPlatformDefaults(info),
|
|
protectedElements: newProtectedElements(),
|
|
protectedElements: newProtectedElements(),
|
|
}, nil
|
|
}, nil
|
|
@@ -220,3 +226,8 @@ func EnsureFrozenImagesLinux(testEnv *Execution) error {
|
|
func (e *Execution) GitHubActions() bool {
|
|
func (e *Execution) GitHubActions() bool {
|
|
return os.Getenv("GITHUB_ACTIONS") != ""
|
|
return os.Getenv("GITHUB_ACTIONS") != ""
|
|
}
|
|
}
|
|
|
|
+
|
|
|
|
+// NotAmd64 returns true if the daemon's architecture is not amd64
|
|
|
|
+func (e *Execution) NotAmd64() bool {
|
|
|
|
+ return e.DaemonVersion.Arch != "amd64"
|
|
|
|
+}
|