Skip to content

On exitcode != 0, make sure to log the Docker error log #9

@robert-bor

Description

@robert-bor

When a finite Docker process (such as docker ps) does not run because of a lack of privileges, it will quit without printing the error log.

The error.log, however, contains crucial information for the error, eg:

jenkins@some-slave01:~/jenkins_slave/workspace/somecustomer/somecustomer-core/snapshotter$ cat docker-std-err.log 
Got permission denied while trying to connect to the Docker daemon socket at unix:///var/run/docker.sock: Get http://%2Fvar%2Frun%2Fdocker.sock/v1.25/containers/json: dial unix /var/run/docker.sock: connect: permission denied

The code to adjust is in DockerFiniteProcessRunner.execute.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions