Archived Support Site

This support site is archived. You can view the old support discussions but you cannot post new discussions.

GitLab Integration?

Kef's Avatar

Kef

25 Jul, 2017 05:36 AM

Does AppHarbor have any integration with GitLab that allows it to get the latest commits and build them? I tried the Mirroring feature in GitLab but it doesn't seem to work with AppHarbor!
Thank you in advance!

  1. 1 Posted by Kef on 25 Jul, 2017 05:53 AM

    Kef's Avatar

    So I found out that it does work, but takes a really long time for it to update (about 10 minutes I believe). Is there any other alternative to this? or a way to shorten the time?

  2. Support Staff 2 Posted by rune on 26 Jul, 2017 04:00 AM

    rune's Avatar

    Hi,

    We don't have an officia GitLabl integration, but I'm curious to hear what solution you ended up with? It might be possible to do it faster if the 10 minutes isn't just the time it takes to build and deploy the app.

    Best,
    Rune

  3. 3 Posted by Kef on 26 Jul, 2017 12:08 PM

    Kef's Avatar

    So in GitLab, if you go to Project -> Settings -> Repository you will find an option to push to another repo the latest commits. The proplem is that this service is a scheduled one and not instantaneous, so it takes between 10-15 minutes for my app to completely deploy, knowing that if I push directly to appharbor it would take less than a minute. But yeah, that's pretty much what I did.

    Another thing to remember is to put the password after the username in the appharbor repo url.

  4. Support Staff 4 Posted by rune on 18 Aug, 2017 03:23 AM

    rune's Avatar

    Hi,

    Apologies for the slow response -- and thanks for the heads up about how you've set this up! I took a look at the GitLab documentation, but as you said these pushes to remote repositories are scheduled and it doesn't seem possible to change the interval.

    It should however be possible to manually force an update every 5 minutes, so perhaps that's a reasonable solution for deployments that should be processed faster?

    Alternatively you might be able to make a simple "intermediate" service to bridge GitLab's WebHook API with AppHarbor's build API. As far as I can tell it's possible to download tarballs supported by AppHarbor by appending the archive format to the commit URL, and the service could use that along with other WebHook information to create build notifications compatible with AppHarbor.

    I'll also make sure to add this as a feature request, but I can't promise when/if it'll be officially supported. If you end up creating your own solution in the meantime you're more than welcome to share it here in case others want to use it :)

    Best,
    Rune

  5. 5 Posted by Kef on 18 Aug, 2017 02:10 PM

    Kef's Avatar

    Yeah I think it's possible to integrate GitLab's WebHook with AppHarbor's build API.
    But instead of doing this I just found it easier to add two push URL's to my git repo. AppHarbor's and GitLab's. That way I can push to both services at the same time, but not really sure whether this will have implications in the future or not.

  6. Support Staff 6 Posted by rune on 23 Aug, 2017 09:44 PM

    rune's Avatar

    Hi,

    That sounds like a reasonable workaround -- I don't think there are any significant implications to doing so, and in fact it might be better than relying in GitLab's repository syncing feature. In particular I'm not sure how GitLab would handle a scenario where pushing to your AppHarbor repository would result in an error or require a force-push. When you push the repository to AppHarbor manually you'll at least see any relevant warnings and can determine how to best resolve it!

    If you do experience any issues with this feel free to reach out!

    Best,
    Rune

  7. rune closed this discussion on 23 Aug, 2017 09:44 PM.

Discussions are closed to public comments.
If you need help with AppHarbor please start a new discussion.

Keyboard shortcuts

Generic

? Show this help
ESC Blurs the current field

Comment Form

r Focus the comment reply box
^ + ↩ Submit the comment

You can use Command ⌘ instead of Control ^ on Mac