Skip to content
Snippets Groups Projects
Commit 2b77e21b authored by Nick Thomas's avatar Nick Thomas
Browse files

Remove the build container after execution has completed

parent abc1f12d
Branches
Tags
No related merge requests found
......@@ -50,7 +50,7 @@ type executor struct {
executors.AbstractExecutor
client docker_helpers.Client
failures []string // IDs of containers that have failed in some way
builds []*types.Container
builds []string // IDs of successfully created build containers
services []*types.Container
caches []string // IDs of cache containers
options dockerOptions
......@@ -777,6 +777,8 @@ func (s *executor) createContainer(containerType, imageName string, cmd []string
s.failures = append(s.failures, resp.ID)
return nil, err
}
s.builds = append(s.builds, resp.ID)
return &inspect, nil
}
......@@ -1112,8 +1114,8 @@ func (s *executor) Cleanup() {
remove(cacheID)
}
for _, build := range s.builds {
remove(build.ID)
for _, buildID := range s.builds {
remove(buildID)
}
wg.Wait()
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment