jenkinsci / jenkinsci/scm-api-plugin

[JENKINS-52916] Cannot use git pull using jenkine pipeline script

Open
#410 0 comments 0 reactions 0 assignees View on GitHub
component:scm-api-plugin imported-jira-issue jira-type:task priority:major resolution:unresolved
Dominant language
Java
Stars
33
Forks
87
PR merge metrics
No merged PRs in 30d

Description

I am unable to pull the code from git while using Jenkins pipeline script. We have tried multiple scenarios but every time it clones from the repository

 

Right Now we are using GITSCM:

checkout([ $class: 'GitSCM',branches: [[name: "develop"]],

poll:true,

doGenerateSubmoduleConfigurations: false,

extensions: [[$class: 'LocalBranch', localBranch: '**']],

submoduleCfg: [],

userRemoteConfigs: [[url: "https://IDT.git", credentialsId: "abe-efg-2dfr"]]])

 

The script clones but it doesn't pull the latest code. Could you please advise how we can pull the latest code via GitScm in jenkins pipeline project?

 

Regards

Nick

 

 

 

---
Originally reported by ngarwal01, imported from: Cannot use git pull using jenkine pipeline script


  • status: Open
  • priority: Major
  • component(s): scm-api-plugin
  • resolution: Unresolved
  • votes: 0
  • watchers: 1
  • imported: 20251223-222157

Raw content of original issue

I am unable to pull the code from git while using Jenkins pipeline script. We have tried multiple scenarios but every time it clones from the repository

 

Right Now we are using GITSCM:
checkout([ $class: 'GitSCM',branches: [[name: "develop"]],

poll:true,

doGenerateSubmoduleConfigurations: false,

extensions: [[$class: 'LocalBranch', localBranch: '**']],

submoduleCfg: [],

userRemoteConfigs: [[url: "https://IDT.git", credentialsId: "abe-efg-2dfr"]]])

 

The script clones but it doesn't pull the latest code. Could you please advise how we can pull the latest code via GitScm in jenkins pipeline project?

 

Regards

Nick

 

 

 

Contributor guide

Open the contributing guide

Research direction

No source file or test is named. Start by reproducing the reported GitSCM checkout with the shown pipeline configuration and determine whether the `develop` branch receives the latest code. Done means identifying a reproducible plugin behavior or documenting that the configuration is working as intended.

Written by the indexing model from the issue text.

Assessment

Tech stack
git, java
Domain
backend, tooling
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
20/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.