Bump docker version (#1334)

to support compose 3.8
This commit is contained in:
Hang Yan
2020-10-31 17:30:28 +08:00
committed by GitHub
parent f31257f5cf
commit ee3228cb7a
5 changed files with 102 additions and 17 deletions
+1 -1
View File
@@ -241,7 +241,7 @@ func (s *ServiceConfig) GetOSUpdateStrategy() *deployapi.RollingDeploymentStrate
delay := time.Second * 1
if config.Delay != 0 {
delay = config.Delay
delay = time.Duration(config.Delay)
}
interval := cast.ToInt64(delay.Seconds())
+1 -1
View File
@@ -176,7 +176,7 @@ func (c *Compose) LoadFile(files []string) (kobject.KomposeObject, error) {
}
return komposeObject, nil
// Use docker/cli for 3
case "3", "3.0", "3.1", "3.2", "3.3", "3.4", "3.5", "3.6", "3.7":
case "3", "3.0", "3.1", "3.2", "3.3", "3.4", "3.5", "3.6", "3.7", "3.8":
komposeObject, err := parseV3(files)
if err != nil {
return kobject.KomposeObject{}, err
+8 -3
View File
@@ -37,14 +37,19 @@ func durationPtr(value time.Duration) *time.Duration {
return &value
}
func durationTypesPtr(value time.Duration) *types.Duration {
target := types.Duration(value)
return &target
}
func TestParseHealthCheck(t *testing.T) {
helperValue := uint64(2)
check := types.HealthCheckConfig{
Test: []string{"CMD-SHELL", "echo", "foobar"},
Timeout: durationPtr(1 * time.Second),
Interval: durationPtr(2 * time.Second),
Timeout: durationTypesPtr(1 * time.Second),
Interval: durationTypesPtr(2 * time.Second),
Retries: &helperValue,
StartPeriod: durationPtr(3 * time.Second),
StartPeriod: durationTypesPtr(3 * time.Second),
}
// CMD-SHELL or SHELL is included Test within docker/cli, thus we remove the first value in Test