I'm trying to write a custom pipe which ends up doing a docker build and push. I ran into a permissions issues with a mercurial file. When running the "docker build ..." command I got the following error:
error checking context: 'no permission to read from '/opt/atlassian/pipelines/agent/build/.hg/cache/checkisexec''
Running ls -al on that directory within the script revealed that file didn't have global read:
total 20
drwxrwxrwx. 2 nobody nogroup 4096 Mar 13 14:17 .
drwxrwxrwx. 4 nobody nogroup 4096 Mar 13 14:17 ..
-rw-rw-rw-. 1 nobody nogroup 707 Mar 13 14:17 branch2-base
-rw-rw-rw-. 1 nobody nogroup 818 Mar 13 14:17 branch2-served
-rwx--x--x. 1 nobody nogroup 0 Mar 13 14:17 checkisexec
lrwxrwxrwx. 1 nobody nogroup 16 Mar 13 14:17 checklink -> checklink-target
-rw-rw-rw-. 1 nobody nogroup 0 Mar 13 14:17 checklink-target
-rw-rw-rw-. 1 nobody nogroup 2472 Mar 13 14:17 hgtagsfnodes1
I was able to get around it by adding a chmod on that file in the repos pipeline script before calling the pipe (could not do it in the pipe script itself), but that doesn't seem like it should be necessary. Is this a bug or some setting I'm missing? Oh, I'm using the example simple bash-pipe as template for my custom pipe.