-
Notifications
You must be signed in to change notification settings - Fork 12
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
pipelines: not a readable file:bitbucket-pipelines.yml #1
Comments
What is the output of:
? |
I get |
Hmm, that sounds looks interesting as it seems the file is readable. Can you operate on it with other tools? Can you read the file? Can you change the file? (all the same shell, in case you wonder) /e: are you operating on a local file-system? |
I can read the file using
but can't using the keyword 'pipelines' |
A nice, and can you go into that directory and execute the following:
Also having the PHP version would be interesting:
And last but not least a bit of information about your system:
|
Ah an you could try the |
It still says not a readable file. |
$ php -r 'var_dump(is_readable($argv[1]));' -- bitbucket-pipelines.yml --> bool(false) This is what I get after executing those commands mentioned above. |
No, the error comes before opening the file
No, it is not. It just uses any image you name there and will pass that exact name to docker.
No, as written, the image name is not related to the error message. The error message (also confirmed by the "bool(false)") shows that the pipelines utility is seeing that At this point I can only guess what is going on here. Something prevents showing the file as readable. As you say it is the local file-system and in the home-directory could it be that you have SE-Linux or similar running that is preventing showing readability of the file? This is about your system, not the image. Just to make that explicit again. Two more tests:
The first should give bool(true) and the second the number of bytes the file has. But please provide the output so I get more insights. |
The first command gives : bool(true) Can you confirm the way I should run my .yml file? |
Should the pipelines.phar file be inside my cloned project repo? |
Okay now I see it, the file has a SELinux security context. Most likely that one is preventing readability. Check your system configuration and give the pipelines utility enough mojo in the SELinux security context to make This should solve your problem. |
You can try like this: RainLoop/rainloop-webmail#262 (comment) |
should make it working for files w/ acls / se linux contexts. report: #1
should make it working for files w/ acls / se linux contexts. report: #1
should make it working for files w/ acls / se linux contexts. report: #1
I'm preparing 0.0.18 which addresses this issue with falling back to a check if the file can be |
Version 0.0.18 is out and should be w/o that error on files with SE LInux context that make them appear non-readble by testing if the file can be read anyway. Please test it. |
@pparchure Any further feedback on this issue from your end? |
@ktomk : sorry for the late response. It worked for me. Can now run the yaml file locally. That's some great work by you. Thank you. I'll stay in touch if I come across any problems in the future. Thanks a ton for your help. |
workaround for error on docker pull: $ bin/pipelines --deploy mount --pipeline custom/lint-php +++ step #1 name...........: (unnamed) effective-image: php:5.3 container......: pipelines-1.no-name.custom-lint-php.pipelines container-id...: *failure* pipelines: setting up the container failed Unable to find image 'php:5.3' locally docker: Error response from daemon: unexpected EOF. See 'docker run --help'. exit status: 125 The command "bin/pipelines --deploy mount --pipeline custom/lint-php" exited with 125. it is only so far experiencing with the php:5.3, the problem is known for CI, e.g. [1] or [2]. [1]: https://travis-ci.community/t/docker-pull-fails-often/7137 [2]: https://forums.docker.com/t/docker-pull-causes-error-response-from-daemon-unexpected-eof/88608
workaround for error on docker pull: $ bin/pipelines --deploy mount --pipeline custom/lint-php +++ step #1 name...........: (unnamed) effective-image: php:5.3 container......: pipelines-1.no-name.custom-lint-php.pipelines container-id...: *failure* pipelines: setting up the container failed Unable to find image 'php:5.3' locally docker: Error response from daemon: unexpected EOF. See 'docker run --help'. exit status: 125 The command "bin/pipelines --deploy mount --pipeline custom/lint-php" exited with 125. it is only so far experiencing with the php:5.3, the problem is known for CI, e.g. [1] or [2]. [1]: https://travis-ci.community/t/docker-pull-fails-often/7137 [2]: https://forums.docker.com/t/docker-pull-causes-error-response-from-daemon-unexpected-eof/88608
workaround for error on docker pull: $ bin/pipelines --deploy mount --pipeline custom/lint-php +++ step #1 name...........: (unnamed) effective-image: php:5.3 container......: pipelines-1.no-name.custom-lint-php.pipelines container-id...: *failure* pipelines: setting up the container failed Unable to find image 'php:5.3' locally docker: Error response from daemon: unexpected EOF. See 'docker run --help'. exit status: 125 The command "bin/pipelines --deploy mount --pipeline custom/lint-php" exited with 125. it is only so far experiencing with the php:5.3, the problem is known for CI, e.g. [1] or [2]. [1]: https://travis-ci.community/t/docker-pull-fails-often/7137 [2]: https://forums.docker.com/t/docker-pull-causes-error-response-from-daemon-unexpected-eof/88608
workaround for error on docker pull: $ bin/pipelines --deploy mount --pipeline custom/lint-php +++ step #1 name...........: (unnamed) effective-image: php:5.3 container......: pipelines-1.no-name.custom-lint-php.pipelines container-id...: *failure* pipelines: setting up the container failed Unable to find image 'php:5.3' locally docker: Error response from daemon: unexpected EOF. See 'docker run --help'. exit status: 125 The command "bin/pipelines --deploy mount --pipeline custom/lint-php" exited with 125. it is only so far experiencing with the php:5.3, the problem is known for CI, e.g. [1] or [2]. [1]: https://travis-ci.community/t/docker-pull-fails-often/7137 [2]: https://forums.docker.com/t/docker-pull-causes-error-response-from-daemon-unexpected-eof/88608
the `--file` option accepts "-" (dash) as an argument to read the pipelines yaml from standard input (stdin). a heredoc example: $ <<'PIPELINE' bin/pipelines --file - pipelines: default: - step: image: ktomk/pipelines:busybox script: - printenv | sort PIPELINE �+++ step #1 name...........: (unnamed) effective-image: ktomk/pipelines:busybox container......: pipelines-1.no-name.default.pipelines container-id...: 3e0b182c1bcd �+++ copying files into container... �+ printenv | sort BITBUCKET_BUILD_NUMBER=0 BITBUCKET_CLONE_DIR=/app BITBUCKET_COMMIT=0000000000000000000000000000000000000000 BITBUCKET_REPO_OWNER=pipelines BITBUCKET_REPO_SLUG=pipelines ... the `--file` option further accepts forms of process substitution now as well: $ bin/pipelines --show --file <(cat bitbucket-pipelines.yml) -v info: project directory is '/home/pipelines/workspace/pipelines' info: reading pipelines from /proc/self/fd/11 PIPELINE ID STEP IMAGE NAME default 1 ktomk/pipelines:busybox "pipeline features and introspection" custom/lint-php-5.3 1 php:5.3 no-name custom/unit-tests-php-5.3 1 cespi/php-5.3:cli-latest no-name ... also test yaml parser implementations with a test-point for parser classes.
the `--file` option accepts "-" (dash) as an argument to read the pipelines yaml from standard input (stdin). a heredoc example: $ <<'PIPELINE' bin/pipelines --file - pipelines: default: - step: image: ktomk/pipelines:busybox script: - printenv | sort PIPELINE �+++ step #1 name...........: (unnamed) effective-image: ktomk/pipelines:busybox container......: pipelines-1.no-name.default.pipelines container-id...: 3e0b182c1bcd �+++ copying files into container... �+ printenv | sort BITBUCKET_BUILD_NUMBER=0 BITBUCKET_CLONE_DIR=/app BITBUCKET_COMMIT=0000000000000000000000000000000000000000 BITBUCKET_REPO_OWNER=pipelines BITBUCKET_REPO_SLUG=pipelines ... the `--file` option further accepts forms of process substitution now as well: $ bin/pipelines --show --file <(cat bitbucket-pipelines.yml) -v info: project directory is '/home/pipelines/workspace/pipelines' info: reading pipelines from /proc/self/fd/11 PIPELINE ID STEP IMAGE NAME default 1 ktomk/pipelines:busybox "pipeline features and introspection" custom/lint-php-5.3 1 php:5.3 no-name custom/unit-tests-php-5.3 1 cespi/php-5.3:cli-latest no-name ... also test yaml parser implementations with a test-point for parser classes.
when global docker option enabled, each step automatically gets docker service. missing so far as testing shows: $ bin/pipelines --file test/data/yml/options.yml --docker-client docker-42.42.1-binsh-test-stub +++ step #1 name...........: "docker version" effective-image: ktomk/pipelines:busybox container......: pipelines-1.docker-version.default.pipelines container-id...: 415b9769dd1c +++ copying files into container... /bin/sh: docker: not found + docker --version script non-zero exit status: 127 needs fixing.
when global docker option enabled, each step automatically gets docker service. missing so far as testing shows: $ bin/pipelines --file test/data/yml/options.yml --docker-client docker-42.42.1-binsh-test-stub +++ step #1 name...........: "docker version" effective-image: ktomk/pipelines:busybox container......: pipelines-1.docker-version.default.pipelines container-id...: 415b9769dd1c +++ copying files into container... /bin/sh: docker: not found + docker --version script non-zero exit status: 127 needs fixing.
when global docker option enabled, each step automatically gets docker service. missing so far as testing shows: $ bin/pipelines --file test/data/yml/options.yml --docker-client docker-42.42.1-binsh-test-stub +++ step #1 name...........: "docker version" effective-image: ktomk/pipelines:busybox container......: pipelines-1.docker-version.default.pipelines container-id...: 415b9769dd1c +++ copying files into container... /bin/sh: docker: not found + docker --version script non-zero exit status: 127 needs fixing.
when global docker option enabled, each step automatically gets docker service. missing so far as testing shows: $ bin/pipelines --file test/data/yml/options.yml --docker-client docker-42.42.1-binsh-test-stub +++ step #1 name...........: "docker version" effective-image: ktomk/pipelines:busybox container......: pipelines-1.docker-version.default.pipelines container-id...: 415b9769dd1c +++ copying files into container... /bin/sh: docker: not found + docker --version script non-zero exit status: 127 needs fixing.
Hello,
This is some great work!
But I am stuck at the first step, while running the YAML file. it says it's not a readable file. My YAML file uses a scala-sbt image with sbt commands in the script.
Could you please help me with this issue I am facing. Do I do some things differently?
Thanks,
Prathamesh
The text was updated successfully, but these errors were encountered: