jenkinsci / jenkinsci/workflow-multibranch-plugin

[JENKINS-71143] Pipeline code is not synced to pinned label in multibranch pipelines

Open
#544 1 comment 0 reactions 0 assignees View on GitHub
component:p4-plugin component:workflow-multibranch-plugin imported-jira-issue priority:major resolution:unresolved
Dominant language
Java
Stars
87
Forks
131
PR merge metrics
No merged PRs in 30d

Description

Apologies in advance if this is the wrong expectation but I haven't found much documentation on this feature so any help with workarounds would be appreciated. 

Expectation: When configuring a perforce-based multibranch pipeline to use a pinned label (which is ideally set based on a job parameter), a branch's pipeline groovy code should also sync to the revision tagged within that label. ie. "Release.jenkinsfile#8" is tagged in the pinned label, so when running the associated pipeline in Jenkins using that label, it will run the #8 revision of the pipeline.

Actual: The pipeline will always run the latest revision of the pipeline even when a label is pinned, either hardcoded or parameterized.

 

This is problematic if features/platforms/compilers are added or removed in the same branch, for example, we added a new feature to the latest revision which should not be triggered when using the old label since that feature didn't exist at the time, and so will always fail the pipeline.

This breaks the reproducibility of our releases so I am hoping this is an unintended bug and not a design flaw. If there is another way to do what I'm expecting please let me know. 

 

Thanks,

Rob

 

---
Originally reported by robmcgee, imported from: Pipeline code is not synced to pinned label in multibranch pipelines


  • assignee: mjdetullio
  • status: Open
  • priority: Major
  • component(s): p4-plugin, workflow-multibranch-plugin
  • label(s): multi-branch, p4-plugin
  • resolution: Unresolved
  • votes: 0
  • watchers: 1
  • imported: 20251212-090250

Raw content of original issue

Apologies in advance if this is the wrong expectation but I haven't found much documentation on this feature so any help with workarounds would be appreciated. 

Expectation: When configuring a perforce-based multibranch pipeline to use a pinned label (which is ideally set based on a job parameter), a branch's pipeline groovy code should also sync to the revision tagged within that label. ie. "Release.jenkinsfile#8" is tagged in the pinned label, so when running the associated pipeline in Jenkins using that label, it will run the #8 revision of the pipeline.

Actual: The pipeline will always run the latest revision of the pipeline even when a label is pinned, either hardcoded or parameterized.

 

This is problematic if features/platforms/compilers are added or removed in the same branch, for example, we added a new feature to the latest revision which should not be triggered when using the old label since that feature didn't exist at the time, and so will always fail the pipeline.

This breaks the reproducibility of our releases so I am hoping this is an unintended bug and not a design flaw. If there is another way to do what I'm expecting please let me know. 

 

Thanks,

Rob

 

environment

```
Jenkins 2.387.2 running on Linux 5.10.173-154.642.amzn2.x86_64 (Docker)

OpenJDK 11.0.18+10

Plugins:

P4 Plugin 1.14.0

Pipeline: Multibranch 733.v109046189126
```

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.