Questions tagged [jenkins-git-plugin]

37 questions
8
votes
2 answers

How to cleanup pipeline before checkout of repository in Jenkinsfile

I want to make a clean before checkout operation which is described in Jenkins git plugin documentation: Clean before checkout Clean the workspace before every checkout by deleting all untracked files and directories, including those which are…
3
votes
0 answers

Jenkins Git pligin slow checkout

I doing clone outside of Jenkins into some shared folder using LSF workload management platform by IBM Or let’s say I doing clone manually from command line Then I want to pull newer changes (commits) and checkout branch using GIT plugin It works,…
OlegIs
  • 41
  • 2
2
votes
1 answer

Jenkins Git plugin is not fetching commits in submodules

I have a Git repository abc.git containing submodules in it. We have a Jenkins job that is used to build abc.git repository. The Jenkins job uses the GitSCM plugin to check out the code and do the build. Below is the plugin configuration that is…
2
votes
1 answer

Jenkinsfile: Sparse checkout leaves no entry on working directory

I am writing a Jenkins pipeline. It checks out from repo A first and should later on build and test the code. But for this, I need a certain directory from a different repository (repo B). So I have a first pipeline step checkout([$class: 'GitSCM']…
1
vote
1 answer

How to make jenkins checkout code into a separate directory, without the .git folder?

I'm a very new Jenkins user. I am running the latest stable jenkins version, installed on Windows. I have a pipeline job that checks out code to our test site when someone makes a commit. Right now the step of copying files from the workspace to the…
Ryan Stille
  • 1,364
  • 1
  • 13
  • 19
1
vote
0 answers

Jenkins - restarting a pipeline on a different node fails on 'git checkout' (git plugin)

There is a job that gets triggered on pull request creation or update. I do not have the permissions to edit the job itself. Sometimes it will fail due to network connection problems, timeouts, etc. In this case I'd like to be able to restart the…
wquinoa
  • 122
  • 8
1
vote
0 answers

Included Excluded region in Jenkins with Bitbucket server checkout

I want to understand how include region and exclude region works for GIT Plugin For my jenkins job setup, I have BitBucket server SCM checkout set and I am added an included path. This is the only path for which I want to trigger a build. However,…
iDev
  • 2,163
  • 10
  • 39
  • 64
1
vote
1 answer

wrapper for git, for jenkins pipeline, on windows 10 jenkins slave

What I am trying to accomplish - I want to have a wrapper for git itself, that will retry if the git command fails (timeout/network issue). I have following dummy code of wrapper: "C:\Program Files\Git\cmd\git.exe" %* echo Success! After changing…
Wojtas.Zet
  • 636
  • 2
  • 10
  • 30
1
vote
2 answers

Jenkins git checkout freezing on credentials for LFS

I have a MultiBranch Pipeline based off a Jenkins file which explicitly clones another repository provided by parameters. I'm seeing that the it is freezing, and timing out, after attempting to ask for credentials for git-lfs as part of git checkout…
Cirrith
  • 147
  • 11
1
vote
0 answers

Jenkins withCredentials gitUsernamePassword GIT issue

I have an issue with pushing to repo using jenkins git plugin. I'm using withCredentials([gitUsernamePassword(credentialsId: 'id')]) I'm have credentials looks like user@support.com, so then I'm trying to push I see an error Authentication failed…
Aleksei
  • 11
  • 3
1
vote
0 answers

Jenkinsfile: how can I checkout branch instead of refs/heads/branch?

The following Jenkinsfile: pipeline { agent any stages { stage( "1" ) { steps { script { def br = "demo_branch" def clone_url = "ssh://git@server.com:7999/spc/my_prj.git" def cred_id =…
StoneThrow
  • 5,314
  • 4
  • 44
  • 86
1
vote
0 answers

Can we checkout a specific submodule from the submodules list in Jenkins?

My use case is that I would like to keep a list of submodules in .gitmodule. However, I will need each submodule separately while building my package. example let say below is the content of my .gitmodule file. [submodule "submodule1"] path…
SHC
  • 487
  • 1
  • 6
  • 19
1
vote
1 answer

List of branches in GitSCM checkout step?

I started investigating the GitSCM class in Jenkins, so I see the parameters it takes in the constructor. There's only one thing I don't understand: The branches parameter is of type: List branches. My question is: why does it take a…
1
vote
1 answer

Jenkins Git Publish fails when pushing a branch; no stderror shown

Our build includes a local shell command creating a local git branch based on the parameter that starts the build. After copying the files to their destination the goal is to push the new branch to the repository so that if there are future updates…
1
vote
1 answer

Command "git lfs pull origin" returned status code 1; stderr: git: 'lfs' is not a git command

Installed the git-lfs on our mac slaves and followed the artical at https://medium.com/@priya_talreja/git-lfs-setup-in-jenkins-ee80879007e3. to build jenkins job we are getting the following error: Git LFS initialized. xxxx xxxx xxxx Enabling…
sai kumar
  • 113
  • 2
  • 9
1
2 3