jenkinsci / jenkinsci/gitlab-plugin
Variables targetSourceBranch not showing on second node
- Dominant language
- Java
- Stars
- 1.4k
- Forks
- 615
- Avg merge
- 4h 32m
- Merged PRs (30d)
- 10
Description
## Issue
I have a working Gitlab -> Jenkins integration working for 1 node. The variables (for eg. `gitlabBranch`) are being read by Jenkins and they also show in the Groovy script in the Build Environment.
However, I want to build on 2 different nodes which I have enabled with `This project is parameterized` in Jenkins and Node variable. When the webhook triggers the build, the builds on node1 and node2 start. However, I see that the variables are being only read on the 1st node, and they are showing as null on the 2nd machine.
I suspect, the variables are not being forwarded to the 2nd nodes. Is this a misconfiguration or does the gitlab-plugin not support it?
### Context
- **Gitlab plugin version**:1.5.12
- **Gitlab version**: 11.10.4-ee
- **Jenkins version**: 2.187
- **Job type**: Freestyle
### Problem description
I would like to trigger builds from the targetSourceBranch when there is a Merge Request or a Push Request from GitLab. It has been working well when I trigger the webhook on 1 node.
I would like to trigger the build on 2 nodes (Windows and Linux). However, the variables are being seen on only the first node. And the variables (particularly the `targetSourceBranch`) are showing as null on the second node. This causes it to build on the wrong branch.
I am currently not using PipeLine as we would have to change a lot of things on the build system.
Is there a way to forward the variables to the second node? If not, do you have any other alternatives?
Contributor guide
Assessment
This issue has not been assessed yet.