Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Pipeline status is not returning to GitLab when "custom script" is used in Build Configuration #395

Open
prasad-clouduser opened this issue Jan 31, 2024 · 1 comment
Labels
bug Something isn't working

Comments

@prasad-clouduser
Copy link

Jenkins and plugins versions report

Environment
Paste the output here

What Operating System are you using (both controller, and any agents involved in the problem)?

PIC
RHEL

Reproduction steps

  1. Used "Custom Script" in Mode field of Build Configuration in Multi Branch Pipeline.
  2. Ran the pipeline and able to execute it successfully and but pipeline is not returning the status.
  3. Pipeline status in GitLab in Pending state. Actually it should be showing as success but not in this case.
  4. Attached screenshot for reference.
    customScript

Expected Results

Pipeline status in GitLba should be showing as success and allow MR to merge with target branch.

Actual Results

Not returning pipeline status from Jenkins to GitLab. pipeline status in GitLab is in stuck state.
PIC

Anything else?

No response

Are you interested in contributing a fix?

No response

@fidelski
Copy link

fidelski commented Jun 5, 2024

This does not only happen when using a custom script, it also happens when using a multibranch pipeline.

...
Triggered by GitLab Merge Request #140: handle-error-on-output => master
...
[GitLab Pipeline Status] Notifying merge request build status: RUNNING brmp/MR-140 #1: Build started...
[Pipeline] }
[Pipeline] // stage
[Pipeline] withEnv
...
[Pipeline] End of Pipeline
[GitLab Pipeline Status] Notifying merge request build status: SUCCESS brmp/MR-140 #1: This commit looks good.
Finished: SUCCESS

There is no [GitLab Pipeline Status] Notified after either the build started or the build finished.

[EDIT]
Problem solved: The problem was the API key, it was not having sufficient privilege. Weird though, since I accidentally gave additional rights to "api" (like "read_repository" etc.). Creating a new API key with solely "api" scope solved the problem.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants