Merge pull request #37151 from tonistiigi/experimental-buildkit

Experimental BuildKit support
Upstream-commit: c752b0991e31ba9869ab6a0661af57e9423874fb
Component: engine
This commit is contained in:
Tibor Vass
2018-06-12 13:31:48 -07:00
committed by GitHub
213 changed files with 38196 additions and 243 deletions
@@ -2534,7 +2534,7 @@ func (s *DockerSuite) TestBuildDockerignoringBadExclusion(c *check.C) {
build.WithFile(".dockerignore", "!\n"),
)).Assert(c, icmd.Expected{
ExitCode: 1,
Err: "error checking context: 'illegal exclusion pattern: \"!\"",
Err: `illegal exclusion pattern: "!"`,
})
}
@@ -126,8 +126,12 @@ func (s *DockerSuite) TestBuildAddChangeOwnership(c *check.C) {
// * Run a 1-year-long sleep from a docker build.
// * When docker events sees container start, close the "docker build" command
// * Wait for docker events to emit a dying event.
//
// TODO(buildkit): this test needs to be rewritten for buildkit.
// It has been manually tested positive. Confirmed issue: docker build output parsing.
// Potential issue: newEventObserver uses docker events, which is not hooked up to buildkit.
func (s *DockerSuite) TestBuildCancellationKillsSleep(c *check.C) {
testRequires(c, DaemonIsLinux)
testRequires(c, DaemonIsLinux, TODOBuildkit)
name := "testbuildcancellation"
observer, err := newEventObserver(c)
@@ -90,7 +90,7 @@ func (s *DockerSuite) TestHealth(c *check.C) {
buildImageSuccessfully(c, "no_healthcheck", build.WithDockerfile(`FROM testhealth
HEALTHCHECK NONE`))
out, _ = dockerCmd(c, "inspect", "--format={{.ContainerConfig.Healthcheck.Test}}", "no_healthcheck")
out, _ = dockerCmd(c, "inspect", "--format={{.Config.Healthcheck.Test}}", "no_healthcheck")
c.Check(out, checker.Equals, "[NONE]\n")
// Enable the checks from the CLI
@@ -208,6 +208,10 @@ func SwarmInactive() bool {
return testEnv.DaemonInfo.Swarm.LocalNodeState == swarm.LocalNodeStateInactive
}
func TODOBuildkit() bool {
return os.Getenv("DOCKER_BUILDKIT") == ""
}
// testRequires checks if the environment satisfies the requirements
// for the test to run or skips the tests.
func testRequires(c requirement.SkipT, requirements ...requirement.Test) {