jenkinsci / jenkinsci/scm-api-plugin
[JENKINS-52916] Cannot use git pull using jenkine pipeline script
- 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
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
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