Skip to content

Commit

Permalink
do not attach the action container stdout/stderr to the current process
Browse files Browse the repository at this point in the history
when tink-worker is configured with --capture-action-logs=false the action
container stdout/stderr must not be attached to the current process.

that configuration is used when there is an existing docker log-driver, which
will capture the all the containers logs without tink-worker help.

this prevents the action container logs from being duplicated in the
tink-worker container logs and in the action container docker logs.

Signed-off-by: Rui Lopes <rgl@ruilopes.com>
  • Loading branch information
rgl committed Oct 9, 2021
1 parent e8019c9 commit 0404155
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion cmd/tink-worker/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM alpine:3.11
FROM alpine:3.14
ENTRYPOINT [ "/usr/bin/tink-worker" ]

ARG TARGETARCH
Expand Down
4 changes: 2 additions & 2 deletions cmd/tink-worker/internal/action.go
Original file line number Diff line number Diff line change
Expand Up @@ -31,8 +31,8 @@ func (w *Worker) createContainer(ctx context.Context, cmd []string, wfID string,
Env: action.GetEnvironment(),
}
if !captureLogs {
config.AttachStdout = true
config.AttachStderr = true
config.AttachStdout = false
config.AttachStderr = false
config.Tty = false
}

Expand Down

0 comments on commit 0404155

Please sign in to comment.