1
0
Fork 0
mirror of https://github.com/moby/moby.git synced 2022-11-09 12:21:53 -05:00
Commit graph

31 commits

Author SHA1 Message Date
Solomon Hykes
8d213e91b3 Merge pull request #5706 from vieux/remove_add_string 2014-05-14 17:31:52 -07:00
Solomon Hykes
d61190169d Engine: ensure all pipes are properly closed by Receiver and Sender
Docker-DCO-1.1-Signed-off-by: Solomon Hykes <solomon@docker.com> (github: shykes)

[michael@docker.com: fix stdin closing in engine.Job.Run]
[michael@docker.com: fix fd leak in engine.Receiver.Run]
Docker-DCO-1.1-Signed-off-by: Michael Crosby <michael@docker.com> (github: crosbymichael)

Docker-Tested-By: Solomon Hykes <solomon@docker.com>
Docker-Tested-by: Michael Crosby <michael@docker.com>
2014-05-09 16:12:21 -07:00
Victor Vieux
e304e3a662 remove addString and replace Tail
Docker-DCO-1.1-Signed-off-by: Victor Vieux <vieux@docker.com> (github: vieux)
2014-05-09 18:09:59 +00:00
Michael Crosby
f90029611f Add exported status code from a job
This allows the job's status code to be consumed externally so that we
can use it as an exit code or saving to a state file.
Docker-DCO-1.1-Signed-off-by: Michael Crosby <michael@crosbymichael.com> (github: crosbymichael)
2014-04-23 13:47:56 -07:00
Solomon Hykes
ea2fba5ce0 Engine: optional Logging field to disable custom logging in engine.
* The default behavior is preserved
* This disables the use of the `TEST` environment variable in engine.

Docker-DCO-1.1-Signed-off-by: Solomon Hykes <solomon@docker.com> (github: shykes)
2014-04-07 21:41:25 +00:00
Victor Vieux
4a4915c8ee Merge pull request #4312 from shykes/engine-error-reporting
Engine: clearer job error reporting
2014-02-24 13:58:12 -08:00
Solomon Hykes
8a1778301b Engine: clearer job error reporting
* Job.Error and Job.Errorf always print a newline.
* Avoid redundant prefixing of error messages.

Docker-DCO-1.1-Signed-off-by: Solomon Hykes <solomon@docker.com> (github: shykes)
2014-02-24 11:53:56 -08:00
Solomon Hykes
2019a73f03 Engine.ParseJob: create a new job from a shell-like text command.
Docker-DCO-1.1-Signed-off-by: Solomon Hykes <solomon@docker.com> (github: shykes)
2014-02-24 11:38:13 -08:00
Victor Vieux
8fbdb7b59e add setSubEnv and getSubEnv
Docker-DCO-1.1-Signed-off-by: Victor Vieux <victor.vieux@docker.com> (github: vieux)
2014-01-31 04:01:46 +00:00
Victor Vieux
24086fa75d job.error\* now return engine.StatusErr
Docker-DCO-1.1-Signed-off-by: Victor Vieux <victor.vieux@docker.com> (github: vieux)
2014-01-31 04:01:46 +00:00
Victor Vieux
1498cd4e05 use exists
Docker-DCO-1.1-Signed-off-by: Victor Vieux <victor.vieux@docker.com> (github: vieux)
2014-01-31 02:21:59 +00:00
Victor Vieux
187646127f fix convertion issues
Docker-DCO-1.1-Signed-off-by: Victor Vieux <victor.vieux@docker.com> (github: vieux)
2014-01-30 00:56:42 +00:00
Victor Vieux
9dcbdbc4b1 move pull and import to a job
Docker-DCO-1.1-Signed-off-by: Victor Vieux <victor.vieux@docker.com> (github: vieux)
2014-01-24 14:46:31 -08:00
Victor Vieux
85b9338205 add GetenvInt64 ans SetenvInt64 2013-12-13 16:29:22 -08:00
Victor Vieux
d5f5ecb658 improve GetenvJson 2013-12-13 16:02:19 -08:00
Victor Vieux
930ec9f52c move commit to job 2013-12-13 14:19:56 -08:00
Solomon Hykes
bef8de9319 Engine: integer job status, improved stream API
* Jobs return an integer status instead of a string
* Status convention mimics unix process execution: 0=success, 1=generic error, 127="no such command"
* Stdout and Stderr support multiple thread-safe data receivers and ring buffer filtering
2013-12-11 11:52:59 -08:00
Solomon Hykes
a80c059bae Engine: break out Env utilities into their own type - Env 2013-12-08 06:06:05 +00:00
Solomon Hykes
a4f8a2494b Engine: integer job status, improved stream API
* Jobs return an integer status instead of a string
* Status convention mimics unix process execution: 0=success, 1=generic error, 127="no such command"
* Stdout and Stderr support multiple thread-safe data receivers and ring buffer filtering
2013-11-30 00:25:46 +00:00
Victor Vieux
8e5ab5bfca improve tests on the engine 2013-11-19 11:47:47 -08:00
Solomon Hykes
359a6f49b9 Move integration tests to integration/, expose missing public methods in the core 2013-11-14 10:50:00 -08:00
Solomon Hykes
b00d5f0185 gofmt 2013-11-13 19:25:55 +00:00
Solomon Hykes
6c4393ccbb Merge branch 'job-create-start-clean' into engine-patch-2
Conflicts:
	engine/engine.go
	engine/job.go
	server.go
	utils_test.go
2013-11-13 00:36:20 +00:00
Guillaume J. Charmes
6998c3c387
go fmt 2013-11-07 12:27:33 -08:00
Solomon Hykes
8d6df3a7e2 Remove debug messages 2013-11-05 23:00:20 +00:00
Solomon Hykes
e5f8ab6160 Engine: 'create' creates a container and prints its ID on stdout 2013-11-05 23:00:20 +00:00
Solomon Hykes
434f06d03d Engine: fix a bug when encoding a job environment to json 2013-11-05 23:00:20 +00:00
Solomon Hykes
4e7cb37dcc Engine: improved logging and identification of jobs 2013-11-05 18:39:59 +00:00
Solomon Hykes
958b4a8757 Engine: 'start' starts the specified container 2013-11-05 18:39:59 +00:00
Solomon Hykes
e8491ae54c Engine: cleanly log the start and end of each engine job 2013-10-26 17:17:45 -07:00
Solomon Hykes
0d1a825137 Minimal, unintrusive implementation of a cleaner Job API.
* Implement a new package: engine. It exposes a useful but minimalist job API.
* Refactor main() to instanciate an Engine instead of a Server directly.
* Refactor server.go to register an engine job.

This is the smallest possible refactor which can include the new Engine design
into master. More gradual refactoring will follow.
2013-10-26 14:18:13 -07:00