Send status updates to hosted GitLab instances

@MartinStraub when we get to work on the built in support (meaning to do it without any Build Step) weā€™ll definitely support the self-hosted versions of the ā€œbig threeā€ (GitHub, Bitbucket, GitLab).

Might take a bit more time for Bitbucket as the self hosted version of Bitbucket (Bitbucket Server) is quite a bit different compared to bitbucket.org, in fact it wasnā€™t even called Bitbucket initially, it was Atlassian Stash (https://www.atlassian.com/blog/archives/atlassian-stash-enterprise-git-repository-management), and even to this day these have separate API, webhook etc. formats, while GitHub and GitLab self-hosted have the same API & other formats as the .com hosted versions.

In any case, a step for Bitbucket Server is definitely possible, similar to the existing GitHub Status (https://github.com/bitrise-steplib/steps-github-status) and GitLab Status (https://github.com/bitrise-steplib/steps-gitlab-status) steps. You can create a step if you have some time, itā€™s quite simple - a related recent blog post: https://blog.bitrise.io/how-to-create-and-share-your-own-bitrise-step

I didnā€™t know that existed. Why wasnā€™t the link posted earlier in this thread, itā€™s exactly matching the topic! :smiley:

Nevermind, Iā€™ll try it out and replace the entire stuff I mentioned above with it if it works. One question about it (I canā€™t find documentation on the Repo): How am I supposed to configure the step to send ā€œpendingā€ and ā€œrunningā€ states correctly? ā€œRunningā€ could probably be established by placing the step into my workflow twice, one at the beginning and one at the end. But what about ā€œpendingā€?

Well I just put the step at the beginning and end of my workflow. When it run at the beginning, the step passed successfully (green state with a checkmark) but I couldnā€™t find the ā€œrunningā€ state anywhere in GitLab. Iā€™d expect a ā€œRunning 1ā€ here in this screenshot:

Iā€™ll update you on the step at the end once the build has finishedā€¦

Hereā€™s the entire step output:

Config:
- APIURL: https://gitlab.example.com/api/v4
- PrivateToken: abcdefg
- RepositoryURL: git@gitlab.example.com/Customer/Project.git
- CommitHash: someHash
- PresetStatus: auto
|                                                                              |
+---+---------------------------------------------------------------+----------+
| āœ“ | gitlab-status                                                 | 7.79 sec |
+---+---------------------------------------------------------------+----------+

UPDATE: The step at the end didnā€™t work either. It passes but thereā€™s nothing on GitLab.

If you want to report anything else other than ā€œsuccess/errorā€ please set it in the step. As mentioned in the inputā€™s description ( https://github.com/bitrise-steplib/steps-gitlab-status/blob/920f7b1d320a2d5ccb99c48bc49a126a528420a2/step.yml#L55 ) :

Set Specific Status: If set, this step will set a specific status instead of reporting the current build status. If you select auto the step will send success status if the current build status is success (no step failed previously) and failed status if the build previously failed.

Meaning, with the default auto option the step will report either success or failed based on whether the build failed or not up to that point. It will not report ā€œpendingā€ or anything else, as it has no idea whether the step is the first or last step in the workflow. It can only know/detect whether a previous step failed or not, but canā€™t tell whether there will be 10+ other steps after it or 0.

Can you please create a #issues:steps-and-tool-issues report for this? Might be a configuration issue, or an actual step bug. Please donā€™t forget to include the related buildā€™s bitrise.io URL! :wink:

Hi everybody,

Thank you for requesting a feature.
Iā€™m pleased to inform you that the feature is implemented and itā€™s already released. :champagne::sunglasses:
You can find more information in our blogpost: https://blog.bitrise.io/introducing-gitlab-self-hosted-support-for-organizations
ā€¦and on our devcenter: https://devcenter.bitrise.io/adding-a-new-app/self-hosted-gitlab/