Skip to content

Commit

Permalink
Seed jobs can not clone repositories which contain lfs files.
Browse files Browse the repository at this point in the history
We now add GitLFS pull after checkout behaviour in order to support also repositories which are relying on Git LFS.

Closes jenkinsci#482
  • Loading branch information
rcosnita committed Dec 26, 2020
1 parent d6b10c6 commit 1131db4
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion pkg/configuration/user/seedjobs/seedjobs.go
Original file line number Diff line number Diff line change
Expand Up @@ -79,6 +79,7 @@ import hudson.plugins.git.BranchSpec;
import hudson.plugins.git.GitSCM;
import hudson.plugins.git.SubmoduleConfig;
import hudson.plugins.git.extensions.impl.CloneOption;
import hudson.plugins.git.extensions.impl.GitLFSPull;
import javaposse.jobdsl.plugin.ExecuteDslScripts;
import javaposse.jobdsl.plugin.LookupStrategy;
import javaposse.jobdsl.plugin.RemovedJobAction;
Expand All @@ -92,7 +93,10 @@ def jobDslSeedName = "{{ .ID }}-{{ .SeedJobSuffix }}";
def jobRef = jenkins.getItem(jobDslSeedName)
def repoList = GitSCM.createRepoList("{{ .RepositoryURL }}", "{{ .CredentialID }}")
def gitExtensions = [new CloneOption(true, true, ";", 10)]
def gitExtensions = [
new CloneOption(true, true, ";", 10),
new GitLFSPull()
]
def scm = new GitSCM(
repoList,
newArrayList(new BranchSpec("{{ .RepositoryBranch }}")),
Expand Down

0 comments on commit 1131db4

Please sign in to comment.