Docker authorization plugin won't allow mouting volume below $BITBUCKET_CLONE_DIR

XMLWordPrintable

      Issue

      Related to Issue BCLOUD-15844

      I understand that the docker auth plugin is used to ensure that no directories above $BITBUCKET_CLONE_DIR are mounted for security reasons.
      My issues is that no directories below $BITBUCKET_CLONE_DIR can be mounted either.

      This bug started between 2018/06/08 and 2018/06/12

      Usecase

      I have two repositories:

      1. Application source code.
      2. Docker container for the application.

      Pushing commits to the second repo should trigger a build of the image, clone the application source code down, mount to the container and run the tests, then push to dockerhub. My problem is that I can't clone the application source code directly to $BITBUCKET_CLONE_DIR because it's not empty (the docker files are there).

      I can't include my docker image in the application repo, because if I rebuild and push the docker image for every single test of the application I'll run out of build minutes.

      Error

      This bug started between 2018/06/08 and 2018/06/12. The git clone step on the docker repo was actually working on 2018/06/08, mounting a directory below $BITBUCKET_CLONE_DIR. As of today (2018/06/12) it fails with this error:

      docker: Error response from daemon: authorization denied by plugin pipelines: -v only supports $BITBUCKET_CLONE_DIR.
      

      I have tried both -v $PWD/ApplicationSrc:/some/dir/on/docker and -v $BITBUCKET_CLONE_DIR/ApplicationSrc:/some/dir/on/docker both of which returned the same error.

      I'd really appreciate if the auth plugin could be reverted to allow mounting of directories below $BITBUCKET_CLONE_DIR

            Assignee:
            Unassigned
            Reporter:
            conors_nli
            Votes:
            12 Vote for this issue
            Watchers:
            19 Start watching this issue

              Created:
              Updated:
              Resolved: