Hello,
I get the following error in my pipeline when using slack-notify .
<span>+ docker container run \</span>
<span>--volume=/opt/atlassian/pipelines/agent/build:/opt/atlassian/pipelines/agent/build \</span>
<span>--volume=/usr/local/bin/docker:/usr/local/bin/docker:ro \</span>
<span>--volume=/opt/atlassian/pipelines/agent/ssh:/opt/atlassian/pipelines/agent/ssh:ro \</span>
<span>--volume=/opt/atlassian/pipelines/agent/build/.bitbucket/pipelines/generated/pipeline/pipes:/opt/atlassian/pipelines/agent/build/.bitbucket/pipelines/generated/pipeline/pipes \</span>
<span>--volume=/opt/atlassian/pipelines/agent/build/.bitbucket/pipelines/generated/pipeline/pipes/atlassian/slack-notify:/opt/atlassian/pipelines/agent/build/.bitbucket/pipelines/generated/pipeline/pipes/atlassian/slack-notify \</span>
<span>--workdir=$(pwd) \</span>
<span>--label=org.bitbucket.pipelines.system=true \</span>
<span>--env=BITBUCKET_STEP_TRIGGERER_UUID="$BITBUCKET_STEP_TRIGGERER_UUID" \</span>
<span>--env=BITBUCKET_REPO_FULL_NAME="$BITBUCKET_REPO_FULL_NAME" \</span>
<span>--env=BITBUCKET_GIT_HTTP_ORIGIN="$BITBUCKET_GIT_HTTP_ORIGIN" \</span>
<span>--env=BITBUCKET_PROJECT_UUID="$BITBUCKET_PROJECT_UUID" \</span>
<span>--env=BITBUCKET_REPO_IS_PRIVATE="$BITBUCKET_REPO_IS_PRIVATE" \</span>
<span>--env=BITBUCKET_WORKSPACE="$BITBUCKET_WORKSPACE" \</span>
<span>--env=BITBUCKET_REPO_OWNER_UUID="$BITBUCKET_REPO_OWNER_UUID" \</span>
<span>--env=BITBUCKET_BRANCH="$BITBUCKET_BRANCH" \</span>
<span>--env=BITBUCKET_REPO_UUID="$BITBUCKET_REPO_UUID" \</span>
<span>--env=BITBUCKET_PROJECT_KEY="$BITBUCKET_PROJECT_KEY" \</span>
<span>--env=BITBUCKET_REPO_SLUG="$BITBUCKET_REPO_SLUG" \</span>
<span>--env=CI="$CI" \</span>
<span>--env=BITBUCKET_REPO_OWNER="$BITBUCKET_REPO_OWNER" \</span>
<span>--env=BITBUCKET_STEP_RUN_NUMBER="$BITBUCKET_STEP_RUN_NUMBER" \</span>
<span>--env=BITBUCKET_BUILD_NUMBER="$BITBUCKET_BUILD_NUMBER" \</span>
<span>--env=BITBUCKET_GIT_SSH_ORIGIN="$BITBUCKET_GIT_SSH_ORIGIN" \</span>
<span>--env=BITBUCKET_PIPELINE_UUID="$BITBUCKET_PIPELINE_UUID" \</span>
<span>--env=BITBUCKET_COMMIT="$BITBUCKET_COMMIT" \</span>
<span>--env=BITBUCKET_CLONE_DIR="$BITBUCKET_CLONE_DIR" \</span>
<span>--env=PIPELINES_JWT_TOKEN="$PIPELINES_JWT_TOKEN" \</span>
<span>--env=BITBUCKET_STEP_UUID="$BITBUCKET_STEP_UUID" \</span>
<span>--env=BITBUCKET_DOCKER_HOST_INTERNAL="$BITBUCKET_DOCKER_HOST_INTERNAL" \</span>
<span>--env=DOCKER_HOST="tcp://host.docker.internal:2375" \</span>
<span>--env=BITBUCKET_PIPE_SHARED_STORAGE_DIR="/opt/atlassian/pipelines/agent/build/.bitbucket/pipelines/generated/pipeline/pipes" \</span>
<span>--env=BITBUCKET_PIPE_STORAGE_DIR="/opt/atlassian/pipelines/agent/build/.bitbucket/pipelines/generated/pipeline/pipes/atlassian/slack-notify" \</span>
<span>--env=MESSAGE="$BITBUCKET_TRIGGERER_USERNAME - $COMMIT_MESSAGE </span>
<span>$LINK </span>
<span>This will be in the next release." \</span>
<span>--env=WEBHOOK_URL="<a href="https://hooks.slack.com/services/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" rel="noopener nofollow noreferrer" target="_blank">https://hooks.slack.com/services/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</a>" \</span>
<span>--add-host="host.docker.internal:$BITBUCKET_DOCKER_HOST_INTERNAL" \</span>
<span>bitbucketpipelines/slack-notify:2.0.0</span>
<span>/tmp/e5021ecc-2427-51f0-ad65-08124a7fd8a5/tmp/shellScript1224050314865190000.sh: line 54: docker: Permission denied</span>
This is what pipe that gives the error in bitbucket-pipeline.yml
- step: &send-to-slack-merge
name: Send to slack merge
runs-on:
- qbank3.runner
image:
name: eu.gcr.io/qbnk-cloud/qbank3/phpfpm:1.2.5-alpine
username: _json_key
password: '$GCLOUD_API_JSON'
script:
- COMMIT_MESSAGE=`git log --format=%B -n 1 $BITBUCKET_COMMIT`
- export foundTicket=$(echo $COMMIT_MESSAGE | grep -oE '([a-zA-Z]{2,}[-]{1}[0-9]{1,})')
- pipe: atlassian/slack-notify:2.0.0
variables:
MESSAGE: "$BITBUCKET_TRIGGERER_USERNAME - $COMMIT_MESSAGE \n$LINK \nThis will be in the next release."
I am using my own runner, could that be the issue? I don't understand why Docker does not have permission!?