WaitDev waits for the dev pod managers to complete. This essentially waits until all dev pods are closed.
()
| 137 | // WaitDev waits for the dev pod managers to complete. |
| 138 | // This essentially waits until all dev pods are closed. |
| 139 | func (p *pipeline) WaitDev() error { |
| 140 | children := []types.Pipeline{} |
| 141 | p.m.Lock() |
| 142 | for _, v := range p.dependencies { |
| 143 | children = append(children, v) |
| 144 | } |
| 145 | p.m.Unlock() |
| 146 | |
| 147 | // wait for children first |
| 148 | errs := []error{} |
| 149 | for _, child := range children { |
| 150 | err := child.WaitDev() |
| 151 | if err != nil { |
| 152 | errs = append(errs, err) |
| 153 | } |
| 154 | } |
| 155 | |
| 156 | // wait for dev pods to finish |
| 157 | err := p.devPodManager.Wait() |
| 158 | if err != nil { |
| 159 | errs = append(errs, err) |
| 160 | } |
| 161 | |
| 162 | return utilerrors.NewAggregate(errs) |
| 163 | } |
| 164 | |
| 165 | func (p *pipeline) Name() string { |
| 166 | return p.name |