Bitbucket pipelines: can't map volume to docker to expose test results

oxyhouse December 11, 2017

I'm attempting to expose test results for automated test reporting of a nodejs app build into a docker. Here's the yml

options:
  docker: true

pipelines:
  default:
    - step:
        script: 
          - export IMAGE_NAME=$DOCKER_HUB_USERNAME/currency-updater:$BITBUCKET_COMMIT
          - docker build -t $IMAGE_NAME .
          - docker login --username $DOCKER_HUB_USERNAME --password $DOCKER_HUB_PASSWORD
          - docker push $IMAGE_NAME
    - step:
        script:
          - export IMAGE_NAME=$DOCKER_HUB_USERNAME/currency-updater:$BITBUCKET_COMMIT
          - docker login --username $DOCKER_HUB_USERNAME --password $DOCKER_HUB_PASSWORD
          - docker run -v="$BITBUCKET_CLONE_DIR/test-results:/app/test-results" -w="./app" $IMAGE_NAME run-script test-junit

When step 2 executes, it complains that it has some permissions limitations

docker run -v="$BITBUCKET_CLONE_DIR/test-results:/app/test-results" -w="./app" $IMAGE_NAME run-script test-junit
docker: Error response from daemon: authorization denied by plugin pipelines: Command not supported.
See 'docker run --help'.

even if the volume is located inside clone dir as requested by guidelines. If I run the same commands locally (with the needed adaptations) it obviously runs. 

1 comment

DmytroS January 11, 2018

The same for me!

As soon as I add docker volume parameters, i get the same error.

Comment

Log in or Sign up to comment
TAGS
AUG Leaders

Atlassian Community Events