•  
      epic #12270 Gitlab integration
    Summary
    Gitlab integration
    Empty
    Canceled

    Overview

    Gitlab is a very good tool that does a decent job at git and especially CI. It might be usefull to keep the full tracability end-to-end from requirements to code & tests & delivers even across the tools.

    For organisations where developers are pushing to use gitlab, this integration is an answer to keep other part of the team (project management, QA, etc) interacting with them and have a common workflow.

    Why would you keep maintaining Tuleap Git if you integrate gitlab (or github..) ?

    That's an excellent question. There are couple of reasons why

    • Tuleap Git does also a quite decent job too and people are already enjoying it. They might not need for the extra features gitlab provides or the tradeoff of changing from one known tool to 2 tools is not worth it.
    • Tuleap Git has features Gitlab doesn't have like tight integration with gerrit.
    • From IT standpoint, if there is no need for gitlab it avoids having to maintain 2 different services (Tuleap & Gitlab).

    Functional overview

    Functionally speaking there are several steps of integration

    1. Being able to have a continuity from Tuleap to Gitlab / git part. The project management (think Scrum / Kanban items) can be done with Tuleap and developers references that in their commits. So tasks / stories / ... are linked to code.
    2. Being able to have continuity from Gitlab to Tuleap. If the tracability journey starts from the code, it should be easy to go from commits to tasks / stories.
    3. More "tight" integration between the 2 tools (like Tuleap being able to list gitlab groups repositories, gitlab referencing directly Tuleap issue tracker, etc).
    4. Broader integration between the 2 tools. Current strategy is centered around "Tuleap does the artifact thing and Gitlab does the git/ci thing" but their might be other scenario to consider.

    Referencing Tuleap artifacts in gitlab git commits

    • Leverage gitlab push webhook to be consumed by Tuleap
      • Tuleap exposes a new end point to be configured in gitlab
      • At each push on gitlab, Tuleap consume the webhook payload and extract the references
      • Tuleap can they create references in the corresponding artifacts to point toward gitlab commits
      • This could be used with any kind of reference in tuleap (artifact, wiki, documents, etc)
      • Bonus: should work with github as well
    • Automatically change things in Tuleap from gitlab
      • Introduce "reference branch" and "action key works" in Tuleap
      • Hence usage of pattern like "close art #123" would actually change the status of art 123 when merged  into reference branch (master)
    • Reference external repositories
      • a Tuleap git repo could reference a gitlab repo or
      • a Tuleap project could match a gitlab organization/group

    Referencing Tuleap elements in gitlab

    To be investigated: how to create links / ui integration in gitlab so art #123 (or another kind of pattern) would be recognized.

    Investigation should be done, we could reuse what's already done with jira in gitlab: https://gitlab.com/gitlab-org/gitlab-ce/blob/master/app/models/project_services/jira_service.rb

    State of the Art

    To find out what is possible to integrate between Tuleap and GitLab, we used the existing integration between Jira and GitLab.

    • From Jira, we need to install GitLab App. In this app, we can link some repositories GitLab (and create some GitLab web hooks automatically)
    • We can reference an artifact thanks to its id, for example:
      • Reference on a commit: "PROJECT-10 my commit message"
      • Reference on a branch: "PROJECT-10_my_branch_name"
    • In artifact view, we can have:
      • Branches (Branch's name (link to GitLab), Pull Request's status, button 'Create Pull Request')
        • Available only if a branch has an artifact id, or if a Pull Request was created with the artifact id in his commit message
      • Commits (Author (GitLab avatar), commit hash (link to GitLab), start of commit message, date, diff files)
      • Pull Request (ID (link to GitLab), Title, Status, Author, Reviewer, Date last update)
    • We can create some triggers to modify artifact status based on:
      • Commit
      • Pull Request (Created, Merged, Closed, reopen)
    • Use 'Smart Commit' (create actions from commit message):
      • Add artifact comment ("PROJECT-10 #comment my new comment")
      • Change artifact status ("PROJECT-10 #open", "PROJECT-10 #end_of_life", ...)
      • Add times on timetracking ("PROJECT-10 #time 1w 2d 3h 4m")
    • References in GitLab to a Jira Issue
    Empty
    Details
    #12270
    Manuel Vacelet (vaceletm)
    2021-02-03 19:31
    2018-09-13 17:27
    Attachments
    Empty
    References
    Referencing epic #12270
    Referenced by epic #12270

    Follow-ups

    User avatar
    • Description
      Something went wrong, the follow up content couldn't be loaded
      Only formatting have been changed, you should switch to markup to see the changes
    User avatar
    • Description
      Something went wrong, the follow up content couldn't be loaded
      Only formatting have been changed, you should switch to markup to see the changes
    User avatar
    • Description
      Something went wrong, the follow up content couldn't be loaded
      Only formatting have been changed, you should switch to markup to see the changes
    User avatar
    • Description
      Something went wrong, the follow up content couldn't be loaded
      Only formatting have been changed, you should switch to markup to see the changes