# Communication with giblab doesn't work when I use a shared library

**URL:** <https://community.jenkins.io/t/communication-with-giblab-doesnt-work-when-i-use-a-shared-library/35515>\
**Category:** Ask a question\
**Tags:** question\
**Created:** [August 28, 2025, 8:28am UTC](https://community.jenkins.io/t/communication-with-giblab-doesnt-work-when-i-use-a-shared-library/35515 "2025-08-28T08:28:09Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![confusedcapybara](https://avatars.discourse-cdn.com/v4/letter/c/50afbb/32.png) [@confusedcapybara](https://community.jenkins.io/u/confusedcapybara)\
**Post date:** [August 28, 2025, 8:28am UTC](https://community.jenkins.io/t/communication-with-giblab-doesnt-work-when-i-use-a-shared-library/35515/1 "2025-08-28T08:28:09Z")

</div>

Hello,

I have Jenkins for CI/CD and gitlab for code repo (both self hosted).

I’m using the gitlab plugin to update the pipeline status in gitlab. I’m also using web hooks.

I’ve created a shared library and confirmed that the CI/CD is working properly. However, it no longer updates the gitlab status.

For example, using the following script, everything works as expected. If I add “@Library(‘jenkins-shared-library’) \_” at the beginning of the file (or make the library load implicitly), it won’t update anything over gitlab.

```java
pipeline {
    agent any

    options {
        gitLabConnection('gitlab-connection')
        gitlabBuilds(builds: ['api-checkout'])
    }

    stages {
        stage('Checkout') {
            steps {
                updateGitlabCommitStatus name: 'api-checkout', state: 'running'
                checkout scm
            }
            post {
                success {
                    updateGitlabCommitStatus name: 'api-checkout', state: 'success'
                }
                failure {
                    updateGitlabCommitStatus name: 'api-checkout', state: 'failed'
                }
            }
        }
    }
    post {
        success {
            echo "✅ Successfully built and deployed"
        }
        failure {
            echo "❌ Build and deployment of failed"
        }
        always {
            echo "🧹 Cleaning up..."
            cleanWs()
        }
    }
} 

```
