Skip to content

Commit

Permalink
[skip ci] remove obsolete code
Browse files Browse the repository at this point in the history
  • Loading branch information
timfeirg committed Mar 2, 2017
1 parent 98233fb commit f165780
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 19 deletions.
2 changes: 1 addition & 1 deletion VERSION
@@ -1 +1 @@
0.7.15
0.7.16
6 changes: 2 additions & 4 deletions devtools/test.yaml
Expand Up @@ -11,12 +11,10 @@ entrypoints:
ports:
- "5000/tcp"
restart: "always"
health_check: "tcp"
web-bad-health:
cmd: "python run.py --interval 15"
ports:
- "5000/tcp"
health_check: "http"
web-bad-health-no-check:
cmd: "python run.py --interval 15"
ports:
Expand Down Expand Up @@ -53,7 +51,7 @@ entrypoints:
build:
- "curl www.baidu.com"
- "pip install -r requirements.txt"
base: "hub.ricebook.net/base/alpine:python-2016.04.24"
base: "hub.ricebook.net/base/centos:python-latest"
mount_paths:
- "/var/www/html"
- "/data/test-ci"
Expand All @@ -67,7 +65,7 @@ combos:
entrypoint: "web"
networks:
- "release"
envs: "FOO=bar;"
extra_env: "FOO=bar;"
permitted_users:
- "tonic"
- "liuyifu"
Expand Down
14 changes: 0 additions & 14 deletions types/specs.go
Expand Up @@ -26,7 +26,6 @@ type Entrypoint struct {
AfterStart string `yaml:"after_start,omitempty"`
BeforeStop string `yaml:"before_stop,omitempty"`
Ports []Port `yaml:"ports,omitempty,flow"`
Exposes []Expose `yaml:"exposes,omitempty,flow"`
NetworkMode string `yaml:"network_mode,omitempty"`
RestartPolicy string `yaml:"restart,omitempty"`
HealthCheckPort int `yaml:"healthcheck_port,omitempty,flow"`
Expand Down Expand Up @@ -61,19 +60,6 @@ func (p Port) Proto() string {
return parts[1]
}

type Expose string

// suppose expose is like 80/tcp:46656/tcp
func (e Expose) ContainerPort() Port {
ports := strings.Split(string(e), ":")
return Port(ports[0])
}

func (e Expose) HostPort() Port {
ports := strings.Split(string(e), ":")
return Port(ports[1])
}

// load Specs from content
func LoadSpecs(content string) (Specs, error) {
specs := Specs{}
Expand Down

0 comments on commit f165780

Please sign in to comment.