浏览代码

Update compose-file to bc280351b9589b05c6da031d9f93c5c5d22db922

Signed-off-by: Vincent Demeester <vincent@sbr.pm>
(cherry picked from commit b0903c9db0e1fe0226102e3887b5c30474837e97)
Signed-off-by: Victor Vieux <victorvieux@gmail.com>
Vincent Demeester 8 年之前
父节点
当前提交
f44e2dca56

+ 1 - 1
vendor.conf

@@ -132,7 +132,7 @@ github.com/flynn-archive/go-shlex 3f9db97f856818214da2e1057f8ad84803971cff
 github.com/docker/go-metrics 86138d05f285fd9737a99bee2d9be30866b59d72
 
 # composefile
-github.com/aanand/compose-file 8cff34df885ef07824138236bc4d27d359888b17
+github.com/aanand/compose-file a70cb6ea5c403c383b5117dcd1dea78880a47824
 github.com/mitchellh/mapstructure f3009df150dadf309fdee4a54ed65c124afad715
 github.com/xeipuuv/gojsonpointer e0fe6f68307607d540ed8eac07a342c33fa1b54a
 github.com/xeipuuv/gojsonreference e02fc20de94c78484cd5ffb007f8af96be030a45

+ 10 - 1
vendor/github.com/aanand/compose-file/loader/loader.go

@@ -134,7 +134,7 @@ func GetUnsupportedProperties(configDetails types.ConfigDetails) []string {
 
 func sortedKeys(set map[string]bool) []string {
 	var keys []string
-	for key, _ := range set {
+	for key := range set {
 		keys = append(keys, key)
 	}
 	sort.Strings(keys)
@@ -467,6 +467,8 @@ func convertField(
 	switch fieldTag {
 	case "":
 		return data, nil
+	case "healthcheck":
+		return loadHealthcheck(data)
 	case "list_or_dict_equals":
 		return loadMappingOrList(data, "="), nil
 	case "list_or_dict_colon":
@@ -571,6 +573,13 @@ func loadShellCommand(value interface{}) (interface{}, error) {
 	return value, nil
 }
 
+func loadHealthcheck(value interface{}) (interface{}, error) {
+	if str, ok := value.(string); ok {
+		return append([]string{"CMD-SHELL"}, str), nil
+	}
+	return value, nil
+}
+
 func loadSize(value interface{}) (int64, error) {
 	switch value := value.(type) {
 	case int:

文件差异内容过多而无法显示
+ 1 - 1
vendor/github.com/aanand/compose-file/schema/bindata.go


+ 1 - 1
vendor/github.com/aanand/compose-file/schema/schema.go

@@ -32,7 +32,7 @@ func init() {
 
 // Validate uses the jsonschema to validate the configuration
 func Validate(config map[string]interface{}) error {
-	schemaData, err := Asset("data/config_schema_v3.json")
+	schemaData, err := Asset("data/config_schema_v3.0.json")
 	if err != nil {
 		return err
 	}

+ 2 - 2
vendor/github.com/aanand/compose-file/types/types.go

@@ -124,7 +124,7 @@ type DeployConfig struct {
 }
 
 type HealthCheckConfig struct {
-	Command  []string `compose:"shell_command"`
+	Test     []string `compose:"healthcheck"`
 	Timeout  string
 	Interval string
 	Retries  *uint64
@@ -132,7 +132,7 @@ type HealthCheckConfig struct {
 }
 
 type UpdateConfig struct {
-	Parallelism     uint64
+	Parallelism     *uint64
 	Delay           time.Duration
 	FailureAction   string `mapstructure:"failure_action"`
 	Monitor         time.Duration

部分文件因为文件数量过多而无法显示