From b9f6b37d1ec65ee0bf4f199e4fe39e4c5dbbc3ea Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Roman=20Van=C3=AD=C4=8Dek?= Date: Fri, 28 Jul 2023 19:57:33 +0200 Subject: [PATCH] Debug search for working directory bind --- plugin.go | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/plugin.go b/plugin.go index cf80550..6871325 100644 --- a/plugin.go +++ b/plugin.go @@ -15,6 +15,7 @@ import ( "github.com/drone-plugins/drone-github-actions/utils" "github.com/pkg/errors" + "time" "github.com/opencontainers/selinux/go-selinux" docker "github.com/docker/docker/client" ) @@ -150,16 +151,21 @@ func getWorkDirPath(p Plugin, ctx context.Context) (string, string, error) { return "", "", errors.Wrap(err, "failed to locate the working directory in the container") } + fmt.Fprintf(os.Stdout, "CWD = %s\n", cwd); + cntr, err := docker.ContainerInspect(ctx, cntrId) if err != nil { return "", "", errors.Wrap(err, "failed to inspect ourselves as a container") } for _, i := range cntr.Mounts { + fmt.Fprintf(os.Stdout, "Source = %s Destination = %s\n", i.Source, i.Destination); if i.Destination == cwd { return i.Source, i.Destination, nil } } + time.Sleep(86400 * time.Second) + return "", "", errors.New("mount point with working directory not found") }