<h2>Configure webhooks in GitLab manually</h2><br/><div style="overflow-x:auto"> <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"><head><meta content="text/html; charset=UTF-8" /><meta name="copyright" content="(C) Copyright 2024" /><meta name="DC.rights.owner" content="(C) Copyright 2024" /><meta name="generator" content="DITA-OT" /><meta name="DC.type" content="task" /><meta name="DC.title" content="Configure webhooks in GitLab manually" /><meta name="abstract" content="Configure webhooks in GitLab manually to send job and push notifications to the DevOps application." /><meta name="description" content="Configure webhooks in GitLab manually to send job and push notifications to the DevOps application." /><meta name="DC.relation" scheme="URI" content="../../../product/enterprise-dev-ops/concept/gitlab-integration-dev-ops.html" /><meta name="DC.relation" scheme="URI" content="../../../product/enterprise-dev-ops/concept/dev-ops-bundle-landing-page.html" /><meta name="DC.relation" scheme="URI" content="../../../product/enterprise-dev-ops/concept/devops-landing-page-new.html" /><meta name="DC.relation" scheme="URI" content="../../../product/enterprise-dev-ops/concept/integrating-devops-change-with-third-party-tools.html" /><meta name="DC.creator" content="Mayuram Borthakur" /><meta name="DC.creator" content="Lisa Hultman" /><meta name="DC.creator" content="ServiceNow" /><meta name="DC.date.created" content="2023-08-03" /><meta name="DC.date.modified" content="2024-02-01" /><meta name="DC.format" content="XHTML" /><meta name="DC.identifier" content="configure-webhooks-in-gitlab" /><link rel="stylesheet" type="text/css" href="../../../CSS/commonltr.css" /><title>Configure webhooks in GitLab manually</title></head><body id="configure-webhooks-in-gitlab"> <div class="breadcrumb"><a class="link" href="../../../product/enterprise-dev-ops/concept/dev-ops-bundle-landing-page.html" title="Use the ServiceNow DevOps application with your DevOps toolchain to provide data insights, accelerate change, increase development performance, validate configuration data, and increase the visibility of your DevOps environment using a single system.">DevOps</a> > <a class="link" href="../../../product/enterprise-dev-ops/concept/devops-landing-page-new.html" title="With ServiceNow DevOps Change Velocity, you can import data from your DevOps tool chain to the ServiceNow platform and deliver changes faster without sacrificing compliance.">DevOps Change Velocity</a> > <a class="link" href="../../../product/enterprise-dev-ops/concept/integrating-devops-change-with-third-party-tools.html" title="Integrate your orchestration, planning, coding, artifact, software quality, and security tools with DevOps Change Velocity for end to end change traceability and automation.">Integrating DevOps Change Velocity with third-party tools</a> > </div> <h1 class="title topictitle1" id="ariaid-title1">Configure webhooks in <span class="ph">GitLab</span> manually</h1> <div class="body taskbody"><p class="shortdesc">Configure webhooks in <span class="ph">GitLab</span> manually to send job and push notifications to the <span class="ph">DevOps</span> application.</p> <div class="section prereq p" id="configure-webhooks-in-gitlab__prereq_ffv_y21_bxb"> <div class="p">Role required:<ul class="ul" id="configure-webhooks-in-gitlab__ul_jsm_tdk_51c"><li class="li">sn_devops.admin or sn_devops.tool_owner in <span class="ph">DevOps Change Velocity</span></li><li class="li"><span class="ph">GitLab</span> admin</li></ul> </div> </div> <div class="section context" id="configure-webhooks-in-gitlab__context_mvr_ld1_gmb"> <div class="p">Create webhooks for the following two triggers in <span class="ph">GitLab</span> for every project you want to track.<ul class="ul" id="configure-webhooks-in-gitlab__ul_xvm_zd1_gmb"><li class="li">Push events (code capability)</li><li class="li">Job events (code capability)</li></ul> </div> <p class="p">You can also access manual configuration from the <span class="ph">GitLab</span> tool record in <span class="ph">DevOps Change Velocity</span>.</p> </div> <ol class="ol steps" id="configure-webhooks-in-gitlab__steps_gfv_y21_bxb"><li class="li step stepexpand"> <span class="ph cmd">In <span class="ph">GitLab</span>, navigate to <span class="ph menucascade"><span class="ph uicontrol">Project</span> > <span class="ph uicontrol">Settings</span> > <span class="ph uicontrol">Webhooks</span></span> and add a webhook.</span> </li><li class="li step stepexpand"> <span class="ph cmd">In <span class="ph">DevOps Change Velocity</span>, choose <span class="ph uicontrol">Configure manually</span> when configuring the tool instance to send data.</span> <div class="itemgroup info"> <p class="p"><img class="image" id="configure-webhooks-in-gitlab__image_hw1_w2n_2yb" src="../image/gitlab-connect-workspace-4.png" height="543" width="794" alt="GitLab configure webhooks manually." /></p> <div class="p"> <div class="note"><span class="notetitle">Note:</span> You can also access manual configuration from the <span class="ph">GitLab</span> tool record in <span class="ph">DevOps Change Velocity</span>. From the tool record, select <span class="ph menucascade"><span class="ph uicontrol">Configure</span> > <span class="ph uicontrol">Configure manually</span></span>.</div> </div> </div> </li><li class="li step stepexpand"> <span class="ph cmd">Copy the <span class="ph uicontrol">Webhook URL</span> field from <span class="ph">DevOps Change Velocity</span> connection details for <span class="ph">GitLab</span>.</span> <div class="itemgroup info"> <div class="p"> <div class="note"><span class="notetitle">Note:</span> Select <span class="ph uicontrol">Copy</span> in the appropriate field to copy the value to your clipboard. The field label changes to <span class="ph uicontrol">Copied</span>, but you can copy multiple times.</div> </div> <p class="p"><img class="image" id="configure-webhooks-in-gitlab__image_v3k_4nv_v1c" src="../image/gitlab-manual-webhooks-4.png" height="433" width="749" alt="Copy webhook details." /></p> </div> </li><li class="li step stepexpand"> <span class="ph cmd">Modify the copied Webhook URL to reflect your tool details, and paste the URL in <span class="ph">GitLab</span>.</span> <div class="itemgroup info"> <p class="p">For example:</p> <p class="p">https://<your instance>.service-now.com/api/sn_devops/v2/devops/tool/{code | plan | artifact | orchestration | test | softwarequality }?toolId=<your ToolId></p> </div> <ol type="a" class="ol substeps" id="configure-webhooks-in-gitlab__substeps_ibv_bwf_2yb"><li class="li substep substepexpand"> <span class="ph cmd">Select one of the tool capabilities {code | plan | artifact | orchestration | test | softwarequality } to match your tool.</span> <div class="itemgroup info">For example:<p class="p">https://<your instance>.service-now.com/api/sn_devops/v2/devops/tool/orchestration?toolId=<your ToolId></p> </div> </li><li class="li substep substepexpand"> <span class="ph cmd">Copy the modified Webhook URL to the <span class="ph uicontrol">URL</span> field of the new webhook in your <span class="ph">GitLab</span> instance.</span> </li></ol> </li><li class="li step stepexpand"> <span class="ph cmd">Copy the <span class="ph uicontrol">Secret token</span> field from the ServiceNow instance connection details for <span class="ph">GitLab</span>, and paste in the <span class="ph uicontrol">Secret Token</span> field of the new webhook in your <span class="ph">GitLab</span> instance.</span> <div class="itemgroup info"> <div class="tablenoborder"><table cellpadding="4" cellspacing="0" summary="" id="configure-webhooks-in-gitlab__table_s3f_3wn_dyb" class="table" frame="border" border="1" rules="all"><caption><span class="tablecap"><span class="table--title-label">Table 1. </span>Copy field values</span></caption><colgroup><col style="width:39.370078740157474%" /><col style="width:60.629921259842526%" /></colgroup><thead class="thead" style="text-align:left;"><tr class="row"><th class="entry cellrowborder" style="vertical-align:top;" id="d58763e281">From <span class="ph">DevOps Change Velocity</span></th><th class="entry cellrowborder" style="vertical-align:top;" id="d58763e286">To <span class="ph">GitLab</span></th></tr></thead><tbody class="tbody"><tr class="row"><td class="entry cellrowborder" style="vertical-align:top;" headers="d58763e281 ">Webhook URL (modified)</td><td class="entry cellrowborder" style="vertical-align:top;" headers="d58763e286 ">URL</td></tr><tr class="row"><td class="entry cellrowborder" style="vertical-align:top;" headers="d58763e281 ">Secret token</td><td class="entry cellrowborder" style="vertical-align:top;" headers="d58763e286 ">Secret Token</td></tr></tbody></table> </div> </div> </li><li class="li step stepexpand"> <span class="ph cmd">Select the check boxes for <span class="ph uicontrol">Push events</span>, <span class="ph uicontrol">Tag push events</span>, <span class="ph uicontrol">Comments</span>, and <span class="ph uicontrol">Merge request events</span>.</span> <div class="itemgroup info"> <p class="p"><img class="image" id="configure-webhooks-in-gitlab__image_brs_mpv_v1c" src="../image/gitlab-manual-webhooks-5.png" height="720" width="687" alt="GitLab push events." /></p> </div> </li><li class="li step stepexpand"> <span class="ph cmd">Select <span class="ph uicontrol">Add webhook</span>.</span> </li><li class="li step stepexpand"> <span class="ph cmd">Repeat the procedure to create a webhook for job events in <span class="ph">GitLab</span>.</span> <div class="itemgroup info"> <p class="p">Select the check boxes for <span class="ph uicontrol">Job events</span> and <span class="ph uicontrol">Pipeline events</span>.</p> <p class="p"><img class="image" id="configure-webhooks-in-gitlab__image_l5z_bqv_v1c" src="../image/gitlab-manual-webhooks-6.png" height="720" width="686" alt="GitLab job events." /></p> </div> </li><li class="li step stepexpand"> <span class="ph cmd">Select <span class="ph uicontrol">Add webhook</span>.</span> <div class="itemgroup info"> <p class="p"><span class="ph">GitLab</span> webhooks for <span class="ph">DevOps Change Velocity</span> integration:</p> <p class="p"><img class="image" id="configure-webhooks-in-gitlab__image_yfp_vlv_v1c" src="../image/gitlab-manual-webhooks-3.png" alt="Webhooks configured in GitLab." /></p> </div> </li></ol> </div> <div class="related-links"> <div class="familylinks"> <div class="parentlink"><strong>Parent Topic:</strong> <a class="link" href="../../../product/enterprise-dev-ops/concept/gitlab-integration-dev-ops.html" title="Connect to your GitLab instance to discover repositories and pipeline definitions and configure real-time notifications or polling to enable change traceability and automation.">GitLab integration with DevOps Change Velocity</a></div> </div> </div></body></html></div>