When using a private step it fails on Linux but succeeds on the Mac stack.
YML
- git::git@bitbucket.org:my_owner/my-repo.git@1.1.0:
title: My private step
LINUX
you should probably use a "https://..." git clone URL,
instead of the "git@..." git clone URL which usually requires authentication
even if the repository is open source!
+------------------------------------------------------------------------------+
| (8) My private step |
+------------------------------------------------------------------------------+
| id: git@bitbucket.org:my_owner/my-repo.git... |
| version: 1.1.0 |
| collection: git |
| toolkit: bash |
| time: 2020-11-24T14:57:59Z |
+------------------------------------------------------------------------------+
| |
| |
+---+---------------------------------------------------------------+----------+
| x | My private step (exit code: 1) | 0.42 sec |
+---+---------------------------------------------------------------+----------+
| Issue tracker: Not provided |
| Source: Not provided |
+---+---------------------------------------------------------------+----------+```
MAC
It just works
Any idea what’s wrong? I also tried the https:// way. Same result.
This is currently blocking us from using the Linux stack.
Debugging custom code is outside the scope of our normal support. We make a best effort to help, but there’s a limit to how much we can do.
In this case it’s a little hard to debug the issue when we can’t see your codebase. Is this a public repo? If so, can you share the link? I’m happy to take a look and see if I spot something.
I don’t think it’s the script code.
But just something wrong with access rights maybe?
If I copy the shell script and add it to a script step it works fine.
But hosted on private bitbucket with same ssh as the cloned repo it fails (cloning works).
It’s just weird that it fails on Linux but succeeds on Mac.
But here is the shell code anyway. This is just a basic script. But we have multiple private steps who also instant fail on linux.
set -ex
version=$(echo $BITRISE_GIT_BRANCH| sed -e 's/.*\///g')
envman add --key GIT_BRANCH_VERSION --value "$version"
EDIT: I just hosted the step public and everything works fine. (https://github.com/sepperousseau/test-step)
The problem occurs when It’s privately hosted. You could say well just host it public.
But for some of our scripts that’s just not possible. It’s just weird that the private step works on Mac.
I’m investigating this right now… In the mean time, is there any reason you can’t just use our “Script” step? A custom step feels overkill for three lines of code…
Hi! I’m not able to replicate the issue on this side. Would you mind sending me a couple build URL’s? One where it’s working (mac) and one where it fails (linux)? Thanks!
We’ve done some digging on this and we’re not certain as to why your steps are failing on Linux. We’re not able to replicate the problem locally.
Troubleshooting private steps is beyond the scope of normal Bitrise support. While we make a best effort to support issues like this, there’s a limit to how much we can help.
In general, rather than using private steps, we suggest using the “Script” step whenever possible.