I’m trying to setup Bitrise access to our self hosted instance of GitLab.
Problem is that our configuration doesn’t allow ssh access to the repos from a network that is not in our VPN so only https access is granted.
But our repositories are private, therefore Bitrise fails to access.
We managed to grant access to BuddyBuild: GitLab generates a Private Access Token that grants access to its API, that BuddyBuild uses to access the repo.
Is there any way to achieve the same with Bitrise?
Do you have any hint about the next steps?
I’ve just started a new job in a new company and since I’ve already used Bitrise in past I was looking forward to use it in here as well.
Open your Terminal and cd into the repo root (ideally do a clean git clone too, but not required)
In the repo’s root dir (in Terminal) run: bitrise init (this will generate a bitrise.yml in that directory.)
Open the Workflow editor of the app on bitrise.io and copy paste the bitrise.yml from your Mac/Linux into the editor’s bitrise.yml tab
In your case, to use a private https repo you’ll have to do one more thing: replace the Activate SSH Key step with Authenticate host with netrc and configure that step for your server. Note: password can be the GitLab Private Access Token I believe.
That should be all. If you have any questions just let us know!
thanks for the quick reply.
I’m trying your steps but when I run bitrise init I get FATA[14:11:46] Plugin (init) not installed.
I guess I’m missing something here.
I’m on OSX, the brew update && brew install bitrise went well and Bitrise 1.12.0 is installed.
Ahh, indeed - I’ll file a bug report for the CLI, the missing step is:
bitrise setup
After this you can run the bitrise init (or any other command) as this will ensure everything’s prepared / all plugins (like the init one) are available.
This is auto-performed the first time you run a build, otherwise it has to be called manually (but should not be for init, so I’ll create the bug report )
sorry to bother you again but I’m trapped on another issue.
I’m not actually sure it’s self-hosted-related but I’m giving it a go, in case we can always move it to a separate thread.
In my buddybuild configuration there is a nice feature: whenever I create a Merge Request on GitLab a new build is triggered on BuddyBuild (that’s easy to achieve with bitrise too) and the Merge Request shows a link to the build as “pipeline” and the Merge buttons switches to “Merge when pipeline succeeds” (see attached picture).
That’s really cool and it’s something I’m trying to achieve with Bitrise as well.
Is there any way you can help me with this matter?
I’ve been trying different configurations of webhooks but with no success.
UPDATE: for reporting back the status of the build to a self hosted GitLab instance we now have a Step: GitLab status step v0.9.0 released
This is of course just the first step, we plan to support this use case better, from adding a new repo to having the setup prepared without adding an additional step, but for now the Step can be used for reporting back the status.