Pipeline (with Git) NOT honoring options?

50 views
Skip to first unread message

ZillaYT

unread,
Aug 16, 2018, 10:16:26 AM8/16/18
to Jenkins Users
Jenkins v2.107.2

We are have a Jenkins Pipeline job set up this way
  • Pipeline script from SCM
  • SCM: Git
  • Repositories: (Set up appropriately and correctly using SSH)
  • Additional Behaviors
    • Clean before checkout
    • Advanced clone behaviours
      • Fetch tags: unchecked
      • Honor refspec on initial clone: unchecked
      • Shallow clone: checked
      • Shallow clone depth: 1
      • Path of reference repo during clone: (blank)
      • Timeout in minutes for clone and fetch operations: 30
    • Advanced checkout behaviors:
      • Timeout (in minutes) for checkout operation: 30
However, it seems like NONE of the "Advance..." options are used. I get the following. See where it time out after 10 minutes instead of 30 as specified in the options? Also, I unchecked "Fetch tags" but it's still fetching tags? I thought this was fixed?

Checking out git@bitbucket.org:project/repo.git, branch=dont-merge-test-build-only
[Pipeline] checkout
Cloning the remote Git repository
Cloning repository git@bitbucket.org:project/repo.git
 
> git init /home/jenkins/workspace/Utilities/test-project-build-only/libLoader # timeout=10
Fetching upstream changes from git@bitbucket.org:project/repo.git
 
> git --version # timeout=10
using GIT_SSH to set credentials Bitbucket credentials
 
> git fetch --tags --progress git@bitbucket.org:project/repo.git +refs/heads/*:refs/remotes/origin/*
ERROR: Timeout after 10 minutes
ERROR: Error cloning remote repo 'origin'
hudson.plugins.git.GitException: Command "git fetch --tags --progress g...@bitbucket.project/repo.git +refs/heads/*:refs/remotes/origin/*" returned status code 128:
stdout:
stderr: Warning: Permanently added 'bitbucket.org,xxx.xxx.xxx.xxx' (RSA) to the list of known hosts.




 

ZillaYT

unread,
Aug 16, 2018, 11:12:10 AM8/16/18
to Jenkins Users
Wait, I think the above Git output is via this code. How can I pass no-tag fetch, shallow fetch, and timeout options to the fromGit() call?

stage('Loading Base Pipeline') {
        pipeline = fileLoader.fromGit(jenkinsPipeline, gitPath, gitBranch, gitCredentialsId, jenkinsNode)
    }
Reply all
Reply to author
Forward
0 new messages