mirror of
https://gitea.com/gitea/runner.git
synced 2026-11-08 16:20:29 +00:00
fix: make container.sweep opt-in (#1389)
Sweeping removed every container a job started through its Docker proxy, which silently tore down services that jobs deploy to the runner's own Docker daemon. Deploying from a runner on the target host is common, so `container.sweep` now defaults to `false` and CI-only runners can opt in with `container.sweep: true`. Fixes https://gitea.com/gitea/runner/issues/1385 Reviewed-on: https://gitea.com/gitea/runner/pulls/1389 Reviewed-by: bircni <[email protected]> Co-authored-by: silverwind <[email protected]>
This commit is contained in:
1 parent
95ef17d022
commit
bb6d793cb9
8 files changed
+9
-8
No files matched your search
@@ -612,7 +612,7 @@ func (r *Runner) run(ctx context.Context, task *runnerv1.Task, reporter *report.
|
||||
},
|
||||
ContainerOptions: r.cfg.Container.Options,
|
||||
ServiceReadyTimeout: r.cfg.Container.ServiceReadyTimeout,
|
||||
NoSweep: r.cfg.Container.Sweep != nil && !*r.cfg.Container.Sweep,
|
||||
Sweep: r.cfg.Container.Sweep,
|
||||
ContainerDaemonSocket: r.cfg.Container.DockerHost,
|
||||
Privileged: r.cfg.Container.Privileged,
|
||||
DefaultActionInstance: r.getDefaultActionsURL(task),
|
||||
|
||||
Reference in new issue
Block a user