Skip to content

Make Jenkins->GitLab workflow discoverable

Omar Bickell requested to merge obicke-master-patch-40d8 into master

What does this MR do and why?

TL;DR We have many customers that want to trigger CI pipelines from Jenkins (e.g. to run Security Scans) and while this is possible AFAIK, it certainly is not easily discoverable, to the point that many people think it isn't possible. It would be great to document the options here, thereby providing another bridge for GitLab CI adoption, particularly for orgs with significant legacy Jenkins implementations.

When Googling for "Jenkins" and "GitLab", the only docs that came up in the first page (as of October 10th) are related to how GitLab can trigger Jenkins builds (GitLab->Jenkins) . Nothing comes up about the other way around, i.e. having Jenkins trigger GitLab pipelines (Jenkins->GitLab). Moreover, the GitLab->Jenkins integration explicitly states that it is useful when "You plan to migrate your CI from Jenkins to GitLab CI/CD in the future, but need an interim solution". Even customers that love GitLab and have committed to using an All GitLab approach for all new projects often balk at the prospect of migrating their legacy Jenkins projects/processes.

IMHO, the Jenkins->GitLab approach could help these customers add cherry-picked CI jobs to those Jenkins-based projects/processes, thereby incrementally adopting GitLab's bells and whistles without having to formally adopt "a plan" to migrate everything. The more of their processes incorporate GitLab CI, or are assimilated by GitLab CI, and the more Jenkins developers are exposed to GitLab CI, the more we help motivate, and lower the bar for, an eventual whole hog migration.

As far as I understand it is possible to trigger a Gitlab pipeline from Jenkins, using the Pipeline Trigger API endpoint within the Jenkins job and a pipeline trigger token to authenticate that API call (https://docs.gitlab.com/ee/ci/triggers/), and checking the results in Jenkins once the API call hit. However, this is not easy to discover, and would benefit from:

  • the addition of a word/sentence about "Jenkins" on those pages (not mentioned at all there)
  • creating a dedicated page for "Triggering GitLab Pipeline from Jenkins"
  • adding a section somewhere about the various strategies, i.e. "whole hog vs. incremental", and the different incremental approaches (Jenkins->GitLab vs. GitLab->Jenkins)

This addresses the first of those bullets.

Related issues

!136892 (merged)

Author's checklist

If you are a GitLab team member and only adding documentation, do not add any of the following labels:

  • ~"frontend"
  • ~"backend"
  • ~"type::bug"
  • ~"database"

These labels cause the MR to be added to code verification QA issues.

Reviewer's checklist

Documentation-related MRs should be reviewed by a Technical Writer for a non-blocking review, based on Documentation Guidelines and the Style Guide.

If you aren't sure which tech writer to ask, use roulette or ask in the #docs Slack channel.

  • If the content requires it, ensure the information is reviewed by a subject matter expert.
  • Technical writer review items:
    • Ensure docs metadata is present and up-to-date.
    • Ensure the appropriate labels are added to this MR.
    • Ensure a release milestone is set.
    • If relevant to this MR, ensure content topic type principles are in use, including:
      • The headings should be something you'd do a Google search for. Instead of Default behavior, say something like Default behavior when you close an issue.
      • The headings (other than the page title) should be active. Instead of Configuring GDK, say something like Configure GDK.
      • Any task steps should be written as a numbered list.
      • If the content still needs to be edited for topic types, you can create a follow-up issue with the docs-technical-debt label.
  • Review by assigned maintainer, who can always request/require the reviews above. Maintainer's review can occur before or after a technical writer review.
Edited by Omar Bickell

Merge request reports